content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
"""Authentication middleware
This module provides one piece of middleware named
``authkit.authenticate.middleware`` which is used to intercept responses with
a specified status code, present a user with a means of authenticating
themselves and handle the sign in process.
Each of the authentication methods supported... | [
37811,
47649,
3299,
3504,
1574,
198,
198,
1212,
8265,
3769,
530,
3704,
286,
3504,
1574,
3706,
220,
198,
15506,
18439,
15813,
13,
41299,
5344,
13,
27171,
1574,
15506,
543,
318,
973,
284,
15788,
9109,
351,
198,
64,
7368,
3722,
2438,
11,
... | 2.473449 | 7,156 |
from http.server import HTTPServer, BaseHTTPRequestHandler
from urllib.parse import parse_qs
import requests
import ssl
import sys
import tdameritrade.auth #added as40183
import urllib
import urllib3 #as40183
from sys import argv
import pymysql.cursors
import datetime
import dateutil.relativedelta
import ... | [
6738,
2638,
13,
15388,
1330,
38288,
18497,
11,
7308,
40717,
18453,
25060,
201,
198,
6738,
2956,
297,
571,
13,
29572,
1330,
21136,
62,
48382,
201,
198,
11748,
7007,
201,
198,
11748,
264,
6649,
201,
198,
11748,
25064,
201,
198,
11748,
415... | 2.077274 | 5,487 |
import os
import time
import datetime
import ref
import torch
import torch.utils.data
from opts import opts
from model.Pose3D import Pose3D
from datahelpers.dataloaders.fusedDataLoader import FusionDataset
from datahelpers.dataloaders.h36mLoader import h36m
from datahelpers.dataloaders.mpiiLoader import mpii
from dat... | [
11748,
28686,
198,
11748,
640,
198,
11748,
4818,
8079,
198,
198,
11748,
1006,
198,
11748,
28034,
198,
11748,
28034,
13,
26791,
13,
7890,
198,
6738,
2172,
82,
1330,
2172,
82,
198,
6738,
2746,
13,
47,
577,
18,
35,
1330,
37557,
18,
35,
... | 3.076923 | 195 |
#-----------------------------------------------------------------------------
#
# Paper: When Crowdsourcing Fails: A Study of Expertise on Crowdsourced
# Design Evaluation
# Author: Alex Burnap - aburnap@umich.edu
# Date: October 10, 2014
# License: Apache v2
# Descrip... | [
2,
10097,
32501,
198,
2,
220,
220,
220,
220,
220,
220,
198,
2,
220,
220,
220,
220,
220,
220,
14962,
25,
1649,
29452,
82,
29985,
376,
1768,
25,
317,
12481,
286,
25516,
786,
319,
29452,
82,
30555,
220,
198,
2,
220,
220,
220,
220,
... | 2.491853 | 1,657 |
# This script will accept a filename from the user and print the extension of that.
# If the script doesn't find a period in filename, then it'll display result accordingly.
# "not in" or "in" membership operator can be used with strings as well along with list, tuples.
# Need to check which additional other places can... | [
2,
770,
4226,
481,
2453,
257,
29472,
422,
262,
2836,
290,
3601,
262,
7552,
286,
326,
13,
198,
2,
1002,
262,
4226,
1595,
470,
1064,
257,
2278,
287,
29472,
11,
788,
340,
1183,
3359,
1255,
16062,
13,
198,
2,
366,
1662,
287,
1,
393,
... | 3.385852 | 311 |
__copyright__ = """This code is licensed under the 3-clause BSD license.
Copyright ETH Zurich, Laboratory of Physical Chemistry, Reiher Group.
See LICENSE.txt for details.
"""
import os
import scine_utilities as utils
from distutils import ccompiler
manager = utils.core.ModuleManager()
if not manager.module_loaded('X... | [
834,
22163,
4766,
834,
796,
37227,
1212,
2438,
318,
11971,
739,
262,
513,
12,
565,
682,
347,
10305,
5964,
13,
198,
15269,
35920,
43412,
11,
18643,
286,
16331,
27867,
11,
33225,
372,
4912,
13,
198,
6214,
38559,
24290,
13,
14116,
329,
3... | 2.983498 | 303 |
# -*- coding: utf-8 -*-
# Copyright 2016 Open Permissions Platform Coalition
# 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 appl... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
1584,
4946,
2448,
8481,
19193,
15135,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779... | 2.613456 | 1,516 |
"""ScrollList Component Test"""
import curses
from source.controls import Window
from source.controls import ScrollList as Scroller
__author__ = "Samuel Whang"
| [
37811,
29261,
8053,
35100,
6208,
37811,
198,
11748,
43878,
198,
6738,
2723,
13,
13716,
82,
1330,
26580,
198,
6738,
2723,
13,
13716,
82,
1330,
17428,
8053,
355,
1446,
10646,
198,
198,
834,
9800,
834,
796,
366,
16305,
2731,
854,
648,
1,
... | 3.833333 | 42 |
import os
from collections import deque
from glycan_profiling.task import TaskBase
debug_mode = bool(os.environ.get("GLYCRESOFTDEBUG"))
| [
11748,
28686,
198,
6738,
17268,
1330,
390,
4188,
198,
198,
6738,
13874,
5171,
62,
5577,
4386,
13,
35943,
1330,
15941,
14881,
628,
198,
24442,
62,
14171,
796,
20512,
7,
418,
13,
268,
2268,
13,
1136,
7203,
8763,
56,
9419,
1546,
46,
9792... | 3.042553 | 47 |
# @generated AUTOGENERATED file. Do not Change!
# flake8: noqa
# fmt: off
# isort: skip_file
import typing
from gql import gql, Client
Episode = typing.Literal["NEWHOPE", "EMPIRE", "JEDI"]
GetRecursive__hero__Droid__friends__Droid__friends = typing.TypedDict("GetRecursive__hero__Droid__friends__Droid__friends", {"na... | [
2,
2488,
27568,
47044,
7730,
1677,
1137,
11617,
2393,
13,
2141,
407,
9794,
0,
198,
2,
781,
539,
23,
25,
645,
20402,
198,
2,
46996,
25,
572,
198,
2,
318,
419,
25,
14267,
62,
7753,
198,
198,
11748,
19720,
198,
6738,
308,
13976,
1330... | 3.050308 | 974 |
# -*- coding: utf-8 -*-
"""
Created on Wed May 16 09:32:56 2018
@author: gamer
"""
import pygame as pg
import numpy as np
import skimage.transform as transform | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
3300,
1737,
1467,
7769,
25,
2624,
25,
3980,
2864,
198,
198,
31,
9800,
25,
26713,
198,
37811,
198,
198,
11748,
12972,
6057,
355,
23241,
198,
11748... | 2.875 | 56 |
import pygame
import sys
# branching recursion
width = input("Enter a width: ")
height = input("Enter a height: ")
radius = input("Enter a radius: ")
setup(int(width), int(height), int(radius)) | [
11748,
12972,
6057,
198,
11748,
25064,
198,
198,
2,
49526,
664,
24197,
198,
197,
197,
198,
10394,
796,
5128,
7203,
17469,
257,
9647,
25,
366,
8,
198,
17015,
796,
5128,
7203,
17469,
257,
6001,
25,
366,
8,
198,
42172,
796,
5128,
7203,
... | 3.061538 | 65 |
from hmc5883l import HMC5883L
sensor = HMC5883L(scl=5, sda=4)
valmin=[0,0,0]
valmax=[0,0,0]
valscaled=[0,0,0]
f=open("cal.csv",'w')
for count in range(3000):
valread = sensor.read()
# for i in range(3):
# if valread[i]<valmin[i]: valmin[i]=valread[i]
# if valread[i]>valmax[i]: valmax[i]=val... | [
6738,
289,
23209,
3365,
5999,
75,
1330,
367,
9655,
3365,
5999,
43,
198,
198,
82,
22854,
796,
367,
9655,
3365,
5999,
43,
7,
38528,
28,
20,
11,
264,
6814,
28,
19,
8,
198,
2100,
1084,
41888,
15,
11,
15,
11,
15,
60,
198,
2100,
9806,... | 1.934028 | 288 |
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2, 6, 0):
_edgetpu_cpp_wrapper = swig_import_helper()
de... | [
2,
770,
2393,
373,
6338,
7560,
416,
12672,
3528,
357,
4023,
1378,
2503,
13,
2032,
328,
13,
2398,
737,
198,
2,
10628,
513,
13,
15,
13,
23,
198,
2,
198,
2,
2141,
407,
787,
2458,
284,
428,
2393,
4556,
345,
760,
644,
345,
389,
1804,... | 2.785794 | 901 |
"""Mean covariance estimation."""
from copy import deepcopy
import numpy as np
from .base import sqrtm, invsqrtm, logm, expm
from .ajd import ajd_pham
from .distance import distance_riemann
from .geodesic import geodesic_riemann
def _get_sample_weight(sample_weight, data):
"""Get the sample weights.
If none... | [
37811,
5308,
272,
44829,
590,
31850,
526,
15931,
198,
6738,
4866,
1330,
2769,
30073,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
764,
8692,
1330,
19862,
17034,
76,
11,
800,
31166,
17034,
76,
11,
2604,
76,
11,
1033,
76,
198,
67... | 2.328656 | 5,915 |
#!/usr/bin/env python
from fabric.api import *
import app
import app_config
"""
Environments
Changing environment requires a full-stack test.
An environment points to both a server and an S3
bucket.
"""
"""
Template-specific functions
Changing the template functions should produce output
with fab render without a... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
9664,
13,
15042,
1330,
1635,
198,
198,
11748,
598,
198,
11748,
598,
62,
11250,
198,
198,
37811,
198,
4834,
12103,
198,
198,
48333,
2858,
4433,
257,
1336,
12,
25558,
1332,
13... | 2.557585 | 1,259 |
from PIL import Image
from openpyxl import Workbook
from openpyxl.styles import PatternFill
from openpyxl.utils import get_column_letter
from functools import partial
import sys
import argparse
if __name__ == "__main__":
args = handle_arguments()
convert(args)
| [
6738,
350,
4146,
1330,
7412,
201,
198,
6738,
1280,
9078,
87,
75,
1330,
5521,
2070,
201,
198,
6738,
1280,
9078,
87,
75,
13,
47720,
1330,
23939,
33762,
201,
198,
6738,
1280,
9078,
87,
75,
13,
26791,
1330,
651,
62,
28665,
62,
9291,
201... | 2.813725 | 102 |
from unittest import TestCase
from dat_analysis.dat_object.dat_hdf import DatHDF
from dat_analysis.hdf_file_handler import HDFFileHandler
from dat_analysis.dat_object.make_dat import get_dat, get_dats, DatHandler
from tests.helpers import get_testing_Exp2HDF
from dat_analysis.data_standardize.exp_specific.Feb21 import ... | [
6738,
555,
715,
395,
1330,
6208,
20448,
198,
6738,
4818,
62,
20930,
13,
19608,
62,
15252,
13,
19608,
62,
71,
7568,
1330,
16092,
39,
8068,
198,
6738,
4818,
62,
20930,
13,
71,
7568,
62,
7753,
62,
30281,
1330,
5572,
5777,
576,
25060,
1... | 2.795539 | 269 |
import myshop
theater()
| [
11748,
616,
24643,
628,
628,
198,
198,
1169,
729,
3419,
198
] | 2.636364 | 11 |
#!/usr/bin/env python
# CREATED BY CHRISTOPHER LAVENDER
# BASED ON WORK BY ADAM BURKHOLDER
# INTEGRATIVE BIOINFORMATICS, NIEHS
# WORKING OBJECT ORIENTED VERSION
import os
import math
import argparse
import sys
from operator import itemgetter
# STRAND_STATUS IS USED TO DETERMINE IF STRAND IS USED IN SORT
# ENTRY ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
29244,
11617,
11050,
48354,
3185,
16879,
9131,
53,
10619,
1137,
198,
2,
29809,
1961,
6177,
30936,
11050,
5984,
2390,
45604,
42,
39,
3535,
14418,
198,
2,
17828,
7156,
49,
37045,
... | 2.200368 | 1,632 |
import cv2
import numpy as np
img = cv2.imread('lena.jpg', cv2.IMREAD_GRAYSCALE)
thresh = 127
im_bw = cv2.threshold(img, thresh, 255, cv2.THRESH_BINARY)[1]
cv2.imshow('image', im_bw)
cv2.waitKey(0)
cv2.destroyAllWindows() | [
11748,
269,
85,
17,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
9600,
796,
269,
85,
17,
13,
320,
961,
10786,
75,
8107,
13,
9479,
3256,
269,
85,
17,
13,
3955,
15675,
62,
38,
30631,
6173,
21358,
8,
201,
198,
201,
198,
400,
... | 1.95 | 120 |
#!/usr/bin/env python
"""
Introduces the "argparse" module, which is used to parse more complex argument strings
eg: ./006-argparse.py --name Jeff mauve
"""
import argparse # http://docs.python.org/2/library/argparse.html#module-argparse
import subprocess
if __name__ == '__main__':
main() | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
15005,
728,
262,
366,
853,
29572,
1,
8265,
11,
543,
318,
973,
284,
21136,
517,
3716,
4578,
13042,
198,
198,
1533,
25,
24457,
28041,
12,
853,
29572,
13,
9078,
1377,
3672,
... | 3.041237 | 97 |
"""
This is the IOC source code for the unique AT2L0, with its 18 in-out filters.
"""
from typing import List
from caproto.server import SubGroup, expand_macros
from caproto.server.autosave import RotatingFileManager
from .. import calculator, util
from ..filters import InOutFilterGroup
from ..ioc import IOCBase
from... | [
37811,
198,
1212,
318,
262,
48245,
2723,
2438,
329,
262,
3748,
5161,
17,
43,
15,
11,
351,
663,
1248,
287,
12,
448,
16628,
13,
198,
37811,
198,
6738,
19720,
1330,
7343,
198,
198,
6738,
1451,
305,
1462,
13,
15388,
1330,
3834,
13247,
1... | 2.548013 | 604 |
"""mysite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-bas... | [
37811,
28744,
578,
10289,
28373,
198,
198,
464,
4600,
6371,
33279,
82,
63,
1351,
11926,
32336,
284,
5009,
13,
1114,
517,
1321,
3387,
766,
25,
198,
220,
220,
220,
3740,
1378,
31628,
13,
28241,
648,
404,
305,
752,
13,
785,
14,
268,
14... | 2.664706 | 1,700 |
from flask_wtf import Form
from wtforms import StringField, PasswordField, SubmitField
from wtforms.validators import DataRequired
| [
6738,
42903,
62,
86,
27110,
1330,
5178,
198,
6738,
266,
83,
23914,
1330,
10903,
15878,
11,
30275,
15878,
11,
39900,
15878,
198,
6738,
266,
83,
23914,
13,
12102,
2024,
1330,
6060,
37374,
628,
197
] | 3.911765 | 34 |
from django.contrib import admin
from budgetcalc.models import Category, Optiongroup, Option, Submission
admin.site.register(Category, CategoryAdmin)
admin.site.register(Optiongroup, OptiongroupAdmin)
admin.site.register(Option, OptionAdmin)
admin.site.register(Submission, SubmissionAdmin) | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
198,
6738,
4466,
9948,
66,
13,
27530,
1330,
21743,
11,
16018,
8094,
11,
16018,
11,
42641,
628,
628,
198,
198,
28482,
13,
15654,
13,
30238,
7,
27313,
11,
21743,
46787,
8,
198,
28482,... | 3.746835 | 79 |
num = int(input("Digite um numero: "))
if(num % 5 == 0 and num % 3 == 0):
print("FizzBuzz")
else:
print(num) | [
22510,
796,
493,
7,
15414,
7203,
19511,
578,
23781,
997,
3529,
25,
366,
4008,
198,
198,
361,
7,
22510,
4064,
642,
6624,
657,
290,
997,
4064,
513,
6624,
657,
2599,
198,
220,
220,
220,
3601,
7203,
37,
6457,
48230,
4943,
198,
17772,
25... | 2.294118 | 51 |
# GPG Reaper
#
# MIT License
#
# Copyright (c) 2018 Kacper Szurek
# https://security.szurek.pl/
from pgpy.packet.fields import MPI, RSAPriv
from pgpy.constants import PubKeyAlgorithm, KeyFlags, HashAlgorithm, SymmetricKeyAlgorithm, CompressionAlgorithm
from pgpy import PGPKey
from pgpy.packet.packets import PrivKeyV4
... | [
2,
402,
6968,
29245,
198,
2,
220,
198,
2,
17168,
13789,
198,
2,
198,
2,
15069,
357,
66,
8,
2864,
509,
330,
525,
27974,
495,
74,
198,
2,
3740,
1378,
12961,
13,
82,
89,
495,
74,
13,
489,
14,
198,
6738,
23241,
9078,
13,
8002,
316... | 1.856742 | 1,780 |
from app import app
from flask_sqlalchemy import SQLAlchemy
from os import getenv
app.config["SQLALCHEMY_DATABASE_URI"] = getenv("DATABASE_URL")
app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
db = SQLAlchemy(app)
| [
6738,
598,
1330,
598,
198,
6738,
42903,
62,
25410,
282,
26599,
1330,
16363,
2348,
26599,
198,
6738,
28686,
1330,
651,
24330,
198,
198,
1324,
13,
11250,
14692,
17861,
1847,
3398,
3620,
56,
62,
35,
1404,
6242,
11159,
62,
47269,
8973,
796,... | 2.695122 | 82 |
import torch
from os.path import join
from fvcore.common.registry import Registry
ARCHITECTURE_REGISTRY = Registry("ARCHITECTURE")
| [
198,
11748,
28034,
198,
6738,
28686,
13,
6978,
1330,
4654,
198,
198,
6738,
277,
85,
7295,
13,
11321,
13,
2301,
4592,
1330,
33432,
198,
198,
31315,
2043,
9782,
11335,
62,
31553,
1797,
40405,
796,
33432,
7203,
31315,
2043,
9782,
11335,
49... | 3.190476 | 42 |
#%%
import base64
import matplotlib.pyplot as plt
import numpy as np
import json
from ast import literal_eval
data1encoded = 'eyJkZGFFbmFibGVkIjpmYWxzZSwiZGF0YSI6W3sic3RhcnRUaW1lIjoxNjE5MTM3MjUxMzg1LCJkdXJhdGlvbiI6NjQ1Miwic2NvcmUiOjAsImdyYXZpdHkiOjAuMjUsInBpcGVJbnRlcnZhbCI6MTQwMCwicGlwZWhlaWdodCI6OTAsImNvbGxpc2lvblBvc... | [
2,
16626,
198,
11748,
2779,
2414,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
33918,
198,
6738,
6468,
1330,
18875,
62,
18206,
198,
198,
7890,
16,
12685,
9043,
796,
705,
... | 1.673903 | 8,384 |
# -*- coding: utf-8 -*-
"""
Created on Wed Nov 30 16:08:04 2016
@author: Manuel
"""
from C45Tree_own import split
import pandas as pa
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
3300,
5267,
1542,
1467,
25,
2919,
25,
3023,
1584,
198,
198,
31,
9800,
25,
25995,
198,
37811,
198,
198,
6738,
327,
2231,
27660,
62,
593,
1330,
6... | 2.5 | 56 |
# Generated by Django 2.2.16 on 2020-10-28 06:58
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
1433,
319,
12131,
12,
940,
12,
2078,
9130,
25,
3365,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.875 | 32 |
"""
Sample Example
"""
from goibibo import goibiboAPI
GO = goibiboAPI("ae51f09b", "da2d83a905110d15a51795b018605026")
print GO.FlightSearch("BLR", "HYD", 20141028)
print GO.MinimumFare("BLR", "HYD", 20141028)
print GO.BusSearch("bangalore", "hyderabad", 20141028)
print GO.BusSeatMap("vJ52KC0ymd0635qTD9bDDy9GHBkGl5FJM... | [
37811,
198,
36674,
17934,
198,
37811,
198,
6738,
467,
571,
26762,
1330,
467,
571,
26762,
17614,
198,
198,
11230,
796,
467,
571,
26762,
17614,
7203,
3609,
4349,
69,
2931,
65,
1600,
366,
6814,
17,
67,
5999,
64,
44928,
11442,
67,
1314,
6... | 2.090253 | 277 |
from datetime import datetime
from dateutil.tz import tzutc
from aiogithub.objects.response import BaseResponseObject
from aiogithub.utils import return_key
| [
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
6738,
3128,
22602,
13,
22877,
1330,
256,
89,
315,
66,
198,
198,
6738,
257,
72,
519,
10060,
13,
48205,
13,
26209,
1330,
7308,
31077,
10267,
198,
6738,
257,
72,
519,
10060,
13,
26791,
1330,
... | 3.425532 | 47 |
#!/usr/bin/python
"""how to user basic math operations in python """
def do_bitwise_operations():
"""bitwise operations"""
assert 5 & 3 == 1
assert ~4 == -5
assert 5 ^ 3 == 6
assert 5 >> 1 == 2
assert 5 << 2 == 20
print("bitwise operations done")
if __name__ == "__main__":
math_o... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
37811,
4919,
284,
2836,
4096,
10688,
4560,
287,
21015,
37227,
628,
198,
4299,
466,
62,
2545,
3083,
62,
3575,
602,
33529,
198,
220,
220,
220,
37227,
2545,
3083,
4560,
37811,
628,
220,
220... | 2.686567 | 134 |
# RT - Original Command
from __future__ import annotations
from discord.ext import commands
import discord
from aiomysql import Pool, Cursor
from rtutil import DatabaseManager
def setup(bot):
bot.add_cog(OriginalCommand(bot))
| [
2,
11923,
532,
13745,
9455,
198,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
11748,
36446,
198,
198,
6738,
257,
29005,
893,
13976,
1330,
19850,
11,
327,
21471,
198,
198,
6738,
374,
83,
... | 3.4 | 70 |
import re
import requests
import sys
sys.path.append('cli_stats')
from directory import Directory
from pprint import pprint
from storage_config import StorageConfig
from tqdm import tqdm
session = requests.Session()
#TODO
"""
*Program is not scaling well
"""
"""***HOW TO USE***
1. Create an instance of Foot... | [
11748,
302,
198,
11748,
7007,
198,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
10786,
44506,
62,
34242,
11537,
198,
198,
6738,
8619,
1330,
27387,
198,
198,
6738,
279,
4798,
1330,
279,
4798,
198,
6738,
6143,
62,
11250,
1330,
2051... | 2.355776 | 1,411 |
from django.db import models
from django.contrib.auth import get_user_model
from django_countries import countries
COUNTRY_CHOICES = tuple(countries)
User = get_user_model()
# Create your models here.
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
651,
62,
7220,
62,
19849,
198,
6738,
42625,
14208,
62,
9127,
1678,
1330,
2678,
198,
198,
34,
19385,
40405,
62,
44899,
34444,
796,
46545,
... | 3.1875 | 64 |
import numpy as np
def least_squares_BCES(Y1, Y2, V11, V22, V12=0, origin=False):
"""
Make a least-squares fit for non-NaN values taking into account the errors in both rho and J variables. This implementation is based on Akritas1996 article. It is a generalization of the least-squares method. The variance o... | [
198,
11748,
299,
32152,
355,
45941,
628,
198,
4299,
1551,
62,
16485,
3565,
62,
2749,
1546,
7,
56,
16,
11,
575,
17,
11,
569,
1157,
11,
569,
1828,
11,
569,
1065,
28,
15,
11,
8159,
28,
25101,
2599,
198,
220,
220,
220,
37227,
198,
2... | 2.335948 | 765 |
from ErnosCube.face_enum import FaceEnum
from ErnosCube.orient_enum import OrientEnum
from ErnosCube.sticker import Sticker
from ErnosCube.face import Face
from ErnosCube.face import RowFaceSlice, ColFaceSlice
from plane_rotatable_tests import PlaneRotatableTests
from hypothesis import given
from strategies import sti... | [
6738,
22762,
418,
29071,
13,
2550,
62,
44709,
1330,
15399,
4834,
388,
198,
6738,
22762,
418,
29071,
13,
13989,
62,
44709,
1330,
35275,
4834,
388,
198,
6738,
22762,
418,
29071,
13,
13915,
263,
1330,
520,
15799,
198,
6738,
22762,
418,
290... | 3.591241 | 137 |
from unittest.case import TestCase
from django.core.exceptions import ImproperlyConfigured
from django.test.utils import override_settings
from djangoes import (ConnectionHandler,
IndexDoesNotExist,
ConnectionDoesNotExist,
load_backend)
from djangoes.b... | [
6738,
555,
715,
395,
13,
7442,
1330,
6208,
20448,
198,
198,
6738,
42625,
14208,
13,
7295,
13,
1069,
11755,
1330,
12205,
525,
306,
16934,
1522,
198,
6738,
42625,
14208,
13,
9288,
13,
26791,
1330,
20957,
62,
33692,
198,
198,
6738,
42625,
... | 2.506329 | 158 |
#!/usr/bin/env python
"""
Copyright 2014 Novartis Institutes for Biomedical Research
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 ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
15269,
1946,
5267,
433,
271,
33656,
329,
8436,
35914,
4992,
198,
198,
26656,
15385,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
5832,
... | 3.881988 | 161 |
def get_permutations(sequence):
'''
Enumerate all permutations of a given string
sequence (string): an arbitrary string to permute. Assume that it is a
non-empty string.
You MUST use recursion for this part. Non-recursive solutions will not be
accepted.
Returns: a list of all pe... | [
4299,
651,
62,
16321,
32855,
7,
43167,
2599,
201,
198,
220,
220,
220,
705,
7061,
201,
198,
220,
220,
220,
2039,
6975,
378,
477,
9943,
32855,
286,
257,
1813,
4731,
201,
198,
201,
198,
220,
220,
220,
8379,
357,
8841,
2599,
281,
14977,... | 2.401674 | 478 |
all_tests = [
{
"name" : "wc-fast",
"exec" : "./test-wc.bin",
"records" : 1000 * 1000, # records per epoch
"record_size" : 100,
"target_ms" : 1000,
"input_file" : "/ssd/1g.txt",
# --- optional: soft delay --- #
#"softdelay_maxbad_ratio" : 0.1, # okay if aonmaly delay % is less than this in a windo... | [
439,
62,
41989,
796,
685,
198,
197,
90,
198,
197,
197,
1,
3672,
1,
1058,
366,
86,
66,
12,
7217,
1600,
198,
197,
197,
1,
18558,
1,
1058,
366,
19571,
9288,
12,
86,
66,
13,
8800,
1600,
220,
198,
197,
197,
1,
8344,
3669,
1,
1058,
... | 2.47032 | 1,314 |
# Time: O(n)
# Space: O(1)
| [
2,
3862,
25,
220,
440,
7,
77,
8,
198,
2,
4687,
25,
440,
7,
16,
8,
198
] | 1.647059 | 17 |
'''
Created on Jan 16, 2016
@author: enikher
'''
import logging
import datetime
LOG = logging.getLogger(__name__)
LOG_LEVEL = logging.DEBUG
LOG_PATH = "./dlService.log"
logging.basicConfig(format='%(asctime)s %(levelname)s: %(message)s',
filename=LOG_PATH,
datefmt='%Y-%m-%dT:%H... | [
7061,
6,
198,
41972,
319,
2365,
1467,
11,
1584,
198,
198,
31,
9800,
25,
551,
1134,
372,
198,
7061,
6,
198,
11748,
18931,
198,
11748,
4818,
8079,
198,
198,
25294,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
198,
25294,
... | 2.311966 | 234 |
from .appifaceprog import api
from .database import db | [
6738,
764,
1324,
361,
330,
538,
3828,
1330,
40391,
198,
6738,
764,
48806,
1330,
20613
] | 3.6 | 15 |
from EasyPortfolioExplorer.app.easy.base import EasyBase
| [
6738,
16789,
13924,
13652,
18438,
11934,
13,
1324,
13,
38171,
13,
8692,
1330,
16789,
14881,
201,
198,
201
] | 3.277778 | 18 |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | [
198,
6738,
10088,
1330,
708,
81,
1136,
353,
198,
11748,
12972,
648,
21653,
13,
8019,
13,
87,
6978,
2978,
525,
355,
2124,
6978,
2978,
525,
198,
6738,
12972,
648,
21653,
13,
8019,
13,
17859,
19199,
1330,
8324,
20941,
6719,
16005,
10707,
... | 3.387931 | 116 |
"""
Definition of TreeNode:
class TreeNode:
def __init__(self, val):
self.val = val
self.left, self.right = None, None
"""
| [
37811,
198,
36621,
286,
12200,
19667,
25,
198,
4871,
12200,
19667,
25,
198,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
1188,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2100,
796,
1188,
198,
220,
220,
220,
220,
... | 2.383333 | 60 |
"""This program takes a matrix of size mxn as input, and prints the matrix in a spiral format
for example: input ->> [[1,2,3],
[4,5,6],
[7,8,9],
[10,11,12]]
output ->> 1 2 3 6 9 12 11 10 7 4 5 8"""
| [
37811,
1212,
1430,
2753,
257,
17593,
286,
2546,
285,
87,
77,
355,
5128,
11,
290,
20842,
262,
17593,
287,
257,
23642,
5794,
198,
1640,
1672,
25,
5128,
532,
4211,
16410,
16,
11,
17,
11,
18,
4357,
198,
220,
220,
220,
220,
220,
220,
2... | 1.786164 | 159 |
import abc
import numpy as np
import torch
import torch.nn as nn
class VPSDE(AbstractSDE):
# def proposal_distribution(self):
# def g2(t):
# return self.beta_0 + t * (self.beta_1 - self.beta_0)
# def a2(t):
# log_mean_coeff = -0.25 * t ** 2 * (self.beta_1 - self.beta_0) \... | [
11748,
450,
66,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
628,
198,
198,
4871,
569,
3705,
7206,
7,
23839,
50,
7206,
2599,
628,
220,
220,
220,
1303,
825,
6961,
62,
17080,
3890,
... | 1.938776 | 294 |
import os
os.system('./build.sh')
os.system('g++ parser_sha_data_parallel.cpp -o psdp -O3')
os.system('./psdp lanczos2_16.pws lanczos2_16_112_N=16_rdl.pws lanczos2_112_N=16_circuit.txt lanczos2_112_N=16_meta.txt')
os.system('./psdp lanczos2_16.pws lanczos2_16_176_N=64_rdl.pws lanczos2_176_N=64_circuit.txt lanczos2_176... | [
11748,
28686,
198,
418,
13,
10057,
7,
4458,
14,
11249,
13,
1477,
11537,
198,
418,
13,
10057,
10786,
70,
4880,
30751,
62,
26270,
62,
7890,
62,
1845,
29363,
13,
20322,
532,
78,
279,
21282,
79,
532,
46,
18,
11537,
198,
198,
418,
13,
... | 1.929952 | 414 |
import pandas as pd
import matplotlib.pyplot as plt
from diagrams.base import *
DATASET = DATASET_FOLDER + "ama0302.csv"
tabulize_data(DATASET_FOLDER + "ama0302.csv", GENERATED_PATH + "seq-table-ama0302.tex")
tabulize_data(DATASET_FOLDER + "ama0601.csv", GENERATED_PATH + "seq-table-ama0601.tex")
tabulize_data(DATAS... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
6738,
37067,
13,
8692,
1330,
1635,
198,
198,
35,
1404,
1921,
2767,
796,
360,
1404,
1921,
2767,
62,
37,
3535,
14418,
1343,
366,
... | 2.235632 | 174 |
# Run training with PointRend head
# uses default configuration from detectron2
# The model is initialized via pre-trained coco models from detectron2 model zoo
#
# Fatemeh Saleh <fatemehsadat.saleh@anu.edu.au>
import os
from detectron2.config import get_cfg
from detectron2.data.datasets import register_coco_instances... | [
2,
5660,
3047,
351,
6252,
49,
437,
1182,
198,
2,
3544,
4277,
8398,
422,
4886,
1313,
17,
198,
2,
383,
2746,
318,
23224,
2884,
662,
12,
35311,
8954,
78,
4981,
422,
4886,
1313,
17,
2746,
26626,
198,
2,
198,
2,
12301,
368,
17231,
1646... | 2.390205 | 633 |
import re, os, sys
isBeingDebugged = False if (not os.environ.has_key('WINGDB_ACTIVE')) else int(os.environ['WINGDB_ACTIVE']) == 1
__re__ = re.compile("(?P<commented>(#|))cfg_file=(?P<cfg_file>.*)", re.DOTALL | re.MULTILINE)
__top__ = '/usr' if (not isBeingDebugged) else r'J:\@11.1'
fpath = find_nagios_cfg(__... | [
11748,
302,
11,
28686,
11,
25064,
201,
198,
201,
198,
271,
18357,
27509,
2004,
796,
10352,
611,
357,
1662,
28686,
13,
268,
2268,
13,
10134,
62,
2539,
10786,
54,
2751,
11012,
62,
10659,
9306,
6,
4008,
2073,
493,
7,
418,
13,
268,
2268... | 1.736768 | 2,135 |
import urllib2
from sqlalchemy import func, distinct, asc, desc, and_, or_
from flask import Blueprint, request, jsonify, abort, g, render_template, make_response, redirect, url_for, flash
from dataviva import db, __latest_year__
from dataviva.attrs.models import Bra, Wld, Hs, Isic, Cbo, Yb
from dataviva.secex.models... | [
11748,
2956,
297,
571,
17,
198,
198,
6738,
44161,
282,
26599,
1330,
25439,
11,
7310,
11,
10570,
11,
1715,
11,
290,
62,
11,
393,
62,
198,
6738,
42903,
1330,
39932,
11,
2581,
11,
33918,
1958,
11,
15614,
11,
308,
11,
8543,
62,
28243,
... | 3.519841 | 252 |
"""
Given an array A of non-negative integers, return an array consisting of all the even elements of A,
followed by all the odd elements of A.
You may return any answer array that satisfies this condition.
Example 1:
Input: [3,1,2,4]
Output: [2,4,3,1]
The outputs [4,2,3,1], [2,4,1,3], and [4,2,1,3] would also be a... | [
37811,
198,
15056,
281,
7177,
317,
286,
1729,
12,
31591,
37014,
11,
1441,
281,
7177,
17747,
286,
477,
262,
772,
4847,
286,
317,
11,
198,
27780,
276,
416,
477,
262,
5629,
4847,
286,
317,
13,
198,
198,
1639,
743,
1441,
597,
3280,
7177... | 2.715152 | 165 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
"""
<img src="https://meerschaum.io/assets/banner_1920x320.png" alt="Meerschaum banner">
| PyPI | GitHub | License ... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
43907,
25,
69,
12685,
28,
40477,
12,
23,
198,
198,
37811,
198,
27,
9600,
12351,
2625,
5450,
1378,
1326,
364,
1... | 2.737582 | 1,067 |
from insights.parsers import kpatch_patches
from insights.tests import context_wrap
from insights.core.plugins import ContentException
import pytest
ASSORTED_KPATCHES = """
asdfasdfasdf_asdfasdfasdf-asdfasdfasdf_asdfasdfasdf.ko
asdfasdfasdf_asdfasdfasdf-asdfasdfasdf_asdfasdfasdf.ko.xz
foo-bar.ko
foo-bar.ko.xz
foo.ko
... | [
6738,
17218,
13,
79,
945,
364,
1330,
479,
17147,
62,
8071,
2052,
198,
6738,
17218,
13,
41989,
1330,
4732,
62,
37150,
198,
6738,
17218,
13,
7295,
13,
37390,
1330,
14041,
16922,
198,
11748,
12972,
9288,
628,
198,
10705,
9863,
1961,
62,
... | 2.555556 | 252 |
from pybricks.hubs import EV3Brick
ev3 = EV3Brick()
print(ev3.battery.voltage()) # 7400
print(ev3.battery.current()) # 180
| [
6738,
12972,
65,
23706,
13,
71,
23161,
1330,
8696,
18,
33,
5557,
198,
198,
1990,
18,
796,
8696,
18,
33,
5557,
3419,
198,
198,
4798,
7,
1990,
18,
13,
65,
16296,
13,
37764,
496,
28955,
220,
1303,
767,
7029,
198,
4798,
7,
1990,
18,
... | 2.351852 | 54 |
# -*- coding: utf-8 -*-
import copy
import logging
from operator import attrgetter
from typing import Dict
from app.service.messages.handler import Handler
logger = logging.getLogger(__name__)
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
4866,
198,
11748,
18931,
198,
198,
6738,
10088,
1330,
708,
81,
1136,
353,
198,
6738,
19720,
1330,
360,
713,
198,
198,
6738,
598,
13,
15271,
13,
37348,
1095,
13,
... | 3.126984 | 63 |
import matplotlib.pyplot as plt
import tensorflow as tf
import tensorflow_hub as hub
import numpy as np
from pytube import YouTube
import os
import cv2
from PIL import Image
import shutil
import glob
import ffmpy
if __name__ == "__main__":
import sys
transfer(sys.argv[1], sys.argv[2]) | [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
11192,
273,
11125,
62,
40140,
355,
12575,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
12972,
29302,
1330,
7444,
198,
11748,... | 2.892157 | 102 |
from collections import OrderedDict
from zeep import Client
from zeep import xsd
import zeep.helpers
import zeep.exceptions
import logging.config
import re
from .constants import methods
| [
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
198,
6738,
41271,
538,
1330,
20985,
198,
6738,
41271,
538,
1330,
2124,
21282,
198,
11748,
41271,
538,
13,
16794,
364,
198,
11748,
41271,
538,
13,
1069,
11755,
198,
11748,
18931,
13,
11250,
1... | 3.705882 | 51 |
"""booking_status
Revision ID: 7eb209b7ab1e
Revises: 0a95c6679356
Create Date: 2021-02-22 01:19:10.744915
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
from booking_microservice.constants import BookingStatus
# revision identifiers, used by Alembic.
revision = '7eb209... | [
37811,
2070,
278,
62,
13376,
198,
198,
18009,
1166,
4522,
25,
767,
1765,
22567,
65,
22,
397,
16,
68,
198,
18009,
2696,
25,
657,
64,
3865,
66,
2791,
3720,
32066,
198,
16447,
7536,
25,
33448,
12,
2999,
12,
1828,
5534,
25,
1129,
25,
... | 2.666667 | 150 |
records = [('foo', 1, 2), ('bar', 'hello'), ('foo', 3, 4)]
for tag, *args in records:
if tag == 'foo':
do_foo(*args)
elif tag == 'bar':
do_bar(*args)#
line = 'nobody:*:-2:-2:Unprivileged User:/var/empty:/user/bin/flase'
uname, *fields, homedir, sh = line.split(':')
print(uname)
print(fields)
... | [
8344,
3669,
796,
685,
10786,
21943,
3256,
352,
11,
362,
828,
19203,
5657,
3256,
705,
31373,
33809,
19203,
21943,
3256,
513,
11,
604,
15437,
198,
198,
1640,
7621,
11,
1635,
22046,
287,
4406,
25,
198,
220,
220,
220,
611,
7621,
6624,
705... | 2.19469 | 226 |
""" Configurations shared between PyTorch and Keras. """
CONFIG = {
"large": [
# in_ch, exp, out_ch, ks, stride, dilation, se, activation
[16, 16, 16, 3, 1, 1, None, "relu"],
[16, 64, 24, 3, 2, 1, None, "relu"],
[24, 72, 24, 3, 1, 1, None, "relu"],
[24, 72, 40, 5, 2, 1, 0.25... | [
37811,
17056,
20074,
4888,
1022,
9485,
15884,
354,
290,
17337,
292,
13,
37227,
198,
198,
10943,
16254,
796,
1391,
198,
220,
220,
220,
366,
11664,
1298,
685,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
287,
62,
354,
11,
1033,
11,
5... | 1.729781 | 2,646 |
import base64
import hashlib
import hmac
import json
import logging
import time
from json.decoder import JSONDecodeError
from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional, Tuple
from urllib.parse import urlencode
import requests
from rotkehlchen.accounting.ledger_actions import LedgerAction
from ro... | [
11748,
2779,
2414,
198,
11748,
12234,
8019,
198,
11748,
289,
20285,
198,
11748,
33918,
198,
11748,
18931,
198,
11748,
640,
198,
6738,
33918,
13,
12501,
12342,
1330,
19449,
10707,
1098,
12331,
198,
6738,
19720,
1330,
41876,
62,
50084,
2751,
... | 2.664273 | 1,114 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# parts of this were originally generated by sphinx-quickstart on Thu Aug 31 17:31:36 2017.
import os.path
import sys
sys.path.append(os.path.abspath('..'))
project = 'CLI'
copyright = '2021 rerobots, Inc | <a href="https://github.com/rerobots/cli">source code</a>'
au... | [
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,
198,
2,
3354,
286,
428,
547,
6198,
7560,
416,
599,
20079,
87,
12,
24209,
9688,
319,
26223,
2447,
3261,
1596,
... | 2.596401 | 389 |
import time
from lltm.lltm import LLTM
import torch
batch_size = 16
input_features = 32
state_size = 128
X = torch.randn(batch_size, input_features)
h = torch.randn(batch_size, state_size)
C = torch.randn(batch_size, state_size)
rnn = LLTM(input_features, state_size)#net init
forward = 0
backward = 0
for _ in range... | [
11748,
640,
198,
6738,
32660,
17209,
13,
297,
17209,
1330,
27140,
15972,
198,
11748,
28034,
198,
198,
43501,
62,
7857,
796,
1467,
198,
15414,
62,
40890,
796,
3933,
198,
5219,
62,
7857,
796,
13108,
198,
198,
55,
796,
28034,
13,
25192,
... | 2.460317 | 252 |
# Licensed under Apache License Version 2.0 - see LICENSE
"""This is a helper that prints the content of the function overview tables .
- docs/index.rst
- README.rst
Both contain a table of functions defined in iteration_utilities and
manually updating them is a pain. Therefore this file can be executed and the
conte... | [
2,
49962,
739,
24843,
13789,
10628,
362,
13,
15,
532,
766,
38559,
24290,
198,
37811,
1212,
318,
257,
31904,
326,
20842,
262,
2695,
286,
262,
2163,
16700,
8893,
764,
198,
198,
12,
34165,
14,
9630,
13,
81,
301,
198,
12,
20832,
11682,
... | 2.643525 | 749 |
# Given the tuple below that represents the Imelda May album "More Mayhem", write
# code to print the album details, followed by a listing of all the tracks in the album.
#
# Indent the tracks by a single tab stop when printing them (remember that you can pass
# more than one item to the print function, separating them... | [
2,
11259,
262,
46545,
2174,
326,
6870,
262,
314,
1326,
18986,
1737,
5062,
366,
5167,
35450,
1600,
3551,
198,
2,
2438,
284,
3601,
262,
5062,
3307,
11,
3940,
416,
257,
13487,
286,
477,
262,
8339,
287,
262,
5062,
13,
198,
2,
198,
2,
... | 2.888889 | 378 |
import sys
import os
from PyQt4 import QtGui, QtCore
def main():
app = QtGui.QApplication(sys.argv)
form = MainForm()
form.show()
app.exec_()
if __name__ == '__main__':
main()
| [
11748,
25064,
198,
11748,
28686,
198,
6738,
9485,
48,
83,
19,
1330,
33734,
8205,
72,
11,
33734,
14055,
198,
198,
4299,
1388,
33529,
198,
220,
220,
220,
598,
796,
33734,
8205,
72,
13,
48,
23416,
7,
17597,
13,
853,
85,
8,
198,
220,
... | 2.302326 | 86 |
import os
from .. import constants
from . import application
| [
11748,
28686,
198,
6738,
11485,
1330,
38491,
198,
6738,
764,
1330,
3586,
198
] | 4.692308 | 13 |
#########################################################################
# Copyright 2011 Cloud Sidekick
#
# 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... | [
29113,
29113,
7804,
2,
198,
2,
15069,
2813,
10130,
12075,
24585,
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,... | 4.436464 | 181 |
import pybullet as p
import numpy as np
from icecream import ic
from scipy.spatial.transform import Rotation as R
from highlevel_planning_py.tools.util import (
homogenous_trafo,
invert_hom_trafo,
pos_and_orient_from_hom_trafo,
SkillExecutionError,
)
| [
11748,
12972,
15065,
1616,
355,
279,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
4771,
36277,
1330,
14158,
198,
6738,
629,
541,
88,
13,
2777,
34961,
13,
35636,
1330,
371,
14221,
355,
371,
198,
6738,
1029,
5715,
62,
11578,
768,
62,
... | 2.7 | 100 |
# coding: utf-8
"""Actions package"""
| [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
32,
2733,
5301,
37811,
198
] | 2.6 | 15 |
import argparse
import httplib
import json
import numpy
import re
import time
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Analyzes execution time of cloud services.')
parser.add_argument('--server', '-s', dest='server', default='128.111.179.159')
parser.add_argument('--port', '... | [
11748,
1822,
29572,
198,
11748,
1841,
489,
571,
198,
11748,
33918,
198,
11748,
299,
32152,
198,
11748,
302,
198,
11748,
640,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
30751,
796,
1822,
29572... | 2.832474 | 388 |
from django.db import models
from products.models import Product
from account.models import Account
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
198,
6738,
3186,
13,
27530,
1330,
8721,
198,
6738,
1848,
13,
27530,
1330,
10781,
628
] | 4.434783 | 23 |
from gmocoin.common.const import ConstMeta
| [
6738,
308,
76,
25634,
259,
13,
11321,
13,
9979,
1330,
4757,
48526,
628
] | 3.384615 | 13 |
# Generated by Django 2.2.5 on 2019-09-30 12:15
import logging
from django.db import migrations
from django.db.models import Q
log = logging.getLogger('nomination_migration')
def migrate_nominations_to_new_model(apps, schema_editor):
"""
Migrations nominations from the infraction model to the nomination mod... | [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
20,
319,
13130,
12,
2931,
12,
1270,
1105,
25,
1314,
198,
11748,
18931,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
1330,
1195,
19... | 2.32636 | 956 |
#!/usr/bin/python
import datetime
x = datetime.datetime.now()
print(x) # current date and time
print(x.year) # current year
print(x.strftime("%A")) # current day
y = datetime.datetime(2020, 5, 17) # set date
print(y)
print(y.strftime("%B")) # Month name, full version
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
11748,
4818,
8079,
198,
198,
87,
796,
4818,
8079,
13,
19608,
8079,
13,
2197,
3419,
198,
4798,
7,
87,
8,
220,
1303,
1459,
3128,
290,
640,
198,
4798,
7,
87,
13,
1941,
8,
220,
1303,
1... | 2.628571 | 105 |
n1 = Node(None)
n2 = Node(n1)
n3 = Node(n1)
n4 = Node(n2)
n5 = Node(n2)
n1.print_tree_below()
| [
198,
77,
16,
796,
19081,
7,
14202,
8,
198,
77,
17,
796,
19081,
7,
77,
16,
8,
198,
77,
18,
796,
19081,
7,
77,
16,
8,
198,
198,
77,
19,
796,
19081,
7,
77,
17,
8,
198,
77,
20,
796,
19081,
7,
77,
17,
8,
198,
198,
77,
16,
1... | 1.701754 | 57 |
# -*- coding: utf-8 -*-
"""Unit test package for pyrmx."""
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
26453,
1332,
5301,
329,
279,
2417,
36802,
526,
15931,
198
] | 2.307692 | 26 |
from weakest_link.util import wait_for_choice, green, red, dollars, get_random_mean_word, starts_with_vowel, format_time
| [
6738,
34968,
62,
8726,
13,
22602,
1330,
4043,
62,
1640,
62,
25541,
11,
4077,
11,
2266,
11,
5054,
11,
651,
62,
25120,
62,
32604,
62,
4775,
11,
4940,
62,
4480,
62,
85,
322,
417,
11,
5794,
62,
2435,
198
] | 3.102564 | 39 |
import typing as t
import infiltrate.browsers as browsers
import infiltrate.eternal_warcy_cards_browser as ew_cards
import infiltrate.models.card as card_mod
from infiltrate import db
def update_is_in_expedition():
"""Sets the is_in_expedition column of the cards table
to match Eternal Warcry readings."""
... | [
11748,
19720,
355,
256,
198,
198,
11748,
42111,
13,
65,
8516,
364,
355,
22616,
198,
11748,
42111,
13,
316,
35220,
62,
5767,
948,
62,
27761,
62,
40259,
355,
304,
86,
62,
27761,
198,
11748,
42111,
13,
27530,
13,
9517,
355,
2657,
62,
4... | 2.569492 | 295 |
from collections import namedtuple
from math import ceil
from typing import Tuple, Dict, Union, List, Counter
import numpy as np
import pandas as pd
from classifiers.config import Config
from data_loading.PathMinerDataset import PathMinerDataset
from data_loading.PathMinerLoader import PathMinerLoader
from data_loadi... | [
6738,
17268,
1330,
3706,
83,
29291,
198,
6738,
10688,
1330,
2906,
346,
198,
6738,
19720,
1330,
309,
29291,
11,
360,
713,
11,
4479,
11,
7343,
11,
15034,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198... | 2.75885 | 904 |
# pylint: disable=C0301
from .annotations.annotation_tools import AnnotationToolViewSet
from .annotations.annotation_votes import AnnotationVoteViewSet
from .annotations.annotations import AnnotationViewSet
from .data_collections.collection_devices import CollectionDeviceViewSet
from .data_collections.collection_sites ... | [
2,
279,
2645,
600,
25,
15560,
28,
34,
3070,
486,
198,
6738,
764,
34574,
602,
13,
1236,
14221,
62,
31391,
1330,
1052,
38983,
25391,
7680,
7248,
198,
6738,
764,
34574,
602,
13,
1236,
14221,
62,
29307,
1330,
1052,
38983,
37394,
7680,
724... | 3.398357 | 1,461 |
from datetime import datetime, timezone
import udi_interface
import requests
import json
from enums import BatteryLevel, DeviceStatus
from nodes import AcuriteDeviceNode
LOGGER = udi_interface.LOGGER
Custom = udi_interface.Custom
| [
6738,
4818,
8079,
1330,
4818,
8079,
11,
640,
11340,
198,
198,
11748,
334,
10989,
62,
39994,
198,
11748,
7007,
198,
11748,
33918,
198,
198,
6738,
551,
5700,
1330,
23490,
4971,
11,
16232,
19580,
198,
6738,
13760,
1330,
4013,
333,
578,
247... | 3.65625 | 64 |
ErrorMsg = {'BadZipFile' : 'Uploaded zip file is bad',
'EmptyZipFile' : 'Uploaded zip file is empty',} | [
12331,
50108,
796,
1391,
6,
22069,
41729,
8979,
6,
1058,
705,
41592,
276,
19974,
2393,
318,
2089,
3256,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
40613,
41729,
8979,
6,
1058,
705,
41592,
276,
19974,
2393,
... | 2.5 | 46 |
from DTL.qt import QtCore, QtGui
from DTL.qt.QtCore import Qt
#------------------------------------------------------------
#------------------------------------------------------------
#------------------------------------------------------------
#------------------------------------------------------------... | [
6738,
360,
14990,
13,
39568,
1330,
33734,
14055,
11,
33734,
8205,
72,
198,
6738,
360,
14990,
13,
39568,
13,
48,
83,
14055,
1330,
33734,
198,
198,
2,
47232,
10541,
198,
2,
47232,
10541,
198,
220,
220,
220,
220,
220,
220,
220,
220,
19... | 5.483333 | 60 |
import unittest
from mock import mock_open, patch
from rest_framework.generics import ListAPIView
from rest_framework_ccbv.renderers import (
BasePageRenderer, IndexPageRenderer, LandPageRenderer, ErrorPageRenderer,
SitemapRenderer, DetailPageRenderer,
)
from rest_framework_ccbv.config import VERSION
from res... | [
11748,
555,
715,
395,
198,
198,
6738,
15290,
1330,
15290,
62,
9654,
11,
8529,
198,
6738,
1334,
62,
30604,
13,
8612,
873,
1330,
7343,
2969,
3824,
769,
198,
198,
6738,
1334,
62,
30604,
62,
535,
65,
85,
13,
10920,
19288,
1330,
357,
198... | 2.863636 | 198 |
import pytest
from django.conf.urls import include, url
from django.test import Client, override_settings
from .util import all_template_engines
from .test_sendable_email import MY_SENDABLE_EMAIL
urlpatterns = [
url(r'^examples/', include('emailpal.urls')),
]
def test_invalid_example_raises_404(client):
re... | [
11748,
12972,
9288,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
2291,
11,
19016,
198,
6738,
42625,
14208,
13,
9288,
1330,
20985,
11,
20957,
62,
33692,
198,
198,
6738,
764,
22602,
1330,
477,
62,
28243,
62,
1516,
1127,
198,
... | 2.813333 | 300 |
from common.utils import crypt_utils
from bright import settings
row_data = [
{
'username': 'admin',
'password': crypt_utils.md5('admin', settings.APP_SALT),
'cellphone': '13966660426',
'email': 'admin@wesoft.com'
}
]
| [
6738,
2219,
13,
26791,
1330,
8194,
62,
26791,
198,
6738,
6016,
1330,
6460,
198,
198,
808,
62,
7890,
796,
685,
198,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
705,
29460,
10354,
705,
28482,
3256,
198,
220,
220,
220,... | 2.3125 | 112 |
import os
from flask import Flask, request, jsonify
from flask_restful import Api
from resources.company import Company, Companylist
from resources.employee import Employee, EmployeeList
from db import db
from resources.user import UserRegister, UserLogin, UserLogout
app = Flask(__name__)
app.config['SQLALCHEMY_DATABA... | [
11748,
28686,
198,
6738,
42903,
1330,
46947,
11,
2581,
11,
33918,
1958,
198,
6738,
42903,
62,
2118,
913,
1330,
5949,
72,
198,
6738,
4133,
13,
39722,
1330,
5834,
11,
5834,
4868,
198,
6738,
4133,
13,
7033,
1453,
1330,
36824,
11,
36824,
... | 2.488987 | 908 |
# encoding: utf-8
from django.db import models
from django.conf import settings | [
2,
21004,
25,
3384,
69,
12,
23,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460
] | 3.333333 | 24 |
"""
T=O(N)
""" | [
198,
37811,
198,
51,
28,
46,
7,
45,
8,
198,
37811
] | 1.363636 | 11 |
# Generated by Django 4.0 on 2022-02-06 09:46
from django.db import migrations, models
import leads.models
import rizcrm.storage_backends
| [
2,
2980,
515,
416,
37770,
604,
13,
15,
319,
33160,
12,
2999,
12,
3312,
7769,
25,
3510,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
5983,
13,
27530,
198,
11748,
374,
528,
6098,
76,
13,
35350,
62,
... | 3.043478 | 46 |
#!/usr/bin/python3
# MIT License
# Copyright (c) 2017 Aleksey Vilezhaninov
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# t... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
628,
198,
2,
17168,
13789,
198,
198,
2,
15069,
357,
66,
8,
2177,
9300,
74,
4397,
569,
576,
89,
7637,
259,
709,
198,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
59... | 3.05045 | 3,112 |