content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
from django.conf.urls import url
from traffic import views
app_name = 'traffic'
urlpatterns = [
# url(r'^$', views.index),
# url(r'^index/', views.index),
url(r'^traffic/pages/$', views.page_view, name='performance'),
url(r'^traffic/calender/$', views.calender_view, name='calender'),
url(r'^traff... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
198,
198,
6738,
4979,
1330,
5009,
198,
198,
1324,
62,
3672,
796,
705,
9535,
2108,
6,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
1303,
19016,
7,
81,
6,
61,
3,
... | 2.550562 | 178 |
from django.urls import path, include
from accounts import views
urlpatterns = [
path('', views.indx, name='accounts'),
<<<<<<< HEAD
path('/signup', views.signup, name='signup'),
path('logout', views.logout, name='logout'),
path('/login', views.loginn, name='login'),
path('/usertpe/<int:pk>/', vie... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
11,
2291,
198,
198,
6738,
5504,
1330,
5009,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
3108,
10786,
3256,
5009,
13,
521,
87,
11,
1438,
11639,
23317,
82,
33809,
198,
16791,
... | 2.711968 | 493 |
default_app_config = 'silverlance.apps.SilverlanceAppConfig'
| [
12286,
62,
1324,
62,
11250,
796,
705,
40503,
23215,
13,
18211,
13,
26766,
23215,
4677,
16934,
6,
198
] | 3.388889 | 18 |
"""
A really simple MediaWiki API client for the Scratch Wiki.
Can:
* read pages
* edit pages
* list pages in category
* list page backlinks ("what links here")
* list page transclusions
Requires the `requests` library.
http://wiki.scratch.mit.edu/
Example Usage
=============
Get a page::
wiki = S... | [
37811,
198,
32,
1107,
2829,
6343,
32603,
7824,
5456,
329,
262,
1446,
36722,
13078,
13,
198,
198,
6090,
25,
628,
220,
1635,
1100,
5468,
198,
220,
1635,
4370,
5468,
198,
220,
1635,
1351,
5468,
287,
6536,
198,
220,
1635,
1351,
2443,
736,... | 2.831461 | 445 |
from evntbus import Event
| [
6738,
819,
429,
10885,
1330,
8558,
628,
628,
628
] | 3.444444 | 9 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2020 Palo Alto Networks, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
220,
15069,
12131,
44878,
34317,
27862,
11,
3457,
198,
2,
198,
2,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362... | 2.762679 | 1,538 |
from .Person import Person
from .Role import Role
from .Event import Event
| [
6738,
764,
15439,
1330,
7755,
198,
6738,
764,
47445,
1330,
20934,
198,
6738,
764,
9237,
1330,
8558,
198
] | 4.166667 | 18 |
import numpy as np
import random
import time
import copy
def kmax(data, init_centriod, L = 2, K = 3, max_iterations = 50):
'''
data: a collection of records
init_centriod: the inital centriod
L: top K attributes
K: cluster numbers
max_iterations: the max iteration before stop
'''
star... | [
11748,
299,
32152,
355,
45941,
220,
198,
11748,
4738,
198,
11748,
640,
198,
11748,
4866,
198,
198,
4299,
479,
9806,
7,
7890,
11,
2315,
62,
1087,
380,
375,
11,
406,
796,
362,
11,
509,
796,
220,
513,
11,
3509,
62,
2676,
602,
796,
20... | 2.185163 | 1,685 |
'''
Module to generate the TC with the given probability to "go straight", "turn left" or "turn right"
'''
import numpy as np
from car_road import Map
import os
import config as cf
import json
class RoadGen:
"""Class for generating roads"""
def test_case_generate(self):
"""Function that produces a... | [
7061,
6,
198,
26796,
284,
7716,
262,
17283,
351,
262,
1813,
12867,
284,
366,
2188,
3892,
1600,
366,
15344,
1364,
1,
393,
366,
15344,
826,
1,
198,
7061,
6,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
1097,
62,
6344,
1330... | 1.482099 | 10,251 |
import logging
from scipy.interpolate import splev, splrep
import numpy as np
from barry.cosmology import pk2xi
from barry.cosmology.camb_generator import getCambGenerator
from barry.datasets import PowerSpectrum_SDSS_DR12_Z061_NGC, CorrelationFunction_SDSS_DR12_Z061_NGC
class DummyPowerSpectrum_SDSS_DR12_Z061_NGC(P... | [
11748,
18931,
198,
6738,
629,
541,
88,
13,
3849,
16104,
378,
1330,
599,
2768,
11,
4328,
7856,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
2318,
563,
13,
6966,
29126,
1330,
279,
74,
17,
29992,
198,
6738,
2318,
563,
13,
6966,
... | 2.527835 | 485 |
import logging
from datetime import datetime
import django_rq
from api.models import CheckTaskJob
from utils.check_url import check_url
logger = logging.getLogger(__name__)
| [
11748,
18931,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
11748,
42625,
14208,
62,
81,
80,
198,
198,
6738,
40391,
13,
27530,
1330,
6822,
25714,
33308,
198,
6738,
3384,
4487,
13,
9122,
62,
6371,
1330,
2198,
62,
6371,
198,
198,
6... | 3.178571 | 56 |
#!/usr/bin/env python
from optparse import OptionParser
parser = OptionParser(usage="%prog infile outfile")
opts, args = parser.parse_args()
try:
infile, outfile = args
except ValueError:
infile = "/data/uwa/jvansanten/projects/2012/muongun/corsika/SIBYLL/Hoerandel5/atmod_12.hdf5"
outfile = "Hoerandel5_atmod12_SIB... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
2172,
29572,
1330,
16018,
46677,
198,
198,
48610,
796,
16018,
46677,
7,
26060,
2625,
4,
1676,
70,
1167,
576,
503,
7753,
4943,
198,
404,
912,
11,
26498,
796,
30751,
13,
29572... | 2.467143 | 700 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from executiveorder.util import *
from executiveorder.executiveorder import ExecutiveOrder
base_url = "https://en.wikisource.org"
url = "/wiki/Category:United_States_executive_orders"
eos = []
def get_all_pages(url):
'''
Gets all the pages in the base site.
'''
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
4640,
2875,
13,
22602,
1330,
1635,
198,
6738,
4640,
2875,
13,
18558,
8827,
2875,
1330,
10390,
18743,
198,
198,
86... | 2.415623 | 1,357 |
import heterocl as hcl
if __name__ == "__main__":
test() | [
11748,
14445,
38679,
355,
289,
565,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1332,
3419
] | 2.583333 | 24 |
"""
Given the mapping a = 1, b = 2, ... z = 26, and an encoded message, count the number of ways it can be decoded.
For example, the message '111' would give 3, since it could be decoded as 'aaa', 'ka', and 'ak'.
You can assume that the messages are decodable. For example, '001' is not allowed.
"""
import ti... | [
37811,
201,
198,
15056,
262,
16855,
257,
796,
352,
11,
275,
796,
362,
11,
2644,
1976,
796,
2608,
11,
290,
281,
30240,
3275,
11,
954,
262,
1271,
286,
2842,
340,
460,
307,
875,
9043,
13,
201,
198,
201,
198,
1890,
1672,
11,
262,
3275... | 2.703057 | 229 |
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import os
import time
#"./chromedriver"
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
DRIVER_BIN = os.path.join(PROJECT_ROOT, "chromedriver.exe")
browser = webdriver.Chrome(executable_path = DRIVER_BIN)
browser.get("https://... | [
6738,
384,
11925,
1505,
1330,
3992,
26230,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11321,
13,
13083,
1330,
26363,
198,
11748,
28686,
198,
11748,
640,
198,
198,
2,
1911,
14,
28663,
276,
38291,
1,
198,
198,
31190,
23680,
62,
... | 2.757962 | 157 |
import logging
import re
import os
import glob
class FileOpener:
'''
Test class that hosts common file functions like opening text files
'''
@classmethod
def open_text_file(cls, filename: str, lowercase: bool = True) -> str:
"""Opens and returns text file in utf-8-sig encoding
Arg... | [
11748,
18931,
198,
11748,
302,
198,
11748,
28686,
198,
11748,
15095,
628,
198,
4871,
9220,
18257,
877,
25,
198,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
6208,
1398,
326,
11453,
2219,
2393,
5499,
588,
4756,
2420,
3696,
198,
220,
2... | 2.38324 | 895 |
#
# Copyright 2021 Red Hat Inc.
# SPDX-License-Identifier: Apache-2.0
#
"""
Handler module for gathering configuration data.
"""
from .env import ENVIRONMENT
CLOWDER_ENABLED = ENVIRONMENT.bool("CLOWDER_ENABLED", default=False)
if CLOWDER_ENABLED:
from app_common_python import ObjectBuckets, LoadedConfig, KafkaTop... | [
2,
198,
2,
15069,
33448,
2297,
10983,
3457,
13,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
24843,
12,
17,
13,
15,
198,
2,
198,
37811,
198,
25060,
8265,
329,
11228,
8398,
1366,
13,
198,
37811,
198,
6738,
764,
24330,
1330,
1... | 2.435233 | 6,176 |
from thefuck import shells
| [
6738,
262,
31699,
1330,
19679,
628,
198
] | 4.142857 | 7 |
from random import randint
from time import sleep
from player import Player
| [
6738,
4738,
1330,
43720,
600,
198,
6738,
640,
1330,
3993,
198,
6738,
2137,
1330,
7853,
198
] | 4.75 | 16 |
import EulerRunner
numFile = open('../data/Problem067_numbers.txt', 'r')
nums = [[int(num) for num in line.split(' ')] for line in numFile.readlines()]
print len(nums)
print len(nums[-1])
EulerRunner.solve_problem(problem67_dp)
| [
11748,
412,
18173,
49493,
198,
198,
22510,
8979,
796,
1280,
10786,
40720,
7890,
14,
40781,
15,
3134,
62,
77,
17024,
13,
14116,
3256,
705,
81,
11537,
198,
77,
5700,
796,
16410,
600,
7,
22510,
8,
329,
997,
287,
1627,
13,
35312,
10786,
... | 2.613636 | 88 |
# -*- coding: utf-8 -*-
import os
import shutil
import numpy as np
import six
import tensorflow as tf
from tfsnippet.utils import (ensure_variables_initialized,
VarScopeObject,
get_variables_as_dict,
reopen_variable_scope,
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2237,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
198,
6738,
256,
9501,
77,
... | 2.336438 | 3,436 |
import rospy
import sys, select, os
import roslib
import time
from tool.test_utils import *
roslib.load_manifest('mecanum_robot_gazebo')
if __name__ == '__main__' :
rospy.init_node('pingpong')
mecanum_0 = Make_mecanum_left('mecanum_0')
#mecanum_0.torque = [0, -2000000, 0]
#mecanum_0.torque = ... | [
11748,
686,
2777,
88,
198,
11748,
25064,
11,
2922,
11,
28686,
198,
11748,
686,
6649,
571,
198,
11748,
640,
198,
198,
6738,
2891,
13,
9288,
62,
26791,
1330,
1635,
198,
198,
4951,
8019,
13,
2220,
62,
805,
8409,
10786,
76,
721,
272,
38... | 1.861862 | 333 |
import azapi
api = azapi.AZlyrics()
def get_lyrics(artist, title, dir='./', save=False):
"""artist=name of artist, title=name of song, dir=directory to save (if saving), save=save the lyrics in a text file (boolean input)"""
attempts = 0
val = None
title_lower = title.lower()
if ' feat' in title_l... | [
11748,
35560,
15042,
198,
198,
15042,
796,
35560,
15042,
13,
22778,
306,
10466,
3419,
198,
198,
4299,
651,
62,
306,
10466,
7,
49016,
11,
3670,
11,
26672,
28,
4458,
14,
3256,
3613,
28,
25101,
2599,
198,
220,
220,
220,
37227,
49016,
28,... | 2.358289 | 561 |
# Twper - Async Twitter Scraper
# Copyright Sacha Jungerman
# See LICENSE for details.
__version__ = '0.1.1'
__author__ = 'Sacha Jungerman'
__license__ = 'MIT'
from Twper.Twper import Tweet, TwitterAccount, Query, Queries
| [
2,
1815,
525,
532,
1081,
13361,
3009,
1446,
38545,
198,
2,
15069,
20678,
64,
7653,
1362,
805,
198,
2,
4091,
38559,
24290,
329,
3307,
13,
198,
198,
834,
9641,
834,
796,
705,
15,
13,
16,
13,
16,
6,
198,
834,
9800,
834,
796,
705,
5... | 2.922078 | 77 |
import numpy as np
import PIL.Image as image
from sklearn.cluster import KMeans
from skfuzzy.cluster import cmeans
imgData,row,col = loadData('11.jpg')
imgData = imgData.T
center, u, u0, d, jm, p, fpc = cmeans(imgData, m=2, c=2, error=0.0001, maxiter=1000)
for i in u:
label = np.argmax(u, axis=0)
label = label.reshap... | [
11748,
299,
32152,
355,
45941,
198,
11748,
350,
4146,
13,
5159,
355,
2939,
198,
6738,
1341,
35720,
13,
565,
5819,
1330,
509,
5308,
504,
198,
6738,
1341,
69,
4715,
88,
13,
565,
5819,
1330,
269,
1326,
504,
198,
9600,
6601,
11,
808,
11... | 2.330275 | 218 |
#
# Copyright (c) SAS Institute Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | [
2,
198,
2,
15069,
357,
66,
8,
35516,
5136,
3457,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
... | 3.837696 | 191 |
import numpy as np
import tensorflow as tf
from jass.base.const import color_masks
from jass.base.player_round import PlayerRound
from jass.player.player import Player
from tensorflow.keras.models import load_model
class DeepLearningPlayer(Player):
"""
Deep learning implementation of a player to play Jass.
... | [
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
198,
6738,
474,
562,
13,
8692,
13,
9979,
1330,
3124,
62,
5356,
591,
198,
6738,
474,
562,
13,
8692,
13,
7829,
62,
744,
1330,
7853,
22685,
198,
6738,
474,
... | 2.297704 | 1,263 |
# 27、移除元素
# 一、双指针法,设置快慢指针,当快指针指向元素等于删除元素时,快指针快走一步,
# 慢指针不走;否则,快慢指针同时走一步,并把快指针的元素值赋给慢指针,这样
# 慢指针走过的元素就是删除掉指定元素的数组,时间复杂度O(n),空间复杂度O(1)
nums = [0, 1, 2, 2, 3, 0, 4, 2]
val = 2
print(removeElement0(nums, val)) | [
2,
2681,
23513,
163,
100,
119,
165,
247,
97,
17739,
225,
163,
112,
254,
198,
2,
220,
31660,
23513,
20998,
234,
162,
234,
229,
165,
240,
230,
37345,
243,
171,
120,
234,
164,
106,
122,
163,
121,
106,
33232,
104,
162,
227,
95,
162,
... | 0.642424 | 330 |
import pytest
import os
import slug
from slug import ProcessGroup, Process, Pipe
from conftest import runpy, not_in_path
@pytest.mark.skipif(not hasattr(ProcessGroup, 'pgid'),
reason="No Process Group IDs")
@pytest.mark.skipif(ProcessGroup is slug.base.ProcessGroup,
reason... | [
11748,
12972,
9288,
198,
11748,
28686,
198,
11748,
31065,
198,
6738,
31065,
1330,
10854,
13247,
11,
10854,
11,
36039,
198,
6738,
369,
701,
395,
1330,
1057,
9078,
11,
407,
62,
259,
62,
6978,
628,
628,
198,
198,
31,
9078,
9288,
13,
4102... | 2.275766 | 359 |
import torch
import enchanter.addons.criterions as C
import enchanter
| [
11748,
28034,
198,
11748,
551,
3147,
353,
13,
39996,
13,
22213,
263,
507,
355,
327,
198,
11748,
551,
3147,
353,
628,
628,
628
] | 3.26087 | 23 |
r"""
This script creates a plot of the mass-loading factor eta and the star
formation e-folding timescale as functions of Galactocentric radius in the
forms adopted by Johnson et al. (2021).
"""
from .. import env
from ...simulations.models.insideout import insideout
from .utils import named_colors
import matplotlib.p... | [
81,
37811,
198,
1212,
4226,
8075,
257,
7110,
286,
262,
2347,
12,
25138,
5766,
2123,
64,
290,
262,
3491,
198,
1161,
304,
12,
11379,
278,
1661,
38765,
355,
5499,
286,
5027,
529,
420,
22317,
16874,
287,
262,
198,
23914,
8197,
416,
5030,
... | 2.468388 | 1,123 |
#!/usr/bin/env python3
""" BranchExplorer is the high-level tool that tries to explore specific parts
of code rather than maximizing coverage like regular automatic testing. """
import argparse
import logging
import os
import sys
import time
import datetime
import branchexp.imports
import branchexp.config
from branch... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
20551,
18438,
11934,
318,
262,
1029,
12,
5715,
2891,
326,
8404,
284,
7301,
2176,
3354,
198,
1659,
2438,
2138,
621,
48350,
5197,
588,
3218,
11353,
4856,
13,
37227,
198,
198,
... | 3.140625 | 256 |
import tempfile
from frekenbok.settings import *
from frekenbok.settings.dev import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': tempfile.mkstemp(suffix='.sqlite3', prefix='frekenbok_')[1],
}
}
| [
11748,
20218,
7753,
198,
198,
6738,
2030,
3464,
65,
482,
13,
33692,
1330,
1635,
198,
6738,
2030,
3464,
65,
482,
13,
33692,
13,
7959,
1330,
1635,
198,
198,
35,
1404,
6242,
1921,
1546,
796,
1391,
198,
220,
220,
220,
705,
12286,
10354,
... | 2.230088 | 113 |
import torch
import torch.nn.functional as F
from torch import nn
class Interpolate(nn.Module):
"""nn.Module wrapper for F.interpolate"""
def conv3x3(in_planes, out_planes, stride=1):
"""3x3 convolution with padding"""
return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias... | [
11748,
28034,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
6738,
28034,
1330,
299,
77,
628,
198,
4871,
4225,
16104,
378,
7,
20471,
13,
26796,
2599,
198,
220,
220,
220,
37227,
20471,
13,
26796,
29908,
329,
376,
13,
3849,
161... | 2.644886 | 704 |
# ###########################################################################
#
# CLOUDERA APPLIED MACHINE LEARNING PROTOTYPE (AMP)
# (C) Cloudera, Inc. 2020
# All rights reserved.
#
# Applicable Open Source License: Apache 2.0
#
# NOTE: Cloudera open source products are modular software products
# made up of hun... | [
2,
1303,
29113,
29113,
7804,
2235,
198,
2,
198,
2,
220,
7852,
2606,
14418,
32,
3486,
49094,
337,
16219,
8881,
12509,
1503,
15871,
48006,
2394,
56,
11401,
357,
23518,
8,
198,
2,
220,
357,
34,
8,
1012,
280,
1082,
64,
11,
3457,
13,
1... | 3.133409 | 877 |
import importlib
import logging
from typing import Iterable, Any # noqa: F401
from pyhocon import ConfigTree # noqa: F401
from databuilder.extractor.base_extractor import Extractor
LOGGER = logging.getLogger(__name__)
class DBAPIExtractor(Extractor):
"""
Generic DB API extractor.
"""
CONNECTION_... | [
11748,
1330,
8019,
198,
11748,
18931,
198,
6738,
19720,
1330,
40806,
540,
11,
4377,
220,
1303,
645,
20402,
25,
376,
21844,
198,
198,
6738,
12972,
71,
36221,
1330,
17056,
27660,
220,
1303,
645,
20402,
25,
376,
21844,
198,
198,
6738,
4818... | 2.250499 | 1,002 |
# Utils for small Ising models
from itertools import product
import numpy as np
from jax import jit
from jax import random
from jax.config import config
from jax.scipy.special import logsumexp
from tqdm import tqdm
config.update("jax_disable_jit", False)
"""
Note: in our experiments we consider two classes of Ising ... | [
2,
7273,
4487,
329,
1402,
1148,
278,
4981,
198,
198,
6738,
340,
861,
10141,
1330,
1720,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
474,
897,
1330,
474,
270,
198,
6738,
474,
897,
1330,
4738,
198,
6738,
474,
897,
13,
11250,
1330,
... | 3.710425 | 259 |
NAME_CHARS = set('ABCDEFGHIJKLMNOPQRSTUVWXYZ' +
'abcdefghijklmnopqrstuvwxyz0123456789')
NAME_FIRST_CHARS = set('ABCDEFGHIJKLMNOPQRSTUVWXYZ' +
'abcdefghijklmnopqrstuvwxyz')
| [
20608,
62,
3398,
27415,
796,
900,
10786,
24694,
32988,
17511,
23852,
42,
31288,
45,
3185,
48,
49,
2257,
52,
30133,
34278,
57,
6,
1343,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
39305,
... | 1.638462 | 130 |
import setuptools
import re
long_description = ""
# with open("README.md", "r") as fh:
# long_description = fh.read()
version = re.search(
r"^__version__\s*?=\s*?'(.*)'",
open('safe_env/version.py').read(),
re.M
).group(1)
requires_base = load_requirements_from_file("requirements-base.txt")
requi... | [
11748,
900,
37623,
10141,
198,
11748,
302,
198,
198,
6511,
62,
11213,
796,
13538,
198,
2,
351,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
4943,
355,
277,
71,
25,
198,
2,
220,
220,
220,
220,
890,
62,
11213,
796,
277,
71,
13... | 2.520958 | 501 |
from unittest.case import TestCase
from tweepy.error import TweepError
from responsebot.common.exceptions import MissingConfigError, APIQuotaError, AuthenticationError
try:
from mock import patch, MagicMock
except ImportError:
from unittest.mock import patch, MagicMock
from responsebot.responsebot import Re... | [
6738,
555,
715,
395,
13,
7442,
1330,
6208,
20448,
198,
198,
6738,
4184,
538,
88,
13,
18224,
1330,
24205,
538,
12331,
198,
198,
6738,
2882,
13645,
13,
11321,
13,
1069,
11755,
1330,
25639,
16934,
12331,
11,
7824,
4507,
4265,
12331,
11,
... | 3.55914 | 93 |
"""
profiles.py
Copyright 2007 Andres Riancho
This file is part of w3af, http://w3af.org/ .
w3af is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 2 of the License.
w3af is distributed in the hope that it... | [
37811,
198,
5577,
2915,
13,
9078,
198,
198,
15269,
4343,
843,
411,
371,
666,
6679,
198,
198,
1212,
2393,
318,
636,
286,
266,
18,
1878,
11,
2638,
1378,
86,
18,
1878,
13,
2398,
14,
764,
198,
198,
86,
18,
1878,
318,
1479,
3788,
26,
... | 2.099103 | 8,920 |
from django.db import models
# Create your models here.
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
198,
2,
13610,
534,
4981,
994,
13,
628
] | 3.625 | 16 |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from PyQt5.QtCore import QObject, pyqtSlot, QUrl
from PyQt5.QtWebKitWidgets import QWebView
view = QWebView()
frame = view.page().mainFrame() # todo check is it changing
| [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
14055,
1330,
1195,
10267,
11,
12972,
39568,
38963,
11,
1195,
28165,
198,
6738,
... | 2.449438 | 89 |
#! /usr/bin/jython
# -*- coding: utf-8 -*-
#
# csv_read.py
#
# Jul/20/2015
#
import sys
import string
#
sys.path.append ('/var/www/data_base/common/python_common')
sys.path.append ('/var/www/data_base/common/jython_common')
from jython_text_manipulate import csv_read_proc
from text_manipulate import dict_display_p... | [
2,
0,
1220,
14629,
14,
8800,
14,
73,
7535,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
197,
40664,
62,
961,
13,
9078,
198,
2,
198,
2,
197,
197,
197,
197,
197,
197,
16980,
14,
1238,
14,
4626... | 2.83945 | 218 |
from subprocess import Popen, PIPE
from typing import Optional, List
from requests import Response
from Core.ConfigHandler import ConfigHandler
from VersionControlProvider.Github.ConfigGithub import ConfigGithub
from VersionControlProvider.Github.Github import Github
| [
6738,
850,
14681,
1330,
8099,
268,
11,
350,
4061,
36,
198,
6738,
19720,
1330,
32233,
11,
7343,
198,
198,
6738,
7007,
1330,
18261,
198,
198,
6738,
7231,
13,
16934,
25060,
1330,
17056,
25060,
198,
6738,
10628,
15988,
29495,
13,
38,
10060,... | 4.301587 | 63 |
import numpy as np
from integration import *
| [
11748,
299,
32152,
355,
45941,
198,
6738,
11812,
1330,
1635,
628
] | 4.181818 | 11 |
# -*- coding: utf-8 -*-
from distutils.core import setup
import py2exe, sys
sys.argv.append('py2exe')
#C:\Python34\python.exe setup.py
setup(
windows=[
{
"script": "huiini.py",
"icon_resources": [(1, "myicon.ico")]
}
],
options={
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
1233,
26791,
13,
7295,
1330,
9058,
198,
11748,
12972,
17,
13499,
11,
25064,
198,
198,
17597,
13,
853,
85,
13,
33295,
10786,
9078,
17,
13499,
11537,
198,
2,
34,
7... | 1.669753 | 324 |
import datetime as dt
import itertools as it
from pathlib import Path
import re
import simplejson
import altair.vegalite.v3 as A
from bs4 import BeautifulSoup
import requests
import pandas as pd
import numpy as np
pth = Path("~/repos/covid/data").expanduser()
url_ga_county = url_ga = "https://dph.georgia.gov/covid-19... | [
11748,
4818,
8079,
355,
288,
83,
198,
11748,
340,
861,
10141,
355,
340,
198,
6738,
3108,
8019,
1330,
10644,
198,
11748,
302,
198,
11748,
2829,
17752,
198,
198,
11748,
5988,
958,
13,
303,
13528,
578,
13,
85,
18,
355,
317,
198,
6738,
... | 2.230948 | 1,719 |
import time
from math import sqrt
from collections import OrderedDict
class Solver(object):
"""executes the alogirithms in order to find the intersections"""
| [
11748,
640,
198,
6738,
10688,
1330,
19862,
17034,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
628,
198,
4871,
4294,
332,
7,
15252,
2599,
198,
220,
220,
220,
37227,
18558,
1769,
262,
435,
519,
343,
342,
907,
287,
1502,
284,
1064,
262... | 3.644444 | 45 |
import numpy as np
| [
11748,
299,
32152,
355,
45941,
628,
628
] | 3.142857 | 7 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Aug 14 09:35:37 2020
@author: Jeremias Knoblauch and Lara Vomfell
Description: Likelihood function wrappers for use within NPL class
"""
import numpy as np
import pdb
from scipy.stats import poisson, norm, binom
from scipy.optimize import minimize
im... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
19480,
2447,
1478,
7769,
25,
2327,
25,
2718,
12131,
198,
198,
31,
9800,
25,
10272,
76,
44... | 2.202679 | 3,360 |
import time
import machine
from network import WLAN
from mqtt import MQTTClient # Grapped from https://github.com/pycom/pycom-libraries/blob/master/examples/mqtt/mqtt.py
# Add to your /lib folder and upload
import pycom
pycom.heartbeat(False) # disable the heartbeat LED
# Configuration va... | [
11748,
640,
198,
11748,
4572,
198,
6738,
3127,
1330,
370,
25697,
198,
6738,
285,
80,
926,
1330,
337,
48,
15751,
11792,
1303,
7037,
1496,
422,
3740,
1378,
12567,
13,
785,
14,
9078,
785,
14,
9078,
785,
12,
75,
11127,
14,
2436,
672,
14... | 2.412664 | 458 |
from nornir import InitNornir
from nornir.core.filter import F
if __name__ == "__main__":
main()
| [
6738,
299,
1211,
343,
1330,
44707,
45,
1211,
343,
198,
6738,
299,
1211,
343,
13,
7295,
13,
24455,
1330,
376,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
3419,
198
] | 2.6 | 40 |
# Generated by Django 3.2.7 on 2021-09-27 18:57
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
22,
319,
33448,
12,
2931,
12,
1983,
1248,
25,
3553,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
from django.core import mail
from django.core.signing import Signer
from django.db import transaction
from django.contrib.auth.models import User, Group
from django.utils import translation
from django.core.urlresolvers import resolve, reverse
from rest_framework.test import APITestCase
from django_tenants.test.cases i... | [
6738,
42625,
14208,
13,
7295,
1330,
6920,
198,
6738,
42625,
14208,
13,
7295,
13,
12683,
278,
1330,
5865,
263,
198,
6738,
42625,
14208,
13,
9945,
1330,
8611,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
11,
... | 3.76942 | 811 |
#!/usr/bin/env python
# Author(s): Smruti Panigrahi
# Import modules
import rospy
import pcl
import numpy as np
import ctypes
import struct
import sensor_msgs.point_cloud2 as pc2
from sensor_msgs.msg import PointCloud2, PointField
from std_msgs.msg import Header
from random import randint
#from pcl_helper import *
i... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
6434,
7,
82,
2599,
2439,
81,
47966,
5961,
328,
430,
5303,
198,
198,
2,
17267,
13103,
198,
11748,
686,
2777,
88,
198,
11748,
279,
565,
198,
11748,
299,
32152,
355,
45941,
198,... | 2.730337 | 445 |
from __future__ import (
absolute_import,
unicode_literals,
)
import uuid
from pysoa.common.metrics import TimerResolution
from pysoa.common.transport.base import (
ClientTransport,
)
from pysoa.common.transport.exceptions import MessageReceiveTimeout
from pysoa.common.transport.http2_gateway.settings imp... | [
6738,
11593,
37443,
834,
1330,
357,
198,
220,
220,
220,
4112,
62,
11748,
11,
198,
220,
220,
220,
28000,
1098,
62,
17201,
874,
11,
198,
8,
198,
198,
11748,
334,
27112,
198,
198,
6738,
12972,
568,
64,
13,
11321,
13,
4164,
10466,
1330,... | 3.113095 | 168 |
import pickle
import numpy as np
import networkx as nx
import matplotlib.pyplot as plt
import utils.plot_functions as pf
import utils.data_manipulation as dm
import utils.network_manipulation as nm
from ast import literal_eval # to evaluate what is in a string literally.
flg_plot_graph_on_map = True
flg_imshow_adja... | [
11748,
2298,
293,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
3127,
87,
355,
299,
87,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
11748,
3384,
4487,
13,
29487,
62,
12543,
2733,
355,
279,
69,
220,
198,
... | 2.64038 | 2,105 |
#%%
import importlib
from numpy.core.fromnumeric import transpose
import aseAtoms2cfg
import myread
importlib.reload(aseAtoms2cfg)
importlib.reload(myread)
import copy
from random import random
import numpy as np
# seed random number generator
from aseAtoms2cfg import atoms2cfg
from ase.build import graphene_nanoribb... | [
2,
16626,
198,
11748,
1330,
8019,
198,
198,
6738,
299,
32152,
13,
7295,
13,
6738,
77,
39223,
1330,
1007,
3455,
198,
11748,
257,
325,
2953,
3150,
17,
37581,
198,
11748,
616,
961,
198,
11748,
8019,
13,
260,
2220,
7,
589,
2953,
3150,
1... | 2.185265 | 923 |
#!/usr/bin/env python3
import watson
import time
import json
import arrow
import datetime
if __name__ == "__main__":
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
266,
13506,
198,
11748,
640,
198,
11748,
33918,
198,
11748,
15452,
198,
11748,
4818,
8079,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
... | 2.866667 | 45 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
# --- UTILITY METHODS ---
def _convert_dates_to_strings(row):
""" Given a database row returned by psycopg2,
convert all dates to strings (usually used
to ensure JSON serialisability). """
for key in row:
if type(row[key]) =... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
4818,
8079,
628,
198,
2,
11420,
19255,
4146,
9050,
337,
36252,
50,
11420,
198,
4299,
4808,
1102,
1851,
62,
19581... | 2.47619 | 525 |
from sygicmaps.client import Client
from sygicmaps.input import Input
__version__ = "0.2.7-dev"
| [
6738,
827,
70,
291,
31803,
13,
16366,
1330,
20985,
198,
6738,
827,
70,
291,
31803,
13,
15414,
1330,
23412,
198,
198,
834,
9641,
834,
796,
366,
15,
13,
17,
13,
22,
12,
7959,
1,
198
] | 2.771429 | 35 |
#!/usr/bin/env python3
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
"""... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
15069,
357,
66,
8,
2177,
12,
25579,
11,
3203,
11,
3457,
13,
198,
2,
1439,
2489,
10395,
13,
198,
2,
770,
2723,
2438,
318,
11971,
739,
262,
347,
10305,
12,
7635,
5964,
... | 3.429293 | 198 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 2019/2/13 08:58
# @User : zhunishengrikuaile
# @File : config.py
# @Email : binary@shujian.org
# @MyBlog : WWW.SHUJIAN.ORG
# @NetName : 書劍
# @Software: 百度识图Api封装
# 配置文件
'''
应用ID: 14348843
应用API_KEY: wc68dHtiY9mwuD7980EXr1I2
应用SECRET_KEY: dCaMG095LvB9p... | [
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,
2488,
7575,
220,
220,
220,
1058,
13130,
14,
17,
14,
1485,
8487,
25,
3365,
198,
2,
2488,
12982,
220,
220,
220... | 0.977379 | 53,447 |
# geometry calculations
# TODO:
# - swap to x^(0.5) instead of sqrt for speed?
import numpy as np
# from scipy.spatial import distance
| [
2,
22939,
16765,
198,
2,
16926,
46,
25,
198,
2,
220,
532,
16075,
284,
2124,
61,
7,
15,
13,
20,
8,
2427,
286,
19862,
17034,
329,
2866,
30,
198,
198,
11748,
299,
32152,
355,
45941,
198,
2,
422,
629,
541,
88,
13,
2777,
34961,
1330,... | 2.843137 | 51 |
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 28 20:46:54 2021
@author: ahmed
"""
import numpy as np
from sklearn import preprocessing, neighbors, svm
from sklearn.model_selection import train_test_split
import pandas as pd
df = pd.read_csv('breast-cancer-wisconsin.txt')
df.replace('?',-99999, inplace=True)
df.drop... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
3300,
2758,
2579,
1160,
25,
3510,
25,
4051,
33448,
198,
198,
31,
9800,
25,
29042,
1150,
198,
37811,
198,
198,
11748,
299,
32152,
355,
45941,
198,... | 2.451895 | 343 |
import setuptools
from cli_badges import __version__
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="cli_badges", # Replace with your own username
version=__version__,
author="Haider Ali Punjabi",
author_email="me@haideralipunjabi.com",
keywords=["color",... | [
11748,
900,
37623,
10141,
198,
6738,
537,
72,
62,
14774,
3212,
1330,
11593,
9641,
834,
198,
4480,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
4943,
355,
277,
71,
25,
198,
220,
220,
220,
890,
62,
11213,
796,
277,
71,
13,
961,
... | 2.707038 | 611 |
# -*- coding: utf-8 -*-
import emoji
from typing import Tuple
from nonebot.adapters.onebot.v11 import Message, MessageSegment
# CONSTANT
PLAIN_TEXT = ['face', 'reply', 'at', 'text'] | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
44805,
198,
6738,
19720,
1330,
309,
29291,
198,
6738,
4844,
13645,
13,
324,
12126,
13,
505,
13645,
13,
85,
1157,
1330,
16000,
11,
16000,
41030,
434,
198,
198,
2,
... | 2.8 | 65 |
"""Ascii menu class"""
from __future__ import print_function
from cloudmesh_client.common.Printer import Printer
from builtins import input
def ascii_menu(title=None, menu_list=None):
"""
creates a simple ASCII menu from a list of tuples containing a label
and a functions reference. The function should n... | [
37811,
1722,
979,
72,
6859,
1398,
37811,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
6738,
6279,
76,
5069,
62,
16366,
13,
11321,
13,
6836,
3849,
1330,
1736,
3849,
198,
198,
6738,
3170,
1040,
1330,
5128,
628,
198,
4299,
35... | 2.115694 | 994 |
# -*- coding: cp936 -*-
A=[]
B=[]
f=open('1.txt','r')
c=[]
for i in range(0,16):
a = f.readline()
b = a.split()
c.append(b)
#print(c)
for i in c:
A.append(i[0])
B.append(i[1])
#print (A)
#print (B)
xor=[]
for i in range(0,len(A)):
for j in range(0,len(A[0])):
d = int(... | [
2,
532,
9,
12,
19617,
25,
31396,
24,
2623,
532,
9,
12,
201,
198,
201,
198,
32,
28,
21737,
201,
198,
33,
28,
21737,
201,
198,
69,
28,
9654,
10786,
16,
13,
14116,
41707,
81,
11537,
201,
198,
66,
28,
21737,
201,
198,
1640,
1312,
... | 1.5625 | 384 |
#! python
#-*- coding: utf-8 -*-
# 标准化输出。
from __future__ import print_function
# 各种包。
import os, sys, time
import math
# PYMC
import pymc as pm
from pymc import Uniform, Normal, MCMC, AdaptiveMetropolis
# NUMPY
import numpy as np
# SPARK
from pyspark.sql import SparkSession
# 外部依赖项
from model_DALEC_LAI_All import init... | [
2,
0,
21015,
198,
2,
12,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
10545,
254,
229,
49035,
228,
44293,
244,
164,
122,
241,
49035,
118,
16764,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
2,
10263,
238,
... | 2.23783 | 719 |
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.11.3
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
# name: python3
# ---
# %%
import pandas as pd
# %% tags=["pa... | [
2,
11420,
198,
2,
474,
929,
88,
353,
25,
198,
2,
220,
220,
474,
929,
88,
5239,
25,
198,
2,
220,
220,
220,
220,
2420,
62,
15603,
341,
25,
198,
2,
220,
220,
220,
220,
220,
220,
7552,
25,
764,
9078,
198,
2,
220,
220,
220,
220,
... | 2.187251 | 251 |
import unittest
from unittest.mock import patch
import numpy as np
import pytest
import pysprint
from pysprint import FFTMethod, Generator
from pysprint.core._fft_tools import (
find_roi,
find_center,
_ensure_window_at_origin,
predict_fwhm,
)
from pysprint.utils import NotCalculatedException
# ... | [
11748,
555,
715,
395,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
8529,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
12972,
9288,
198,
198,
11748,
279,
893,
4798,
198,
6738,
279,
893,
4798,
1330,
376,
9792,
17410,
11,
35986,
... | 2.751445 | 173 |
import turtle as trtl
import random as rand
# leaderboard variables
leaderboard_file_name = "a122_leaderboard.txt"
leader_names_list = []
leader_scores_list = []
player_name = input ("Please enter your name:")
import leaderboard as lb
score = 0
colors = ["black", "sky blue", "salmon", "orchid", "pale ... | [
11748,
28699,
355,
491,
28781,
201,
198,
11748,
4738,
355,
43720,
201,
198,
201,
198,
2,
3554,
3526,
9633,
201,
198,
27940,
3526,
62,
7753,
62,
3672,
796,
366,
64,
18376,
62,
27940,
3526,
13,
14116,
1,
201,
198,
27940,
62,
14933,
62... | 2.705882 | 493 |
class KshellDataStructureError(Exception):
"""
Raise when KSHELL data file has unexpected structure / syntax.
""" | [
4871,
509,
29149,
6601,
1273,
5620,
12331,
7,
16922,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
35123,
618,
509,
9693,
23304,
1366,
2393,
468,
10059,
4645,
1220,
15582,
13,
198,
220,
220,
220,
37227
] | 3.378378 | 37 |
import typing
from modtox.modtox.Molecules.target_col import CollectionFromTarget, IDs
from modtox.modtox.Molecules.mol import MoleculeFromInChI
from modtox.modtox.utils.enums import Database, StandardTypes
from unittest.mock import MagicMock, Mock, PropertyMock, patch
import pickle5
## sm stands for molecule identi... | [
11748,
19720,
198,
6738,
953,
83,
1140,
13,
4666,
83,
1140,
13,
44,
2305,
13930,
13,
16793,
62,
4033,
1330,
12251,
4863,
21745,
11,
32373,
198,
6738,
953,
83,
1140,
13,
4666,
83,
1140,
13,
44,
2305,
13930,
13,
43132,
1330,
25726,
23... | 2.232143 | 2,744 |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
=============
TAP plus
=============
@author: Juan Carlos Segovia
@contact: juan.carlos.segovia@sciops.esa.int
European Space Astronomy Centre (ESAC)
European Space Agency (ESA)
Created on 30 jun. 2016
"""
import xml.sax
from ... | [
2,
49962,
739,
257,
513,
12,
565,
682,
347,
10305,
3918,
5964,
532,
766,
38559,
24290,
13,
81,
301,
201,
198,
37811,
201,
198,
25609,
28,
201,
198,
51,
2969,
5556,
201,
198,
25609,
28,
201,
198,
201,
198,
31,
9800,
25,
16852,
1740... | 2.423077 | 312 |
from django.conf.urls import url
from explorer import views
urlpatterns = [
# 首页
url(r'^get_block_chart$', views.get_block_chart), # 爆块信息统计
url(r'^get_overview$', views.get_overview), # 概览
url(r'^get_hashrate_ranking$', views.get_hashrate_ranking), # 算力走势-有效算力
url(r'^get_power_valid$', views.ge... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
198,
198,
6738,
39349,
1330,
5009,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
1303,
16268,
99,
244,
165,
94,
113,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
113... | 1.520557 | 1,581 |
import math
import numpy as np
import os
import vmdutil
from vmdutil import vmddef
from lookat import LookAt, MotionFrame
FPS = 30
MIXEL = 0.08
G = -9.8 / MIXEL / FPS / FPS
GV = (0, G, 0) # fixed
HALFG = G / 2
cp_all = vmddef.BONE_LERP_CONTROLPOINTS
replace_controlpoints(cp_all, vmdutil.PARABOLA2_CONTROLPOINTS,... | [
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
198,
11748,
410,
9132,
22602,
198,
6738,
410,
9132,
22602,
1330,
45887,
1860,
891,
198,
6738,
804,
265,
1330,
6803,
2953,
11,
20843,
19778,
198,
198,
37,
3705,
79... | 2.297297 | 222 |
# Generated by Django 3.2.6 on 2021-08-24 01:05
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
21,
319,
33448,
12,
2919,
12,
1731,
5534,
25,
2713,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.766667 | 30 |
#!/usr/bin/env python
from __future__ import print_function
from time import localtime
from sys import exc_info
from sys import exit
DEFAULT_RESOLUTION = 5
MIDDAY = 12
HOUR_WORD_MAPPINGS = {
0: "midnight",
1: "one",
2: "two",
3: "three",
4: "four",
5: "five",
6: "six",
7: "seven",
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
6738,
640,
1330,
1957,
2435,
198,
6738,
25064,
1330,
2859,
62,
10951,
198,
6738,
25064,
1330,
8420,
198,
198,
7206,
38865,
62,
... | 1.853403 | 573 |
from icalendar import Calendar, Event
import urllib.request
from bs4 import BeautifulSoup
mainParse(2018)
| [
6738,
220,
605,
9239,
1330,
26506,
11,
8558,
198,
11748,
2956,
297,
571,
13,
25927,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
628,
198,
198,
12417,
10044,
325,
7,
7908,
8,
198
] | 3.205882 | 34 |
from . import *
| [
6738,
764,
1330,
1635,
198
] | 3.2 | 5 |
from .tfe_client import Client
| [
6738,
764,
83,
5036,
62,
16366,
1330,
20985,
198
] | 3.444444 | 9 |
# coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from swagger_server.models.base_model_ import Model
from swagger_server import util
class Protein(Model):
"""NOTE: This class is auto generated by the swagger cod... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
4818,
8079,
1330,
3128,
11,
4818,
8079,
220,
1303,
645,
20402,
25,
376,
21844,
198,
198,
6738,
19720,
1330,
7343,
11,
360,
713,
220... | 2.403374 | 1,956 |
#!/usr/bin/env python
'''
Synfire chains
--------------
M. Diesmann et al. (1999). Stable propagation of synchronous spiking in cortical
neural networks. Nature 402, 529-533.
'''
from angela2 import *
duration = 100*ms
# Neuron model parameters
Vr = -70*mV
Vt = -55*mV
taum = 10*ms
taupsp = 0.325*ms
weight = 4.86*mV
#... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
7061,
6,
198,
29934,
6495,
14659,
198,
26171,
198,
44,
13,
360,
444,
9038,
2123,
435,
13,
357,
18946,
737,
520,
540,
43594,
286,
18305,
516,
599,
14132,
287,
35001,
198,
710,
1523,
7... | 2.154423 | 667 |
#87671-Joao Freitas 87693-Pedro Soares Grupo 15
# -*- coding: utf-8 -*-
"""
Created on Mon Oct 16 20:31:54 2017
@author: mlopes
"""
import numpy as np
import random
from tempfile import TemporaryFile
outfile = TemporaryFile()
| [
2,
5774,
46250,
12,
9908,
5488,
4848,
21416,
10083,
48528,
12,
43468,
305,
1406,
3565,
25665,
7501,
1315,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
2892,
2556,
1467,
1160,
25,
3132,
... | 2.674157 | 89 |
from .. import Interpreter, adapter
from ..interface import Block
from typing import Optional
import random
| [
6738,
11485,
1330,
4225,
3866,
353,
11,
21302,
198,
6738,
11485,
39994,
1330,
9726,
198,
6738,
19720,
1330,
32233,
198,
11748,
4738,
198
] | 4.695652 | 23 |
"""Model definition."""
from dataclasses import dataclass
from typing import Any, Optional
from dcorm.alias import Alias
from dcorm.column import Column
from dcorm.database import Database
from dcorm.engine import Engine
from dcorm.path import Path
__all__ = ['ModelType', 'Model']
class ModelType(type):
"""Me... | [
37811,
17633,
6770,
526,
15931,
198,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
19720,
1330,
4377,
11,
32233,
198,
198,
6738,
30736,
579,
13,
26011,
1330,
978,
4448,
198,
6738,
30736,
579,
13,
28665,
1330,
29201,
19... | 2.420253 | 790 |
from __future__ import print_function
import sys
sys.path.append(r"../..")
import sys
from pytestqt import qtbot
from lxml import etree
from PyQt5.QtWidgets import QWidget, QPlainTextEdit
from pymdwizard.gui import datacred
| [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
25064,
198,
198,
17597,
13,
6978,
13,
33295,
7,
81,
1,
40720,
492,
4943,
198,
198,
11748,
25064,
198,
6738,
12972,
9288,
39568,
1330,
10662,
83,
13645,
198,
6738,
300,
19... | 2.783133 | 83 |
"""
Init segments (phases)
"""
from compendium.initsegment.checksegment import CheckSegment
from compendium.initsegment.folderstructure import FolderStructureSegment
from compendium.initsegment.github import GithubSegment
from compendium.initsegment.pyenv import PyEnvSegment
SEGMENTS = [
GithubSegment,
... | [
37811,
198,
31768,
17894,
357,
746,
1386,
8,
198,
37811,
198,
198,
6738,
552,
49811,
13,
15003,
325,
5154,
13,
9122,
325,
5154,
1330,
6822,
41030,
434,
198,
6738,
552,
49811,
13,
15003,
325,
5154,
13,
43551,
301,
5620,
1330,
48107,
12... | 2.808511 | 141 |
import unittest
import tempfile
import os
import logging
import filecmp
import cfg
import utils
from kneaddata import run
from kneaddata import utilities
class TestHumann2Functions(unittest.TestCase):
"""
Test the functions found in kneaddata
"""
def test_read_in_file_n_lines(self):
... | [
11748,
555,
715,
395,
198,
11748,
20218,
7753,
198,
11748,
28686,
198,
11748,
18931,
198,
11748,
2393,
48991,
198,
198,
11748,
30218,
70,
198,
11748,
3384,
4487,
198,
198,
6738,
638,
1329,
7890,
1330,
1057,
198,
6738,
638,
1329,
7890,
1... | 2.173804 | 1,588 |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
__a... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
17202,
39410,
25,
428,
2393,
373,
7560,
416,
262,
21624,
12994,
26144,
35986,
13,
17202,
198,
2,
17202,
2141,
407,
4370,
416,
1021,
4556,
345,
821,
1728,
345,
760,
644,
345,
389,
1804,
0,
17202,
... | 3.797297 | 148 |
from phlm import *
| [
6738,
872,
75,
76,
1330,
1635,
198
] | 2.714286 | 7 |
from flask import Flask, jsonify, abort, make_response
from flask_restful import Api, Resource, reqparse, marshal
from flasgger import swag_from
from flask_jwt_extended import jwt_required, get_jwt_identity
from app import db
from models import models
from resources.fields import role_fields
| [
6738,
42903,
1330,
46947,
11,
33918,
1958,
11,
15614,
11,
787,
62,
26209,
198,
6738,
42903,
62,
2118,
913,
1330,
5949,
72,
11,
20857,
11,
43089,
29572,
11,
22397,
282,
198,
6738,
781,
292,
26679,
1330,
1509,
363,
62,
6738,
198,
6738,
... | 3.511905 | 84 |
from RDRPOSTagger.InitialTagger.InitialTagger import initializeCorpus, initializeSentence
from RDRPOSTagger.SCRDRlearner.Object import FWObject
from RDRPOSTagger.SCRDRlearner.SCRDRTree import SCRDRTree
from RDRPOSTagger.SCRDRlearner.SCRDRTreeLearner import SCRDRTreeLearner
from RDRPOSTagger.Utility.Config import NUMBER... | [
6738,
371,
7707,
32782,
7928,
13,
24243,
51,
7928,
13,
24243,
51,
7928,
1330,
41216,
45680,
385,
11,
41216,
31837,
594,
198,
6738,
371,
7707,
32782,
7928,
13,
6173,
49,
7707,
3238,
1008,
13,
10267,
1330,
48849,
10267,
198,
6738,
371,
... | 2.940252 | 318 |
#!/usr/bin/env python
#
# Copyright (C) 2016 The Android Open Source Project
#
# 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 req... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
2,
15069,
357,
34,
8,
1584,
383,
5565,
4946,
8090,
4935,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
... | 3.395604 | 273 |
#
# Copyright (c) 2017 Juniper Networks, Inc. All rights reserved.
#
"""
MESOS CNI Server
"""
# Standard library import
import bottle
import json
# Application library import
from cfgm_common.rest import LinkObject
from mesos_cni import MESOSCniDataObject
from vnc_api.vnc_api import *
# end
# end
# Pub... | [
2,
198,
2,
15069,
357,
66,
8,
2177,
7653,
9346,
27862,
11,
3457,
13,
1439,
2489,
10395,
13,
198,
2,
198,
198,
37811,
198,
44,
1546,
2640,
327,
22125,
9652,
198,
37811,
198,
198,
2,
8997,
5888,
1330,
198,
11748,
9294,
198,
11748,
3... | 2.602362 | 254 |
"""A helper for remembering useful shell commands."""
import os
from subprocess import check_output, CalledProcessError
from .cmdmanager import CmdManager
from .dbitem import DBItem
from .main import main, __version__
# Inspect git version if we're in a git repo
__dev_version__ = ''
thisdir = os.path.dirname(os.path.... | [
37811,
32,
31904,
329,
24865,
4465,
7582,
9729,
526,
15931,
198,
11748,
28686,
198,
6738,
850,
14681,
1330,
2198,
62,
22915,
11,
34099,
18709,
12331,
198,
6738,
764,
28758,
37153,
1330,
327,
9132,
13511,
198,
6738,
764,
67,
2545,
368,
1... | 2.790323 | 248 |