content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
from setuptools import setup, find_packages
setup(
name='fchat',
version='0.0',
packages=find_packages(exclude=['test']),
license='MIT',
description='A python based f-chat client',
long_description=open('README.txt').read(),
install_requires=['requests'],
url='https://github.com',
a... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
69,
17006,
3256,
198,
220,
220,
220,
2196,
11639,
15,
13,
15,
3256,
198,
220,
220,
220,
10392,
28,
19796,
62,
43789,
7,
... | 2.666667 | 141 |
# "TOP" means the last-known value of each property of each device.
# One use for this is so that we can set the type of each property explicitly after bulk-uploading to DevicePilot
# NOTE: Any property can occasionally have a value of None (null), from which the type can't be inferred. So we need to explicitly exclude... | [
2,
366,
35222,
1,
1724,
262,
938,
12,
4002,
1988,
286,
1123,
3119,
286,
1123,
3335,
13,
198,
2,
1881,
779,
329,
428,
318,
523,
326,
356,
460,
900,
262,
2099,
286,
1123,
3119,
11777,
706,
11963,
12,
25850,
278,
284,
16232,
47,
2343... | 4.130952 | 84 |
# https://theailearner.com/2018/10/15/creating-video-from-images-using-opencv-python/
# Steps:
# Fetch all the image file names using glob
# Read all the images using cv2.imread()
# Store all the images into a list
# Create a VideoWriter object using cv2.VideoWriter()
# Save the images to video file using cv2.Vide... | [
2,
3740,
1378,
1169,
64,
576,
283,
1008,
13,
785,
14,
7908,
14,
940,
14,
1314,
14,
20123,
278,
12,
15588,
12,
6738,
12,
17566,
12,
3500,
12,
9654,
33967,
12,
29412,
14,
198,
2,
32144,
25,
198,
2,
220,
376,
7569,
477,
262,
2939,
... | 2.743017 | 358 |
import logging
from typing import Iterable
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker as sqlalchemy_sessionmaker
from sqlalchemy.orm.session import Session
logger = logging.getLogger(f"py_reportit.{__name__}")
| [
11748,
18931,
198,
198,
6738,
19720,
1330,
40806,
540,
198,
6738,
44161,
282,
26599,
1330,
2251,
62,
18392,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
6246,
10297,
355,
44161,
282,
26599,
62,
29891,
10297,
198,
6738,
44161,
282,
26599,
... | 3.464789 | 71 |
import torch
import torch.nn.functional as F
from collections import namedtuple
from rlpyt.ul.algos.ul_for_rl.base import BaseUlAlgorithm
from rlpyt.ul.models.ul.vae_models import VaeHeadModel, VaeDecoderModel
from rlpyt.utils.quick_args import save__init__args
from rlpyt.utils.logging import logger
from rlpyt.ul.repla... | [
11748,
28034,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
6738,
17268,
1330,
3706,
83,
29291,
198,
6738,
374,
75,
9078,
83,
13,
377,
13,
14016,
418,
13,
377,
62,
1640,
62,
45895,
13,
8692,
1330,
7308,
47920,
2348,
42289,
... | 2.754098 | 488 |
from traitlets.config.configurable import LoggingConfigurable
from traitlets import Unicode
__author__ = 'Manfred Minimair <manfred@minimair.org>'
| [
6738,
1291,
2578,
912,
13,
11250,
13,
11250,
11970,
1330,
5972,
2667,
16934,
11970,
198,
6738,
1291,
2578,
912,
1330,
34371,
628,
198,
834,
9800,
834,
796,
705,
5124,
39193,
1855,
320,
958,
1279,
805,
39193,
31,
1084,
320,
958,
13,
23... | 3.282609 | 46 |
print("importing: pytest and platform")
import pytest
import platform
print("importing: sys and os")
import sys, os
sys.path.append(os.path.realpath(os.path.dirname(__file__)+"/.."))
print("importing: numpy")
import numpy as np
print("importing: matplotlib")
import matplotlib
@pytest.mark.mpl_image_compare(baseli... | [
4798,
7203,
11748,
278,
25,
12972,
9288,
290,
3859,
4943,
198,
11748,
12972,
9288,
198,
11748,
3859,
198,
198,
4798,
7203,
11748,
278,
25,
25064,
290,
28686,
4943,
198,
11748,
25064,
11,
28686,
198,
17597,
13,
6978,
13,
33295,
7,
418,
... | 2.608844 | 294 |
# -*- coding: utf-8 -*-
"""
Author: David Wong <davidwong.xc@gmail.com>
License: 3 clause BSD license
"""
from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
13838,
25,
3271,
27247,
1279,
67,
8490,
86,
506,
13,
25306,
31,
14816,
13,
785,
29,
198,
34156,
25,
513,
13444,
347,
10305,
5964,
198,
198,
37811,
198,
198... | 2.53 | 500 |
import numpy as np
import matplotlib.pyplot as plt
# RELU函数当input>0: output: x, input < 0, output = 0
x = np.arange(-5.0, 5.0, 0.1)
y1 = sigmoid_function(x)
y2 = step_function(x)
y3 = relu(x)
plt.plot(x, y1, label = "sigmoid")
plt.plot(x, y2, label = "step", linestyle = "--")
plt.plot(x, y3, label = "relu", linestyle... | [
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
2,
29749,
52,
49035,
121,
46763,
108,
37605,
241,
15414,
29,
15,
25,
5072,
25,
2124,
11,
5128,
1279,
657,
11,
5072,
796,
657,
198... | 2.010811 | 185 |
import tensorflow as tf
import numpy as np
from dias.model.FPN_Model import Dias_FPN
from dias.model.Unet_Model import Dias_Unet
from dias.dataIO.data import IonoDataManager
import segmentation_models as sm
import matplotlib.pyplot as plt
import os
def train(cfgs):
"""
Function for training DIAS.
"""
p... | [
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
2566,
292,
13,
19849,
13,
5837,
45,
62,
17633,
1330,
360,
4448,
62,
5837,
45,
198,
6738,
2566,
292,
13,
19849,
13,
3118,
316,
62,
17633,
1330,
360,
... | 2.049715 | 1,227 |
from abc import abstractmethod, ABCMeta
from pymarkdownlint.options import IntOption
from bs4 import BeautifulSoup
import markdown
import re
RE_HEADERS = re.compile('^h[1-6]$')
class Rule(object, metaclass=ABCMeta):
""" Class representing markdown rules. """
options_spec = []
id = []
name = ""
e... | [
6738,
450,
66,
1330,
12531,
24396,
11,
9738,
48526,
198,
6738,
12972,
4102,
2902,
75,
600,
13,
25811,
1330,
2558,
19722,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
11748,
1317,
2902,
198,
198,
11748,
302,
198,
198,
2200,
62,... | 2.823789 | 681 |
"""GDAX Trading simulator
Usage:
train_lr.py [-zepd <file> -s --stop <stop> -a <after> -b <before> -c <cnt>]
[--err-avg]
train_lr.py (-h | --help)
Options:
-d=FILE Data path [default: /data/gdax/BTC-EUR_27_6_2017_200_days_min.json]
-h --help Show this screen.
-v --version Version
-z --zmq ... | [
37811,
38,
5631,
55,
25469,
35375,
198,
198,
28350,
25,
198,
220,
4512,
62,
14050,
13,
9078,
25915,
89,
538,
67,
1279,
7753,
29,
532,
82,
1377,
11338,
1279,
11338,
29,
532,
64,
1279,
8499,
29,
532,
65,
1279,
19052,
29,
532,
66,
12... | 2.537402 | 508 |
for x in arrayYield():
print(x) | [
198,
1640,
2124,
287,
7177,
56,
1164,
33529,
198,
220,
220,
220,
3601,
7,
87,
8
] | 2.25 | 16 |
import rpxdock as rp, concurrent
if __name__ == '__main__':
main() | [
11748,
374,
8416,
67,
735,
355,
374,
79,
11,
24580,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
1388,
3419
] | 2.592593 | 27 |
from django import forms
from django.contrib.auth.models import User
from django.db import IntegrityError
from categories.exceptions import ShareContractUserIsOwner, ShareContractAlreadyExists, ShareContractUserDoesNotExist
from categories.models import ShareContract
| [
6738,
42625,
14208,
1330,
5107,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
6738,
42625,
14208,
13,
9945,
1330,
39348,
12331,
198,
198,
6738,
9376,
13,
1069,
11755,
1330,
8734,
45845,
12982,
3792,
42419... | 4.285714 | 63 |
# Generated by Django 3.2.5 on 2021-08-06 17:22
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
20,
319,
33448,
12,
2919,
12,
3312,
1596,
25,
1828,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import os
import time
import random
import tkinter
import threading
import subprocess
import glob
from ascii_art import *
from widgets import *
import platform
platform = platform.system()
# thanks to everyone on https://www.asciiart.eu/
class FILE_HANDLER(object):
""" File opening and closing yes"""
# def load_... | [
11748,
28686,
198,
11748,
640,
198,
11748,
4738,
198,
11748,
256,
74,
3849,
198,
11748,
4704,
278,
198,
11748,
850,
14681,
198,
11748,
15095,
198,
198,
6738,
355,
979,
72,
62,
433,
1330,
1635,
198,
6738,
40803,
1330,
1635,
198,
198,
1... | 2.594005 | 1,835 |
# The MIT License (MIT)
#
# Copyright © 2021 Fridtjof Gjengset, Adele Zaini, Gaute Holen
#
# 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
... | [
2,
383,
17168,
13789,
357,
36393,
8,
198,
2,
198,
2,
15069,
10673,
33448,
1305,
312,
83,
73,
1659,
402,
73,
1516,
2617,
11,
1215,
11129,
1168,
391,
72,
11,
12822,
1133,
6479,
268,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
... | 2.344422 | 2,976 |
import sqlite3 | [
11748,
44161,
578,
18
] | 3.5 | 4 |
import urllib2
import json
from celery.decorators import task
from celery.utils.log import get_task_logger
from .models import GroupMember
logger = get_task_logger(__name__)
@task(name='fetch_members_from_group')
@task(name='fetch_facebook_page_fans')
| [
11748,
2956,
297,
571,
17,
198,
11748,
33918,
198,
6738,
18725,
1924,
13,
12501,
273,
2024,
1330,
4876,
198,
6738,
18725,
1924,
13,
26791,
13,
6404,
1330,
651,
62,
35943,
62,
6404,
1362,
198,
6738,
764,
27530,
1330,
4912,
27608,
198,
... | 2.855556 | 90 |
import argparse
import logging
import sys
import uuid
from psycopg2 import connect
QUERY = """
SELECT DISTINCT t.table_schema as schema_name
FROM information_schema.tables t
WHERE t.table_schema NOT IN
('pg_catalog', 'information_schema',
'pg_toast', 'gp_toolkit', 'pg_internal')
ORDER... | [
11748,
1822,
29572,
198,
11748,
18931,
198,
11748,
25064,
198,
11748,
334,
27112,
198,
198,
6738,
17331,
22163,
70,
17,
1330,
2018,
198,
198,
10917,
19664,
796,
37227,
198,
46506,
220,
360,
8808,
1268,
4177,
256,
13,
11487,
62,
15952,
2... | 2.431655 | 278 |
from nets import neural_net as nn
import matplotlib.pyplot as plt
from operator import itemgetter
from sklearn.metrics import roc_curve, auc, roc_auc_score
from sklearn.model_selection import train_test_split
import numpy as np
"""
# AUTOENCODER
# Instantiate neural network and training classes
NN = nn.Neural_Network(... | [
6738,
31720,
1330,
17019,
62,
3262,
355,
299,
77,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
10088,
1330,
2378,
1136,
353,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
686,
66,
62,
22019,
303,
11,
257,
... | 2.30058 | 3,277 |
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--file', required=True)
args = parser.parse_args()
file1 = open(f'{args.file}', 'r')
lines = file1.readlines()
Data_Memory={}
#While not end of line
i = 0
j= []
#print(len(lines))
while (i<len(lines)) :
arr = lines[i].split(" ")
... | [
198,
11748,
1822,
29572,
198,
198,
48610,
796,
1822,
29572,
13,
28100,
1713,
46677,
3419,
198,
198,
48610,
13,
2860,
62,
49140,
10786,
438,
7753,
3256,
2672,
28,
17821,
8,
198,
198,
22046,
796,
30751,
13,
29572,
62,
22046,
3419,
198,
... | 1.731034 | 1,450 |
import networkx as nx
columns = ['discharge_id',
'avg_clust',
'cumulative_experience',
'avg_cumulative_experience',
'team_edge_size',
'team_size']
notes_with_disposition_file = '../data/notes_w_disposition.csv'
discharges_with_disposition_file = '../data/discharges_w_dispositio... | [
11748,
3127,
87,
355,
299,
87,
198,
198,
28665,
82,
796,
37250,
6381,
10136,
62,
312,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
615,
70,
62,
565,
436,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
36340,
13628,
62,
... | 2.295775 | 142 |
import json
import yaml
import configparser
from pathlib import Path
| [
11748,
33918,
198,
11748,
331,
43695,
198,
11748,
4566,
48610,
198,
6738,
3108,
8019,
1330,
10644,
198
] | 4.058824 | 17 |
from flask import Flask, render_template
from models.service import Service
import mlab
app = Flask(__name__)
mlab.connect()
@app.route('/')
@app.route('/search/<int:gender>')
if __name__ == '__main__':
app.run(debug=True)
| [
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
198,
6738,
4981,
13,
15271,
1330,
4809,
198,
11748,
285,
23912,
198,
198,
1324,
796,
46947,
7,
834,
3672,
834,
8,
198,
4029,
397,
13,
8443,
3419,
628,
198,
31,
1324,
13,
38629,
10786,
1... | 2.771084 | 83 |
# Copyright 2020 Google LLC
#
# 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 writing, ... | [
2,
15069,
12131,
3012,
11419,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
733... | 2.791398 | 3,255 |
from JumpScale import j
from GitFactory import GitFactory
j.base.loader.makeAvailable(j, 'clients')
j.clients.git = GitFactory()
| [
6738,
15903,
29990,
1330,
474,
198,
6738,
15151,
22810,
1330,
15151,
22810,
198,
198,
73,
13,
8692,
13,
29356,
13,
15883,
10493,
7,
73,
11,
705,
565,
2334,
11537,
198,
73,
13,
565,
2334,
13,
18300,
796,
15151,
22810,
3419,
628
] | 3.195122 | 41 |
from django.conf.urls.defaults import *
urlpatterns = patterns('djangobench_webui.webui.views',
(r'^$', 'results'),
(r'^data/(?P<benchmark>\w+)/$', 'benchmark_data'),
)
| [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
13,
12286,
82,
1330,
1635,
628,
198,
6371,
33279,
82,
796,
7572,
10786,
28241,
648,
672,
24421,
62,
12384,
9019,
13,
12384,
9019,
13,
33571,
3256,
198,
220,
220,
220,
357,
81,
6,
61,
3,
... | 2.294872 | 78 |
#
# Valuation of European Call Options in BSM Model
# Comparison of Analytical, int_valueegral and FFT Approach
# 11_cal/BSM_option_valuation_FOU.py
#
# (c) Dr. Yves J. Hilpisch
# Derivatives Analytics with Python
#
import numpy as np
from numpy.fft import fft
from scipy.integrate import quad
from scipy import stats
im... | [
2,
198,
2,
3254,
2288,
286,
3427,
4889,
18634,
287,
347,
12310,
9104,
198,
2,
34420,
286,
16213,
22869,
11,
493,
62,
8367,
1533,
1373,
290,
376,
9792,
38066,
198,
2,
1367,
62,
9948,
14,
4462,
44,
62,
18076,
62,
2100,
2288,
62,
37,... | 2.064879 | 2,759 |
from ._seam_carving import _seam_carve_v
from .. import util
from .._shared import utils
import numpy as np
def seam_carve(image, energy_map, mode, num, border=1, force_copy=True):
""" Carve vertical or horizontal seams off an image.
Carves out vertical/horizontal seams from an image while using the given
... | [
6738,
47540,
325,
321,
62,
7718,
1075,
1330,
4808,
325,
321,
62,
7718,
303,
62,
85,
198,
6738,
11485,
1330,
7736,
198,
6738,
11485,
62,
28710,
1330,
3384,
4487,
198,
11748,
299,
32152,
355,
45941,
628,
198,
4299,
15787,
62,
7718,
303,... | 2.751163 | 860 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
""" QiBuild """
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
357,
66,
8,
2321,
12,
1238,
2481,
8297,
28650,
47061,
13,
1439,
2489,
10395,
13,
198,
2,
5765,
286,
428,
... | 2.980676 | 207 |
######################
# Author: Nick Gavalas
# 2/3/2019 fixed by Kimon Moschandreou
######################
import time
import sys
import os
import selenium
from selenium import webdriver
# TODO: Substitute timers with webdriverwaits.
url = sys.argv[1]
projectname = 'deleteme'
tjobname = 'deletethisproject'
tjobimage... | [
14468,
4242,
2235,
198,
2,
6434,
25,
8047,
402,
9226,
292,
198,
2,
362,
14,
18,
14,
23344,
5969,
416,
6502,
261,
5826,
354,
49078,
280,
198,
14468,
4242,
2235,
198,
198,
11748,
640,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
... | 2.714825 | 1,059 |
import os
import argparse
import numpy as np
import gym
from gym.envs.atari.atari_env import ACTION_MEANING
import pygame
from atari_demo.wrappers import AtariDemo
from atari_demo.utils import *
import time
parser = argparse.ArgumentParser()
parser.add_argument('-g', '--game', type=str, default='MontezumaRevenge')
par... | [
11748,
28686,
198,
11748,
1822,
29572,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
11550,
198,
6738,
11550,
13,
268,
14259,
13,
35554,
13,
35554,
62,
24330,
1330,
40282,
62,
11682,
1565,
2751,
198,
11748,
12972,
6057,
198,
6738,
379,
... | 2.365142 | 1,509 |
"""Methods for dealing with configuration files."""
import os
try:
import ujson as json
except ImportError:
import json
import sutter
config_ = None
class Config(object):
"""
An internal representation of a configuration file.
Handles multiple possible config sources (path or env var) and nest... | [
37811,
46202,
329,
7219,
351,
8398,
3696,
526,
15931,
198,
198,
11748,
28686,
198,
198,
28311,
25,
198,
220,
220,
220,
1330,
334,
17752,
355,
33918,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
1330,
33918,
198,
11748,
264,
10381,
... | 2.58045 | 1,156 |
# -*- coding: utf-8 -*-
"""
ARM lexer
~~~~~~~~~
Pygments lexer for ARM Assembly.
:copyright: Copyright 2017 Jacques Supcik
:license: Apache 2, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, include
from pygments.token import Text, Name, Number, String, Comment, Punctuation
_... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
220,
220,
220,
20359,
31191,
263,
198,
220,
220,
220,
220,
15116,
93,
628,
220,
220,
220,
9485,
11726,
31191,
263,
329,
20359,
10006,
13,
628,
220,
220,
22... | 2.85 | 120 |
import datetime
import os
import sys
import tempfile
import unittest
import rr
if __name__ == "__main__":
unittest.main()
| [
11748,
4818,
8079,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
20218,
7753,
198,
11748,
555,
715,
395,
198,
198,
11748,
374,
81,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
555,
71... | 2.765957 | 47 |
import asyncio
import base64
from .base import TelnetShell
TAR_DATA = "tar -czOC /data mha_master miio storage zigbee devices.txt gatewayInfoJson.info 2>/dev/null | base64"
| [
11748,
30351,
952,
198,
11748,
2779,
2414,
198,
198,
6738,
764,
8692,
1330,
12088,
3262,
23248,
198,
198,
51,
1503,
62,
26947,
796,
366,
18870,
532,
26691,
4503,
1220,
7890,
285,
3099,
62,
9866,
21504,
952,
6143,
1976,
328,
20963,
4410,... | 2.933333 | 60 |
from typing import *
class IdentifyPolicy:
"""
Provides entity identification functionalities used during appending entities to a graph.
Identification mechanism is based on the equality of identification keys extracted by entities.
:param identifier: A function to extract the identificatio... | [
6738,
19720,
1330,
1635,
201,
198,
201,
198,
201,
198,
4871,
11440,
1958,
36727,
25,
201,
198,
220,
220,
220,
37227,
201,
198,
220,
220,
220,
47081,
9312,
11795,
10345,
871,
973,
1141,
598,
1571,
12066,
284,
257,
4823,
13,
201,
198,
... | 3.051355 | 701 |
import scrapy
| [
11748,
15881,
88,
628,
198
] | 3.2 | 5 |
import os | [
11748,
28686
] | 4.5 | 2 |
import behave
@behave.when(u'I delete the created bot by email')
@behave.when(u'I try to delete a bot by the name of "{bot_name}"')
@behave.then(u'There are no bot by the name of "{bot_name}"')
@behave.given(u'There are no bots in project')
| [
11748,
17438,
628,
198,
31,
1350,
14150,
13,
12518,
7,
84,
6,
40,
12233,
262,
2727,
10214,
416,
3053,
11537,
628,
198,
31,
1350,
14150,
13,
12518,
7,
84,
6,
40,
1949,
284,
12233,
257,
10214,
416,
262,
1438,
286,
45144,
13645,
62,
... | 2.829545 | 88 |
from .models import Entry
| [
6738,
764,
27530,
1330,
21617,
628,
198
] | 4 | 7 |
"""
Module with code related to creating data.
"""
import PIL.Image
import PIL.ImageDraw
import PIL.ImageFont
import numpy as np
import cv2
import net.printing
class TemplatesMaker:
"""
Class for creating plain images of characters.
Plain image is defined as a simple black character on white background.... | [
37811,
198,
26796,
351,
2438,
3519,
284,
4441,
1366,
13,
198,
37811,
198,
198,
11748,
350,
4146,
13,
5159,
198,
11748,
350,
4146,
13,
5159,
25302,
198,
11748,
350,
4146,
13,
5159,
23252,
198,
198,
11748,
299,
32152,
355,
45941,
198,
1... | 2.602723 | 808 |
import re
import pymysql
| [
11748,
302,
198,
11748,
279,
4948,
893,
13976,
628
] | 2.888889 | 9 |
import datetime
from typing import Any, Callable, Dict, List, Optional, TypedDict, TypeVar
import attr
from . import base_core, base_db, base_proto
def Attrib(
# proto section
is_proto_field: bool = True,
proto_path: Optional[str] = None,
proto_converter: Optional[base_proto.ProtoCon... | [
11748,
4818,
8079,
198,
6738,
19720,
1330,
4377,
11,
4889,
540,
11,
360,
713,
11,
7343,
11,
32233,
11,
17134,
276,
35,
713,
11,
5994,
19852,
198,
198,
11748,
708,
81,
198,
198,
6738,
764,
1330,
2779,
62,
7295,
11,
2779,
62,
9945,
... | 2.469697 | 1,254 |
from django.contrib import admin
from .models import Question, Answer, Scrapedquestion
admin.site.register(Question)
admin.site.register(Answer)
admin.site.register(Scrapedquestion)
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
764,
27530,
1330,
18233,
11,
23998,
11,
1446,
31951,
25652,
198,
198,
28482,
13,
15654,
13,
30238,
7,
24361,
8,
198,
28482,
13,
15654,
13,
30238,
7,
33706,
8,
198,
28482,
13,
... | 3.588235 | 51 |
axI=n°²ÂjPÀq | [
64,
206,
87,
126,
236,
210,
218,
40,
28,
77,
200,
7200,
31185,
5523,
73,
47,
127,
222,
80
] | 0.894737 | 19 |
from django.shortcuts import render
from Crawlers.Helpers.amazon_crawler import amazon_crawl
from django import template
from Crawlers.Helpers.snapdeal_crawler import snapdeal_crawl
from Crawlers.Helpers.ebay_crawler import ebay_crawl
# Create your views here.
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
20177,
8116,
13,
12621,
19276,
13,
33103,
62,
66,
39464,
1330,
716,
5168,
62,
66,
13132,
198,
6738,
42625,
14208,
1330,
11055,
198,
6738,
20177,
8116,
13,
12621,
19276,
13,
45... | 3.3 | 80 |
"""Check if userbot alive. If you change these, you become the gayest gay such that even the gay world will disown you."""
import asyncio
from telethon import events
from telethon.tl.types import ChannelParticipantsAdmins
from platform import uname
from userbot import ALIVE_NAME
from userbot.utils import admin_cmd
DEF... | [
37811,
9787,
611,
2836,
13645,
6776,
13,
1002,
345,
1487,
777,
11,
345,
1716,
262,
5650,
395,
5650,
884,
326,
772,
262,
5650,
995,
481,
595,
593,
345,
526,
15931,
198,
11748,
30351,
952,
198,
6738,
5735,
400,
261,
1330,
2995,
198,
6... | 2.341085 | 387 |
'''Setup script for lascheck'''
from setuptools import setup
__version__ = '0.1.4'
CLASSIFIERS = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: End Users/Desktop",
"Intended A... | [
7061,
6,
40786,
4226,
329,
39990,
9122,
7061,
6,
201,
198,
201,
198,
6738,
900,
37623,
10141,
1330,
9058,
201,
198,
201,
198,
834,
9641,
834,
796,
705,
15,
13,
16,
13,
19,
6,
201,
198,
201,
198,
31631,
5064,
40,
4877,
796,
685,
... | 2.534196 | 541 |
#tweepy1.py - To test trend obtaining
import sys
sys.path.append('/home/vijay/.local/lib/python2.7/site-packages')
import tweepy
import woeid
import yweather
import time
import os
import sys
reload(sys)
#Configure Tweepy API
t0 = time.time()
consumer_key = 'Osyy0PSrhMRpnIWxjBLzLJeKR'
consumer_secret = 'AYY7Qb48y... | [
198,
198,
2,
83,
732,
538,
88,
16,
13,
9078,
532,
1675,
1332,
5182,
16727,
198,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
10786,
14,
11195,
14,
85,
2926,
323,
11757,
12001,
14,
8019,
14,
29412,
17,
13,
22,
14,
15654,
12,... | 2.219512 | 410 |
# Author: Alejandro M. BERNARDIS
# Email alejandro.bernardis at gmail.com
# Created: 2019/11/23 08:53
# El ejemplo fue tomado de: https://github.com/viewfinderco/viewfinder
import time
from dotted.collection import DottedDict
global_manager = CounterManager()
| [
2,
6434,
25,
9300,
47983,
337,
13,
347,
28778,
49608,
198,
2,
9570,
31341,
47983,
13,
33900,
446,
271,
379,
308,
4529,
13,
785,
198,
2,
15622,
25,
13130,
14,
1157,
14,
1954,
8487,
25,
4310,
198,
198,
2,
2574,
304,
73,
18856,
78,
... | 3.044444 | 90 |
import os
from P4 import P4, P4Exception
from qtpy import QtCore, QtGui, QtWidgets
import perforce.Utils as Utils
from perforce.AppInterop import interop | [
11748,
28686,
198,
198,
6738,
350,
19,
1330,
350,
19,
11,
350,
19,
16922,
198,
6738,
10662,
83,
9078,
1330,
33734,
14055,
11,
33734,
8205,
72,
11,
33734,
54,
312,
11407,
198,
198,
11748,
583,
3174,
13,
18274,
4487,
355,
7273,
4487,
... | 2.924528 | 53 |
from logzero import logger, setup_logger, logging
import config
| [
6738,
2604,
22570,
1330,
49706,
11,
9058,
62,
6404,
1362,
11,
18931,
198,
11748,
4566,
198
] | 4 | 16 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/Users/Colin/Documents/pyqode/core/examples/notepad/forms/main_window.ui'
#
# Created by: PyQt5 UI code generator 5.4.1
#
# WARNING! All changes made in this file will be lost!
from qtpy import QtCore, QtGui, QtWidgets
from pyqode.core.wid... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
5178,
7822,
7560,
422,
3555,
334,
72,
2393,
31051,
14490,
14,
5216,
259,
14,
38354,
14,
9078,
80,
1098,
14,
7295,
14,
1069,
12629,
14,
1662,
47852,
14,
23914,
... | 2.985294 | 136 |
# Enter your code here. Read input from STDIN. Print output to STDOUT
from itertools import permutations
a,b=input().split()
l=[]
for i in permutations(a,int(b)):
l.append("".join(i))
print(*sorted(l),sep="\n")
| [
2,
6062,
534,
2438,
994,
13,
4149,
5128,
422,
48571,
1268,
13,
12578,
5072,
284,
48571,
12425,
198,
198,
6738,
340,
861,
10141,
1330,
9943,
32855,
198,
64,
11,
65,
28,
15414,
22446,
35312,
3419,
198,
75,
28,
21737,
198,
1640,
1312,
... | 2.569767 | 86 |
from localization import L
from PyQt6.QtCore import *
from PyQt6.QtGui import *
from PyQt6.QtWidgets import *
from resources.fonts import QXFontDB
from xlib import qt as lib_qt
from ... import backend
| [
6738,
42842,
1330,
406,
198,
6738,
9485,
48,
83,
21,
13,
48,
83,
14055,
1330,
1635,
198,
6738,
9485,
48,
83,
21,
13,
48,
83,
8205,
72,
1330,
1635,
198,
6738,
9485,
48,
83,
21,
13,
48,
83,
54,
312,
11407,
1330,
1635,
198,
6738,
... | 2.794521 | 73 |
# Fits EARM 1.3 (Gaudet et. al 2012) against a single-cell time course
# measurement of an executioner caspase reporter (a proxy for Caspase-3 activity
# i.e. PARP cleavage). The model is contained in earm_1_3_standalone.py which
# was produced via export from a PySB implementation of the model
# (pysb.examples.earm_1_... | [
2,
376,
896,
31834,
44,
352,
13,
18,
357,
38,
3885,
316,
2123,
13,
435,
2321,
8,
1028,
257,
2060,
12,
3846,
640,
1781,
198,
2,
15558,
286,
281,
9706,
263,
269,
5126,
589,
9095,
357,
64,
15741,
329,
327,
5126,
589,
12,
18,
3842,
... | 2.357179 | 1,971 |
##%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
## Feature Engineering (quadratic fit via linear model)
## %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#%% read data
import numpy as np
data = np.loadtxt('quadratic_raw_data.csv', del... | [
2235,
36917,
36917,
36917,
36917,
36917,
36917,
36917,
36917,
36917,
36917,
36917,
36917,
36917,
36917,
36917,
36917,
36917,
36917,
36917,
4,
201,
198,
2235,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
... | 2.576772 | 508 |
# unit tests for rates
import math
import pynucastro.rates as rates
from pytest import approx
| [
2,
4326,
5254,
329,
3965,
198,
11748,
10688,
198,
198,
11748,
279,
2047,
1229,
459,
305,
13,
9700,
355,
3965,
198,
6738,
12972,
9288,
1330,
5561,
628,
628
] | 3.5 | 28 |
#!/usr/bin/env python
ANSIBLE_METADATA = {
'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'
}
from ansible.module_utils.basic import AnsibleModule, json
from ansible.module_utils.viptela import viptelaModule, viptela_argument_spec
from collections import OrderedDict
if __na... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
15037,
34563,
62,
47123,
2885,
13563,
796,
1391,
198,
220,
220,
220,
705,
38993,
62,
9641,
10354,
705,
16,
13,
16,
3256,
198,
220,
220,
220,
705,
13376,
10354,
37250,
3866,
1177,
... | 2.742188 | 128 |
def assign_latest_cp(args):
"""
From the given arguments checks the 'out_path' parameters.
Looks for a checkpoint assuming the checkpoint was saved in out_path
and the previous run was with the same training parameters.
Example:
If you run the program with these arguments;
"data... | [
4299,
8333,
62,
42861,
62,
13155,
7,
22046,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
3574,
262,
1813,
7159,
8794,
262,
705,
448,
62,
6978,
6,
10007,
13,
198,
220,
220,
220,
29403,
329,
257,
26954,
13148,
262,
26954,
373,... | 1.935374 | 882 |
import pygame
from digicolor import colors
import numpy as np
from nasergame.lib import math3d as m3d
__all__ = ["Wireframe"]
def pairs(iterable):
"s -> (s0,s1), (s1,s2), (s2, s3), ..."
return zip(iterable[::2], iterable[1::2])
| [
11748,
12972,
6057,
198,
6738,
3100,
27045,
273,
1330,
7577,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
299,
6005,
6057,
13,
8019,
1330,
10688,
18,
67,
355,
285,
18,
67,
198,
198,
834,
439,
834,
796,
14631,
29451,
14535,
8973... | 2.39604 | 101 |
import numpy as np
a = np.array([[3,2,1], [5, 4, -1]])
b = np.array([[4,5,7], [-3, 4, -1]])
print(a*b)
print(a)
print(b) | [
11748,
299,
32152,
355,
45941,
198,
198,
64,
796,
45941,
13,
18747,
26933,
58,
18,
11,
17,
11,
16,
4357,
685,
20,
11,
604,
11,
532,
16,
11907,
8,
198,
65,
796,
45941,
13,
18747,
26933,
58,
19,
11,
20,
11,
22,
4357,
25915,
18,
... | 1.753623 | 69 |
"""
Serializers
"""
import datetime
import collections
from dateutil import parser
from google.appengine.ext.ndb import ModelAttribute
from exceptions import ValidationError, SerializerError
from helpers import get_key_from_urlsafe, KEY_CLASS
TYPE_MAPPING = {
'IntegerProperty': IntegerField,
'Floa... | [
37811,
198,
32634,
11341,
198,
37811,
198,
11748,
4818,
8079,
198,
11748,
17268,
198,
198,
6738,
3128,
22602,
1330,
30751,
198,
6738,
23645,
13,
1324,
18392,
13,
2302,
13,
358,
65,
1330,
9104,
33682,
198,
198,
6738,
13269,
1330,
3254,
2... | 3.134078 | 179 |
import uuid
from fastapi import status
"""
NOTE: There are no tests for the foreign key constraints. The DELETE endpoint will need to be updated once the endpoints
are in place in order to account for this.
"""
#
# INVALID TESTS
#
#
# VALID TESTS
#
| [
11748,
334,
27112,
198,
198,
6738,
3049,
15042,
1330,
3722,
628,
198,
37811,
198,
16580,
25,
1318,
389,
645,
5254,
329,
262,
3215,
1994,
17778,
13,
383,
5550,
2538,
9328,
36123,
481,
761,
284,
307,
6153,
1752,
262,
886,
13033,
198,
53... | 3.2375 | 80 |
#!/usr/bin/env python
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
x,y,z = [], [], []
xd,yd,zd = [], [], []
x_fname = '/home/cobot/Desktop/assemble_project/track_data/assemble_0.01s/dataFile_x.txt'
x_dmp_fname = '/home/cobot/Desktop/assemble_project/track_data/assemble_0.01s/dmp_dataFi... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
355,
285,
489,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
87,
11,
88,
11,
89,
796,
685... | 2.028484 | 983 |
#!python
from timetable.timetableparser import parse
import sys
import export
import argparse
if __name__ == "__main__":
convert(*build_options())
| [
2,
0,
29412,
198,
198,
6738,
40021,
13,
16514,
316,
540,
48610,
1330,
21136,
198,
11748,
25064,
198,
11748,
10784,
198,
11748,
1822,
29572,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
22... | 3.204082 | 49 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Sep 29 09:22:06 2018
@author: marvin
"""
import numpy as np
## 1. Data dimensions
### 2. Scalars: 0-dimension
height = np.array(1.79)
age = np.array(1.79, dtype=np.uint8) ##unsigned int
# age2 becomes int64
age2 = age + 3
age2 = age + np.array(3, d... | [
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,
7031,
8621,
2808,
7769,
25,
1828,
25,
3312,
2864,
198,
198,
31,
9800,
25,
1667,
7114,
198... | 2.525253 | 594 |
from __future__ import unicode_literals
from django.test import TestCase
from ..utils import partial_dict_equals
| [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
198,
6738,
11485,
26791,
1330,
13027,
62,
11600,
62,
4853,
874,
628
] | 3.515152 | 33 |
# -*- coding: utf-8 -*-
# Copyright 2015-2016 Telefónica Investigación y Desarrollo, S.A.U
#
# This file is part of FIWARE 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:
#
# htt... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
15069,
1853,
12,
5304,
14318,
69,
18840,
3970,
16203,
32009,
18840,
331,
2935,
283,
2487,
78,
11,
311,
13,
32,
13,
52,
198,
2,
198,
2,
770,
2393,
318,
636,
... | 2.566729 | 1,064 |
import itertools
import math
import random
from functools import partial
from strong_graphs.output import output
from strong_graphs.data_structure import Network
from strong_graphs.negative import (
nb_neg_arcs,
nb_neg_loop_arcs,
nb_neg_tree_arcs,
)
from strong_graphs.arc_generators import (
gen_tree_ar... | [
11748,
340,
861,
10141,
198,
11748,
10688,
198,
11748,
4738,
198,
6738,
1257,
310,
10141,
1330,
13027,
198,
6738,
1913,
62,
34960,
82,
13,
22915,
1330,
5072,
198,
6738,
1913,
62,
34960,
82,
13,
7890,
62,
301,
5620,
1330,
7311,
198,
67... | 2.147356 | 1,683 |
import sys
import math
from enum import Enum
import random
number_of_cells = int(input())
game = Game()
for i in range(number_of_cells):
cell_index, richness, neigh_0, neigh_1, neigh_2, neigh_3, neigh_4, neigh_5 = [int(j) for j in input().split()]
game.board.append(Cell(cell_index, richness, [neigh_... | [
11748,
25064,
201,
198,
11748,
10688,
201,
198,
6738,
33829,
1330,
2039,
388,
201,
198,
11748,
4738,
201,
198,
201,
198,
201,
198,
17618,
62,
1659,
62,
46342,
796,
493,
7,
15414,
28955,
201,
198,
6057,
796,
3776,
3419,
201,
198,
1640,... | 2.289176 | 619 |
# encoding: utf-8
# Copyright 2011 Tree.io Limited
# This file is part of Treeio.
# License www.tree.io/license
"""
Import/Export Contacts API
"""
import csv
from django.http import HttpResponse
import StringIO
import datetime
class ProcessTransactions():
"Import/Export Contacts"
def export_transactions(s... | [
2,
21004,
25,
3384,
69,
12,
23,
198,
2,
15069,
2813,
12200,
13,
952,
15302,
198,
2,
770,
2393,
318,
636,
286,
12200,
952,
13,
198,
2,
13789,
7324,
13,
21048,
13,
952,
14,
43085,
198,
198,
37811,
198,
20939,
14,
43834,
2345,
8656,
... | 2.490826 | 654 |
"""
Model building using keras library
This includes code for building the various RNN base models for our polymuse
The models are store in current directory, in hierarchy
--h5_models/
--piano/
--stateful/
--stateless/
--lead/
--stateful/
--stateless/
--drum/
-... | [
628,
628,
198,
198,
37811,
198,
17633,
2615,
1262,
41927,
292,
5888,
198,
1212,
3407,
2438,
329,
2615,
262,
2972,
371,
6144,
2779,
4981,
329,
674,
7514,
76,
1904,
220,
198,
464,
4981,
389,
3650,
287,
1459,
8619,
11,
287,
18911,
198,
... | 2.76087 | 460 |
import asyncio
import json
import logging
from datetime import date
from datetime import datetime
from datetime import time
import arrow
import telepot
from base_site.mainapp.models import Records
from django.conf import settings
from telepot.aio.loop import MessageLoop
| [
11748,
30351,
952,
198,
11748,
33918,
198,
11748,
18931,
198,
6738,
4818,
8079,
1330,
3128,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
4818,
8079,
1330,
640,
198,
198,
11748,
15452,
198,
11748,
5735,
13059,
198,
6738,
2779,
62,
... | 3.956522 | 69 |
# Copyright (c) 2012 Advanced Micro Devices, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copyright
# notice, this list of conditions... | [
2,
15069,
357,
66,
8,
2321,
13435,
4527,
29362,
11,
3457,
13,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
2297,
396,
3890,
290,
779,
287,
2723,
290,
13934,
5107,
11,
351,
393,
1231,
198,
2,
17613,
11,
389,
10431,
2810,
326,
2... | 2.414826 | 2,037 |
from setuptools import setup, find_packages
with open('README.md') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
setup(
name='spotify_infosuite',
version='0.1.0',
description='Provides info about song/artist',
long_description=readme,
url='https://github.com/stevedpedersen/spotify-inf... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
628,
198,
4480,
1280,
10786,
15675,
11682,
13,
9132,
11537,
355,
277,
25,
198,
197,
961,
1326,
796,
277,
13,
961,
3419,
198,
198,
4480,
1280,
10786,
43,
2149,
24290,
11537,
355... | 2.722826 | 184 |
import functools
import warnings
from typing import Callable, Generic, Hashable, Type, TypeVar
from typing_extensions import ParamSpec
from ._internal import API
from ._providers.indirect import ImplementationDependency
P = ParamSpec("P")
T = TypeVar("T")
# @API.private
@API.private
| [
11748,
1257,
310,
10141,
198,
11748,
14601,
198,
6738,
19720,
1330,
4889,
540,
11,
42044,
11,
21059,
540,
11,
5994,
11,
5994,
19852,
198,
198,
6738,
19720,
62,
2302,
5736,
1330,
25139,
22882,
198,
198,
6738,
47540,
32538,
1330,
7824,
19... | 3.464286 | 84 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2020-09-04 08:33
from __future__ import unicode_literals
import bluebottle.files.validators
from django.db import migrations, models
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
1157,
13,
1314,
319,
12131,
12,
2931,
12,
3023,
8487,
25,
2091,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198... | 2.865672 | 67 |
# Uses Python 2.7
print "This program will allow you to easily edit the quiz data."
print "It assumes that a folder named 'Website' is in the same directory\n and that the folder structure matches that of the"
print "one located at https://github.com/nichwall/LASA-Engineering-Design-Quizzes."
print "\nThe quiz data is... | [
2,
36965,
11361,
362,
13,
22,
198,
198,
4798,
366,
1212,
1430,
481,
1249,
345,
284,
3538,
4370,
262,
38964,
1366,
526,
198,
4798,
366,
1026,
18533,
326,
257,
9483,
3706,
705,
33420,
6,
318,
287,
262,
976,
8619,
59,
77,
290,
326,
2... | 2.573472 | 769 |
from django.contrib.auth import get_user_model
from django.test import TestCase
from ..profilefields import ProfileFields
User = get_user_model()
| [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
651,
62,
7220,
62,
19849,
198,
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
198,
6738,
11485,
13317,
25747,
1330,
13118,
15878,
82,
198,
198,
12982,
796,
651,
62,
7220,
62,
... | 3.386364 | 44 |
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
# Takes a linked list and reverses it.
| [
2,
30396,
329,
1702,
306,
12,
25614,
1351,
13,
198,
2,
1398,
7343,
19667,
25,
198,
2,
220,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
1188,
28,
15,
11,
1306,
28,
14202,
2599,
198,
2,
220,
220,
220,
220,
220,
220,
220,
... | 2.228261 | 92 |
#-----------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------
#-------------------------------B-SPLINE EXAMPLE CODE-------------------------------
#----------------------------------------------------------------... | [
2,
10097,
1783,
6329,
198,
2,
10097,
1783,
6329,
198,
2,
1783,
24305,
33,
12,
4303,
24027,
7788,
2390,
16437,
42714,
1783,
24305,
198,
2,
10097,
1783,
6329,
198,
2,
3880,
11696,
13337,
360,
13,
31565,
3880,
198,
2,
10097,
1783,
6329,
... | 3.059942 | 684 |
import random
HEADERS = {
'Host': 'bet.hkjc.com',
'User-Agent': getheaders(),
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Language': 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2',
'Accept-Encoding': 'gzip, deflate, ... | [
11748,
4738,
201,
198,
201,
198,
37682,
4877,
796,
1391,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
17932,
10354,
705,
11181,
13,
71,
42421,
66,
13,
785,
3256,
201,
198,
220,
220,
220,
220,
220,
220,
220,
705,
12982,
12,
36... | 1.812227 | 229 |
# -*- coding: utf-8 -*-
""" Module summary description.
More detailed description.
"""
from pyrasta.crs import srs_from
from pyrasta.io_.files import RasterTempFile, VrtTempFile
from pyrasta.tools import _gdal_temp_dataset, _return_raster
from osgeo import gdal_array
import affine
import gdal
@_return_raster
def ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
19937,
10638,
6764,
13,
198,
198,
5167,
6496,
6764,
13,
198,
37811,
198,
6738,
279,
2417,
40197,
13,
66,
3808,
1330,
264,
3808,
62,
6738,
198,
6738,
279,
2... | 1.859162 | 4,104 |
import sys, imp;
# Check if psutil is installed
try:
f, pathname, desc = imp.find_module("psutil", sys.path[1:])
except ImportError:
print("Install psutil with \"pip install --user psutil\"")
sys.exit(0)
import psutil, time, threading, ctypes # An included library with Python install.
mm = Memor... | [
11748,
25064,
11,
848,
26,
198,
198,
2,
6822,
611,
26692,
22602,
318,
6589,
198,
28311,
25,
198,
220,
220,
220,
277,
11,
3108,
3672,
11,
1715,
796,
848,
13,
19796,
62,
21412,
7203,
862,
22602,
1600,
25064,
13,
6978,
58,
16,
25,
12... | 2.834711 | 121 |
a,b,c,d = 1,2,3,4
f= input()
if(f.count("V")%2 != 0):
a, b, c, d = b, a, d, c
if(f.count("H")%2 != 0):
a, b, c, d = c, d, a, b
print(a,b)
print(c,d)
| [
64,
11,
65,
11,
66,
11,
67,
796,
352,
11,
17,
11,
18,
11,
19,
198,
69,
28,
5128,
3419,
198,
361,
7,
69,
13,
9127,
7203,
53,
4943,
4,
17,
14512,
657,
2599,
198,
220,
257,
11,
275,
11,
269,
11,
288,
796,
275,
11,
257,
11,
... | 1.565657 | 99 |
# This work is based on original code developed and copyrighted by TNO 2020.
# Subsequent contributions are licensed to you by the developers of such code and are
# made available to the Project under one or several contributor license agreements.
#
# This work is licensed to you under the Apache License, Version 2... | [
2,
220,
770,
670,
318,
1912,
319,
2656,
2438,
4166,
290,
33696,
416,
309,
15285,
12131,
13,
198,
2,
220,
3834,
44399,
9284,
389,
11971,
284,
345,
416,
262,
6505,
286,
884,
2438,
290,
389,
198,
2,
220,
925,
1695,
284,
262,
4935,
73... | 1.538636 | 19,011 |
import os
import json
import copy
import pype.api
from avalon import io
PSDImage = None
| [
11748,
28686,
198,
11748,
33918,
198,
11748,
4866,
198,
11748,
279,
2981,
13,
15042,
198,
6738,
37441,
261,
1330,
33245,
198,
198,
3705,
35,
5159,
796,
6045,
628
] | 3.214286 | 28 |
__author__ = 'tiantong'
| [
834,
9800,
834,
796,
705,
83,
3014,
506,
6,
198
] | 2.4 | 10 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'procstep.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.ar... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
5178,
7822,
7560,
422,
3555,
334,
72,
2393,
705,
36942,
9662,
13,
9019,
6,
198,
2,
198,
2,
15622,
416,
25,
9485,
48,
83,
20,
12454,
2438,
17301,
642,
13,
2... | 2.433333 | 180 |
import collections
import contextlib
import cProfile
import inspect
import gc
import multiprocessing
import os
import random
import sys
import time
import unittest
import warnings
from io import StringIO
from unittest import result, runner, signals, suite, loader, case
from .loader import TestLoader
from numba.core i... | [
11748,
17268,
198,
11748,
4732,
8019,
198,
11748,
269,
37046,
198,
11748,
10104,
198,
11748,
308,
66,
198,
11748,
18540,
305,
919,
278,
198,
11748,
28686,
198,
11748,
4738,
198,
11748,
25064,
198,
11748,
640,
198,
11748,
555,
715,
395,
... | 2.615988 | 3,440 |
# -*- coding: utf-8 -*-
"""
This example demonstrates how solutions to the TOA calibration
problem may be found using multi-dimensional scaling. The example
sets 10 anchors in space and the recreates their position based
on their mutual distances and a set of constraints
"""
import matplotlib.pylab as plt
import numpy ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
1212,
1672,
15687,
703,
8136,
284,
262,
5390,
32,
36537,
198,
45573,
743,
307,
1043,
1262,
5021,
12,
19577,
20796,
13,
383,
1672,
198,
28709,
838,
43360,
287... | 2.087011 | 1,609 |
# Copyright 2014 Red Hat, 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 a... | [
2,
220,
220,
220,
15069,
1946,
2297,
10983,
11,
3457,
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.089855 | 345 |
#!/usr/bin/env python3
from irrp_with_class import IRRP
irrp = IRRP(gpio=18, filename="codes", post=130, no_confirm=True)
irrp.record("light:on")
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
6738,
4173,
81,
79,
62,
4480,
62,
4871,
1330,
14826,
20031,
628,
198,
343,
81,
79,
796,
14826,
20031,
7,
31197,
952,
28,
1507,
11,
29472,
2625,
40148,
1600,
1281,
28,
12952,... | 2.365079 | 63 |
# Copyright Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompan... | [
2,
15069,
6186,
13,
785,
11,
3457,
13,
393,
663,
29116,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
11074,
921,
198,
2,
743,
407,
779,
428,
2393,
2845,
... | 2.737461 | 2,552 |
import pandas as pd
import os
import re
# function to procure the absolute path of the file to be read
if __name__ == "__main__":
# Table 1 - Current In-Place Rents #
# tab seperated file - hence named with .tsv extension
rev_fname = r'source/rev_curr_inplace_rents_inp.tsv'
rev_fpat... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
28686,
198,
11748,
302,
628,
198,
2,
2163,
284,
23364,
262,
4112,
3108,
286,
262,
2393,
284,
307,
1100,
628,
220,
220,
220,
220,
628,
198,
220,
220,
220,
220,
628,
628,
198,
198,
361,
1... | 2.52549 | 255 |
__all__ = ['Fit_Motion','FitFunction_Motion','FitFunction_Motion_Scandir','Jacobian_Motion',\
'Jacobian_Motion_Scandir','Partial_Motion_no_Mass','Jac_Motion_Index' ]
from scipy.optimize import least_squares
import numpy as np
from MLG.Microlensing.const import const_Einsteinradius
from MLG.StellarMotion import getS... | [
834,
439,
834,
796,
37250,
31805,
62,
45740,
41707,
31805,
22203,
62,
45740,
41707,
31805,
22203,
62,
45740,
62,
3351,
392,
343,
41707,
46751,
666,
62,
45740,
3256,
59,
198,
197,
197,
6,
46751,
666,
62,
45740,
62,
3351,
392,
343,
4170... | 2.528143 | 4,868 |