content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
import os
import glob
from astropy.io import fits
#/home/student/Desktop/Images/iTelescope/20180716-California-T24-GOOD
# Yo Neal. When you use this program, you have to change a few things between iTelescope and LFOP
# FIRST, remember to change the file path or you'll be a dummy. Also for LFOP -13 and -12 while
... | [
11748,
28686,
198,
11748,
15095,
198,
6738,
6468,
28338,
13,
952,
1330,
11414,
198,
198,
2,
14,
11195,
14,
50139,
14,
36881,
14,
29398,
14,
72,
33317,
3798,
3008,
14,
1264,
36928,
1433,
12,
25284,
12,
51,
1731,
12,
11230,
3727,
198,
... | 2.59322 | 354 |
from fastai.vision.all import *
from PIL import Image
import streamlit as st
import numpy as np
from io import BytesIO
from .config import imgWidth, imgHeight
st.title("CleanvsMessy")
st.markdown('''
## Upload the image''',True)
st.set_option('deprecation.showfileUploaderEncoding', False)
file = st.file_uploader(" ")
... | [
6738,
3049,
1872,
13,
10178,
13,
439,
1330,
1635,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
4269,
18250,
355,
336,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
33245,
1330,
2750,
4879,
9399,
198,
6738,
764,
11250,
1330,
33705,
309... | 2.853982 | 226 |
import pickle
import matplotlib.pyplot as plt
import pandas as pd
trials = pickle.load(open("trials.p", "rb"))
print("Set breakpoint here")
#for item in trials.trials:
# args = item["vals"]
# res = item["result"]["loss"]
#itemtuples = [(item["misc"]["vals"]["dilation_group"], item["misc"]["vals"]["use_ref_po... | [
11748,
2298,
293,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
19798,
292,
355,
279,
67,
628,
198,
28461,
874,
796,
2298,
293,
13,
2220,
7,
9654,
7203,
28461,
874,
13,
79,
1600,
366,
26145,
48774,
198,
4... | 2.5 | 412 |
import logging
import logging.config
import os
import subprocess
from datetime import datetime, timedelta
from botocore.credentials import CredentialProvider, RefreshableCredentials
from dateutil.tz import tzlocal
from common.E3 import e3
| [
11748,
18931,
198,
11748,
18931,
13,
11250,
198,
11748,
28686,
198,
11748,
850,
14681,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
198,
6738,
10214,
420,
382,
13,
66,
445,
14817,
1330,
327,
445,
1843,
29495,
11,
2253... | 3.626866 | 67 |
''' Stuff you need to update for this to work '''
'Enter your username here'
user = ''
'Enter your password here'
passwd = ''
image1 = '2d83af05944d49c69fa9565fb238a91b.jpg'
image2 = '49b2788b672e4088a25eb0a9eff35c17.jpg'
image3 = '355c2c7e87f0489bb5f0308cdec108f6.jpg'
" ^ You need to change EACH of these to whateve... | [
7061,
6,
27864,
345,
761,
284,
4296,
329,
428,
284,
670,
705,
7061,
198,
6,
17469,
534,
20579,
994,
6,
198,
7220,
796,
10148,
198,
6,
17469,
534,
9206,
994,
6,
198,
6603,
16993,
796,
10148,
628,
198,
198,
9060,
16,
796,
705,
17,
... | 2.543286 | 1,132 |
#import roslib; roslib.load_manifest('rcommander_core')
import graph.style as gs
import graph
import graph.layout as gl
import tool_utils as tu
import graph_model as gm
import numpy as np
import time
import copy
| [
2,
11748,
686,
6649,
571,
26,
686,
6649,
571,
13,
2220,
62,
805,
8409,
10786,
81,
9503,
4066,
62,
7295,
11537,
198,
198,
11748,
4823,
13,
7635,
355,
308,
82,
198,
11748,
4823,
198,
11748,
4823,
13,
39786,
355,
1278,
198,
198,
11748,... | 3.071429 | 70 |
# -*- coding: utf-8 -*-
from django.urls import reverse
from rest_framework.response import Response
from rest_framework import status
from ...collection import BaseAPICollector, BaseAPISpecification
from ... import models
from . import serializers
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
198,
198,
6738,
1334,
62,
30604,
13,
26209,
1330,
18261,
198,
6738,
1334,
62,
30604,
1330,
3722,
198,
198,
6738,
2644,
4368... | 3.614286 | 70 |
#!/usr/bin/env python3
"""
This module defines functions for depth-first-search in a graph with a given adjacency list
"""
def dfs_visit(node_list, adj_list, root_node, parent):
"""
Takes the graph node list, its adj list, and a node s,
and visits all the nodes reachable from s recursively.
"""
fo... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
37811,
198,
1212,
8265,
15738,
5499,
329,
6795,
12,
11085,
12,
12947,
287,
257,
4823,
351,
257,
1813,
9224,
330,
1387,
1351,
198,
37811,
198,
198,
4299,
288,
9501,
62,
4703,
... | 2.460064 | 313 |
# uncompyle6 version 3.2.0
# Python bytecode 2.4 (62061)
# Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)]
# Embedded file name: pirates.quest.QuestHolderBase
| [
2,
34318,
2349,
21,
2196,
513,
13,
17,
13,
15,
198,
2,
11361,
18022,
8189,
362,
13,
19,
357,
38850,
5333,
8,
198,
2,
4280,
3361,
3902,
422,
25,
11361,
362,
13,
22,
13,
1415,
357,
85,
17,
13,
22,
13,
1415,
25,
23,
34825,
1129,
... | 2.488372 | 86 |
from setuptools import setup, find_packages
VERSION = "0.1.1"
setup(
name="hhsh",
version=VERSION,
description=" cli",
long_description=" cli",
keywords="python hhsh cli terminal",
author="itorr,yihong0618",
author_email="zouzou0208@gmail.com",
url="https://github.com/yihong0618/hhsh",... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
43717,
796,
366,
15,
13,
16,
13,
16,
1,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
2625,
12337,
1477,
1600,
198,
220,
220,
220,
2196,
28,
43717,
11,
198,
220,
... | 2.505464 | 366 |
import datetime
import hashlib
import os
import pathlib
from typing import Optional
import yaml
| [
11748,
4818,
8079,
198,
11748,
12234,
8019,
198,
11748,
28686,
198,
11748,
3108,
8019,
198,
198,
6738,
19720,
1330,
32233,
198,
198,
11748,
331,
43695,
628,
628,
198
] | 3.642857 | 28 |
from collections import Counter
import pytest
from datasets import load_dataset
from lassl.blender import DatasetBlender
| [
6738,
17268,
1330,
15034,
198,
198,
11748,
12972,
9288,
198,
6738,
40522,
1330,
3440,
62,
19608,
292,
316,
198,
198,
6738,
300,
562,
75,
13,
2436,
2194,
1330,
16092,
292,
316,
3629,
2194,
628
] | 3.647059 | 34 |
# -*- coding: utf-8 -*-
"""
After the introduction of version 6.2, all wisp data and hst-3d are now on MAST
3D-HST has not added any new data nor changed their directory structure,
but that's not the case for WISP
Aim: parse new directories to make them compatible with v5.0
"""
import os
import glob
from ..utils... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
198,
3260,
262,
9793,
286,
2196,
718,
13,
17,
11,
477,
266,
8802,
1366,
290,
289,
301,
12,
18,
67,
389,
783,
319,
337,
11262,
198,
198,
18,
35,
12... | 2.881481 | 135 |
import storage
import pytest
| [
11748,
6143,
198,
11748,
12972,
9288,
628
] | 4.285714 | 7 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2017-12-06 13:50
from __future__ import unicode_literals
import aldryn_redirects.validators
from django.db import migrations, models
import django.db.models.deletion
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
1157,
13,
23,
319,
2177,
12,
1065,
12,
3312,
1511,
25,
1120,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
... | 2.765432 | 81 |
"""
.. Copyright (c) 2015 Marshall Farrier
license http://opensource.org/licenses/MIT
Constants
=========
"""
UPVEL_COL = 'Up Vel'
DOWNVEL_COL = 'Down Vel'
| [
37811,
198,
492,
15069,
357,
66,
8,
1853,
13606,
6755,
5277,
198,
220,
220,
5964,
2638,
1378,
44813,
1668,
13,
2398,
14,
677,
4541,
14,
36393,
198,
198,
34184,
1187,
198,
2559,
28,
198,
37811,
198,
198,
8577,
18697,
62,
25154,
796,
... | 2.824561 | 57 |
#! /usr/bin/env python3
import rospy
from geometry_msgs.msg import Twist
from sensor_msgs.msg import LaserScan
import numpy as np
import math
from std_msgs.msg import String
if __name__ =='__main__':
rospy.init_node('parking')
pub = rospy.Publisher('/cmd_vel',Twist, queue_size=10)
rospy.Subscriber('/... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
686,
2777,
88,
198,
6738,
22939,
62,
907,
14542,
13,
19662,
1330,
44088,
198,
6738,
12694,
62,
907,
14542,
13,
19662,
1330,
23222,
33351,
198,
11748,
299,
32152,
355,... | 2.508108 | 185 |
"""
Registry for tracking providers dynamically in OpenNSA.
Keeping track of providers in a dynamical way in an NSI implementation is a
huge pain in the ass. This is a combination of things, such as seperate
identities and endpoints, callbacks, and the combination of local providers.
The class ProviderRegistry tries ... | [
37811,
198,
8081,
4592,
329,
9646,
9549,
32366,
287,
4946,
47549,
13,
198,
198,
44815,
2610,
286,
9549,
287,
257,
6382,
605,
835,
287,
281,
10896,
40,
7822,
318,
257,
198,
40878,
2356,
287,
262,
840,
13,
770,
318,
257,
6087,
286,
12... | 3.902655 | 113 |
from test_utils import TempDirectoryContext
from shedclient import task_tracker
| [
6738,
1332,
62,
26791,
1330,
24189,
43055,
21947,
198,
198,
6738,
14999,
16366,
1330,
4876,
62,
2213,
10735,
628
] | 4.315789 | 19 |
# -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.13.0)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x04\x1a\
\x00\
\x01\x08\x3e\x78\x9c\xed\x9c\x4d\x6e\xd3\x50\x14\x85\x1d\x65\x10\
\x66\x61\xc4\x... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
20857,
2134,
2438,
198,
2,
198,
2,
15622,
416,
25,
383,
20857,
3082,
5329,
329,
9485,
48,
83,
20,
357,
48,
83,
410,
20,
13,
1485,
13,
15,
8,
198,
2,
198,... | 1.30049 | 4,283 |
n = int(input())
# names = {input() for _ in range(n)}
names = []
for _ in range(n):
names.append(input())
unique_names = list(set(names))
[print(name)
for name
in sorted(unique_names, key=names.index)]
| [
77,
796,
493,
7,
15414,
28955,
198,
198,
2,
3891,
796,
1391,
15414,
3419,
329,
4808,
287,
2837,
7,
77,
38165,
198,
14933,
796,
17635,
198,
1640,
4808,
287,
2837,
7,
77,
2599,
198,
220,
220,
220,
3891,
13,
33295,
7,
15414,
28955,
1... | 2.6625 | 80 |
from optparse import OptionParser
| [
6738,
2172,
29572,
1330,
16018,
46677,
628
] | 5 | 7 |
# Generated by Django 3.0.6 on 2020-05-22 04:46
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
21,
319,
12131,
12,
2713,
12,
1828,
8702,
25,
3510,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
from django.db import models
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198
] | 3.625 | 8 |
import logging
import pytest
from loguru import logger
| [
11748,
18931,
198,
198,
11748,
12972,
9288,
198,
6738,
2604,
14717,
1330,
49706,
628
] | 4.071429 | 14 |
# Create a plotter without any lights and then enable the
# default light kit.
#
import pyvista
pl = pyvista.Plotter(lighting=None)
pl.enable_lightkit()
actor = pl.add_mesh(pyvista.Cube(), show_edges=True)
pl.show()
| [
2,
13610,
257,
7110,
353,
1231,
597,
7588,
290,
788,
7139,
262,
198,
2,
4277,
1657,
6220,
13,
198,
2,
198,
11748,
12972,
85,
12523,
198,
489,
796,
12972,
85,
12523,
13,
43328,
353,
7,
43351,
28,
14202,
8,
198,
489,
13,
21633,
62,
... | 2.842105 | 76 |
# -*- coding: utf-8 -*-
"""
sphinx.environment.managers
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Manager components for sphinx.environment.
:copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
if False:
# For type annotation
from typing import An... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
220,
220,
220,
599,
20079,
87,
13,
38986,
13,
805,
10321,
198,
220,
220,
220,
220,
27156,
15116,
4907,
93,
628,
220,
220,
220,
9142,
6805,
329,
599,
20079,... | 2.905405 | 148 |
import getopt
import sys
import os
import re
import string
import xml.etree.ElementTree as ET
input_filename = ""
expansion_filename = ""
output_type = "combine"
exclude = set(string.punctuation)
options, remainder = getopt.getopt(sys.argv[1:], 'i:e:t:', ['inputfile=', 'expansionfile=', 'type='])
for opt, arg in op... | [
11748,
651,
8738,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
4731,
198,
11748,
35555,
13,
316,
631,
13,
20180,
27660,
355,
12152,
198,
198,
15414,
62,
34345,
796,
13538,
198,
11201,
5487,
62,
34345,
796,
13538,
1... | 2.416794 | 1,310 |
import cartopy.crs as ccrs
import cartopy.feature as cf
from matplotlib import pyplot as plt
from matplotlib import image as img | [
11748,
6383,
11081,
13,
66,
3808,
355,
36624,
3808,
198,
11748,
6383,
11081,
13,
30053,
355,
30218,
198,
6738,
2603,
29487,
8019,
1330,
12972,
29487,
355,
458,
83,
198,
6738,
2603,
29487,
8019,
1330,
2939,
355,
33705
] | 3.459459 | 37 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import subprocess
import unittest
import filecmp
import gdal
import otbApplication as otb
from abc import ABC
from decloud.core.system import get_env_var, pathify, basename
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
28686,
198,
11748,
850,
14681,
198,
11748,
555,
715,
395,
198,
11748,
2393,
48991,
198,
11748,
308,
31748,
1... | 2.961538 | 78 |
from sclblonnx import add_output, add_input, add_node, node, empty_graph, add_constant, display, merge, run
import numpy as np
| [
6738,
264,
565,
2436,
261,
77,
87,
1330,
751,
62,
22915,
11,
751,
62,
15414,
11,
751,
62,
17440,
11,
10139,
11,
6565,
62,
34960,
11,
751,
62,
9979,
415,
11,
3359,
11,
20121,
11,
1057,
198,
11748,
299,
32152,
355,
45941,
628,
628,
... | 2.911111 | 45 |
import glob
import cv2
import numpy as np
| [
11748,
15095,
198,
198,
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
628
] | 2.933333 | 15 |
description = 'Instrument shutter'
prefix = "IOC"
devices = dict(
beam_monitor_1=device(
'nicos_ess.devices.epics.motor.EpicsMotor',
description="Beam monitor continuous position feedback",
motorpv=f'{prefix}:m8',
abslimits=(-10, 10),
unit='mm',
speed=5.,
),
... | [
11213,
796,
705,
818,
43872,
31168,
6,
198,
40290,
796,
366,
40,
4503,
1,
198,
198,
42034,
796,
8633,
7,
198,
220,
220,
220,
15584,
62,
41143,
62,
16,
28,
25202,
7,
198,
220,
220,
220,
220,
220,
220,
220,
705,
6988,
418,
62,
408... | 2.088339 | 283 |
# -*- coding: utf-8 -*-
# BioSTEAM: The Biorefinery Simulation and Techno-Economic Analysis Modules
# Copyright (C) 2020, Yoel Cortes-Pena <yoelcortes@gmail.com>
#
# This module is under the UIUC open-source license. See
# github.com/BioSTEAMDevelopmentGroup/biosteam/blob/master/LICENSE.txt
# for license details.
"""... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
16024,
30516,
2390,
25,
383,
8436,
382,
69,
15451,
41798,
290,
5429,
78,
12,
48307,
14691,
3401,
5028,
198,
2,
15069,
357,
34,
8,
12131,
11,
25455,
417,
18418,
274,... | 2.422222 | 1,305 |
import cv2
import numpy as np
image = cv2.imread('original.png')
gray = cv2.cvtColor(image.copy(), cv2.COLOR_BGR2GRAY)
gray = cv2.equalizeHist(gray)
blur = cv2.GaussianBlur(gray, (19, 19), 0)
# Application d'un seuil pour obtenir une image binaire
thresh = cv2.adaptiveThreshold(blur, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN... | [
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
198,
9060,
796,
269,
85,
17,
13,
320,
961,
10786,
14986,
13,
11134,
11537,
198,
198,
44605,
796,
269,
85,
17,
13,
33967,
83,
10258,
7,
9060,
13,
30073,
22784,
269,
85,
1... | 2.189956 | 458 |
################################################################################
# Copyright 2019 Noblis, Inc #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); ... | [
29113,
29113,
14468,
198,
2,
15069,
13130,
8140,
27999,
11,
3457,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,... | 2.190934 | 1,456 |
from PIL import Image, ImageFilter
import numpy as np
import glob
from numpy import array
import matplotlib.pyplot as plt
from skimage import morphology
import scipy.ndimage
"""
datapath = "jpg_images/"
img0 = Image.open("jpg_images/maskedimage" + str(0) + ".jpg")
counter = 0
img1 = []
for f in glob.glob('/Users/paulmc... | [
6738,
350,
4146,
1330,
7412,
11,
7412,
22417,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
15095,
198,
6738,
299,
32152,
1330,
7177,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
1341,
9060,
1330,
46320,
19... | 2.538462 | 650 |
import json
import numpy as np
import tensorflow as tf
import time
from predict import Predictor
if __name__ == "__main__":
checkpoint = "logs/semantic_backup_full_submit_dec_10/best_model_epoch_275.ckpt"
hyper_params = json.loads(open("semantic.json").read())
predictor = Predictor(
checkpoint_pa... | [
11748,
33918,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
640,
198,
198,
6738,
4331,
1330,
49461,
273,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,... | 2.335821 | 938 |
from pymyorm.database import Database
from config import db
from models.user import User
if __name__ == '__main__':
Database.connect(**db)
# # case 1
# all = User.find().select('count(*) as count', 'money').group('money').order('count asc').all()
# for one in all:
# print(one)
all = User.... | [
6738,
12972,
1820,
579,
13,
48806,
1330,
24047,
198,
6738,
4566,
1330,
20613,
198,
6738,
4981,
13,
7220,
1330,
11787,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
24047,
13,
8443,
7,
1174,
99... | 2.709091 | 165 |
import os
import json
import logging
from framework._utils import FunctionHook
| [
11748,
28686,
198,
11748,
33918,
198,
11748,
18931,
198,
198,
6738,
9355,
13557,
26791,
1330,
15553,
39,
566,
628
] | 4.263158 | 19 |
print(int(2.0))
print(float(2))
print(abs(-2.0))
print(abs(-2))
| [
4798,
7,
600,
7,
17,
13,
15,
4008,
198,
4798,
7,
22468,
7,
17,
4008,
198,
4798,
7,
8937,
32590,
17,
13,
15,
4008,
198,
4798,
7,
8937,
32590,
17,
4008,
198
] | 2 | 32 |
# import materia as mtr
# import numpy as np
# def test_point_group_C1():
# ctable = mtr.symmetry.C1().cayley_table()
# assert (ctable == np.array([[0]])).all()
# def test_point_group_Ci():
# ctable = mtr.symmetry.Ci().cayley_table()
# assert (ctable == np.array([[0, 1], [1, 0]])).all()
| [
2,
1330,
26910,
544,
355,
285,
2213,
198,
2,
1330,
299,
32152,
355,
45941,
628,
198,
2,
825,
1332,
62,
4122,
62,
8094,
62,
34,
16,
33529,
198,
2,
220,
220,
220,
220,
269,
11487,
796,
285,
2213,
13,
1837,
3020,
11973,
13,
34,
16,... | 2.183099 | 142 |
from unittest.mock import patch, MagicMock
from unittest import TestCase
from ..crawler.pipeliner import pipeline
from ..settings import URL_PROCESSO
| [
6738,
555,
715,
395,
13,
76,
735,
1330,
8529,
11,
6139,
44,
735,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
198,
6738,
11485,
66,
39464,
13,
79,
40634,
7274,
1330,
11523,
198,
6738,
11485,
33692,
1330,
10289,
62,
4805,
4503,
7597,
... | 3.431818 | 44 |
from pathlib import Path
import pytest
from copy import deepcopy
import os
from mc.base import BaseConfig
from mc import step
| [
6738,
3108,
8019,
1330,
10644,
198,
11748,
12972,
9288,
198,
6738,
4866,
1330,
2769,
30073,
198,
11748,
28686,
198,
198,
6738,
36650,
13,
8692,
1330,
7308,
16934,
198,
6738,
36650,
1330,
2239,
628,
628,
628,
628,
198
] | 3.648649 | 37 |
#!/usr/bin/python
import system
import db
import client
import server
import logging
import json
import base64
import os
from aws_xray_sdk.core import patch_all
if "AWS_REGION" in os.environ:
patch_all()
_singleton = None
FORMAT = "%(asctime)-15s %(message)s"
logging.basicConfig(format=FO... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
11748,
1080,
198,
11748,
20613,
198,
11748,
5456,
198,
11748,
4382,
198,
11748,
18931,
198,
11748,
33918,
198,
11748,
2779,
2414,
198,
11748,
28686,
198,
198,
6738,
3253,
82,
62,
87,
2433,... | 2.629032 | 124 |
try:
import cStringIO as StringIO
except ImportError:
import StringIO
import datetime
import os
import sys
import unittest
_src = os.path.join(os.path.dirname(__file__),"..", "src")
if not _src in sys.path:
sys.path.append(_src)
import utils
if __name__ == "__main__":
unittest.main()
| [
198,
28311,
25,
198,
220,
220,
220,
1330,
269,
10100,
9399,
355,
10903,
9399,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
1330,
10903,
9399,
198,
198,
11748,
4818,
8079,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
555,
715,
... | 2.480315 | 127 |
import os
import argparse
from midv500.utils import download, unzip
midv500_links = [
"ftp://smartengines.com/midv-500/dataset/01_alb_id.zip",
"ftp://smartengines.com/midv-500/dataset/02_aut_drvlic_new.zip",
"ftp://smartengines.com/midv-500/dataset/03_aut_id_old.zip",
"ftp://smartengines.com/midv-500/d... | [
11748,
28686,
198,
11748,
1822,
29572,
198,
6738,
3095,
85,
4059,
13,
26791,
1330,
4321,
11,
555,
13344,
198,
198,
13602,
85,
4059,
62,
28751,
796,
685,
198,
220,
220,
220,
366,
701,
79,
1378,
27004,
1516,
1127,
13,
785,
14,
13602,
... | 2.051709 | 4,564 |
import traceback
import pycountry
import taxjar
import frappe
from erpnext import get_default_company
from frappe import _
from frappe.contacts.doctype.address.address import get_company_address
TAX_ACCOUNT_HEAD = frappe.db.get_single_value("TaxJar Settings", "tax_account_head")
SHIP_ACCOUNT_HEAD = frappe.db.get_sin... | [
11748,
12854,
1891,
198,
198,
11748,
12972,
19315,
198,
11748,
1687,
9491,
198,
198,
11748,
5306,
27768,
198,
6738,
1931,
79,
19545,
1330,
651,
62,
12286,
62,
39722,
198,
6738,
5306,
27768,
1330,
4808,
198,
6738,
5306,
27768,
13,
3642,
... | 3.096774 | 124 |
import unittest
import numpy as np
import numpy.testing as nptest
import centerpoints.lib as lib
| [
11748,
555,
715,
395,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
299,
32152,
13,
33407,
355,
299,
457,
395,
198,
198,
11748,
3641,
13033,
13,
8019,
355,
9195,
628
] | 3.225806 | 31 |
# test comment
import os
filename = input("File to format: ")
os.system("gunzip "+filename)
n = int(input("What number genome is this? "))
os.system("mv "+filename[:-3]+" genome"+str(n)+".fna")
original = "genome"+str(n)+".fna"
copy = "genome"+str(n)+"_copy.fna"
filtered = "genome"+str(n)+"_filtered.fna"
rem = ['>']
wi... | [
2,
1332,
2912,
198,
11748,
28686,
198,
34345,
796,
5128,
7203,
8979,
284,
5794,
25,
366,
8,
198,
418,
13,
10057,
7203,
7145,
13344,
43825,
34345,
8,
198,
77,
796,
493,
7,
15414,
7203,
2061,
1271,
19270,
318,
428,
30,
366,
4008,
198,... | 2.315961 | 307 |
from villas.controller.components.manager import Manager
from villas.controller.component import Component
| [
6738,
4489,
292,
13,
36500,
13,
5589,
3906,
13,
37153,
1330,
9142,
198,
6738,
4489,
292,
13,
36500,
13,
42895,
1330,
35100,
628
] | 4.695652 | 23 |
from protorpc.messages import Message, IntegerField, StringField
import protopigeon
def test():
ComposedMessage = protopigeon.compose(MessageOne, MessageTwo)
assert hasattr(ComposedMessage, 'one')
assert hasattr(ComposedMessage, 'two')
assert hasattr(ComposedMessage, 'three')
assert hasattr(Com... | [
6738,
1237,
273,
14751,
13,
37348,
1095,
1330,
16000,
11,
34142,
15878,
11,
10903,
15878,
198,
11748,
1237,
404,
10045,
261,
628,
628,
198,
4299,
1332,
33529,
198,
220,
220,
220,
3082,
1335,
12837,
796,
1237,
404,
10045,
261,
13,
785,
... | 2.823529 | 238 |
"""
# !/usr/bin/env python
# -*- coding: utf-8 -*-
@Time : 2022/2/23 19:35
@Author : shengdl999links@gmail.com
@ProjectName : udacity-program_self_driving_car_engineer_v1.0_source.0
@File : visualization.py
"""
import glob
import os.path
import matplotlib.pyplot as plt
from matplotlib.patches import ... | [
37811,
198,
2,
5145,
14,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
31,
7575,
220,
220,
220,
220,
220,
220,
220,
1058,
33160,
14,
17,
14,
1954,
678,
25,
2327,
198,
31,
... | 2.156385 | 697 |
from setuptools import setup
long_description = 'TODO'
# with open("README.md", "r") as rfd:
# long_description = rfd.read()
REQUIREMENTS = [r.strip() for r in open("requirements.txt").readlines()]
setup(
name='python-fakeports',
version="0.1",
packages=['python_fakeports'],
url='',
license='G... | [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
6511,
62,
11213,
796,
705,
51,
3727,
46,
6,
198,
2,
351,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
4943,
355,
374,
16344,
25,
198,
2,
220,
220,
220,
220,
890,
62,
11213,
796,... | 2.587896 | 347 |
from .BiomeDisplay import BiomeDisplay
from .Chats import Chats
from .PlayEffect import PlayEffect
from .Reconnect import Reconnect
from .SwapAck import SwapAck
from .UseItemAck import UseItemAck | [
6738,
764,
23286,
462,
23114,
1330,
8436,
462,
23114,
198,
6738,
764,
1925,
1381,
1330,
609,
1381,
198,
6738,
764,
11002,
18610,
1330,
3811,
18610,
198,
6738,
764,
6690,
261,
1606,
1330,
23419,
1606,
198,
6738,
764,
10462,
499,
32,
694,... | 3.421053 | 57 |
num_to_letters = {
'2': ['a', 'b', 'c'],
'3': ['d', 'e', 'f'],
'4': ['g', 'h', 'i'],
'5': ['j', 'k', 'l'],
'6': ['m', 'n', 'o'],
'7': ['p', 'q', 'r', 's'],
'8': ['t', 'u', 'v'],
'9': ['w', 'x', 'y', 'z'],
}
| [
22510,
62,
1462,
62,
15653,
796,
1391,
198,
220,
220,
220,
705,
17,
10354,
37250,
64,
3256,
705,
65,
3256,
705,
66,
6,
4357,
220,
220,
220,
220,
198,
220,
220,
220,
705,
18,
10354,
37250,
67,
3256,
705,
68,
3256,
705,
69,
6,
435... | 1.453125 | 192 |
# Copyright 2014-2015 ARM Limited
#
# Licensed under the Apache License, Version 2.0
# See LICENSE file for details.
# standard library options
from argparse import Action, SUPPRESS
| [
2,
15069,
1946,
12,
4626,
20359,
15302,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
198,
2,
4091,
38559,
24290,
2393,
329,
3307,
13,
198,
198,
2,
3210,
5888,
3689,
198,
6738,
1822,
29572,
1330,
7561,
11,
... | 4 | 46 |
# MIT License
#
# Copyright (c) 2019 Arkadiusz Netczuk <dev.arnet@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# t... | [
2,
17168,
13789,
198,
2,
198,
2,
15069,
357,
66,
8,
13130,
9128,
324,
3754,
89,
3433,
26691,
2724,
1279,
7959,
13,
1501,
316,
31,
14816,
13,
785,
29,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
59... | 3.608392 | 429 |
#!/usr/bin/env python
#-*- coding: utf-8 -*-
#---------------------------------------------------------------------------------------------------
# --> Logic to handle scenarios
#---------------------------------------------------------------------------------------------------
import imports
from imports import *
imp... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
12,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
10097,
3880,
6329,
198,
2,
14610,
30146,
284,
5412,
13858,
198,
2,
10097,
3880,
6329,
198,
198,
11748,
17944,
198,
... | 5.983607 | 61 |
import dash
import dash_html_components as html
import dash_bootstrap_components as dbc
import numpy as np
from server import app
from dash.dependencies import Input, Output, State
from dash.exceptions import PreventUpdate
from components.cards import simple_info_card
from components.dropdowns import dropdown_single
fr... | [
11748,
14470,
198,
11748,
14470,
62,
6494,
62,
5589,
3906,
355,
27711,
198,
11748,
14470,
62,
18769,
26418,
62,
5589,
3906,
355,
288,
15630,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
4382,
1330,
598,
198,
6738,
14470,
13,
45841,
39... | 1.595105 | 2,329 |
print(appendA(toAppend = raw_input("Enter a word to add an A letter: ")))
| [
198,
4798,
7,
33295,
32,
7,
1462,
4677,
437,
796,
8246,
62,
15414,
7203,
17469,
257,
1573,
284,
751,
281,
317,
3850,
25,
366,
22305,
198
] | 2.884615 | 26 |
#!/usr/bin/python
from __future__ import print_function
import threading
import boto3
import botocore
import argparse
from time import ctime
###############
# Some Global Vars
##############
lock = threading.Lock()
awsaccts = [{'acct': 'acct1ID',
'name': 'master',
'cffile': 'location of clou... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
4704,
278,
198,
11748,
275,
2069,
18,
198,
11748,
10214,
420,
382,
198,
11748,
1822,
29572,
198,
6738,
640,
1330,
269,
2435,
19... | 2.279675 | 615 |
import os
from Config import Config
from NIM.algorithms import WhaleOptimizationAlgorithm
from NIM.algorithms.algorithm import logger
if __name__ == '__main__':
with open(Config.default_saved_scene_path, 'r') as f:
data = f.read()
m2d = eval(data)
seed = 5
woa = WhaleOptimizationAlgorithm(m2... | [
11748,
28686,
198,
198,
6738,
17056,
1330,
17056,
198,
6738,
399,
3955,
13,
282,
7727,
907,
1330,
44772,
27871,
320,
1634,
2348,
42289,
198,
6738,
399,
3955,
13,
282,
7727,
907,
13,
282,
42289,
1330,
49706,
628,
198,
361,
11593,
3672,
... | 2.267352 | 389 |
'''
File: COVIDZejunDatagraphs.py
Author: Zejun Li
Purpose: This file contains 12 different functions to make 5 different graphs about the COVID 19 in Idaho
'''
import pandas as pd, numpy as np, matplotlib.pyplot as plt
import matplotlib.dates as mdates
import datetime
import datetime as dt
def get_df():
... | [
7061,
6,
201,
198,
8979,
25,
7375,
11008,
36056,
29741,
27354,
6111,
82,
13,
9078,
201,
198,
13838,
25,
9033,
29741,
7455,
201,
198,
30026,
3455,
25,
770,
2393,
4909,
1105,
1180,
5499,
284,
787,
642,
1180,
28770,
546,
262,
7375,
11008... | 2.111819 | 2,826 |
import pytest
import json
import datetime
from scrapy.spiders import Spider
import scrapy.exceptions
from skyscraper.items import BasicItem
from scrapy.exceptions import DropItem
from skyscraper.pipelines.filesystem import DiskDeduplicationPipeline
| [
11748,
12972,
9288,
198,
11748,
33918,
198,
11748,
4818,
8079,
198,
198,
6738,
15881,
88,
13,
2777,
4157,
1330,
12648,
198,
11748,
15881,
88,
13,
1069,
11755,
198,
6738,
37885,
38545,
13,
23814,
1330,
14392,
7449,
198,
6738,
15881,
88,
... | 3.666667 | 69 |
__all__ = [
'account',
'connect',
'locations',
'login',
'logout',
]
from .windscribe import (
account,
connect,
locations,
login,
logout,
) | [
834,
439,
834,
796,
685,
198,
220,
220,
220,
705,
23317,
3256,
198,
220,
220,
220,
705,
8443,
3256,
198,
220,
220,
220,
705,
17946,
602,
3256,
198,
220,
220,
220,
705,
38235,
3256,
198,
220,
220,
220,
705,
6404,
448,
3256,
198,
60... | 2.117647 | 85 |
# Generated by Django 3.2 on 2021-04-20 19:34
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
319,
33448,
12,
3023,
12,
1238,
678,
25,
2682,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.892857 | 28 |
# -*- codingutf-8 -*-
# &Author AnFany
# Sklearn
"""
"""
# PM2.5
import SVM_Regression_Data as rdata
#
from sklearn import svm
import numpy as np
import matplotlib.pyplot as plt
from pylab import mpl
mpl.rcParams['font.sans-serif'] = ['FangSong'] #
mpl.rcParams['axes.unicode_minus'] = False ... | [
2,
532,
9,
12,
19617,
40477,
12,
23,
532,
9,
12,
201,
198,
2,
1222,
13838,
1052,
37,
1092,
201,
198,
201,
198,
2,
3661,
35720,
201,
198,
201,
198,
37811,
201,
198,
201,
198,
37811,
201,
198,
201,
198,
2,
3122,
17,
13,
20,
201,... | 1.898592 | 355 |
from os.path import dirname
import unittest
from .decorators import skip_if_no_mock
from .helpers import mock
from conda import history
| [
6738,
28686,
13,
6978,
1330,
26672,
3672,
198,
11748,
555,
715,
395,
198,
198,
6738,
764,
12501,
273,
2024,
1330,
14267,
62,
361,
62,
3919,
62,
76,
735,
198,
6738,
764,
16794,
364,
1330,
15290,
198,
198,
6738,
1779,
64,
1330,
2106,
... | 3.181818 | 44 |
# This file is necessary to make this directory a package.
from zojax.catalog.catalog import queryCatalog
| [
2,
770,
2393,
318,
3306,
284,
787,
428,
8619,
257,
5301,
13,
198,
198,
6738,
1976,
13210,
897,
13,
9246,
11794,
13,
9246,
11794,
1330,
12405,
49015,
198
] | 3.821429 | 28 |
# -*- encoding: utf-8 -*-
import itertools
try:
from django.core.urlresolvers import reverse
except ImportError:
from django.urls import reverse
from django.db.models.aggregates import Sum
from django.template.defaultfilters import safe
from django.utils.functional import cached_property
from django_tables2 im... | [
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
340,
861,
10141,
198,
198,
28311,
25,
198,
220,
220,
220,
422,
42625,
14208,
13,
7295,
13,
6371,
411,
349,
690,
1330,
9575,
198,
16341,
17267,
12331,
25,
198,
2... | 2.059272 | 1,181 |
#!/usr/bin/python3
import requests
from requests.structures import CaseInsensitiveDict
import json
import getpass
from pathlib import Path
import hashlib
import pandas as pd
import gzip
from multiprocessing import Process
# Global variables
#API_SERVER='https://dev-cloud.sleepdata.org/api/v1'
API_SERVER='https://clo... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
11748,
7007,
198,
6738,
7007,
13,
7249,
942,
1330,
8913,
20376,
18464,
35,
713,
198,
11748,
33918,
198,
11748,
651,
6603,
198,
6738,
3108,
8019,
1330,
10644,
220,
198,
11748,
12234,
8019,
... | 2.864865 | 148 |
import numpy as np
N = 100
R = 10000
R_range = range(R)
size = (N, 3)
C = np.zeros((N, 3))
k = 1
print ("100")
print ("STEP: ", k)
for i in range(N):
print ("He ", C[i, 0], " ", C[i, 1], " ", C[i, 2])
k += 1
for j in range(R):
A = np.random.uniform(-1, 1, size)
B = np.sum(np.multiply(A, A), axis=1)
B = np.sqrt(B)... | [
11748,
299,
32152,
355,
45941,
198,
198,
45,
796,
1802,
198,
49,
796,
33028,
198,
49,
62,
9521,
796,
2837,
7,
49,
8,
198,
7857,
796,
357,
45,
11,
513,
8,
198,
34,
796,
45941,
13,
9107,
418,
19510,
45,
11,
513,
4008,
198,
74,
7... | 1.957692 | 260 |
import os
import matplotlib.pyplot as plt
from skimage.io import imread
def plot_corners(img, corners, show=True):
"""Display the image and plot all contours found"""
plt.imshow(img, cmap='gray')
plt.plot(corners[:,1], corners[:,0], 'r+', markeredgewidth=1.5, markersize=8) # Plot corners
plt.axis('ima... | [
11748,
28686,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
6738,
1341,
9060,
13,
952,
1330,
545,
961,
198,
198,
4299,
7110,
62,
20772,
364,
7,
9600,
11,
14371,
11,
905,
28,
17821,
2599,
198,
220,
220,
220,... | 2.494881 | 586 |
import os
import sys
import pytest
import shutil
from .test_utils import setup_env_vars, unset_env_vars, BACKUP_DEST_DIR, FAKE_HOME_DIR, DIRS
sys.path.insert(0, "../shallow_backup")
from shallow_backup.utils import copy_dir_if_valid
TEST_TEXT_FILE = os.path.join(FAKE_HOME_DIR, 'test-file.txt')
| [
11748,
28686,
198,
11748,
25064,
198,
11748,
12972,
9288,
198,
11748,
4423,
346,
198,
6738,
764,
9288,
62,
26791,
1330,
9058,
62,
24330,
62,
85,
945,
11,
555,
2617,
62,
24330,
62,
85,
945,
11,
28767,
8577,
62,
35,
6465,
62,
34720,
1... | 2.560345 | 116 |
from collections import namedtuple
import networkx as nx
from mesa import Agent, Model
| [
6738,
17268,
1330,
3706,
83,
29291,
198,
198,
11748,
3127,
87,
355,
299,
87,
198,
6738,
18842,
64,
1330,
15906,
11,
9104,
198
] | 3.826087 | 23 |
"""
Given a base speed value and a list of percentages, calculates the speed value
for each percentage
"""
| [
37811,
198,
15056,
257,
2779,
2866,
1988,
290,
257,
1351,
286,
28071,
11,
43707,
262,
2866,
1988,
198,
1640,
1123,
5873,
198,
37811,
198
] | 4.458333 | 24 |
"""Base classes, context managers, and exceptions for MAGI actions."""
from abc import ABCMeta, abstractmethod
import logging
from openravepy import KinBody, Robot
LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(logging.INFO)
class ExecutableSolution(object):
"""Abstract base class for executing p... | [
37811,
14881,
6097,
11,
4732,
11663,
11,
290,
13269,
329,
28263,
40,
4028,
526,
15931,
198,
198,
6738,
450,
66,
1330,
9738,
48526,
11,
12531,
24396,
198,
11748,
18931,
198,
198,
6738,
1280,
5758,
9078,
1330,
16645,
25842,
11,
16071,
198... | 2.774427 | 829 |
from typing import List
from core.exceptions.input_exceptions import (InputFormatException,
InputTypeInconsistencyException)
from core.model.graph import Graph
from core.model.impl.fullOD import FullOD
from core.model.impl.mapOD import MapOD
from core.model.infrastructure ... | [
6738,
19720,
1330,
7343,
198,
198,
6738,
4755,
13,
1069,
11755,
13,
15414,
62,
1069,
11755,
1330,
357,
20560,
26227,
16922,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,... | 2.937853 | 177 |
# encoding: utf-8
"""
Ordinary Kriging interpolation is a linear estimation of regionalized variables.
It assumes that the data change into a normal distribution,
and considers that the expected value of regionalized variable Z is unknown.
The interpolation process is similar to the weighted sliding average,
an... | [
2,
21004,
25,
3384,
69,
12,
23,
201,
198,
201,
198,
37811,
201,
198,
35422,
3219,
509,
4359,
278,
39555,
341,
318,
257,
14174,
31850,
286,
7915,
1143,
9633,
13,
201,
198,
1026,
18533,
326,
262,
1366,
1487,
656,
257,
3487,
6082,
11,
... | 2.3096 | 1,250 |
from .util import clear_proto_mask, is_proto_msg, add_proto_mask
__all__ = [clear_proto_mask, is_proto_msg, add_proto_mask] | [
6738,
764,
22602,
1330,
1598,
62,
1676,
1462,
62,
27932,
11,
318,
62,
1676,
1462,
62,
19662,
11,
751,
62,
1676,
1462,
62,
27932,
628,
198,
834,
439,
834,
796,
685,
20063,
62,
1676,
1462,
62,
27932,
11,
318,
62,
1676,
1462,
62,
196... | 2.403846 | 52 |
#!/usr/bin/python
import rospy
from arm.srv import IKService, IKServiceResponse
rospy.init_node("asdf", anonymous=True)
rospy.wait_for_service('IKService')
srv = rospy.ServiceProxy('IKService', IKService)
resp = srv([5, 16, 8, 0, 0, 0], None)
print resp
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
11748,
686,
2777,
88,
198,
6738,
3211,
13,
27891,
85,
1330,
314,
42,
16177,
11,
314,
42,
16177,
31077,
198,
198,
305,
2777,
88,
13,
15003,
62,
17440,
7203,
292,
7568,
1600,
11614,
28,
... | 2.47619 | 105 |
from datetime import datetime
from locale import *
import scrapy
from injector import Injector
from scrapers.items import CoinMarketCapItem
from scrapers.utils import UrlListGenerator
setlocale(LC_NUMERIC, '')
| [
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
36693,
1330,
1635,
198,
198,
11748,
15881,
88,
198,
6738,
8677,
273,
1330,
554,
752,
273,
198,
198,
6738,
15881,
364,
13,
23814,
1330,
16312,
27470,
15610,
7449,
198,
6738,
15881,
364,
13,
... | 3.396825 | 63 |
from collections import OrderedDict
from urllib.parse import urlparse
import click
import rethinkdb as r
import redis
import crawler.conf as conf
# cli does not need to be thread-safe
conn = r.connect(host=conf.RethinkDBConf.HOST,
db=conf.RethinkDBConf.DB)
domains = r.table('domains')
def top(k... | [
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
6738,
2956,
297,
571,
13,
29572,
1330,
19016,
29572,
198,
198,
11748,
3904,
198,
11748,
36437,
9945,
355,
374,
198,
11748,
2266,
271,
198,
198,
11748,
27784,
1754,
13,
10414,
355,
1013,
198,... | 2.279461 | 297 |
# -8*- coding: utf-8 -*-
import torch
import torch.nn as nn
import torch.optim as optim
import torch.multiprocessing as mp
import torch.backends.cudnn as cudnn
from torch.utils.data import DataLoader, Dataset
from torch.nn.parallel import DistributedDataParallel
from torch.utils.data.distributed import DistributedSamp... | [
2,
532,
23,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
40085,
355,
6436,
198,
11748,
28034,
13,
16680,
541,
305,
919,
278,
355,
29034,... | 1.918006 | 1,866 |
from django.urls import path
from .views import *
app_name = 'newsletter'
urlpatterns = [
path('pixel/', my_image, name='pixel'),
path('click/<str:uuid>/', click_redirect, name='click'),
path('notification/', notification, name='notification'),
path('sendtest/<str:slug>', sendtest, name='sendtest'),
... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
198,
6738,
764,
33571,
1330,
1635,
198,
198,
1324,
62,
3672,
796,
705,
10827,
9291,
6,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
3108,
10786,
32515,
14,
3256,
616,
62... | 2.683453 | 139 |
n = int(input())
temp_n = n
k=0
while True:
a = int(temp_n / 10)
b = temp_n % 10
c = (a + b) % 10
new = b*10 + c
k += 1
if new == n:
break
temp_n = new
print(k)
| [
77,
796,
493,
7,
15414,
28955,
198,
29510,
62,
77,
796,
299,
198,
74,
28,
15,
198,
4514,
6407,
25,
198,
220,
220,
220,
257,
796,
493,
7,
29510,
62,
77,
1220,
838,
8,
198,
220,
220,
220,
275,
796,
20218,
62,
77,
4064,
838,
198,... | 1.807339 | 109 |
#!/usr/bin/env python
"""
cubic spline planner
Author: Atsushi Sakai
"""
import math
import numpy as np
import bisect
from scipy.spatial import distance
def calc_spline_course(x, y, ds=0.1):
sp = Spline2D(x, y)
s = list(np.arange(0, sp.s[-1], ds))
rx, ry, ryaw, rk, rdk = [], [], [], [], []
for i_s... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
66,
549,
291,
4328,
500,
42351,
198,
198,
13838,
25,
317,
912,
17731,
13231,
1872,
198,
198,
37811,
198,
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
47457,
... | 1.844262 | 976 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from behave import *
from helpers.eventually import eventually
| [
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,
17438,
1330,
1635,
198,
6738,
49385,
13,
15596,
935,
1330,
4191,
628
] | 2.947368 | 38 |
from django.conf.urls import url, include
from django.contrib import admin
from django.contrib.auth.views import login, logout
from django.conf import settings
from django.views.static import serve
from django.views.generic import TemplateView
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^accounts/l... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
11,
2291,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
33571,
1330,
17594,
11,
2604,
448,
198,
6738,
42625,
14208,
... | 2.40481 | 499 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import subprocess as sp
| [
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,
11748,
850,
14681,
355,
599,
628
] | 2.354839 | 31 |
from django.conf.urls import patterns, url
from django.contrib import admin
from django.contrib.auth.decorators import login_required
from django.views.generic import TemplateView
admin.autodiscover()
from plag import views, const
urlpatterns = patterns('',
url(r'^$', views.IndexView.as_view(... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
7572,
11,
19016,
198,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
12501,
273,
2024,
1330,
17594,
62,
35827,
198,
6738,
... | 1.843011 | 2,790 |
import hmac
import hashlib
import json
import uuid
import httplib2
COINUT_URL = 'https://coinut.com/api/'
| [
11748,
289,
20285,
198,
11748,
12234,
8019,
198,
11748,
33918,
198,
11748,
334,
27112,
198,
198,
11748,
1841,
489,
571,
17,
198,
198,
8220,
1268,
3843,
62,
21886,
796,
705,
5450,
1378,
3630,
315,
13,
785,
14,
15042,
14,
6,
198
] | 2.634146 | 41 |
from typing import Any, Dict
from ordered_set import OrderedSet
from neighborly.core.ecs import Component
from neighborly.core.engine import AbstractFactory, ComponentDefinition
| [
6738,
19720,
1330,
4377,
11,
360,
713,
198,
198,
6738,
6149,
62,
2617,
1330,
14230,
1068,
7248,
198,
198,
6738,
4780,
306,
13,
7295,
13,
721,
82,
1330,
35100,
198,
6738,
4780,
306,
13,
7295,
13,
18392,
1330,
27741,
22810,
11,
35100,
... | 4.044444 | 45 |
import threading
import time
import pandas as pd
import numpy as np
import matplotlib.cm as cm
import matplotlib.pyplot as plt
import os
import fnmatch
import random
import re
import getpass
import sys
from rdflib import Graph
from synbiohub_adapter.SynBioHubUtil import *
from sbol import *
"""
This class will... | [
198,
11748,
4704,
278,
198,
11748,
640,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
11215,
355,
12067,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
... | 2.625665 | 1,691 |
import os
from six import iteritems
from setuptools import setup
from setuptools.command.develop import develop
from setuptools.command.install import install
import subprocess
PACKAGE_NAME = 'drilsdown'
SOURCES = {
'ipython_IDV': 'projects/ipython_IDV',
'idv_teleport': 'projects/IDV_teleport',
'ramadda_publi... | [
11748,
28686,
198,
6738,
2237,
1330,
11629,
23814,
198,
6738,
900,
37623,
10141,
1330,
9058,
198,
6738,
900,
37623,
10141,
13,
21812,
13,
16244,
1330,
1205,
198,
6738,
900,
37623,
10141,
13,
21812,
13,
17350,
1330,
2721,
198,
11748,
850,
... | 2.272978 | 1,088 |
from datetime import datetime | [
6738,
4818,
8079,
1330,
4818,
8079
] | 4.833333 | 6 |
# Generated by Django 3.1.7 on 2021-03-24 07:36
import django.db.models.deletion
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
22,
319,
33448,
12,
3070,
12,
1731,
8753,
25,
2623,
198,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
... | 2.818182 | 44 |
# Copyright 2015 NEC Corporation. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | [
2,
15069,
1853,
41804,
10501,
13,
220,
1439,
2489,
10395,
13,
198,
2,
198,
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
2,
220,
220,
220,
407,
779,
428,
2393... | 3.300681 | 1,174 |
from __future__ import annotations
from itertools import product
from typing import Iterator
day_num = 17
Range = tuple[int, int]
XStepRange = tuple[int, int | None]
YStepRange = tuple[int, int]
Pos = tuple[int, int]
| [
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
340,
861,
10141,
1330,
1720,
198,
6738,
19720,
1330,
40806,
1352,
198,
198,
820,
62,
22510,
796,
1596,
628,
628,
198,
17257,
796,
46545,
58,
600,
11,
493,
60,
198,
55,
8600,
17257,... | 3.111111 | 72 |