content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
from molsysmt._private_tools.exceptions import *
from molsysmt.forms.common_gets import *
import numpy as np
from nglview import widget as _nglview_widget
import importlib
import sys
from molsysmt.molecular_system import molecular_system_components
form_name='nglview.NGLWidget'
is_form = {
_nglview_widget.NGLWidg... | [
6738,
285,
10220,
893,
16762,
13557,
19734,
62,
31391,
13,
1069,
11755,
1330,
1635,
198,
6738,
285,
10220,
893,
16762,
13,
23914,
13,
11321,
62,
11407,
1330,
1635,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
299,
4743,
1177,
1330,
26... | 2.838983 | 236 |
"""Hotkeys plugin example
this module contains the general, non gui-toolkit specific part of the code
"""
# uncomment these where appropriate
# import collections
# from example_app_keys_gui import layout_extra_fields_* # om dit beschikbaar te maken voor import
# uncomment this to define a routine to (re)build the c... | [
37811,
21352,
13083,
13877,
1672,
198,
198,
5661,
8265,
4909,
262,
2276,
11,
1729,
11774,
12,
25981,
15813,
2176,
636,
286,
262,
2438,
198,
37811,
198,
2,
8820,
434,
777,
810,
5035,
198,
2,
1330,
17268,
198,
2,
422,
1672,
62,
1324,
... | 3.5 | 410 |
# Copyright (c) 2016-2017, Neil Booth
#
# All rights reserved.
#
# The MIT License (MIT)
#
# 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 ... | [
2,
15069,
357,
66,
8,
1584,
12,
5539,
11,
15929,
36389,
198,
2,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
383,
17168,
13789,
357,
36393,
8,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
... | 3.352941 | 493 |
import pygame
import tensorflow as tf
import sys
import settings as stg
import matplotlib.pyplot as plt
from board import Grid
import gui
import numpy as np
game = Game()
while game.running:
game.new_guess()
pygame.quit()
| [
11748,
12972,
6057,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
25064,
198,
11748,
6460,
355,
336,
70,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
3096,
1330,
24846,
198,
11748,
11774,
198,
11748,
... | 3 | 77 |
from mantisshrimp import *
from mantisshrimp.hub.pennfundan import *
from mantisshrimp.engines.fastai import *
import albumentations as A
source = get_pennfundan_data()
parser = PennFundanParser(source)
splitter = RandomSplitter([0.8, 0.2])
train_records, valid_records = parser.parse(splitter)
train_transforms = Alb... | [
6738,
24818,
747,
71,
23750,
1330,
1635,
198,
6738,
24818,
747,
71,
23750,
13,
40140,
13,
79,
1697,
10990,
272,
1330,
1635,
198,
6738,
24818,
747,
71,
23750,
13,
1516,
1127,
13,
7217,
1872,
1330,
1635,
198,
11748,
435,
65,
1713,
602,
... | 2.538462 | 325 |
from os.path import basename, dirname, join, abspath
from setuptools import setup, Extension
from distutils.command.build import build as dBuild
from setuptools.command.install import install as dInstall
from setuptools.command.build_ext import build_ext as dBuildExt
from setuptools.command.bdist_egg import bdist_egg a... | [
6738,
28686,
13,
6978,
1330,
1615,
12453,
11,
26672,
3672,
11,
4654,
11,
2352,
6978,
198,
6738,
900,
37623,
10141,
1330,
9058,
11,
27995,
198,
6738,
1233,
26791,
13,
21812,
13,
11249,
1330,
1382,
355,
288,
15580,
198,
6738,
900,
37623,
... | 2.406734 | 1,485 |
# -----------------------------------------------------------------------
# Copyright (c) 2020, NVIDIA Corporation. All rights reserved.
#
# This work is made available
# under the Nvidia Source Code License (1-way Commercial).
#
# Official Implementation of the CVPR2020 Paper
# Two-shot Spatially-varying BRDF and Shap... | [
2,
16529,
26866,
198,
2,
15069,
357,
66,
8,
12131,
11,
15127,
10501,
13,
1439,
2489,
10395,
13,
198,
2,
198,
2,
770,
670,
318,
925,
1695,
198,
2,
739,
262,
27699,
8090,
6127,
13789,
357,
16,
12,
1014,
22724,
737,
198,
2,
198,
2,... | 4.460177 | 113 |
import pdb
import logging
import os
import sys
import time
import subprocess
import xlrd
import win32gui
import win32api
import win32con
#import comtypes
from configparser import ConfigParser
from comtypes.client import *
from ctypes import *
class RRTE:
DELAY_RRET_START = 8
DELAY_WAIT_DLG = 3
NAME_RRTE_APP ... | [
11748,
279,
9945,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
640,
198,
11748,
850,
14681,
198,
11748,
2124,
75,
4372,
198,
11748,
1592,
2624,
48317,
198,
11748,
1592,
2624,
15042,
198,
11748,
1592,
2624,
1102,
19... | 2.313019 | 1,083 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-03 17:48
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,
940,
13,
20,
319,
2177,
12,
3070,
12,
3070,
1596,
25,
2780,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
... | 2.73913 | 69 |
# The Expat License
#
# Copyright (c) 2017, Shlomi Fish
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, ... | [
2,
383,
5518,
265,
13789,
198,
2,
198,
2,
15069,
357,
66,
8,
2177,
11,
911,
75,
12753,
13388,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
198,
2,
286,
428,
3788,
290,
... | 3.568571 | 350 |
#!/usr/bin/env python3
# coding=utf-8
# -*- utf8 -*-
# author=dave.fang@outlook.com
# create=20170330
import math
from lib.log import LOGGER
def calc_mean(numbers):
"""
:param numbers:
:return:
"""
return sum(numbers) / float(len(numbers))
def calc_stdev(numbers):
"""
:param ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
19617,
28,
40477,
12,
23,
198,
2,
532,
9,
12,
3384,
69,
23,
532,
9,
12,
198,
2,
1772,
28,
67,
1015,
13,
69,
648,
31,
448,
5460,
13,
785,
198,
2,
2251,
28,
1264,
2154,
... | 2.176301 | 346 |
from views.sprite_views.attack_sprite import AttackSprite, AttackState
from views.sprite_views.movement_sprite import Direction, State
| [
6738,
5009,
13,
34975,
578,
62,
33571,
13,
20358,
62,
34975,
578,
1330,
8307,
38454,
578,
11,
8307,
9012,
198,
6738,
5009,
13,
34975,
578,
62,
33571,
13,
21084,
434,
62,
34975,
578,
1330,
41837,
11,
1812,
628
] | 3.578947 | 38 |
# Generated by Django 2.2.3 on 2019-08-01 18:13
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
18,
319,
13130,
12,
2919,
12,
486,
1248,
25,
1485,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.766667 | 30 |
from flask import Blueprint
from flask_security import SQLAlchemyUserDatastore
from app import db
from app.users.models import User, Role
bp = Blueprint('users', __name__, template_folder='templates')
user_datastore = SQLAlchemyUserDatastore(db, User, Role)
# Create a user to test with
| [
6738,
42903,
1330,
39932,
198,
6738,
42903,
62,
12961,
1330,
16363,
2348,
26599,
12982,
27354,
459,
382,
198,
198,
6738,
598,
1330,
20613,
198,
6738,
598,
13,
18417,
13,
27530,
1330,
11787,
11,
20934,
198,
198,
46583,
796,
39932,
10786,
... | 3.435294 | 85 |
from substrateinterface import SubstrateInterface, Keypair
from substrateinterface.utils.ss58 import ss58_encode, ss58_decode
#
# get_config - Get a default and validator specific config elements from args and config.
#
#
# get_eras_rewards_point - Collect the ErasRewardPoints (total and invididual) for a given rang... | [
6738,
32305,
39994,
1330,
3834,
23104,
39317,
11,
7383,
24874,
198,
6738,
32305,
39994,
13,
26791,
13,
824,
3365,
1330,
37786,
3365,
62,
268,
8189,
11,
37786,
3365,
62,
12501,
1098,
198,
198,
2,
198,
2,
651,
62,
11250,
532,
3497,
257,... | 2.642185 | 531 |
# -*- coding: utf-8 -*-
"""
LogfileLexer - Demo
Highlights whole lines which matches the regex.
Usage:
Load a logfile, modify error and warning regex and
run script to see how it works
Note: By commenting or deleting everything, including,
the <comment_or_delete> tags it is ready to be us... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
220,
220,
220,
5972,
7753,
45117,
263,
532,
34588,
628,
220,
220,
220,
30776,
2187,
3951,
543,
7466,
262,
40364,
13,
628,
220,
220,
220,
29566,
25,
198,
22... | 2.98995 | 199 |
from .logger import LOG
from .funs import *
#
#
PY_PARAM_FUNCTION = PyFunction()
#
for fun_name in default_fun_dict:
PY_PARAM_FUNCTION.register_func(fun_name, default_fun_dict[fun_name])
#
PY_RESULT_FUNCTION = PyFunction()
| [
6738,
764,
6404,
1362,
1330,
41605,
198,
6738,
764,
12543,
82,
1330,
1635,
628,
198,
2,
220,
628,
198,
2,
220,
220,
198,
47,
56,
62,
27082,
2390,
62,
42296,
4177,
2849,
796,
9485,
22203,
3419,
198,
2,
220,
198,
1640,
1257,
62,
367... | 2.323529 | 102 |
from ipython_kernel_plugin import IPythonKernelPlugin, IPYTHON_KERNEL_PROTOCOL # noqa
| [
6738,
20966,
7535,
62,
33885,
62,
33803,
1330,
6101,
7535,
42,
7948,
37233,
11,
6101,
56,
4221,
1340,
62,
42,
28778,
3698,
62,
4805,
2394,
4503,
3535,
220,
1303,
645,
20402,
198
] | 2.71875 | 32 |
import torch
import numpy as np
import os
from ..utils import load_params, get_scaler, get_rescaler
| [
11748,
28034,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
6738,
11485,
26791,
1330,
3440,
62,
37266,
11,
651,
62,
1416,
36213,
11,
651,
62,
411,
9948,
263,
628,
628,
628
] | 3.181818 | 33 |
from django.shortcuts import render
from blog.models import BlogPost
from operator import attrgetter
from blog.views import get_blog_queryset
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
# Create your views here.
BLOG_POSTS_PER_PAGE = 1
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
4130,
13,
27530,
1330,
14001,
6307,
198,
6738,
10088,
1330,
708,
81,
1136,
353,
198,
6738,
4130,
13,
33571,
1330,
651,
62,
14036,
62,
10819,
893,
316,
198,
6738,
42625,
14208,... | 3.268293 | 82 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Function: Create a plugin project based on example project.
This script has been tested with ActivePython 2.7/3.2.
Usage: python makeplugin.py [prjname [pkgname [srcprj [srcpkg [useswig]]]]]
or double click the file 'makeplugin.py'.
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
22203,
25,
220,
220,
13610,
257,
13877,
1628,
1912,
319,
1672,
1628,
13,
198,
220,
220,
220,
220,
220,
22... | 2.54902 | 612 |
from PIL import Image
import os
import numpy as np
import pandas as pd
from random import seed
from random import randint
dirname = os.path.dirname('')
dimensions = 600, 600
make_armors("doojunggap", 500, 54)
make_armors("gyungbyungap", 500, 41)
make_armors("chalgap", 34, 12113... | [
201,
198,
201,
198,
6738,
350,
4146,
1330,
7412,
201,
198,
11748,
28686,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
11748,
19798,
292,
355,
279,
67,
201,
198,
6738,
4738,
1330,
9403,
201,
198,
6738,
4738,
1330,
43720,
600,
201... | 2.248276 | 145 |
from collections import namedtuple | [
6738,
17268,
1330,
3706,
83,
29291
] | 5.666667 | 6 |
import sys
import pytest
from polynomials_on_simplices.calculus.real_interval import equivalent_periodic_element
if __name__ == "__main__":
pytest.main(sys.argv)
| [
11748,
25064,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
745,
6213,
296,
8231,
62,
261,
62,
14323,
489,
1063,
13,
9948,
17576,
13,
5305,
62,
3849,
2100,
1330,
7548,
62,
41007,
291,
62,
30854,
628,
198,
198,
361,
11593,
3672,
834,
... | 2.714286 | 63 |
from client_database_connection import mycursor
from ftp import *
from config import free
config = json.loads(open('config.json').read())
node_id = config['node id']
local_path = config['local path']
while free:
sql = "SELECT code_id FROM code_node where node_id = " + node_id
mycursor.execute(... | [
6738,
5456,
62,
48806,
62,
38659,
1330,
616,
66,
21471,
201,
198,
6738,
10117,
79,
1330,
1635,
201,
198,
6738,
4566,
1330,
1479,
201,
198,
201,
198,
201,
198,
201,
198,
11250,
796,
33918,
13,
46030,
7,
9654,
10786,
11250,
13,
17752,
... | 2.503289 | 304 |
import os
from flask import Flask, flash, request, redirect, url_for, jsonify
from flask_cors import CORS
from werkzeug.utils import secure_filename
import subprocess
# set up text to speech map
from nltk.stem import PorterStemmer
from nltk.tokenize import word_tokenize
# speech recognition
import speech_recognition ... | [
11748,
28686,
198,
6738,
42903,
1330,
46947,
11,
7644,
11,
2581,
11,
18941,
11,
19016,
62,
1640,
11,
33918,
1958,
198,
6738,
42903,
62,
66,
669,
1330,
327,
20673,
198,
6738,
266,
9587,
2736,
1018,
13,
26791,
1330,
5713,
62,
34345,
198... | 2.699336 | 602 |
from cc3d.core.PySteppables import *
| [
6738,
36624,
18,
67,
13,
7295,
13,
20519,
7447,
381,
2977,
1330,
1635,
628
] | 2.714286 | 14 |
import data_module
import email_module
import db_module
from jinja2 import Environment, FileSystemLoader
from os import path
import time
from datetime import datetime
DIR_PATH = path.dirname(path.realpath(__file__))
NEW_SKIRT_SUBJECT = r"Novinka! - {0}"
NEW_PRINT_SUBJECT = r"NOV TISKY! - {0}"
DAY_INIT_SUBJECT = r"Kep... | [
11748,
1366,
62,
21412,
198,
11748,
3053,
62,
21412,
198,
11748,
20613,
62,
21412,
198,
6738,
474,
259,
6592,
17,
1330,
9344,
11,
9220,
11964,
17401,
198,
6738,
28686,
1330,
3108,
198,
11748,
640,
198,
6738,
4818,
8079,
1330,
4818,
8079... | 2.566474 | 346 |
# -*- coding: utf-8 -*-
from gos.configuration import Configuration
from gos.exceptions import GOSTaskException, GOSExecutableContainerException
from gos.executable_containers import ExecutableContainer
from gos.tasks import TaskLoader
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
308,
418,
13,
11250,
3924,
1330,
28373,
198,
6738,
308,
418,
13,
1069,
11755,
1330,
10351,
2257,
2093,
16922,
11,
402,
2640,
23002,
18187,
29869,
16922,
198,
6738,
... | 3.590909 | 66 |
import requests
import json
| [
11748,
7007,
198,
11748,
33918,
628
] | 4.833333 | 6 |
from enum import Enum
| [
6738,
33829,
1330,
2039,
388,
198
] | 3.666667 | 6 |
# -*- coding: utf-8 -*-
from zvt.recorders.joinquant.overall.cross_market_recorder import *
from zvt.recorders.joinquant.overall.margin_trading_recorder import *
from zvt.recorders.joinquant.overall.stock_summary_recorder import *
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
1976,
36540,
13,
8344,
6361,
13,
7639,
18934,
415,
13,
2502,
439,
13,
19692,
62,
10728,
62,
8344,
2875,
1330,
1635,
198,
6738,
1976,
36540,
13,
8344,
6361,
13,
7... | 2.75 | 84 |
import unittest
from simulator_diagnoser.graph import InmemoryGraph
from simulator_diagnoser.diagnosis import APTDiagnoser
from simulator_diagnoser.matcher import Terminal, \
Sequence, \
StatelessMatcher
if __name__ == '__main__':
unit... | [
11748,
555,
715,
395,
198,
6738,
35375,
62,
47356,
13416,
13,
34960,
1330,
554,
31673,
37065,
198,
6738,
35375,
62,
47356,
13416,
13,
47356,
5958,
1330,
3486,
51,
18683,
4660,
13416,
198,
6738,
35375,
62,
47356,
13416,
13,
6759,
2044,
1... | 2.155844 | 154 |
#!/usr/bin/env python3
"""Roll up the geo6 json to produce a tree suitable for sub9 query"""
__author__ = "H. Martin"
__version__ = "0.1.0"
import json
import math
from random import randint
data = {}
transformed = {}
with open('geohash_counter_6.json', encoding='utf-8') as data_file:
data = json.loads(data_... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
37811,
26869,
510,
262,
40087,
21,
33918,
284,
4439,
257,
5509,
11080,
329,
850,
24,
12405,
37811,
198,
198,
834,
9800,
834,
796,
366,
39,
13,
5780,
1,
198,
834,
9641,
834,
... | 2.419619 | 367 |
import pytest
from models.notes import NotesModel
from schemas.notes import NotesSchema
from tests.attributes import note_attrs
| [
11748,
12972,
9288,
198,
6738,
4981,
13,
17815,
1330,
11822,
17633,
198,
6738,
3897,
5356,
13,
17815,
1330,
11822,
27054,
2611,
198,
6738,
5254,
13,
1078,
7657,
1330,
3465,
62,
1078,
3808,
628,
198
] | 3.823529 | 34 |
"""
MIT License
Copyright 2021-Present kal-byte
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, ... | [
37811,
198,
36393,
13789,
198,
198,
15269,
33448,
12,
34695,
479,
282,
12,
26327,
198,
198,
5990,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
198,
30073,
286,
428,
3788,
290,
3917,
10314,
3696,
357,
11... | 3.921384 | 318 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from tav.tmux import hook
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
256,
615,
13,
17209,
2821,
1330,
8011,
628
] | 2.205882 | 34 |
# Generated by Django 2.1.7 on 2019-03-23 17:09
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
13,
22,
319,
13130,
12,
3070,
12,
1954,
1596,
25,
2931,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import dash
from dash import dcc
from dash import html,Input, Output
import dash_bootstrap_components as dbc
from ..app import app
from .sidebar_function_tab1 import TAB1_DROPDOWN,time_scale,date_slider,choose_fun_tab1
SIDEBAR1 = [dbc.Row("Energy Dashboard",class_name="title",style={"font-size":"30px","padding-left":... | [
11748,
14470,
198,
6738,
14470,
1330,
288,
535,
198,
6738,
14470,
1330,
27711,
11,
20560,
11,
25235,
198,
11748,
14470,
62,
18769,
26418,
62,
5589,
3906,
355,
288,
15630,
198,
6738,
11485,
1324,
1330,
598,
198,
6738,
764,
1589,
5657,
62... | 2.996416 | 279 |
#!/usr/bin/env python
from __future__ import print_function
from moveit_python_interface import MoveGroupPythonInteface
from geometry_msgs.msg import Pose
import rospy
from interbotix_moveit_interface.srv import GetTrajectory, GetTrajectoryResponse
# flags
GO_TO_START_JOINT_VALUES = False # whether to use ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
6738,
1445,
270,
62,
29412,
62,
39994,
1330,
10028,
13247,
37906,
5317,
891,
558,
198,
6738,
22939,
62,
907,
14542,
13,
19... | 2.270799 | 1,839 |
"""
This module contains the BaseImporter Abstract class which all other importers are inherited from.
"""
from abc import ABC, abstractmethod
from utilities.constants import ImportModes
| [
37811,
198,
1212,
8265,
4909,
262,
7308,
3546,
26634,
27741,
1398,
543,
477,
584,
848,
3816,
389,
19552,
422,
13,
198,
37811,
198,
6738,
450,
66,
1330,
9738,
11,
12531,
24396,
198,
198,
6738,
20081,
13,
9979,
1187,
1330,
17267,
44,
41... | 4.395349 | 43 |
from worldbankstext import * | [
6738,
995,
17796,
301,
2302,
1330,
1635
] | 4 | 7 |
# Imports
import requests
import os
import sys
import lcddriver
import time
import datetime
import RPi.GPIO as GPIO
import dht11
thingspeak_key = 'ZHAO5MQEKA0B93P7'
temperature = 23
humidity = 35
# Send the data to Thingspeak
r = requests.post('https://api.thingspeak.com/update.json', data = {'api_key':thingspeak... | [
2,
1846,
3742,
198,
11748,
7007,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
300,
66,
1860,
38291,
198,
11748,
640,
198,
11748,
4818,
8079,
198,
11748,
25812,
72,
13,
16960,
9399,
355,
50143,
198,
11748,
288,
4352,
1157,
198,
198,... | 2.867188 | 128 |
from ._storage_entry_model import StorageEntryModel | [
6738,
47540,
35350,
62,
13000,
62,
19849,
1330,
20514,
30150,
17633
] | 4.636364 | 11 |
import os
import json
import fire
if __name__ == "__main__":
fire.Fire(main) | [
11748,
28686,
198,
11748,
33918,
198,
11748,
2046,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
2046,
13,
13543,
7,
12417,
8
] | 2.677419 | 31 |
#!/usr/bin/env python
"""Generate go-pylons.py"""
import sys
import textwrap
import virtualenv
filename = 'go-pylons.py'
after_install = """\
import os, subprocess
def after_install(options, home_dir):
etc = join(home_dir, 'etc')
## TODO: this should all come from distutils
## like distutils.sysconfig.get... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
8645,
378,
467,
12,
79,
2645,
684,
13,
9078,
37811,
198,
11748,
25064,
198,
11748,
2420,
37150,
198,
11748,
7166,
24330,
198,
198,
34345,
796,
705,
2188,
12,
79,
2645,
684,
13,
... | 2.241645 | 389 |
import os
import pkg_resources
import shutil
from ..equations import equations
from ..definitions import EQN_DEFINITIONS
def generate_equations_doc(docfile):
"""
Helper function to automatically generate a documentation page containing
all the available equations within cweqgen.
Parameters
-----... | [
11748,
28686,
198,
11748,
279,
10025,
62,
37540,
198,
11748,
4423,
346,
198,
198,
6738,
11485,
4853,
602,
1330,
27490,
198,
6738,
11485,
4299,
50101,
1330,
36529,
45,
62,
7206,
20032,
2043,
11053,
628,
198,
4299,
7716,
62,
4853,
602,
62... | 2.289322 | 1,386 |
import os;
import sys;
FileName='FileIO.txt'
try:
string = os.path.dirname(os.path.realpath(__file__))+'/'+FileName;
fw = open(string, "a+");
crud();
except Exception as e:
print e;
fw.close();
sys.exit();
| [
11748,
28686,
26,
198,
11748,
25064,
26,
198,
198,
8979,
5376,
11639,
8979,
9399,
13,
14116,
6,
628,
628,
628,
198,
198,
28311,
25,
198,
220,
220,
220,
4731,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
5305,
6978,
... | 2.203704 | 108 |
import time
from print_running_function import print_running_function
# Hackish method to import from another directory
# Useful while xendit-python isn't released yet to the public
import importlib.machinery
loader = importlib.machinery.SourceFileLoader("xendit", "../xendit/__init__.py")
xendit = loader.lo... | [
11748,
640,
201,
198,
201,
198,
6738,
3601,
62,
20270,
62,
8818,
1330,
3601,
62,
20270,
62,
8818,
201,
198,
201,
198,
2,
18281,
680,
2446,
284,
1330,
422,
1194,
8619,
201,
198,
2,
49511,
981,
2124,
437,
270,
12,
29412,
2125,
470,
... | 2.661795 | 479 |
import unittest
from textwrap import dedent
import trafaret as T
from .util import get_err
| [
11748,
555,
715,
395,
198,
6738,
2420,
37150,
1330,
4648,
298,
198,
198,
11748,
1291,
69,
8984,
355,
309,
198,
6738,
764,
22602,
1330,
651,
62,
8056,
628,
628
] | 3.275862 | 29 |
B_5801_9 = {0: {'A': -0.3411047643185575, 'C': 0.003633483019123024, 'E': -0.4818751780000427, 'D': -0.48635888961606405, 'G': -0.2552323225624609, 'F': -0.18023397304713804, 'I': 0.3607439895775445, 'H': 0.020686177466924322, 'K': 0.8273437122618179, 'M': 0.47430136579724197, 'L': 0.17966127012728303, 'N': -0.32919669... | [
33,
62,
3365,
486,
62,
24,
796,
1391,
15,
25,
1391,
6,
32,
10354,
532,
15,
13,
2682,
11442,
2857,
2414,
36042,
2816,
2425,
11,
705,
34,
10354,
657,
13,
405,
2623,
2091,
2780,
18938,
24,
1065,
1270,
1731,
11,
705,
36,
10354,
532,
... | 1.902076 | 2,553 |
from django.contrib import admin
from django.utils.translation import gettext_lazy as _
from django_requests_logger.models import RequestLog
admin.site.register(RequestLog, RequestLogAdmin)
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
651,
5239,
62,
75,
12582,
355,
4808,
198,
6738,
42625,
14208,
62,
8897,
3558,
62,
6404,
1362,
13,
27530,
1330,
19390,
11187,
628,
198,
... | 3.446429 | 56 |
# Copyright 2017 Francesco Ceccon
#
# 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 writ... | [
2,
15069,
2177,
27025,
1073,
20101,
535,
261,
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,
... | 3.361204 | 299 |
import requests
import bs4
import re
import random
import codecs
import os
from discord.ext import commands
from discord.ext.commands import BucketType
from cogs.utils import checks
path_qaz = os.path.join(os.getcwd(), 'files', 'qaz.txt')
path_riko = os.path.join(os.getcwd(), 'files', 'riko_meme')
nsfw... | [
11748,
7007,
201,
198,
11748,
275,
82,
19,
201,
198,
11748,
302,
201,
198,
11748,
4738,
201,
198,
11748,
40481,
82,
201,
198,
11748,
28686,
201,
198,
201,
198,
6738,
36446,
13,
2302,
1330,
9729,
201,
198,
6738,
36446,
13,
2302,
13,
... | 2.256983 | 179 |
# keys file is not included in repository
import keys
ROOT = "http://api.cubesensors.com"
AUTH = "%s/auth" % ROOT
RES = "%s/v1" % ROOT
logger_name = "cubesensors_parser"
# Define if should use event hub or insert data straight to db
use_event_hub = False
# CubeSensors config
consumer_key = keys.cube_consumer_key
co... | [
2,
8251,
2393,
318,
407,
3017,
287,
16099,
198,
11748,
8251,
198,
198,
13252,
2394,
796,
366,
4023,
1378,
15042,
13,
66,
29080,
641,
669,
13,
785,
1,
198,
32,
24318,
796,
36521,
82,
14,
18439,
1,
4064,
15107,
2394,
198,
19535,
796,
... | 2.888489 | 278 |
bug = r"""\
=, .=
=.| ,---. |.=
=.| "-(:::::)-" |.=
\\__/`-.|.-'\__//
`-| .::| .::|-' Pillendreher
_|`-._|_.-'|_ (Scarabaeus sacer)
/.-| | .::|-.\
// ,| .::|::::|. \\
|| //\::::|::' /\\ ||
/'\|| `.__|__.' ||/'\
^ \\ //... | [
25456,
796,
374,
37811,
59,
198,
220,
220,
220,
220,
220,
796,
11,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
764,
28,
198,
220,
220,
220,
220,
796,
13,
91,
220,
220,
220,
837,
6329,
13,
220,
220,
220,
930,
13... | 1.399254 | 268 |
"""
<Program Name>
tooldb.py
<Author>
Lukas Puehringer <lukas.puehringer@nyu.edu>
<Started>
June 12, 2017
<Copyright>
See LICENSE for licensing information.
<Purpose>
A basic collection of software supply chain tools in four categories
- vcs (version control systems)
- building
- qa (quality assu... | [
37811,
198,
27,
15167,
6530,
29,
198,
220,
284,
727,
65,
13,
9078,
198,
198,
27,
13838,
29,
198,
220,
28102,
292,
350,
518,
71,
1806,
263,
1279,
2290,
42749,
13,
79,
518,
71,
1806,
263,
31,
3281,
84,
13,
15532,
29,
198,
198,
27,... | 2.10235 | 5,276 |
from operations.operation import Operation
| [
6738,
4560,
13,
27184,
1330,
14680,
628,
198
] | 5.625 | 8 |
# coding=utf-8
"""
@author: magician
@date: 2018/9/13
"""
import datetime as dt
from marshmallow import Schema, fields, pprint
if __name__ == '__main__':
user = User(name='Monty', email='monty@python.org')
blog = Blog(title='Something Completely Different', author=user)
result = BlogSchema().dum... | [
2,
19617,
28,
40477,
12,
23,
198,
198,
37811,
198,
31,
9800,
25,
42055,
198,
31,
4475,
25,
2864,
14,
24,
14,
1485,
198,
37811,
198,
11748,
4818,
8079,
355,
288,
83,
198,
198,
6738,
22397,
42725,
1330,
10011,
2611,
11,
7032,
11,
27... | 2.28143 | 867 |
import random
import click
import numpy as np
import rasterio
from rasterio.transform import from_origin
from rastervision.core.box import Box
from rastervision.data import (RasterioCRSTransformer, ObjectDetectionLabels,
ObjectDetectionGeoJSONStore)
from rastervision.core.class_map impo... | [
11748,
4738,
198,
198,
11748,
3904,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
374,
1603,
952,
198,
6738,
374,
1603,
952,
13,
35636,
1330,
422,
62,
47103,
198,
198,
6738,
374,
1603,
10178,
13,
7295,
13,
3524,
1330,
8315,
198,
673... | 2.769231 | 143 |
from lightdict import HanziDict
hanzi_dic = HanziDict(r'D:\Data\NLP\corpus\words\hanzi.csv')
print('' in hanzi_dic)
x = hanzi_dic['']
print(x)
| [
6738,
1657,
11600,
1330,
9530,
17027,
35,
713,
198,
198,
7637,
17027,
62,
67,
291,
796,
9530,
17027,
35,
713,
7,
81,
6,
35,
7479,
6601,
59,
45,
19930,
59,
10215,
79,
385,
59,
10879,
59,
7637,
17027,
13,
40664,
11537,
628,
198,
479... | 2.027778 | 72 |
from bs4 import Tag
__all__ = ["CustomHtmlTag", "Attrs", "PartialAttrs"]
######## General utility classes for tags and attrs
| [
6738,
275,
82,
19,
1330,
17467,
198,
198,
834,
439,
834,
796,
14631,
15022,
39,
20369,
24835,
1600,
366,
8086,
3808,
1600,
366,
7841,
498,
8086,
3808,
8973,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
7804,
3611,
10361,
6097,
... | 2.8125 | 48 |
"""
WSGI config for pycess project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pycess.settings")
from django.core.wsg... | [
37811,
198,
19416,
18878,
4566,
329,
12972,
919,
1628,
13,
198,
198,
1026,
32142,
262,
25290,
18878,
869,
540,
355,
257,
8265,
12,
5715,
7885,
3706,
7559,
31438,
15506,
13,
198,
198,
1890,
517,
1321,
319,
428,
2393,
11,
766,
198,
5450... | 2.968912 | 193 |
from functools import reduce
games = int(input())
for game in range(games):
number_of_piles = int(input())
pile = list(map(int, input().rstrip().split()))
result = reduce((lambda x, y: x ^ y), pile)
# result = len(pile) % 2 [wont work on test case 2]
print('Second' if result == 0 else 'First')... | [
6738,
1257,
310,
10141,
1330,
4646,
198,
198,
19966,
796,
493,
7,
15414,
28955,
198,
198,
1640,
983,
287,
2837,
7,
19966,
2599,
628,
220,
220,
220,
1271,
62,
1659,
62,
79,
2915,
796,
493,
7,
15414,
28955,
628,
220,
220,
220,
14540,
... | 2.74359 | 117 |
import unittest
from flows.statestore.django_store import StateStore
from flows.statestore.tests.utils import store_state_works
| [
198,
11748,
555,
715,
395,
198,
6738,
15623,
13,
14269,
395,
382,
13,
28241,
14208,
62,
8095,
1330,
1812,
22658,
198,
6738,
15623,
13,
14269,
395,
382,
13,
41989,
13,
26791,
1330,
3650,
62,
5219,
62,
5225,
198,
220,
220,
220,
220,
1... | 3.116279 | 43 |
import numpy as np
import torch.nn as nn
from torch import Tensor, from_numpy
from unittest import TestCase
from ezyrb import ANN
np.random.seed(17)
| [
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
6738,
28034,
1330,
309,
22854,
11,
422,
62,
77,
32152,
198,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
198,
6738,
304,
89,
2417,
65,
1330,
40126,
198,
... | 2.903846 | 52 |
import os.path
_PATH_PREFIX = os.path.dirname(os.path.realpath(__file__))
_TEMPLATE_PATH = os.path.join(_PATH_PREFIX, 'tmpl')
_TEMPLATE_EXT = '.jinja'
_EPUB_SKELETON_PATH = os.path.join(_PATH_PREFIX, 'epub')
_BASIC_CH_PAR_STYLE = 'par-indent'
_FIRST_CH_PAR_STYLE = 'texttop'
_DROP_CAP_STYLE = 'dropcap'
_CLEAR_STYLE... | [
11748,
28686,
13,
6978,
198,
198,
62,
34219,
62,
47,
31688,
10426,
796,
220,
28686,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
5305,
6978,
7,
834,
7753,
834,
4008,
198,
62,
51,
3620,
6489,
6158,
62,
34219,
796,
220,
28686,
1... | 1.968912 | 193 |
if __name__ == "__main__":
print(TreeNode.constructTree([3,9,20,None,None,15,7]))
print(TreeNode.constructTree([2,3,4]))
| [
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
3601,
7,
27660,
19667,
13,
41571,
27660,
26933,
18,
11,
24,
11,
1238,
11,
14202,
11,
14202,
11,
1314,
11,
22,
60,
4008,
198,
220,
220,
220,
360... | 2.220339 | 59 |
import hypothesis.strategies as st
from hypothesis.extra.numpy import arrays
from hypothesis import given
import unittest
import numpy as np
from sklearn.base import BaseEstimator
import inspect
import src.quality_measures as qm
from .logging import logger
# old functions to test against while refactoring
def old_ce... | [
11748,
14078,
13,
2536,
2397,
444,
355,
336,
198,
6738,
14078,
13,
26086,
13,
77,
32152,
1330,
26515,
198,
6738,
14078,
1330,
1813,
198,
11748,
555,
715,
395,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
1341,
35720,
13,
8692,
1330,
... | 2.139265 | 1,551 |
import logging
_logger = logging.getLogger(__name__)
from odoo import api, fields, models
| [
11748,
18931,
198,
62,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
198,
6738,
16298,
2238,
1330,
40391,
11,
7032,
11,
4981,
198
] | 3.214286 | 28 |
# ==================================================================================================
# Copyright 2011 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | [
2,
38093,
10052,
28,
198,
2,
15069,
2813,
3009,
11,
3457,
13,
198,
2,
16529,
3880,
438,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
670,
2845,
287,
... | 4.713846 | 325 |
import base64
import os
import matplotlib.pyplot as plt
import cv2
import numpy as np
from PyQt5 import uic
from PyQt5 import QtWidgets
from PyQt5 import QtMultimedia
from PyQt5 import QtMultimediaWidgets
from PyQt5.QtGui import QImage, QPixmap
from PyQt5.QtWidgets import QDesktopWidget
from nas.gui.login_stimulation_w... | [
11748,
2779,
2414,
198,
11748,
28686,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
9485,
48,
83,
20,
1330,
334,
291,
198,
6738,
9485,
48,
83,
2... | 2.730594 | 219 |
import matplotlib.pyplot as plt
# Diagramm und Achsen definieren
fig, ax = plt.subplots()
# Werte fr Tabelle erstellen
table_data=[
["1", 30, 34],
["2", 20, 223],
["3", 33, 2354],
["4", 25, 234],
["5", 12, 929]
]
#Tabelle erstellen
table = ax.table(cellText=table_data, loc='center', colLabels=['... | [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
220,
198,
198,
2,
6031,
6713,
76,
3318,
26219,
6248,
2730,
494,
918,
198,
5647,
11,
7877,
796,
458,
83,
13,
7266,
489,
1747,
3419,
198,
198,
2,
27648,
660,
1216,
309,
9608,
... | 2.182266 | 203 |
'''
Copyright (c) 2016, 2017, 2019 Timothy Savannah All Rights Reserved.
Licensed under the Lesser GNU Public License Version 3, LGPLv3. You should have recieved a copy of this with the source distribution as
LICENSE, otherwise it is available at https://github.com/kata198/func_timeout/LICENSE
'''
import ... | [
7061,
6,
198,
220,
220,
220,
15069,
357,
66,
8,
1584,
11,
2177,
11,
13130,
22283,
40695,
1439,
6923,
33876,
13,
628,
220,
220,
220,
49962,
739,
262,
12892,
263,
22961,
5094,
13789,
10628,
513,
11,
17370,
6489,
85,
18,
13,
921,
815,
... | 3.338462 | 130 |
from django.contrib import admin
from .models import Image,Areas,Category
# Register your models here.
admin.site.register(Image)
admin.site.register(Areas)
admin.site.register(Category) | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
764,
27530,
1330,
7412,
11,
8491,
292,
11,
27313,
198,
198,
2,
17296,
534,
4981,
994,
13,
628,
198,
198,
28482,
13,
15654,
13,
30238,
7,
5159,
8,
198,
28482,
13,
15654,
13,
... | 3.333333 | 57 |
# -*- coding: utf-8 -*-
from unittest import TestCase
from mock import Mock, patch
from lamvery.cli import (
main,
init,
build,
configure,
deploy,
encrypt,
encrypt_file,
events,
decrypt,
set_alias,
invoke,
rollback,
api,
generate
)
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
198,
6738,
15290,
1330,
44123,
11,
8529,
198,
6738,
30592,
548,
13,
44506,
1330,
357,
198,
220,
220,
220,
1388,
11,
198,
2... | 2.265625 | 128 |
import sqlite3
from util import post_listing_to_slack
from slackclient import SlackClient
import settings
sc = SlackClient(settings.SLACK_TOKEN)
con = sqlite3.connect('listings.db')
# with con:
# con.row_factory = sqlite3.Row
# cur = con.cursor()
# # print("SQLite version: %s" % data)
# cur.execute("... | [
11748,
44161,
578,
18,
198,
6738,
7736,
1330,
1281,
62,
4868,
278,
62,
1462,
62,
6649,
441,
198,
6738,
30740,
16366,
1330,
36256,
11792,
198,
11748,
6460,
198,
198,
1416,
796,
36256,
11792,
7,
33692,
13,
8634,
8120,
62,
10468,
43959,
... | 2.431624 | 234 |
#############################################################################
#
# 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
#
# ... | [
29113,
29113,
7804,
4242,
2,
198,
2,
198,
2,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
220,
220,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
19... | 2.170287 | 4,880 |
from utils import PATH_LABEL
from utils import PATH_DATA_FOLDER
import pickle
import torch
import torch.nn as nn
import torch.utils.data as dat
| [
6738,
3384,
4487,
1330,
46490,
62,
48780,
3698,
198,
6738,
3384,
4487,
1330,
46490,
62,
26947,
62,
37,
3535,
14418,
198,
11748,
2298,
293,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
26791,
13,
... | 3.2 | 45 |
__all__ = [
'AppProject',
'App',
'AppItem',
'AppItemsCreateRequest',
'AppBatch',
'AppBatchCreateRequest'
]
import datetime
import decimal
from enum import unique
from typing import Dict, Any, List
from ..primitives.base import BaseTolokaObject
from ..project.field_spec import FieldSpec
from ...... | [
834,
439,
834,
796,
685,
198,
220,
220,
220,
705,
4677,
16775,
3256,
198,
220,
220,
220,
705,
4677,
3256,
198,
220,
220,
220,
705,
4677,
7449,
3256,
198,
220,
220,
220,
705,
4677,
23022,
16447,
18453,
3256,
198,
220,
220,
220,
705,
... | 3.036765 | 136 |
# Utility functions for Strings (i.e. storing common strings once)
#define common strings
ERR_MISSING_KEY = "The field(s) {0} must be filled in this form."
ERR_INVALID_KEY = "The field '{0}' contains an invalid value."
ERR_UNAUTHORIZED = "The logged in user does not have access to this value: {0}"
MSG_FINISHED_TRAININ... | [
2,
34030,
5499,
329,
4285,
654,
357,
72,
13,
68,
13,
23069,
2219,
13042,
1752,
8,
198,
198,
2,
13086,
2219,
13042,
198,
1137,
49,
62,
44,
16744,
2751,
62,
20373,
796,
366,
464,
2214,
7,
82,
8,
1391,
15,
92,
1276,
307,
5901,
287,... | 3.208589 | 163 |
#!/usr/bin/env python
import sys
import math
maxprime = 12
twomult = 2**2
#====================
def prime_factors(n):
""" Return the prime factors of the given number. """
# < 1 is a special case
if n <= 1:
return [1]
factors = []
lastresult = n
while True:
if lastresult == 1:
break
c = 2
while True... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
25064,
198,
11748,
10688,
198,
198,
9806,
35505,
796,
1105,
198,
4246,
296,
586,
796,
362,
1174,
17,
198,
198,
2,
4770,
1421,
198,
4299,
6994,
62,
22584,
669,
7,
77,
2599... | 2.634686 | 542 |
# MIT License
# Copyright (c) 2016 Aashiq Ahmed, Shuai Chen, Meha Deora, Douglas Hu
# 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 rig... | [
2,
17168,
13789,
198,
198,
2,
15069,
357,
66,
8,
1584,
317,
12144,
80,
21157,
11,
32344,
1872,
12555,
11,
2185,
3099,
1024,
5799,
11,
15796,
11256,
198,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
... | 3.138776 | 490 |
#!/usr/bin/env python
# coding: utf-8
# In[2]:
pip install instaloader
# In[4]:
import instaloader
# In[6]:
ig = instaloader.Instaloader()
dp = input("Enter Insta Username:")
ig.download_profile(dp, profile_pic_only = True)
# In[ ]:
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
2,
554,
58,
17,
5974,
628,
198,
79,
541,
2721,
916,
282,
1170,
263,
628,
198,
2,
554,
58,
19,
5974,
628,
198,
11748,
916,
282,
1170,
2... | 2.367925 | 106 |
import json
import urllib.request
from bottoman import TwitchBot
import config
from db.db import DatabaseManager
def get_user_id_display(user):
"""
uses twitch's API to get a user's token with their (case insensitive)
user name
"""
client_id = config.client_id
token = "srtajsl3jjbhhtfrv... | [
11748,
33918,
198,
11748,
2956,
297,
571,
13,
25927,
198,
198,
6738,
4220,
272,
1330,
23835,
20630,
198,
11748,
4566,
198,
6738,
20613,
13,
9945,
1330,
24047,
13511,
628,
198,
198,
4299,
651,
62,
7220,
62,
312,
62,
13812,
7,
7220,
259... | 2.09414 | 1,041 |
from minigame.waveshare.button import Button
from minigame.waveshare.display import Display
from minigame.games.snake import Snake
WIDTH = 20
HEIGHT = 20
STEP_TIME = 0.5
BLOCK_SIZE = 32
if __name__ == '__main__':
main()
| [
6738,
949,
328,
480,
13,
32569,
43466,
13,
16539,
1330,
20969,
198,
6738,
949,
328,
480,
13,
32569,
43466,
13,
13812,
1330,
16531,
198,
6738,
949,
328,
480,
13,
19966,
13,
16184,
539,
1330,
16705,
198,
198,
54,
2389,
4221,
796,
1160,
... | 2.780488 | 82 |
from api.api_v1 import api_urls
from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
)
''' RANDOM URLs '''
urlpatterns += patterns('etc.views',
url(r'^about/?$', 'about', name = 'about'),
url(r'^help/?$', 'h... | [
6738,
40391,
13,
15042,
62,
85,
16,
1330,
40391,
62,
6371,
82,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
13,
12286,
82,
1330,
1635,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
198,
6738,
42625,
14208,
13,
3642,
822,
... | 2.454804 | 3,518 |
# The MIT License
#
# Copyright (c) 2020 Vincent Liu
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | [
2,
383,
17168,
13789,
198,
2,
198,
2,
15069,
357,
66,
8,
12131,
18653,
18258,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
198,
2,
286,
428,
3788,
290,
3917,
10314,
3696,... | 3.813953 | 301 |
import time
from locust import HttpUser, task, between
# https://docs.locust.io/en/stable/quickstart.html
| [
11748,
640,
198,
6738,
1179,
436,
1330,
367,
29281,
12982,
11,
4876,
11,
1022,
198,
198,
2,
3740,
1378,
31628,
13,
17946,
436,
13,
952,
14,
268,
14,
31284,
14,
24209,
9688,
13,
6494,
198
] | 3.057143 | 35 |
def aep_pep_test(**kwargs):
"""
Calculates two different things:
1.) The x and y coordinates of the AEP and PEP, relative to the coxa of a respective leg
2.) The swing phases and the stance phases, identifying on a frame by frame basis
Return: results data frame with 30 key value pairs:
x6 all... | [
4299,
257,
538,
62,
431,
79,
62,
9288,
7,
1174,
46265,
22046,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
27131,
689,
734,
1180,
1243,
25,
198,
220,
220,
220,
352,
2014,
383,
2124,
290,
331,
22715,
286,
262,
317,
8905,
29... | 2.434958 | 5,704 |
# --------------------------------------------
# Test the Approximate Knapsack function test
# --------------------------------------------
# Pull in the knapsack library.
import random
from pyspark.sql import SparkSession
from knapsack import knapsack
# Create the SparkContext.
sc = SparkSession \
.builder \
... | [
2,
20368,
10541,
198,
2,
6208,
262,
2034,
13907,
1920,
6102,
1686,
441,
2163,
1332,
198,
2,
20368,
10541,
198,
198,
2,
21429,
287,
262,
638,
1686,
441,
5888,
13,
198,
198,
11748,
4738,
198,
6738,
279,
893,
20928,
13,
25410,
1330,
17... | 3.108738 | 515 |
from django.shortcuts import render,get_object_or_404
from .models import BlogArticles
# Create your views here. | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
1136,
62,
15252,
62,
273,
62,
26429,
198,
6738,
764,
27530,
1330,
14001,
8001,
2983,
198,
198,
2,
13610,
534,
5009,
994,
13
] | 3.53125 | 32 |
import pygluu.kubernetes.postgres as module0
from pygluu.kubernetes.postgres import Postgres
| [
11748,
12972,
70,
2290,
84,
13,
74,
18478,
3262,
274,
13,
7353,
34239,
355,
8265,
15,
198,
6738,
12972,
70,
2290,
84,
13,
74,
18478,
3262,
274,
13,
7353,
34239,
1330,
2947,
34239,
628
] | 2.764706 | 34 |
# 918. Maximum Sum Circular Subarray
# Runtime: 1028 ms, faster than 5.09% of Python3 online submissions for Maximum Sum Circular Subarray.
# Memory Usage: 18.6 MB, less than 33.98% of Python3 online submissions for Maximum Sum Circular Subarray.
import math | [
2,
860,
1507,
13,
22246,
5060,
7672,
934,
3834,
18747,
198,
198,
2,
43160,
25,
838,
2078,
13845,
11,
5443,
621,
642,
13,
2931,
4,
286,
11361,
18,
2691,
22129,
329,
22246,
5060,
7672,
934,
3834,
18747,
13,
198,
198,
2,
14059,
29566,
... | 3.638889 | 72 |
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import convolve
from matplotlib.gridspec import GridSpec
import matplotlib as mpl
rng = np.random.default_rng()
def k_cap(input, cap_size):
"""
Given a vector input it returns the highest cap_size
entries from cap_zie
... | [
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
629,
541,
88,
13,
12683,
282,
1330,
3063,
6442,
198,
6738,
2603,
29487,
8019,
13,
2164,
2340,
43106,
1330,
24846,
22882,
198,
... | 2.261477 | 501 |
from collections import Counter, defaultdict
from datetime import datetime
from statistics import mean
from dateutil.parser import parse as parse_datetime
from dateutil import rrule
| [
6738,
17268,
1330,
15034,
11,
4277,
11600,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
7869,
1330,
1612,
198,
198,
6738,
3128,
22602,
13,
48610,
1330,
21136,
355,
21136,
62,
19608,
8079,
198,
6738,
3128,
22602,
1330,
374,
25135,
... | 4.266667 | 45 |
import app.model.model as model
import hashlib
| [
11748,
598,
13,
19849,
13,
19849,
355,
2746,
198,
11748,
12234,
8019,
198
] | 3.615385 | 13 |
import os
import shutil
import numpy as np
from tqdm import tqdm
import matplotlib.pyplot as plt
def compositional_histogram_cutoff(
dir,
elements_list,
histogram_cutoff,
num_bins,
overwrite_data=False,
create_plots=True,
):
"""
Downselect LSMS data with maximum number of samples per ... | [
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
628,
198,
198,
4299,
18882,
1859,
62,
10034,
21857,
... | 2.13732 | 903 |
from django.urls import path
from .views import contactMe
urlpatterns = [
path('contact', contactMe)
]
| [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
764,
33571,
1330,
2800,
5308,
628,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
3108,
10786,
32057,
3256,
2800,
5308,
8,
198,
60,
198
] | 3.027778 | 36 |
import os.path as osp
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QAction
from PyQt5.QtWidgets import QFileDialog
from PointMatcher.utils.filesystem import icon_path
| [
11748,
28686,
13,
6978,
355,
267,
2777,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
8205,
72,
1330,
1195,
19578,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
54,
312,
11407,
1330,
1195,
12502,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
... | 2.701493 | 67 |