content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
'''
'''
from ambry.bundle import BuildBundle
from contextlib import closing
import json
class Bundle(BuildBundle):
''' '''
| [
7061,
6,
198,
7061,
6,
198,
198,
6738,
220,
4915,
563,
13,
65,
31249,
1330,
10934,
33,
31249,
198,
6738,
4732,
8019,
1330,
9605,
198,
11748,
33918,
198,
198,
4871,
25282,
7,
15580,
33,
31249,
2599,
198,
220,
220,
220,
705,
7061,
705... | 2.911111 | 45 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2018-09-27 21:04
from __future__ import unicode_literals
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,
20,
319,
2864,
12,
2931,
12,
1983,
2310,
25,
3023,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
... | 2.736842 | 57 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
#
from tqdm import tqdm
import numpy as np
import traceback
import sys
PITCH_CLASS_NAMES = [
'C', 'C#', 'D', 'Eb', 'E', 'F', 'F#', 'G', 'Ab', 'A', 'Bb', 'B']
POS_RESOLUTION = 4
ROOT_pitch = {
'C': 0,
... | [
2,
15069,
357,
66,
8,
5413,
10501,
13,
1439,
2489,
10395,
13,
201,
198,
2,
49962,
739,
262,
17168,
13789,
13,
201,
198,
2,
201,
198,
201,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
201,
198,
11748,
299,
32152,
355,
45941,
20... | 1.619494 | 2,452 |
import os,sys
import pandas as pd
import numpy as np
import subprocess
from tqdm import tqdm
from ras_method import ras_method
import warnings
warnings.filterwarnings('ignore')
def est_trade_value(x,output_new,sector):
"""
Function to estimate the trade value between two sectors
"""
if (sector is not ... | [
11748,
28686,
11,
17597,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
850,
14681,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
6738,
374,
292,
62,
24396,
1330,
374,
292,
62,
24396,
198... | 2.249912 | 8,567 |
from __future__ import absolute_import
import sys
if sys.version_info.major > 2:
# This is needed for python 2 as otherwise pyspark raises an exception for following command:
# data_type = input_df.schema[str(column_name)].dataType
# Pyspark checks if the input is a string, which does not work
# with th... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
11748,
25064,
198,
361,
25064,
13,
9641,
62,
10951,
13,
22478,
1875,
362,
25,
198,
220,
220,
220,
1303,
770,
318,
2622,
329,
21015,
362,
355,
4306,
279,
893,
20928,
12073,
281,
6631... | 2.575758 | 660 |
from .consts import *
from .Mobjects.labeled_objects import * | [
6738,
764,
1102,
6448,
1330,
1635,
198,
6738,
764,
44,
48205,
13,
18242,
276,
62,
48205,
1330,
1635
] | 3.388889 | 18 |
#!/usr/bin/env python
#
from __future__ import print_function
from argparse import ArgumentParser, RawDescriptionHelpFormatter
import logging
import json
import sys
import platform
import os.path
if platform.system() == "Darwin":
# Explicitly set the backend to avoid the NSInvalidArgumentException when
# runni... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
6738,
1822,
29572,
1330,
45751,
46677,
11,
16089,
11828,
22087,
8479,
1436,
198,
11748,
18931,
198,
11748,
33918,
198,
11748,
... | 2.413576 | 3,182 |
import traceback
from pycompss.api.task import task
from pycompss.api.constraint import constraint
from pycompss.api.parameter import FILE_IN, FILE_OUT
from biobb_common.tools import file_utils as fu
from biobb_analysis.gromacs import gmx_image
import os
import sys
@constraint(computingUnits="1")
@task(input_traj_pat... | [
11748,
12854,
1891,
198,
6738,
12972,
5589,
824,
13,
15042,
13,
35943,
1330,
4876,
198,
6738,
12972,
5589,
824,
13,
15042,
13,
1102,
2536,
2913,
1330,
32315,
198,
6738,
12972,
5589,
824,
13,
15042,
13,
17143,
2357,
1330,
45811,
62,
1268... | 2.833333 | 144 |
# -*- coding: utf-8 -*-
# @Date : 2/16/21
# @Author : Xinyu Gong (xinyu.gong@utexas.edu)
# @Link : None
# @Version : 0.0
from .fid_score_torch import calculate_fid_given_paths_torch
from .inception_score import get_inception_score
__all__ = ["calculate_fid_given_paths_torch", "get_inception_score"]
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2488,
10430,
220,
220,
220,
1058,
362,
14,
1433,
14,
2481,
198,
2,
2488,
13838,
220,
1058,
1395,
3541,
84,
47142,
357,
87,
3541,
84,
13,
70,
506,
31,
315,
1069,
... | 2.272059 | 136 |
from google.appengine.ext import webapp as wa
from google.appengine.ext.zipserve import ZipHandler, main
application = wa.WSGIApplication([('/([^/]+)/(.*)', ZipHandler)])
if __name__ == '__main__':
main()
| [
6738,
23645,
13,
1324,
18392,
13,
2302,
1330,
3992,
1324,
355,
2082,
198,
6738,
23645,
13,
1324,
18392,
13,
2302,
13,
89,
2419,
3760,
1330,
38636,
25060,
11,
1388,
198,
198,
31438,
796,
2082,
13,
19416,
38,
3539,
381,
10142,
26933,
10... | 2.813333 | 75 |
from godity.core.Component import Component
from godity.math.Vector2 import Vector2
| [
6738,
5770,
414,
13,
7295,
13,
21950,
1330,
35100,
201,
198,
6738,
5770,
414,
13,
11018,
13,
38469,
17,
1330,
20650,
17,
201,
198
] | 3.583333 | 24 |
#!/usr/bin/env python
# coding=utf-8
from __future__ import division, print_function, unicode_literals
import numpy as np
import pytest
from brainstorm.structure.layout import (Hub, create_layout,
create_layout_stub,
gather_array_nodes,... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
28,
40477,
12,
23,
198,
6738,
11593,
37443,
834,
1330,
7297,
11,
3601,
62,
8818,
11,
28000,
1098,
62,
17201,
874,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
12972,
... | 1.733913 | 575 |
import sys, os
from jinja2 import Environment, FileSystemLoader
class JinjaParser(object):
"""
Jinja parser for generated tpl called by
top-level controller for generating ray.run()
"""
def patch(string):
"""
patch for boolean variable from tojson
"""
if string == "false": return "... | [
11748,
25064,
11,
28686,
198,
6738,
474,
259,
6592,
17,
1330,
9344,
11,
9220,
11964,
17401,
628,
198,
4871,
17297,
6592,
46677,
7,
15252,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
17297,
6592,
30751,
329,
7560,
256,
489,
14... | 2.67803 | 264 |
'''Module for parsing blast output format 10'''
import numpy as np
#import matplotlib.pyplot as plt
import pandas as pd
import os
#import re
from selseq_constant import *
from selseq_main import find_tag, SequenceFasta
print('start selseq_parsing_blast')
full_seq_threshold = pd.Series()
base_used = set()
... | [
7061,
6,
26796,
329,
32096,
11975,
5072,
5794,
838,
7061,
6,
198,
198,
11748,
299,
32152,
355,
45941,
198,
2,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
28686,
198,
2,
... | 2.35865 | 237 |
from .key_derive import *
| [
6738,
764,
2539,
62,
1082,
425,
1330,
1635,
201,
198
] | 2.7 | 10 |
# Copyright 2016 The Eyra Authors. 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 by applicable la... | [
2,
15069,
1584,
383,
21566,
430,
46665,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
... | 3 | 673 |
'''
Daniel Salas
March 4, 2019
Updated: March 6, 2019
The goal of this program is to spread out the tasks in AlphaEvaluator over
multiple CPU's, in hopes of speeding it up. In the first exercises, I was only
working with a couple hundred funds at a time. Originally, those programs took
over an hour each, but eventuall... | [
7061,
6,
198,
19962,
4849,
292,
198,
16192,
604,
11,
13130,
198,
17354,
25,
2805,
718,
11,
13130,
198,
198,
464,
3061,
286,
428,
1430,
318,
284,
4104,
503,
262,
8861,
287,
12995,
36,
2100,
84,
1352,
625,
198,
48101,
9135,
338,
11,
... | 2.06753 | 18,229 |
import logging
from electrum_gui.common.transaction import data, models
logger = logging.getLogger("app.transaction")
| [
11748,
18931,
198,
198,
6738,
1742,
6582,
62,
48317,
13,
11321,
13,
7645,
2673,
1330,
1366,
11,
4981,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7203,
1324,
13,
7645,
2673,
4943,
628
] | 3.457143 | 35 |
# system imports
import logging
import sys
import json
from rpc import RPC
'''
init
'''
'''
control
'''
| [
2,
1080,
17944,
198,
11748,
18931,
198,
11748,
25064,
198,
11748,
33918,
198,
198,
6738,
374,
14751,
1330,
39400,
198,
198,
7061,
6,
198,
15003,
198,
7061,
6,
628,
198,
198,
7061,
6,
198,
13716,
198,
7061,
6,
628
] | 2.820513 | 39 |
#!/usr/bin/python
import sys
sys.path.append('./')
import unittest
import numpy as np
import matplotlib.pyplot as plt
from hybmc.termstructures.YieldCurve import YieldCurve
from hybmc.models.HullWhiteModel import HullWhiteModel
from hybmc.simulations.McSimulation import McSimulation
from hybmc.simulations.Payoffs i... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
7,
4458,
14,
11537,
198,
198,
11748,
555,
715,
395,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487... | 2.833333 | 204 |
import setuptools
with open('README.rst', 'r') as readme_file:
long_description = readme_file.read()
setuptools.setup(
name='django-cpf-cnpj',
version='1.0.0',
long_description=long_description,
long_description_content_type = 'text/x-rst',
description='A django model and form field for norm... | [
11748,
900,
37623,
10141,
628,
198,
4480,
1280,
10786,
15675,
11682,
13,
81,
301,
3256,
705,
81,
11537,
355,
1100,
1326,
62,
7753,
25,
198,
220,
220,
220,
890,
62,
11213,
796,
1100,
1326,
62,
7753,
13,
961,
3419,
628,
198,
2617,
376... | 2.42029 | 483 |
# 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... | 3.591133 | 203 |
import cgi
import cgitb
print("Content-type:text/html")
print()
print("<html>")
print("<head>")
print("<title>Hello CGI</title>")
print("</head>")
print("<body>")
print("<h2>Hello CGI YOU ARE IN CGI PYTHON</h2>")
print("</body>")
print("</html>")
| [
11748,
269,
12397,
220,
220,
198,
11748,
269,
18300,
65,
198,
198,
4798,
7203,
19746,
12,
4906,
25,
5239,
14,
6494,
4943,
198,
4798,
3419,
198,
4798,
7203,
27,
6494,
29,
4943,
198,
4798,
7203,
27,
2256,
29,
4943,
198,
4798,
7203,
27... | 2.460784 | 102 |
"""
Sat Jun 27, 2015 12:30:32 added by Thanh Son
Email: thanhson1085@gmail.com
This script is a simple example to decode data from bottledwater-pg -> kafka
"""
from kafka import KafkaConsumer
import avro.schema
import avro.io
import io
# To consume messages
consumer = KafkaConsumer('test2',
... | [
37811,
198,
20245,
7653,
2681,
11,
1853,
1105,
25,
1270,
25,
2624,
2087,
416,
17924,
71,
6295,
220,
198,
15333,
25,
621,
71,
1559,
940,
5332,
31,
14816,
13,
785,
220,
198,
198,
1212,
4226,
318,
257,
2829,
1672,
284,
36899,
1366,
422... | 2.482759 | 406 |
# Generated by Django 2.2.6 on 2019-11-17 04:55
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
21,
319,
13130,
12,
1157,
12,
1558,
8702,
25,
2816,
198,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625... | 3.019231 | 52 |
from experiments.run_experiment_1 import run_experiment_1
from experiments.run_experiment_2 import run_experiment_2
# faster, so we do this first.
run_experiment_2()
run_experiment_1()
| [
6738,
10256,
13,
5143,
62,
23100,
3681,
62,
16,
1330,
1057,
62,
23100,
3681,
62,
16,
198,
6738,
10256,
13,
5143,
62,
23100,
3681,
62,
17,
1330,
1057,
62,
23100,
3681,
62,
17,
198,
198,
2,
5443,
11,
523,
356,
466,
428,
717,
13,
1... | 3.04918 | 61 |
from prog import *
from wiki_scraper import *
from nltk.tokenize import sent_tokenize, word_tokenize
if __name__ == "__main__":
main()
| [
6738,
1172,
1330,
1635,
198,
6738,
22719,
62,
1416,
38545,
1330,
1635,
198,
6738,
299,
2528,
74,
13,
30001,
1096,
1330,
1908,
62,
30001,
1096,
11,
1573,
62,
30001,
1096,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834... | 2.86 | 50 |
print(" Money Counter Program ")
# Notes
oneHundredDollar = int(input("How many $100 notes: "))
fiftyDollar = int(input("How many $50 notes: "))
twentyDollar = int(input("How many $20 notes: "))
tenDollar = int(input("How many $10 notes: "))
fiveDollar = int(input("How many $5 notes: "))
# Coi... | [
4798,
7203,
220,
220,
220,
12911,
15034,
6118,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
366,
8,
201,
198,
201,
198,
2,
11822,
201,
198,
505,
39,
3229,
35,
13228,
796,
493,
7,
15414,
7203,
2437,
867,
720,
3064,
4710,
25,
... | 2.695939 | 911 |
from tensorflow.keras.layers import Activation
from tensorflow.keras.layers import Conv2D
from tensorflow.keras.layers import Dense
from tensorflow.keras.layers import Flatten
from tensorflow.keras.layers import Input
from tensorflow.keras.layers import MaxPooling2D
from tensorflow.keras.models import Model
from tensor... | [
6738,
11192,
273,
11125,
13,
6122,
292,
13,
75,
6962,
1330,
13144,
341,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
13,
75,
6962,
1330,
34872,
17,
35,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
13,
75,
6962,
1330,
360,
1072,
198,... | 3.1875 | 112 |
from django.conf.urls import include, url
urlpatterns = [
url(r'^1\.0/', include('api.v10.urls')),
url(r'^1\.1/', include('api.v11.urls')),
]
| [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
2291,
11,
19016,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
16,
17405,
15,
14,
3256,
2291,
10786,
15042,
13,
85,
940,
13,
6371,
82,
11537,
828,
... | 2.097222 | 72 |
from tester import test_case, Node, NodePoll
import concurrent.futures
@test_case("multi_network_connection_base")
@test_case("multi_network_connection_one_by_one")
@test_case("multi_network_connection_with_everything")
@test_case("multi_network_parallel_connection_stress_test")
| [
6738,
256,
7834,
1330,
1332,
62,
7442,
11,
19081,
11,
19081,
39176,
198,
11748,
24580,
13,
69,
315,
942,
628,
198,
31,
9288,
62,
7442,
7203,
41684,
62,
27349,
62,
38659,
62,
8692,
4943,
628,
198,
31,
9288,
62,
7442,
7203,
41684,
62,... | 3.141304 | 92 |
from sklearn.datasets import fetch_20newsgroups
from sklearn.naive_bayes import MultinomialNB
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.feature_extraction.text import CountVectorizer
from pprint import pprint
# Define the category map
category_map = {'talk.politics.misc': 'Politics', 'r... | [
6738,
1341,
35720,
13,
19608,
292,
1039,
1330,
21207,
62,
1238,
10827,
24432,
198,
6738,
1341,
35720,
13,
2616,
425,
62,
24406,
274,
1330,
7854,
259,
49070,
32819,
198,
6738,
1341,
35720,
13,
30053,
62,
2302,
7861,
13,
5239,
1330,
309,
... | 3.077311 | 595 |
import discord
import os
client = discord.Client()
@client.event
@client.event
client.run(os.getenv('TOKEN'))
| [
11748,
36446,
198,
11748,
28686,
198,
198,
16366,
796,
36446,
13,
11792,
3419,
198,
198,
31,
16366,
13,
15596,
198,
198,
31,
16366,
13,
15596,
198,
198,
16366,
13,
5143,
7,
418,
13,
1136,
24330,
10786,
10468,
43959,
6,
4008,
198
] | 2.780488 | 41 |
from freenit.models.role import Role
from freenit.models.user import User
from . import factories
| [
6738,
277,
1361,
270,
13,
27530,
13,
18090,
1330,
20934,
198,
6738,
277,
1361,
270,
13,
27530,
13,
7220,
1330,
11787,
198,
198,
6738,
764,
1330,
17590,
628
] | 3.571429 | 28 |
import os
from PIL import Image
for root, directories, filenames in os.walk(os.getcwd()):
if ("1lg.jpg" in filenames or "1lg.JPG" in filenames) and "1sm.jpg" not in filenames:
print("shrink!")
try:
resize(root, "1lg.jpg", 600, '1sm.jpg')
print("jpg")
except:
... | [
11748,
28686,
198,
6738,
350,
4146,
1330,
7412,
198,
198,
1640,
6808,
11,
29196,
11,
1226,
268,
1047,
287,
28686,
13,
11152,
7,
418,
13,
1136,
66,
16993,
3419,
2599,
198,
220,
220,
220,
611,
5855,
16,
75,
70,
13,
9479,
1,
287,
122... | 1.91133 | 203 |
import pandas as pd
from util import get_company_names, company_rename, most_common
import ssl
import json
ssl._create_default_https_context = ssl._create_unverified_context
lastFullYear = 2020
if __name__ == '__main__':
print('starting incidents...')
df, volume, meta = process_incidents(remote=False, ... | [
11748,
19798,
292,
355,
279,
67,
198,
6738,
7736,
1330,
651,
62,
39722,
62,
14933,
11,
1664,
62,
918,
480,
11,
749,
62,
11321,
198,
11748,
264,
6649,
198,
11748,
33918,
198,
45163,
13557,
17953,
62,
12286,
62,
5450,
62,
22866,
796,
... | 3.020833 | 144 |
#app.py:
from BottleSessions import BottleSessions
from bottle import Bottle, request
app = Bottle()
btl = BottleSessions(app)
@app.route('/set/<key>/<val>')
@app.route('/get/<key>')
@app.route('/')
if __name__ == '__main__':
app.run()
| [
2,
1324,
13,
9078,
25,
198,
198,
6738,
33608,
50,
6202,
1330,
33608,
50,
6202,
198,
6738,
9294,
1330,
33608,
11,
2581,
198,
198,
1324,
796,
33608,
3419,
198,
18347,
75,
796,
33608,
50,
6202,
7,
1324,
8,
198,
198,
31,
1324,
13,
386... | 2.46 | 100 |
import unittest
from test import test_support, test_set
import pickle
import threading
from java.io import (ByteArrayInputStream, ByteArrayOutputStream,
ObjectInputStream, ObjectOutputStream)
from java.util import Random, HashSet, LinkedHashSet
from javatests import PySetInJavaTest
class SetIn... | [
11748,
555,
715,
395,
198,
6738,
1332,
1330,
1332,
62,
11284,
11,
1332,
62,
2617,
198,
198,
11748,
2298,
293,
198,
11748,
4704,
278,
198,
198,
6738,
20129,
13,
952,
1330,
357,
40778,
19182,
20560,
12124,
11,
30589,
19182,
26410,
12124,
... | 2.966887 | 151 |
# -*- coding: utf-8 -*-
import got3 as got
import json
if __name__ == '__main__':
tweets_list = []
tweetCriteria = got.manager.TweetCriteria().setQuerySearch('dengue fever ncku').setLang(
'en').setSince("2015-07-01").setUntil("2019-10-01").setMaxTweets(10)
tweets = got.manager.TweetManager.getT... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
1392,
18,
355,
1392,
198,
11748,
33918,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
12665,
62,
4868,
796,
... | 2.336918 | 279 |
#!/usr/bin/env python
# coding=utf8
import json
from model.setting import withBase, basecfg, pack
from model.base import Article, Flow, Creator, Permit
from flask import Blueprint, request, Response, render_template, g
from .. import select, unselect
script = Blueprint('script', __name__, template_folder='template')
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
28,
40477,
23,
198,
11748,
33918,
198,
6738,
2746,
13,
33990,
1330,
351,
14881,
11,
2779,
37581,
11,
2353,
198,
6738,
2746,
13,
8692,
1330,
10172,
11,
27782,
11,
21038,
11,
... | 3.015873 | 189 |
# test exit status: good exit code
import sys
print('starting', sys.argv[0])
sys.exit(int(sys.argv[1])) # zero
| [
2,
1332,
8420,
3722,
25,
922,
8420,
2438,
198,
11748,
25064,
198,
4798,
10786,
38690,
3256,
25064,
13,
853,
85,
58,
15,
12962,
198,
17597,
13,
37023,
7,
600,
7,
17597,
13,
853,
85,
58,
16,
60,
4008,
220,
220,
220,
220,
220,
220,
... | 2.365385 | 52 |
from scrapy_plus.core.spider import Spider
from scrapy_plus.http.request import Request
from scrapy_plus.items import Item
import time
| [
6738,
15881,
88,
62,
9541,
13,
7295,
13,
2777,
1304,
1330,
12648,
198,
6738,
15881,
88,
62,
9541,
13,
4023,
13,
25927,
1330,
19390,
198,
6738,
15881,
88,
62,
9541,
13,
23814,
1330,
9097,
198,
11748,
640,
628,
628
] | 3.538462 | 39 |
#python3 unicode
#author:Steven Huang 25/04/20
#function: Query cases of COVID-19 from website
#World case statistics by time reference: https://ourworldindata.org/covid-cases
#
import sys
from numpy.lib.npyio import save
sys.path.append("..")
import os
import random
import datetime
import pandas as pd
import numpy as... | [
2,
29412,
18,
28000,
1098,
198,
2,
9800,
25,
28292,
31663,
1679,
14,
3023,
14,
1238,
198,
2,
8818,
25,
43301,
2663,
286,
7375,
11008,
12,
1129,
422,
3052,
198,
2,
10603,
1339,
7869,
416,
640,
4941,
25,
3740,
1378,
454,
6894,
521,
... | 2.506651 | 827 |
# -*- coding: utf-8 -*-
"""
Created on Fri Nov 9 09:40:56 2018
@author: DaniJ
"""
from Database import Database as Parent
import numpy as np
import sympy as sp
class Database_SC (Parent):
'''
Database_SC: #Note for myself and other contributors, if you add or delete properties or methods of the c... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
19480,
5267,
220,
860,
7769,
25,
1821,
25,
3980,
2864,
198,
198,
31,
9800,
25,
22254,
41,
198,
37811,
198,
6738,
24047,
1330,
24047,
355,
16774,
... | 2.163318 | 3,484 |
# -*- coding: utf-8 -*-
"""
Copyright (c) 2010-2018 CNRS / Centre de Recherche Astrophysique de Lyon
Copyright (c) 2016-2018 Simon Conseil <simon.conseil@univ-lyon1.fr>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following condi... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
15269,
357,
66,
8,
3050,
12,
7908,
31171,
6998,
1220,
9072,
390,
3311,
372,
2395,
8304,
10051,
893,
2350,
390,
35193,
198,
15269,
357,
66,
8,
1584,
12,
790... | 3.510373 | 482 |
# -*- coding: utf-8 -*-
"""
~~~~~~~~~~~~~~~~~~~~~~~
kiwivm partial api cli.
:auther vici: heyuhuade@gamil.com
"""
import click
import requests
import yaml
import json
@click.group()
@click.option('--api_key', '-a', help='kvm api token.')
@click.option('--veid', '-v', help='vm id.')
@click.option('--list', '-l', i... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
27156,
8728,
4907,
93,
198,
4106,
86,
452,
76,
13027,
40391,
537,
72,
13,
628,
198,
25,
2306,
372,
20429,
72,
25,
17207,
7456,
84,
671,
31,
28483,
346,
1... | 2.592 | 250 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import getpass
from bs4 import BeautifulSoup
from requests.auth import HTTPBasicAuth
import requests
import pandas as pd
sem="SS2018"
URL="https://cis.technikum-wien.at/cis/private/lehre/notenliste.php?stsem="+sem
pd.set_option('display.max_columns', 500)
pd.set_option(... | [
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,
651,
6603,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
6738,
7007,
13,
18439,
1330,
14626,
2... | 2.609756 | 205 |
r = float(input("Qual o valor do circulo: ")) #recendo os dados
a = r * 3.14 #caculando a area
print(f"A área do circulo é {a}")
| [
81,
796,
12178,
7,
15414,
7203,
46181,
267,
1188,
273,
466,
2498,
43348,
25,
366,
4008,
1303,
8344,
31110,
28686,
9955,
418,
220,
198,
64,
796,
374,
1635,
513,
13,
1415,
220,
1303,
66,
330,
377,
25440,
257,
1989,
198,
4798,
7,
69,
... | 2.298246 | 57 |
import unittest
import numpy as np
from pydftools import calc
if __name__ == '__main__':
unittest.main()
| [
11748,
555,
715,
395,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
279,
5173,
701,
10141,
1330,
42302,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
198
... | 2.666667 | 42 |
from algoritmo2 import *
# definir de tamanho
# M2(tamanho, tempo)
pr = M2(15, .5)
pr.Maneira2() | [
198,
198,
6738,
435,
7053,
270,
5908,
17,
1330,
1635,
198,
198,
2,
2730,
343,
390,
256,
10546,
8873,
198,
2,
337,
17,
7,
83,
10546,
8873,
11,
28691,
8,
198,
1050,
796,
337,
17,
7,
1314,
11,
764,
20,
8,
198,
1050,
13,
44,
1531,... | 2.020408 | 49 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from web_helper.name_generator.abstract_name_generator import AbstractNameGenerator
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
3992,
62,
2978,
525,
13,
3672,
62,
8612,
1352,
13,
397,
8709,
62,
3672,
62,
8612,
1352,
1330,
27741,
5376,... | 2.729167 | 48 |
# *****************************************************************************
# Copyright (c) 2018, NVIDIA CORPORATION. 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... | [
2,
41906,
17174,
4557,
35625,
198,
2,
220,
15069,
357,
66,
8,
2864,
11,
15127,
23929,
44680,
6234,
13,
220,
1439,
2489,
10395,
13,
198,
2,
198,
2,
220,
2297,
396,
3890,
290,
779,
287,
2723,
290,
13934,
5107,
11,
351,
393,
1231,
19... | 2.991323 | 922 |
from loggers import Actions
from serp_impressions import PatchTypes
from simiir.utils.data_handlers import get_data_handler
from stopping_decision_makers.base_decision_maker import BaseDecisionMaker
from stopping_decision_makers.time_since_relevancy_decision_maker import TimeSinceRelevancyDecisionMaker
from stopping_de... | [
6738,
2604,
5355,
1330,
24439,
198,
6738,
1055,
79,
62,
320,
8439,
507,
1330,
17106,
31431,
198,
6738,
985,
72,
343,
13,
26791,
13,
7890,
62,
4993,
8116,
1330,
651,
62,
7890,
62,
30281,
198,
6738,
12225,
62,
12501,
1166,
62,
6620,
1... | 3.684685 | 111 |
import numpy as np
from typing import Optional, Tuple, Callable, Union, List
import torch.utils.data as torchdata
from torch.optim.lr_scheduler import ReduceLROnPlateau
from alr.training.pl_mixup import (
mixup,
reg_mixup_loss,
PseudoLabelledDataset,
onehot_transform,
create_warmup_trainer,
Dat... | [
11748,
299,
32152,
355,
45941,
198,
6738,
19720,
1330,
32233,
11,
309,
29291,
11,
4889,
540,
11,
4479,
11,
7343,
198,
11748,
28034,
13,
26791,
13,
7890,
355,
28034,
7890,
198,
6738,
28034,
13,
40085,
13,
14050,
62,
1416,
704,
18173,
1... | 3.157676 | 241 |
# --------------------------------------------------------------------
# Author: Ben Money-Coomes
# Purpose: A collated collection of functions to edit pdfs from python
#
# --- Credit ---
# Source for information: PyPDF4 documentation
# Source for information 2: https://realpython.com/pdf-python/
#
# -----------------... | [
198,
2,
16529,
650,
198,
2,
6434,
25,
3932,
12911,
12,
7222,
2586,
198,
2,
32039,
25,
317,
2927,
515,
4947,
286,
5499,
284,
4370,
37124,
82,
422,
21015,
198,
2,
198,
2,
11420,
10504,
11420,
198,
2,
8090,
329,
1321,
25,
9485,
20456... | 2.650485 | 1,339 |
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Sets up and starts a Chrome slave."""
import httplib
import httplib2
import json
import os
import shutil
import subprocess
import sys
import time
import... | [
2,
15069,
1946,
383,
18255,
1505,
46665,
13,
1439,
2489,
10395,
13,
198,
2,
5765,
286,
428,
2723,
2438,
318,
21825,
416,
257,
347,
10305,
12,
7635,
5964,
326,
460,
307,
198,
2,
1043,
287,
262,
38559,
24290,
2393,
13,
198,
198,
37811... | 2.625928 | 1,481 |
# This file is part of the History Store (histore).
#
# Copyright (C) 2018-2021 New York University.
#
# The History Store (histore) is released under the Revised BSD License. See
# file LICENSE for full license details.
"""Unit tests for CSV file streams."""
from pathlib import Path
from typing import List, Optional... | [
2,
770,
2393,
318,
636,
286,
262,
7443,
9363,
357,
10034,
382,
737,
198,
2,
198,
2,
15069,
357,
34,
8,
2864,
12,
1238,
2481,
968,
1971,
2059,
13,
198,
2,
198,
2,
383,
7443,
9363,
357,
10034,
382,
8,
318,
2716,
739,
262,
31492,
... | 2.571111 | 1,350 |
from util.util import base, timer
import numpy as np
if __name__ == '__main__':
s = solve_day('lines')
s.sub(s.part1(), part='a')
s.sub(s.part2(), part='b') | [
6738,
7736,
13,
22602,
1330,
2779,
11,
19781,
198,
11748,
299,
32152,
355,
45941,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
264,
796,
8494,
62,
820,
10786,
6615,
11537,
198,
220,
220,
220,... | 2.361111 | 72 |
# Copyright (c) 2017 Linaro Limited.
#
# SPDX-License-Identifier: Apache-2.0
from runners.core import ZephyrBinaryRunner, MissingProgram
# We import these here to ensure the ZephyrBinaryRunner subclasses are
# defined; otherwise, ZephyrBinaryRunner.create_for_shell_script()
# won't work.
# Explicitly silence the unu... | [
2,
15069,
357,
66,
8,
2177,
5164,
12022,
15302,
13,
198,
2,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
24843,
12,
17,
13,
15,
198,
198,
6738,
19323,
13,
7295,
1330,
1168,
27446,
2417,
33,
3219,
49493,
11,
25639,
15167,
198... | 3.243767 | 361 |
import os
import uuid
from dotenv import load_dotenv
from cassandra.cqlengine import columns
from cassandra.cqlengine.models import Model
from cassandra.cqlengine.management import sync_table
from cassandra.cqlengine import connection
from connection import session, KEYSPACE
load_dotenv()
session.default_timeout = 60
... | [
11748,
28686,
198,
11748,
334,
27112,
198,
6738,
16605,
24330,
1330,
3440,
62,
26518,
24330,
198,
6738,
30606,
15918,
13,
66,
13976,
18392,
1330,
15180,
198,
6738,
30606,
15918,
13,
66,
13976,
18392,
13,
27530,
1330,
9104,
198,
6738,
3060... | 3.631579 | 114 |
# -*- coding: utf-8 -*-
"""
plnt.webapp
~~~~~~~~~~~
The web part of the planet.
:copyright: (c) 2009 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD.
"""
from os import path
from sqlalchemy import create_engine
from werkzeug import SharedDataMiddleware, ClosingIterator, Request
f... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
220,
220,
220,
458,
429,
13,
12384,
1324,
198,
220,
220,
220,
220,
15116,
4907,
93,
628,
220,
220,
220,
383,
3992,
636,
286,
262,
5440,
13,
628,
220,
220... | 3.116505 | 206 |
#!/usr/bin/env python
import os
import oauth2 as oauth
import urlparse
USER_AGENT = "discogstagger +http://github.com/jesseward"
class DiscogsAuth(object):
''' Returns an OAuth authentication handle for requests against the
Discogs API. '''
consumer_key = 'sxOsKeryYGLwrSsHtRVA'
consumer_secret = ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
28686,
198,
11748,
267,
18439,
17,
355,
267,
18439,
198,
11748,
19016,
29572,
198,
198,
29904,
62,
4760,
3525,
796,
366,
15410,
519,
301,
7928,
1343,
4023,
1378,
12567,
13,
785,
... | 2.449339 | 1,135 |
# -*- coding: utf-8 -*-
"""
Models module
"""
from datetime import datetime
from sqlalchemy.dialects.postgresql import JSON
from application import db #pylint: disable=E0401
class Activity(db.Model):
"""
Activity class
"""
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
category =... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
5841,
1424,
8265,
198,
37811,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
44161,
282,
26599,
13,
38969,
478,
82,
13,
7353,
34239,
13976,
1330,
19449,
... | 2.599658 | 1,169 |
"""
Regroups the fight checker
--
Author : DrLarck
Last update : 31/01/20 (DrLarck)
"""
# dependancies
import asyncio
# util
from utility.cog.player.player import Player
from utility.cog.character.getter import Character_getter
# fight checker
class Fight_checker:
"""
Represents the fight checker
"""
... | [
37811,
198,
8081,
14459,
262,
1907,
2198,
263,
198,
198,
438,
198,
198,
13838,
1058,
1583,
43,
283,
694,
198,
198,
5956,
4296,
1058,
3261,
14,
486,
14,
1238,
357,
6187,
43,
283,
694,
8,
198,
37811,
198,
198,
2,
4745,
16183,
198,
1... | 2.172743 | 1,152 |
# Generated by Django 3.1.5 on 2021-02-15 12:49
from django.conf import settings
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
20,
319,
33448,
12,
2999,
12,
1314,
1105,
25,
2920,
201,
198,
201,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
201,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
201,
... | 2.804348 | 46 |
# Um professor quer sortear um dos seus quatro alunos para apagar o quadro. Faça um programa que ajude ele, lendo o nome dos alunos e escrevendo na tela o nome do escolhido.
from random import choice
nome1 = input('Digite um nome: ')
nome2 = input('Digite outro nome: ')
nome3 = input('Digite mais um nome: ')
nome4 = ... | [
2,
21039,
6240,
42517,
3297,
451,
23781,
23430,
384,
385,
627,
47756,
435,
403,
418,
31215,
2471,
32452,
267,
15094,
305,
13,
18350,
50041,
23781,
1430,
64,
8358,
257,
73,
2507,
9766,
11,
22096,
78,
267,
299,
462,
23430,
435,
403,
418... | 2.509202 | 163 |
#!/usr/bin/env python
#
# $Id: kfssetup.py 36 2007-11-12 02:43:36Z sriramsrao $
#
# Copyright 2007 Kosmix Corp.
#
# This file is part of Kosmos File System (KFS).
#
# 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 cop... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
2,
720,
7390,
25,
479,
69,
824,
316,
929,
13,
9078,
4570,
4343,
12,
1157,
12,
1065,
7816,
25,
3559,
25,
2623,
57,
19677,
343,
4105,
430,
78,
720,
198,
2,
198,
2,
15069,
... | 2.341726 | 4,647 |
from django.test import TestCase
from django.urls import reverse
from showcase.models import Item
from mainpage.models import ItemOnMainPage
| [
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
198,
198,
6738,
21742,
13,
27530,
1330,
9097,
198,
6738,
1388,
7700,
13,
27530,
1330,
9097,
2202,
13383,
9876,
628
] | 3.864865 | 37 |
# ======================================================================== #
#
# Copyright (c) 2017 - 2020 scVAE authors
#
# 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.apac... | [
2,
38093,
1421,
18604,
1303,
198,
2,
198,
2,
15069,
357,
66,
8,
2177,
532,
12131,
629,
11731,
36,
7035,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
... | 4.007874 | 254 |
import logging
import os
import pathlib
import sys
def get_project_dir() -> pathlib.Path:
"""
Utility function to return absolute directory of project directory as a pathlib.Path instance
:return: pathlib.Path instance
"""
root_dir = [path for path in sys.path if path.endswith("src")]
try:
... | [
11748,
18931,
198,
11748,
28686,
198,
11748,
3108,
8019,
198,
11748,
25064,
628,
198,
4299,
651,
62,
16302,
62,
15908,
3419,
4613,
3108,
8019,
13,
15235,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
34030,
2163,
284,
1441,
4112,
... | 2.694268 | 628 |
"""
PyTorch implementation of Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization
[Huang+, ICCV2017]
This code is based on the following github repo: https://github.com/naoto0804/pytorch-AdaIN
(cloned on 22nd Feb 2018, commit 1a059f43ef5f67eb42daacb60869ed04b7c4c4c7)
"""
import os
import sys
im... | [
37811,
198,
20519,
15884,
354,
7822,
286,
33619,
11619,
17738,
20558,
287,
6416,
12,
2435,
351,
30019,
425,
2262,
590,
14435,
1634,
198,
58,
38202,
648,
28200,
32300,
53,
5539,
60,
198,
198,
1212,
2438,
318,
1912,
319,
262,
1708,
33084,... | 2.336646 | 3,220 |
while True:
art_name = input("\nEnter an artist name('q' to stop): ")
albums = []
if art_name == 'q':
break
else:
while True:
alb_name = input("Enter one or more album of this artist ('q' to stop): ")
album = {}
if alb_name == 'q':
br... | [
198,
4514,
6407,
25,
198,
220,
220,
220,
1242,
62,
3672,
796,
5128,
7203,
59,
77,
17469,
281,
6802,
1438,
10786,
80,
6,
284,
2245,
2599,
366,
8,
198,
220,
220,
220,
16788,
796,
17635,
198,
220,
220,
220,
611,
1242,
62,
3672,
6624,... | 1.98861 | 439 |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
16529,
35937,
198,
2,
15069,
357,
66,
8,
5413,
10501,
13,
1439,
2489,
10395,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
4091,
13789,
13,
14116,
287,
262,
1628,
6808,
329,
198,
2,
5964,
1321... | 3.712281 | 285 |
'''
Integration Test for creating KVM VM in MN HA mode with one mn host, which MN-VM is running on, network shutdown and recovery.
@author: Mirabel
'''
import zstackwoodpecker.test_util as test_util
import zstackwoodpecker.test_state as test_state
import zstackwoodpecker.test_lib as test_lib
import zstackw... | [
7061,
6,
201,
198,
201,
198,
34500,
1358,
6208,
329,
4441,
509,
15996,
16990,
287,
29060,
14558,
4235,
351,
530,
285,
77,
2583,
11,
543,
29060,
12,
15996,
318,
2491,
319,
11,
3127,
18325,
290,
7628,
13,
201,
198,
201,
198,
31,
9800,... | 2.953125 | 192 |
"""
Module dedicated to the Persistence Diagram (PD)
"""
import numpy as np
def save_PD(pd,name="pers_diag.txt"):
"""
A method for saving a persistence diagram as a txt file
:param pd: the persistence diagram
:param name:
:type name: string
"""
np.savetxt(name,pd)
de... | [
37811,
198,
220,
220,
220,
19937,
7256,
284,
262,
9467,
13274,
6031,
6713,
357,
5760,
8,
198,
37811,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
4299,
3613,
62,
5760,
7,
30094,
11,
3672,
2625,
19276,
62,
10989,
363,
13,
14116,
... | 2.68663 | 1,436 |
import os.path as op
import numpy as np
from ._brain import _Brain
class _BrainScraper(object):
"""Scrape Brain objects."""
| [
11748,
28686,
13,
6978,
355,
1034,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
47540,
27825,
1330,
4808,
44687,
628,
198,
4871,
4808,
44687,
3351,
38545,
7,
15252,
2599,
198,
220,
220,
220,
37227,
3351,
13484,
14842,
5563,
... | 3.069767 | 43 |
__version__ = "0.1.0.1"
_CASSIUS_VER = __version__
# The `if True` is needed because this file must be both functional
# and act as auto-generated documentation. reStructuredText needs
# everything after the double-colon to be indented, and Python is only
# okay with that if it's inside of a code block.
if True: #ST... | [
834,
9641,
834,
796,
366,
15,
13,
16,
13,
15,
13,
16,
1,
198,
62,
34,
10705,
40,
2937,
62,
5959,
796,
11593,
9641,
834,
198,
198,
2,
383,
4600,
361,
6407,
63,
318,
2622,
780,
428,
2393,
1276,
307,
1111,
10345,
198,
2,
290,
719... | 3.397727 | 528 |
'''Faça um programa que leia um número inteiro qualquer e mostre
na tela a sua tabuada'''
print('-=' * 30)
print(' TABUADA')
print('-=' * 30)
n = int(input('Digite um número para saber a sua tabuada: '))
print(f'{n} x 1 = {n * 1}')
print(f'{n} x 2 = {n * 2}')
print(f'{n} x 3 = {n * 3}')
prin... | [
7061,
6,
50110,
50041,
23781,
1430,
64,
8358,
443,
544,
23781,
299,
21356,
647,
78,
493,
68,
7058,
4140,
10819,
304,
749,
260,
198,
2616,
256,
10304,
257,
424,
64,
7400,
84,
4763,
7061,
6,
198,
198,
4798,
10786,
12,
11639,
1635,
154... | 1.809859 | 284 |
from management import EsManagement
from mappings import politician_mapping
from settings import politician_settings
es_connection = EsManagement()
es_connection.create_index(index_name="sl_politicians", mapping=politician_mapping, settings=politician_settings)
| [
6738,
4542,
1330,
8678,
48032,
198,
6738,
285,
39242,
1330,
14971,
62,
76,
5912,
198,
6738,
6460,
1330,
14971,
62,
33692,
198,
198,
274,
62,
38659,
796,
8678,
48032,
3419,
198,
274,
62,
38659,
13,
17953,
62,
9630,
7,
9630,
62,
3672,
... | 4.109375 | 64 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui_channel_explorer.ui'
#
# Created: Fri Mar 7 13:18:27 2014
# by: PyQt4 UI code generator 4.9.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
ex... | [
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,
9019,
62,
17620,
62,
20676,
11934,
13,
9019,
6,
198,
2,
198,
2,
15622,
25,
19480,
1526,
220,
767,
1511,
25,
... | 2.534247 | 146 |
from logging import getLogger
import numpy
from chainer import cuda
from chainer_chemistry.links.scaler.base import BaseScaler, to_array # NOQA
def format_x(x):
"""x may be array or Variable"""
# currently, only consider the case x is 2-dim, (batchsize, feature)
if x.ndim == 1:
# Deal with as 1... | [
6738,
18931,
1330,
651,
11187,
1362,
198,
198,
11748,
299,
32152,
198,
6738,
6333,
263,
1330,
269,
15339,
198,
198,
6738,
6333,
263,
62,
15245,
4592,
13,
28751,
13,
1416,
36213,
13,
8692,
1330,
7308,
3351,
36213,
11,
284,
62,
18747,
2... | 2.476852 | 216 |
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
# pylint: disable=too-many-lines,too-many-public-methods
from ._shared import parse_vault_id
from ._shared._generated.v7_0 import models
from .enums import CertificateP... | [
2,
20368,
650,
198,
2,
15069,
357,
66,
8,
5413,
10501,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
198,
2,
20368,
650,
198,
198,
2,
279,
2645,
600,
25,
15560,
28,
18820,
12,
21834,
12,
6615,
11,
18820,
12,
21834,
12,
11377,
1... | 2.402267 | 16,412 |
import matplotlib.pyplot as plt
import numpy as np
import os
import PIL
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
from tensorflow.keras.models import Sequential
import pathlib
# sunflower_url = "https://storage.googleapis.com/download.tensorflow.org/example_images/592p... | [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
11748,
350,
4146,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
198,
6738,
11192,
273,
11125,
1330,
41927,
292,
198,
... | 2.805471 | 329 |
# MIT License
#
# Copyright (c) <2015> <Ikergune, Etxetar>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, m... | [
2,
17168,
13789,
198,
2,
198,
2,
15069,
357,
66,
8,
1279,
4626,
29,
1279,
40,
6122,
70,
1726,
11,
412,
17602,
316,
283,
29,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,... | 2.325099 | 7,610 |
import sqlite3
from datetime import datetime, timedelta
from PyQt5 import QtCore, QtGui, QtWidgets, QtSql
from dateutil.relativedelta import relativedelta
import resources_rc
# SQL commands
# Next IDs
# Lists
# New windows
# Edits
# Updates
# Attachments
# Parties
# Searche... | [
11748,
44161,
578,
18,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
198,
6738,
9485,
48,
83,
20,
1330,
33734,
14055,
11,
33734,
8205,
72,
11,
33734,
54,
312,
11407,
11,
33734,
50,
13976,
198,
6738,
3128,
22602,
13,
... | 2.752137 | 117 |
#!/usr/bin/python2.7
# -*- encoding: utf-8 -*-
"""
@Description: Core of NoXss,include preprocess,detect,scan,e.g.
~~~~~~
@Author : longwenzhang
@Time : 19-10-9 10:13
"""
import cPickle
import os
import time
import urllib
import urllib2
from Queue import Empty
from httplib import Ba... | [
2,
48443,
14629,
14,
8800,
14,
29412,
17,
13,
22,
201,
198,
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
37811,
201,
198,
220,
220,
220,
2488,
11828,
25,
7231,
286,
1400,
55,
824,
11,
17256,
662,
14681,
11... | 1.684211 | 6,270 |
"""Abstraction to send ConnectonStateRequest and wait for ConnectionStateResponse."""
from __future__ import annotations
from typing import TYPE_CHECKING
from xknx.io.const import CONNECTIONSTATE_REQUEST_TIMEOUT
from xknx.knxip import HPAI, ConnectionStateRequest, ConnectionStateResponse, KNXIPFrame
from .request_re... | [
37811,
4826,
301,
7861,
284,
3758,
8113,
261,
9012,
18453,
290,
4043,
329,
26923,
9012,
31077,
526,
15931,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
19720,
1330,
41876,
62,
50084,
2751,
198,
198,
6738,
2124,
15418,
87,
... | 2.436416 | 692 |
# -*- coding: utf-8 -*-
import scrapy
from scrapy.linkextractors import LinkExtractor
from scrapy.spiders import CrawlSpider, Rule
from stack.items import StackItem
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
15881,
88,
198,
6738,
15881,
88,
13,
2815,
365,
742,
974,
669,
1330,
7502,
11627,
40450,
198,
6738,
15881,
88,
13,
2777,
4157,
1330,
327,
13132,
41294,
11,
14330,... | 3.092593 | 54 |
# SPDX-FileCopyrightText: 2020 Robert Cohn
#
# SPDX-License-Identifier: MIT
import pytest
import zignalz as zz
@pytest.fixture()
| [
2,
30628,
55,
12,
8979,
15269,
8206,
25,
12131,
5199,
45005,
198,
2,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
17168,
198,
198,
11748,
12972,
9288,
198,
198,
11748,
1976,
570,
282,
89,
355,
1976,
89,
628,
628,
198,
31,
90... | 2.7 | 50 |
while True:
input = raw_input('>')
# skip the current iteration and jump to the top of the loop and starts the next iteration. Hence, line 8 was not printed.
if input[0] == '#': # here, input[0] means 1st character.
continue
if input == 'done':
break
print 'You entered -',input
print... | [
4514,
6407,
25,
198,
220,
220,
220,
5128,
796,
8246,
62,
15414,
10786,
29,
11537,
198,
220,
220,
220,
1303,
14267,
262,
1459,
24415,
290,
4391,
284,
262,
1353,
286,
262,
9052,
290,
4940,
262,
1306,
24415,
13,
16227,
11,
1627,
807,
3... | 2.87395 | 119 |
# Copyright 2019 New Relic, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | [
2,
15069,
13130,
968,
43437,
11,
3457,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
... | 2.862745 | 408 |
# ------------------------------------------------------------------------------
# Copyright 2018 Frank V. Castellucci and Arthur Greef
#
# 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
#
# ... | [
2,
16529,
26171,
198,
2,
15069,
2864,
5278,
569,
13,
5833,
695,
27501,
290,
13514,
5251,
69,
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,
239... | 3.629032 | 496 |
from datetime import timedelta
import pytest
from django.urls import reverse
from django.utils.timezone import now
from pretalx.event.models import Event
from pretalx.person.models import EventPermission
@pytest.mark.django_db
@pytest.mark.django_db
@pytest.mark.parametrize('path,allowed', (
('tests/functiona... | [
6738,
4818,
8079,
1330,
28805,
12514,
198,
198,
11748,
12972,
9288,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
198,
6738,
42625,
14208,
13,
26791,
13,
2435,
11340,
1330,
783,
198,
198,
6738,
2181,
282,
87,
13,
15596,
13,
27530,
... | 2.596958 | 263 |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File : test.py
@Time : 2019/11/25 10:10:19
@Author : LiJu Tsang
@Version : 1.0
@Contact : zengliju60@gmail.com,957790617@qq.com
@Desc : None
'''
# here put the import code
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
7061,
6,
198,
31,
8979,
220,
220,
220,
1058,
220,
220,
1332,
13,
9078,
198,
31,
7575,
220,
220,
220,
1058,
220,
220... | 2.01626 | 123 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ai et ts=4 sw=4 sts=4 fenc=UTF-8 ft=python
'''
dnszonetest.main
-------------
Main dnszonetest
'''
from __future__ import print_function
from __future__ import unicode_literals
import logging
import socket
import dns.flags
import dns.message
import dns.query
imp... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
43907,
25,
257,
72,
2123,
40379,
28,
19,
1509,
28,
19,
39747,
28,
19,
277,
12685,
28,
48504,
12,
23,
10117,
28,
... | 2.10929 | 1,464 |
import argparse
import os
import pandas as pd
from source.main.address_to_coords import get_data_dir
section_mapping = {'Epicerie': 'L\'Épicerie sucrée et salée',
'Épicerie': 'L\'Épicerie sucrée et salée',
'Boissons': 'Les Boissons',
'Hyg': 'L\'Hygiène et les ... | [
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
6738,
2723,
13,
12417,
13,
21975,
62,
1462,
62,
1073,
3669,
1330,
651,
62,
7890,
62,
15908,
628,
198,
5458,
62,
76,
5912,
796,
1391,
6,
13807,
16... | 1.865772 | 596 |
import math
from collections import deque
from typing import Deque, List, Tuple
import numpy as np
import carla
from . import coordinates, physics
from .carla_utils.manager import TickState
def _interpolate_waypoint_n_meters_ahead(
waypoints: np.ndarray, meters: float
) -> Tuple[float, float]:
"""
Get... | [
11748,
10688,
198,
6738,
17268,
1330,
390,
4188,
198,
6738,
19720,
1330,
1024,
4188,
11,
7343,
11,
309,
29291,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
11748,
1097,
5031,
198,
198,
6738,
764,
1330,
22715,
11,
11887,
198,
6738,... | 2.103313 | 1,781 |
"""
Tests for credit course models.
"""
import ddt
from django.test import TestCase
from opaque_keys.edx.keys import CourseKey
from openedx.core.djangoapps.credit.models import (
CreditCourse,
CreditProvider,
CreditRequest,
CreditRequirement,
CreditRequirementStatus
)
from openedx.core.djangoapps... | [
37811,
198,
51,
3558,
329,
3884,
1781,
4981,
13,
198,
37811,
628,
198,
11748,
288,
28664,
198,
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
6738,
32191,
62,
13083,
13,
276,
87,
13,
13083,
1330,
20537,
9218,
198,
198,
6738,
47... | 2.135655 | 1,091 |
from typing import Union, Any, List
from utils import encrypt_argon2, encrypt
from utils.typing import Document, MongoCollection
| [
6738,
19720,
1330,
4479,
11,
4377,
11,
7343,
201,
198,
6738,
3384,
4487,
1330,
34117,
62,
37920,
17,
11,
34117,
201,
198,
6738,
3384,
4487,
13,
774,
13886,
1330,
16854,
11,
42591,
36307,
201
] | 3.852941 | 34 |
import numpy as np
from gym import spaces
| [
11748,
299,
32152,
355,
45941,
198,
6738,
11550,
1330,
9029,
628
] | 3.909091 | 11 |