content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from collections import defaultdict if __name__ == '__main__': main()
[ 6738, 17268, 1330, 4277, 11600, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
3.166667
24
import json import torch import argparse import numpy as np from transformers.modeling_outputs import SequenceClassifierOutput from transformers import Trainer, TrainingArguments, RobertaTokenizer, RobertaModel, RobertaConfig, RobertaForSequenceClassification if __name__ == '__main__': parser = argparse.ArgumentPa...
[ 11748, 33918, 198, 11748, 28034, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 6121, 364, 13, 4666, 10809, 62, 22915, 82, 1330, 45835, 9487, 7483, 26410, 198, 6738, 6121, 364, 1330, 31924, 11, 13614, 28100, 2886,...
3.11875
160
# -*- coding: utf-8 -*- # @Time : 2017/12/18 # @Author : Shu # @Email : httpservlet@yeah.net from PyQt4.QtCore import * from PyQt4.QtGui import * from FormUI.ui_getseed import Ui_getseedWD
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 2177, 14, 1065, 14, 1507, 198, 2, 2488, 13838, 220, 1058, 32344, 198, 2, 2488, 15333, 220, 220, 1058, 3740, 712, 1616, 31, 43669, ...
2.175824
91
"""Tests two schematic json files to ensure they're equal """ import json import sys INPUT_A: str = sys.argv[1] INPUT_B: str = sys.argv[2] with open(INPUT_A, 'r') as infile_a: with open(INPUT_B, 'r') as infile_b: if json.load(infile_a)['nbt'] != json.load(infile_b)['nbt']: sys.exit(1) sys.exi...
[ 37811, 51, 3558, 734, 44566, 33918, 3696, 284, 4155, 484, 821, 4961, 198, 37811, 198, 198, 11748, 33918, 198, 11748, 25064, 198, 198, 1268, 30076, 62, 32, 25, 965, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 1268, 30076, 62, 33, 25, ...
2.096774
155
""" Contains the templates for benchmark reports. """
[ 37811, 198, 4264, 1299, 262, 24019, 329, 18335, 3136, 13, 198, 37811, 198 ]
4.153846
13
import pytest from timeit import default_timer from stockfish import Stockfish
[ 11748, 12972, 9288, 198, 6738, 640, 270, 1330, 4277, 62, 45016, 198, 198, 6738, 4283, 11084, 1330, 10500, 11084, 628 ]
4.05
20
# -*- coding: utf-8 -*- import os import click from fstmt import TableAdaptorFactory, DashboardFactory, table @click.group() @cli.command() @click.argument('target') @click.argument('market') @click.argument('symbol') @click.option('--year', type=int) @click.option('--quarter', type=int, default=4) @click.option('--...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 11748, 3904, 198, 6738, 277, 301, 16762, 1330, 8655, 48003, 273, 22810, 11, 16189, 3526, 22810, 11, 3084, 198, 198, 31, 12976, 13, 8094, 3419, 19...
2.802974
269
from datetime import date from whoare.zone_parsers.ar.news_from_blockchain import NewDomains
[ 6738, 4818, 8079, 1330, 3128, 198, 6738, 508, 533, 13, 11340, 62, 79, 945, 364, 13, 283, 13, 10827, 62, 6738, 62, 9967, 7983, 1330, 968, 24510, 1299, 628, 628, 628, 198 ]
3.09375
32
"""Unit tests for client scanning.""" from __future__ import unicode_literals import os from rbtools.clients import scan_usable_client from rbtools.clients.git import GitClient from rbtools.clients.svn import SVNClient from rbtools.clients.tests import SCMClientTests from rbtools.utils.process import execute class...
[ 37811, 26453, 5254, 329, 5456, 21976, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 28686, 198, 198, 6738, 374, 18347, 10141, 13, 565, 2334, 1330, 9367, 62, 31979, 62, 16366, 198, 673...
2.168232
1,171
from isign_base_test import IsignBaseTest from isign.archive import archive_factory, Archive, AppArchive, AppZipArchive, IpaArchive from isign.utils import PY3 import logging log = logging.getLogger(__name__)
[ 6738, 318, 570, 62, 8692, 62, 9288, 1330, 1148, 570, 14881, 14402, 198, 6738, 318, 570, 13, 17474, 1330, 15424, 62, 69, 9548, 11, 20816, 11, 2034, 19895, 425, 11, 2034, 41729, 19895, 425, 11, 314, 8957, 19895, 425, 198, 6738, 318, 5...
3.132353
68
""" Light curves components for Cotrendy """ import sys import logging import numpy as np from scipy.stats import median_absolute_deviation import cotrendy.utils as cuts def load_photometry(config, apply_object_mask=True): """ Read in a photometry file Parameters ---------- config : dict C...
[ 37811, 198, 15047, 23759, 6805, 329, 42266, 10920, 88, 198, 37811, 198, 11748, 25064, 198, 11748, 18931, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 34242, 1330, 14288, 62, 48546, 62, 7959, 3920, 198, 11748, 269, 31...
2.221239
2,147
# Script for creating and loading PatStat2018b dataset into Big Query tables # coding: utf-8 ############################################### ###### Importing Libraries and functions ###### from google.cloud import bigquery from open_patstat.utils.gcp import create_table, load_gcs_file, delete_table from open_patstat....
[ 2, 12327, 329, 4441, 290, 11046, 3208, 17126, 7908, 65, 27039, 656, 4403, 43301, 8893, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 29113, 7804, 4242, 21017, 198, 4242, 2235, 17267, 278, 46267, 290, 5499, 46424, 2, 198, 198, 6738, ...
2.942771
664
""" cclib (http://cclib.sf.net) is (c) 2006, the cclib development team and licensed under the LGPL (http://www.gnu.org/copyleft/lgpl.html). """ __revision__ = "$Revision: 737 $" from PyQuante.Molecule import Molecule def makepyquante(atomcoords, atomnos, charge=0, mult=1): """Create a PyQuante Molecule. >>...
[ 37811, 198, 535, 8019, 357, 4023, 1378, 535, 8019, 13, 28202, 13, 3262, 8, 318, 357, 66, 8, 4793, 11, 262, 269, 565, 571, 2478, 1074, 198, 392, 11971, 739, 262, 17370, 6489, 357, 4023, 1378, 2503, 13, 41791, 13, 2398, 14, 22163, 2...
2.312849
358
""" https://www.twilio.com/ This link is the basis for the text messaging, make sure to sign up! After registering, press the home buton and click "Dashboard", both in the top left You will see the following lines "cellphone" -> Paste verified Twilio number as string "ACCOUNT SID" -> Paste that number into account as...
[ 37811, 198, 5450, 1378, 2503, 13, 4246, 346, 952, 13, 785, 14, 198, 1212, 2792, 318, 262, 4308, 329, 262, 2420, 19925, 11, 787, 1654, 284, 1051, 510, 0, 198, 198, 3260, 28336, 11, 1803, 262, 1363, 475, 261, 290, 3904, 366, 43041, ...
3.511538
260
import time import inspect import numpy as np if __name__ == '__main__': test_timer()
[ 11748, 640, 198, 11748, 10104, 198, 11748, 299, 32152, 355, 45941, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1332, 62, 45016, 3419 ]
2.935484
31
# pylint: skip-file import os import importlib.util got_cpu_lgb = False got_gpu_lgb = False from h2o4gpu.util.gpu import device_count _, ngpus_vis_global = device_count() enable_lightgbm_import = True if enable_lightgbm_import: lgb_loader = importlib.util.find_spec('lightgbm') lgb_found = lgb_loader is not...
[ 2, 279, 2645, 600, 25, 14267, 12, 7753, 198, 198, 11748, 28686, 198, 11748, 1330, 8019, 13, 22602, 198, 198, 23442, 62, 36166, 62, 75, 22296, 796, 10352, 198, 23442, 62, 46999, 62, 75, 22296, 796, 10352, 198, 198, 6738, 289, 17, 78,...
1.867837
2,164
# Copyright 2016 Google Inc. 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 law or ag...
[ 2, 15069, 1584, 3012, 3457, 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, 262, 13789, ...
3.385744
477
#!/usr/bin/python3 import pytest from utils import ZERO_ADDRESS from brownie import accounts def test_ownership(Ebb): """Get Owner""" assert Ebb.getOwner() == accounts[0] with pytest.reverts(): # transferOwnership should revert Ebb.transferOwnership(ZERO_ADDRESS, {"from": accounts[0]}) Eb...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 12972, 9288, 198, 6738, 3384, 4487, 1330, 1168, 34812, 62, 2885, 7707, 7597, 198, 198, 6738, 7586, 494, 1330, 5504, 628, 198, 4299, 1332, 62, 15605, 1056, 7, 36, 11848, 2599, ...
2.690323
155
"""Automatic object property code generator.""" from gd.typing import Enum, Union from gd.api.enums import ( ColorChannelProperties, LevelDataEnum, LevelHeaderEnum, ObjectDataEnum, PlayerColor, ) from gd.api.parser import ( # type: ignore _INT, _BOOL, _FLOAT, _HSV, _ENUMS, ...
[ 37811, 16541, 13730, 2134, 3119, 2438, 17301, 526, 15931, 198, 198, 6738, 308, 67, 13, 774, 13886, 1330, 2039, 388, 11, 4479, 198, 198, 6738, 308, 67, 13, 15042, 13, 268, 5700, 1330, 357, 198, 220, 220, 220, 5315, 29239, 2964, 18200, ...
2.22482
556
from picturate.config import CAttnGANConfig from picturate.nets import CAttnGAN config = CAttnGANConfig('bird') gan = CAttnGAN(config, pretrained=True) caption = "This little bird is blue with short beak and white underbelly" filename = 'bird' gan.generate_image(caption, filename)
[ 6738, 2862, 15537, 13, 11250, 1330, 7257, 926, 77, 45028, 16934, 198, 6738, 2862, 15537, 13, 45938, 1330, 7257, 926, 77, 45028, 198, 198, 11250, 796, 7257, 926, 77, 45028, 16934, 10786, 16944, 11537, 198, 198, 1030, 796, 7257, 926, 77, ...
3.142857
91
import pytest import numpy as np from syndata.core import ClusterData from syndata.maxmin import MaxMinClusters, MaxMinCov, MaxMinBal, maxmin_sampler # Test Cases for maxmin_sampler def test_maxmin_sampler(): """ Make sure the sampling mechanism doesn't break when wrong inputs are supplied. """ # Test cases th...
[ 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 11150, 1045, 13, 7295, 1330, 38279, 6601, 198, 6738, 11150, 1045, 13, 9806, 1084, 1330, 5436, 9452, 2601, 13654, 11, 5436, 9452, 34, 709, 11, 5436, 9452, 24597, 11,...
2.298895
6,427
scheduler_type = 'MultiStepLR' scheduler_cfg = dict( gamma=0.5, milestones=(50, 100, 150, 200) ) end_epoch = 250
[ 1416, 704, 18173, 62, 4906, 796, 705, 29800, 8600, 35972, 6, 198, 1416, 704, 18173, 62, 37581, 796, 8633, 7, 198, 220, 220, 220, 34236, 28, 15, 13, 20, 11, 198, 220, 220, 220, 41926, 16193, 1120, 11, 1802, 11, 6640, 11, 939, 8, ...
2.218182
55
from time import strftime from rest_framework.permissions import AllowAny from rest_framework.views import APIView from rest_framework.response import Response
[ 6738, 640, 1330, 965, 31387, 198, 198, 6738, 1334, 62, 30604, 13, 525, 8481, 1330, 22507, 7149, 198, 6738, 1334, 62, 30604, 13, 33571, 1330, 3486, 3824, 769, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 628 ]
4.263158
38
# -*- coding: utf-8 -*- """ Created on Tue Sep 1 14:54:14 2020 @author: Mei """ @memoize
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 8621, 220, 352, 1478, 25, 4051, 25, 1415, 12131, 198, 198, 31, 9800, 25, 42244, 198, 37811, 628, 198, 198, 31, 11883, 78, 1096, 198 ]
2.136364
44
from .modeling_repconc import RepCONC
[ 6738, 764, 4666, 10809, 62, 7856, 1102, 66, 1330, 1432, 10943, 34 ]
3.083333
12
import KratosMultiphysics import KratosMultiphysics.FluidDynamicsApplication as KratosFluid import KratosMultiphysics.kratos_utilities as KratosUtilities have_external_solvers = KratosUtilities.IsApplicationAvailable("ExternalSolversApplication") import KratosMultiphysics.KratosUnittest as UnitTest @UnitTest.skipUnle...
[ 11748, 509, 10366, 418, 15205, 13323, 23154, 198, 11748, 509, 10366, 418, 15205, 13323, 23154, 13, 37, 2290, 312, 35, 4989, 873, 23416, 355, 509, 10366, 418, 37, 2290, 312, 198, 11748, 509, 10366, 418, 15205, 13323, 23154, 13, 74, 10366...
2.834921
315
import pytest def pytest_collection_modifyitems(config, items): """If async dependencies is not available skip async tests.""" try: import treq # noqa skip_async = False except ImportError: skip_async = True skip_slow = pytest.mark.skip(reason="need --runslow option to run"...
[ 11748, 12972, 9288, 628, 198, 4299, 12972, 9288, 62, 43681, 62, 4666, 1958, 23814, 7, 11250, 11, 3709, 2599, 198, 220, 220, 220, 37227, 1532, 30351, 20086, 318, 407, 1695, 14267, 30351, 5254, 526, 15931, 628, 220, 220, 220, 1949, 25, ...
2.550562
178
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import argparse import random import numpy as np import deepmind_lab import tensorflow as tf import sys print('PYTHON VERSION - ', sys.version) # For the DML random agent dataset impo...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 1822, 29572, 198, 11748, 4738, 198, ...
3.00995
201
GET = 100 POST = 200 PUT = 300 DELETE = 400 METHOD_TYPES = ( (GET, 'GET'), (POST, 'POST'), (PUT, 'PUT'), (DELETE, 'DELETE'), ) METHOD_TYPES_DICT = { 'GET': GET, 'POST': POST, 'PUT': PUT, 'DELETE': DELETE, } JSON = 500 HTML = 600 TEXT = 700 RESP_TYPES = ( (JSON, 'JSON'), (HTML...
[ 18851, 796, 1802, 198, 32782, 796, 939, 198, 30076, 796, 5867, 198, 7206, 2538, 9328, 796, 7337, 198, 198, 49273, 62, 9936, 47, 1546, 796, 357, 198, 220, 220, 220, 357, 18851, 11, 705, 18851, 33809, 198, 220, 220, 220, 357, 32782, 1...
1.980315
254
from pydantic import BaseModel
[ 6738, 279, 5173, 5109, 1330, 7308, 17633, 628 ]
4
8
"""Alignment pipeline integration tests. """ import os import time from django.conf import settings from djcelery_testworker.testcase import CeleryWorkerTestCase from main.models import AlignmentGroup from main.models import Dataset from main.models import ExperimentSample from main.testing_util import create_common...
[ 37811, 2348, 16747, 11523, 11812, 5254, 13, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 640, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 7015, 88, 62, 9288, 28816, 13, 9288, 7442, 1330, 15248, 1924, 12468, ...
2.736111
360
# https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ # --------------------------------------------------- from typing import List # Runtime Complexity: O(N) # Space Complexity: O(1) # --------------------------------------------------- # Test Cases # ----------------------------------...
[ 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 13466, 12, 2435, 12, 1462, 12, 17846, 12, 392, 12, 7255, 12, 13578, 14, 198, 2, 20368, 1783, 6329, 198, 6738, 19720, 1330, 7343, 198, 198, 2, 43160, 19157, 414, 25, 440,...
3.087838
148
""" GUI Application to control the PiWall from """ #!/usr/bin/python3 # Author: Gunnar Holwerda # GUI to control a PiWall from tkinter import Frame, StringVar, OptionMenu, Listbox, Button, Label, Tk, END from piwallcontroller.piwallcontroller import PiWallController from piwallcontroller.playlist import Playlist f...
[ 37811, 198, 220, 220, 220, 25757, 15678, 284, 1630, 262, 13993, 22401, 422, 198, 37811, 198, 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 6434, 25, 6748, 23955, 6479, 15448, 6814, 198, 2, 25757, 284, 1630, 257, 13993, 22401, 198,...
2.258017
2,713
# 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. # ---------------------------------------------------------------------...
[ 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...
6.140351
57
from datetime import datetime # def days (d): # now = datetime.now if __name__ == "__main__": # u = int(input("What is your age?")) # d = int(input("What month were you born in?"") print (datetime.now)
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 2, 825, 1528, 357, 67, 2599, 198, 2, 220, 220, 220, 220, 783, 796, 4818, 8079, 13, 2197, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1303, 334, 79...
2.588235
85
import os, mock from pyfakefs import fake_filesystem_unittest from observer import FakeObserver from qtcwatchdog.qtcwatchdog import QtcWatchdog from qtcwatchdog.watcher import ProjectWatcher
[ 11748, 28686, 11, 15290, 198, 6738, 12972, 30706, 9501, 1330, 8390, 62, 16624, 6781, 62, 403, 715, 395, 198, 6738, 22890, 1330, 33482, 31310, 18497, 198, 198, 6738, 10662, 23047, 8340, 9703, 13, 80, 23047, 8340, 9703, 1330, 1195, 23047, ...
3.403509
57
# Copyright 2020 Jamie Thompson. # # 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, 12131, 17826, 11654, 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, 921, 743...
3.682051
195
import pybedtools import sys import argparse # Function which takes in a sites file and produces a query file. # Sites file looks like (these are 1-based coords): # 22:50988105:G:A # # Query file looks like: # #Index Reference Alternate Chrom Pos Ref Alt Identifier DataType #0 TTTCTCCAAATACAGATCCAATGTCTTCACTTGTCTA...
[ 11748, 12972, 3077, 31391, 198, 11748, 25064, 198, 11748, 1822, 29572, 628, 628, 198, 2, 15553, 543, 2753, 287, 257, 5043, 2393, 290, 11073, 257, 12405, 2393, 13, 198, 2, 37034, 2393, 3073, 588, 357, 27218, 389, 352, 12, 3106, 763, 36...
2.262357
526
from .node import KpiNode __all__ = ["KpiNode"]
[ 6738, 764, 17440, 1330, 509, 14415, 19667, 198, 198, 834, 439, 834, 796, 14631, 42, 14415, 19667, 8973, 198 ]
2.578947
19
import unittest import numpy as np from Solvers.Frank_Wolfe_Solver_Static import Frank_Wolfe_Solver from Solvers.Path_Based_Frank_Wolfe_Solver import Path_Based_Frank_Wolfe_Solver #from Solvers.Decomposition_Solver import Decomposition_Solver from Model_Manager.Link_Model_Manager import Link_Model_Manager_class from ...
[ 198, 11748, 555, 715, 395, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 4294, 690, 13, 17439, 62, 32069, 68, 62, 50, 14375, 62, 45442, 1330, 5278, 62, 32069, 68, 62, 50, 14375, 198, 6738, 4294, 690, 13, 15235, 62, 15001, 62, ...
2.882175
331
from unittest import TestCase from network_filters import LatencyFilter, HostLatencyService
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 3127, 62, 10379, 1010, 1330, 5476, 1387, 22417, 11, 14504, 24220, 1387, 16177, 628, 628, 198 ]
3.730769
26
#!/usr/bin/env python import os import platform from setuptools import setup from pip.req import parse_requirements req_file = 'requirements.txt' install_reqs = parse_requirements(req_file, session=False) reqs = [str(ir.req) for ir in install_reqs] del os.link setup( author='Jim Kennedy', author_email='jim@k...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 11748, 3859, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 6738, 7347, 13, 42180, 1330, 21136, 62, 8897, 18883, 198, 198, 42180, 62, 7753, 796, 705, 8897, 18883,...
2.588235
187
from api.filters import IngredientFilter, TagOrAuthorFilter from api.pagination import CustomPagination from api.serializers import (CustomRecipeSerializer, IngredientSerializer, RecipeSerializer, TagSerializer) from django.db.models import Sum from django.http import HttpResponse from djan...
[ 6738, 40391, 13, 10379, 1010, 1330, 17589, 445, 1153, 22417, 11, 17467, 5574, 13838, 22417, 198, 6738, 40391, 13, 79, 363, 1883, 1330, 8562, 47, 363, 1883, 198, 6738, 40391, 13, 46911, 11341, 1330, 357, 15022, 37523, 32634, 7509, 11, 17...
3.269625
293
"""fix affaire abandon default value Revision ID: 5a8069c68433 Revises: ee79f1259c77 Create Date: 2021-09-06 16:28:58.437853 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '5a8069c68433' down_revision = 'ee79f1259c77' branch_labels = None depends_on = None
[ 37811, 13049, 1527, 7626, 6871, 4277, 1988, 198, 198, 18009, 1166, 4522, 25, 642, 64, 1795, 3388, 66, 41580, 2091, 198, 18009, 2696, 25, 304, 68, 3720, 69, 1065, 3270, 66, 3324, 198, 16447, 7536, 25, 33448, 12, 2931, 12, 3312, 1467, ...
2.577236
123
from config import db from models.Pilot import Pilot from models.HelicopteroDeCombate import HelicopteroDeCombate
[ 6738, 4566, 1330, 20613, 198, 6738, 4981, 13, 47, 23439, 1330, 21697, 198, 6738, 4981, 13, 12621, 291, 32563, 78, 5005, 20575, 378, 1330, 48574, 32563, 78, 5005, 20575, 378, 198 ]
3.677419
31
#questão 4 num1 = float(input("Digite o primeiro valor: \n")) num2 = float(input("Digite o segundo valor: \n")) num3 = float(input("Digite o terceiro valor: \n")) if(num1 > num2 > num3 or num1 == num2 > num3 or num1 > num2 == num3): maior = num1 segundo = num2 menor = num3 elif num1 > num2 < num3 or num1 =...
[ 2, 6138, 28749, 604, 198, 198, 22510, 16, 796, 12178, 7, 15414, 7203, 19511, 578, 267, 6994, 7058, 1188, 273, 25, 3467, 77, 48774, 198, 22510, 17, 796, 12178, 7, 15414, 7203, 19511, 578, 267, 384, 70, 41204, 1188, 273, 25, 3467, 77,...
2.092764
539
# -*- coding: utf-8 -*- """ Created on Wed Apr 10 15:53:54 2019 @author: Asun """ import matplotlib.pyplot as plt import numpy as np
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 2758, 838, 1315, 25, 4310, 25, 4051, 13130, 198, 198, 31, 9800, 25, 1081, 403, 198, 37811, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, ...
2.481481
54
import time import requests from utils import save_results if __name__ == '__main__': main()
[ 11748, 640, 198, 198, 11748, 7007, 198, 198, 6738, 3384, 4487, 1330, 3613, 62, 43420, 628, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.891892
37
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division, print_function # Python 3 behaviour in Py2 import numpy as np from finitediff import derivatives_at_point_by_finite_diff, interpolate_by_finite_diff def demo_usage(n_data=50, n_fit=537, nhead=5, ntail=5, plot=False, alt=0): """ ...
[ 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, 11593, 37443, 834, 1330, 7297, 11, 3601, 62, 8818, 220, 1303, 11361, 513, 9172, 287, 9485, 17, 198, 198, 1...
2.02149
1,396
# Copyright (C) 2020 Commissariat a l'energie atomique et aux energies alternatives (CEA) # and others. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Mdspan(CMakePackage): """Reference implementation of mdspan targeting C++23.""" hom...
[ 2, 15069, 357, 34, 8, 12131, 1520, 747, 21621, 257, 300, 6, 877, 22699, 22037, 2350, 2123, 27506, 27598, 14693, 357, 5222, 32, 8, 198, 2, 290, 1854, 13, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 1...
2.492683
410
# pylint: disable=unused-argument # start_marker from dagster import pipeline, solid @solid @solid @pipeline # end_marker
[ 2, 279, 2645, 600, 25, 15560, 28, 403, 1484, 12, 49140, 198, 198, 2, 923, 62, 4102, 263, 198, 6738, 48924, 1706, 1330, 11523, 11, 4735, 628, 198, 31, 39390, 628, 198, 31, 39390, 628, 198, 31, 79, 541, 4470, 628, 198, 2, 886, 62,...
2.729167
48
import ephem as eph import numpy as np from snakeskin.constants import SEC_TO_SIDRAD
[ 11748, 2462, 4411, 355, 304, 746, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 26042, 5116, 13, 9979, 1187, 1330, 10729, 62, 10468, 62, 50, 2389, 49, 2885, 198 ]
2.931034
29
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ astropy.cosmology contains classes and functions for cosmological distance measures and other cosmology-related calculations. See the `Astropy documentation <http://docs.astropy.org/en/latest/cosmology/index.html>`_ for more detailed usage examples an...
[ 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 38559, 24290, 13, 81, 301, 198, 37811, 6468, 28338, 13, 6966, 29126, 4909, 6097, 290, 5499, 329, 8615, 76, 2770, 198, 30246, 5260, 290, 584, 8615, 29126, 12, 5...
3.246575
146
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-10-22 13:01 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, 319, 2864, 12, 940, 12, 1828, 1511, 25, 486, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, ...
2.8
55
# test module default_engine.py import pytest import logging import os import inspect import sys current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parent_dir = os.path.dirname(current_dir) sys.path.insert(0, parent_dir) from laylib import default_engine logging.basicConfig(level...
[ 2, 1332, 8265, 4277, 62, 18392, 13, 9078, 198, 11748, 12972, 9288, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 10104, 198, 11748, 25064, 198, 198, 14421, 62, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 39...
2.705202
346
# Copyright 2018 The TensorFlow 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 applica...
[ 2, 15069, 2864, 383, 309, 22854, 37535, 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, ...
3.309774
665
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
3.550725
345
import requests BASE_URL = 'http://localhost:8000/api/v2/' # GET Avaliacoes """ response = requests.get(f'{BASE_URL}avaliacoes') print(response) print(response.status_code) avaliacoes = response.json() print(avaliacoes) print(avaliacoes.get('count')) print(avaliacoes.get('results')) """ # GET Cursos headers = { ...
[ 11748, 7007, 198, 198, 33, 11159, 62, 21886, 796, 705, 4023, 1378, 36750, 25, 33942, 14, 15042, 14, 85, 17, 14, 6, 198, 198, 2, 17151, 23587, 9607, 3028, 198, 37811, 198, 26209, 796, 7007, 13, 1136, 7, 69, 6, 90, 33, 11159, 62, ...
2.467337
199
from sklearn.cluster import KMeans import traceback from submissions.aartiste import election from submissions.aartiste import county_demographics trumpECHP = DataFrame() ''' Extract data from the CORGIS elections, and merge it with the CORGIS demographics. Both data sets are organized by county and state. ''' joint...
[ 6738, 1341, 35720, 13, 565, 5819, 1330, 509, 5308, 504, 198, 11748, 12854, 1891, 198, 6738, 22129, 13, 64, 433, 40833, 1330, 3071, 198, 6738, 22129, 13, 64, 433, 40833, 1330, 7968, 62, 9536, 24188, 198, 198, 40954, 2943, 14082, 796, 6...
2.562581
1,534
from shapely import geometry # import random # import numpy as np # numParticles = 120 # point_list = [[0,0],[0,1],[1,1],[1,0]] # poly = geometry.Polygon(point_list) # print generate_random_points(numParticles, poly)
[ 6738, 5485, 306, 1330, 22939, 198, 2, 1330, 4738, 198, 2, 1330, 299, 32152, 355, 45941, 198, 198, 2, 997, 7841, 2983, 796, 7982, 198, 198, 2, 966, 62, 4868, 796, 16410, 15, 11, 15, 38430, 15, 11, 16, 38430, 16, 11, 16, 38430, 16...
2.820513
78
# this file is needed for python2, delete for python3
[ 2, 428, 2393, 318, 2622, 329, 21015, 17, 11, 12233, 329, 21015, 18 ]
4.076923
13
# Copyright 2017-2019 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" fi...
[ 2, 15069, 2177, 12, 23344, 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, 743, 198, 2, 407, 779, ...
3.261364
352
""" This package contains the modules related to simulation topologies """
[ 37811, 198, 1212, 5301, 4909, 262, 13103, 3519, 284, 18640, 1353, 5823, 198, 37811, 198 ]
5
15
# Copyright (c) 2017 SK Telecom Ltd # 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 requir...
[ 2, 15069, 357, 66, 8, 2177, 14277, 44021, 12052, 198, 2, 1439, 6923, 33876, 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, ...
2.873333
450
import game.main as game import time import sys if __name__ == "__main__": try: main() except (KeyboardInterrupt, SystemExit): print "\n Recieved Interrupt Signal. Bye...." import sys sys.exit()
[ 11748, 983, 13, 12417, 355, 983, 198, 11748, 640, 198, 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1388, 3419, 198, 220, 220,...
2.43299
97
from django.db import models from django.contrib.auth.models import User from django.contrib.auth.models import AbstractUser from django.http import HttpResponse import uuid from django import forms from django.forms.widgets import Textarea import datetime from posts.models import Post, Like, CommentLike#, In...
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 201, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 201, 198, 201, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 27741, 12982, 201, 198, 6738, ...
2.776119
201
import requests from collections import defaultdict import datetime
[ 11748, 7007, 198, 6738, 17268, 1330, 4277, 11600, 198, 11748, 4818, 8079, 628 ]
5.307692
13
# -*- coding: utf-8 -*- from skimage.viewer import utils from skimage.viewer.utils import dialogs from skimage.viewer.qt import QtCore, QtWidgets, has_qt from skimage._shared import testing @testing.skipif(not has_qt, reason="Qt not installed") @testing.skipif(not has_qt, reason="Qt not installed") @testing.skipi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 1341, 9060, 13, 1177, 263, 1330, 3384, 4487, 198, 6738, 1341, 9060, 13, 1177, 263, 13, 26791, 1330, 17310, 82, 198, 6738, 1341, 9060, 13, 1177, 263, 13, 39568, 1...
3.026455
189
# Pending actions # we can improve user experience of our bot by asking the user simple yes or no followup questions # one easy way to handle these followup is to define pending actions which gets executed as soon as user says "yes" # and wiped if the user says "no"
[ 2, 350, 1571, 4028, 220, 198, 2, 356, 460, 2987, 2836, 1998, 286, 674, 10214, 416, 4737, 262, 2836, 2829, 3763, 393, 645, 1061, 929, 2683, 198, 2, 530, 2562, 835, 284, 5412, 777, 1061, 929, 318, 284, 8160, 13310, 4028, 543, 3011, ...
4.203125
64
# coding=utf-8 import sys import pymysql import requests import datetime from lxml import etree reload(sys) sys.setdefaultencoding('utf8') now_str = datetime.datetime.now().strftime('%Y-%m-%d') headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0....
[ 2, 19617, 28, 40477, 12, 23, 198, 11748, 25064, 198, 198, 11748, 279, 4948, 893, 13976, 198, 11748, 7007, 198, 11748, 4818, 8079, 198, 6738, 300, 19875, 1330, 2123, 631, 198, 198, 260, 2220, 7, 17597, 8, 198, 17597, 13, 2617, 12286, ...
2.385057
174
from java.lang import System as javasystem javasystem.out.println("Hello") from java.util import Random r = rand(100, 23) for i in range(10): print r.nextDouble()
[ 6738, 20129, 13, 17204, 1330, 4482, 355, 474, 615, 4107, 927, 198, 73, 615, 4107, 927, 13, 448, 13, 35235, 7203, 15496, 4943, 198, 198, 6738, 20129, 13, 22602, 1330, 14534, 198, 198, 81, 796, 43720, 7, 3064, 11, 2242, 8, 198, 198, ...
2.816667
60
""" File: exercise_3.1.py Author: William Gatharia This code demonstrates using a for loop. """ #loop and print numbers from 1 to 10 using a for loop and range # range creates a list of numbers # starting from 1 to 10. # Note the 11 = 10 + 1 is the upper limit form range for i in range(1, 11): print(i) ...
[ 37811, 198, 220, 220, 220, 9220, 25, 5517, 62, 18, 13, 16, 13, 9078, 198, 220, 220, 220, 6434, 25, 3977, 402, 776, 10312, 198, 220, 220, 220, 770, 2438, 15687, 1262, 257, 329, 9052, 13, 198, 37811, 198, 2, 26268, 290, 3601, 3146, ...
3.086538
104
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Aug 27 21:19:37 2020 @author: miyazakishinichi """ import pandas as pd from tkinter import messagebox from tkinter import filedialog import tkinter import numpy as np from scipy import stats import matplotlib.pyplot as plt import os, sys, cv2 from tq...
[ 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, 26223, 2447, 2681, 2310, 25, 1129, 25, 2718, 12131, 198, 198, 31, 9800, 25, 285, 7745, 10...
2.455108
646
import cv2 INPUT_FILE='input_encode.avi' FRAME_NUMBER=70 cap=cv2.VideoCapture(INPUT_FILE) cap.set(cv2.CAP_PROP_POS_FRAMES, FRAME_NUMBER) ret,frame=cap.read() cv2.imwrite("frame_"+INPUT_FILE+".png",frame)
[ 198, 11748, 269, 85, 17, 198, 198, 1268, 30076, 62, 25664, 11639, 15414, 62, 268, 8189, 13, 15820, 6, 198, 10913, 10067, 62, 41359, 13246, 28, 2154, 198, 198, 11128, 28, 33967, 17, 13, 10798, 49630, 7, 1268, 30076, 62, 25664, 8, 198...
2.134021
97
# -*- coding: utf-8 -*- # # Authors: Swolf <swolfforever@gmail.com> # Date: 2021/1/07 # License: MIT License """ Common Spatial Patterns and his happy little buddies! """ from copy import deepcopy from typing import Union, Optional, List, Dict, Tuple from functools import partial import numpy as np from numpy import ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 46665, 25, 2451, 4024, 1279, 2032, 349, 487, 382, 332, 31, 14816, 13, 785, 29, 198, 2, 7536, 25, 33448, 14, 16, 14, 2998, 198, 2, 13789, 25, 17168, 1378...
2.142556
8,551
import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import matplotlib.style as style from sklearn.base import BaseEstimator from ..utils import ( is_factor, numerical_gradient, numerical_gradient_jackknife, numerical_gradient_gaussian, numerical_interactions,...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 7635, 355, 3918, 198, 673...
1.632081
9,850
import numpy as np import sys import wavedata import random import os if __name__=="__main__": if len(sys.argv) < 7: print("USAGE: python %s result_dir keywordlist testlist testscp textfile ourdir"%sys.argv[0]) exit(1) result_dir = sys.argv[1] keywordlist = open(sys.argv[2]).readline...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 25064, 198, 11748, 26834, 1045, 198, 11748, 4738, 198, 11748, 28686, 628, 198, 361, 11593, 3672, 834, 855, 1, 834, 12417, 834, 1298, 198, 220, 220, 220, 611, 18896, 7, 17597, 13, 853, 85, 8, ...
2.217993
578
"""Find the smallest integer in the array, Kata in Codewars.""" def smallest(alist): """Return the smallest integer in the list. input: a list of integers output: a single integer ex: [34, 15, 88, 2] should return 34 ex: [34, -345, -1, 100] should return -345 """ res = [alist[0]] for ...
[ 37811, 16742, 262, 18197, 18253, 287, 262, 7177, 11, 509, 1045, 287, 18720, 413, 945, 526, 15931, 628, 198, 4299, 18197, 7, 49845, 2599, 198, 220, 220, 220, 37227, 13615, 262, 18197, 18253, 287, 262, 1351, 13, 628, 220, 220, 220, 5128...
2.359116
181
#!/usr/bin/python3 # Extracts a commafree code from a CNF file created by commafree.py and # the output of a SAT solver on that CNF file. Only works on satisfiable # instances. # # Usage: extract-code.py <cnf-file> <sat-solver-output-file> import re import sys if __name__ == '__main__': if len(sys.argv) < 3: ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 2, 29677, 82, 257, 725, 1878, 631, 2438, 422, 257, 327, 21870, 2393, 2727, 416, 725, 1878, 631, 13, 9078, 290, 198, 2, 262, 5072, 286, 257, 29020, 1540, 332, 319, 326, 327, 21870...
2.339683
315
import iota_wallet as iw
[ 11748, 1312, 4265, 62, 44623, 355, 1312, 86, 628, 628, 628, 628, 628 ]
2.615385
13
#!/usr/bin/python # Copyright (c) 2011 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. import logging import os import pickle import re import autofill_dataset_converter import autofill_dataset_generator import pyauto_fun...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 15069, 357, 66, 8, 2813, 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...
2.407256
9,289
import pytest from test.utils.helpers import get_header_value, get_json_from_response
[ 11748, 12972, 9288, 198, 198, 6738, 1332, 13, 26791, 13, 16794, 364, 1330, 651, 62, 25677, 62, 8367, 11, 651, 62, 17752, 62, 6738, 62, 26209, 628, 198 ]
3.178571
28
from .__init__ import * from .color import ERR
[ 6738, 764, 834, 15003, 834, 1330, 1635, 198, 6738, 764, 8043, 1330, 13793, 49 ]
3.285714
14
from fred.utils import NamespacedClient, query_params from fred.helpers import _get_request class ESeriesClient(NamespacedClient): """ Class for working with FRED series """ @query_params('realtime_start','realtime_end') def details(self,series_id=None,response_type=None,params=None): """...
[ 198, 6738, 277, 445, 13, 26791, 1330, 28531, 32416, 11792, 11, 12405, 62, 37266, 198, 6738, 277, 445, 13, 16794, 364, 1330, 4808, 1136, 62, 25927, 198, 198, 4871, 412, 27996, 11792, 7, 36690, 32416, 11792, 2599, 198, 220, 220, 220, 37...
2.529865
6,747
""" Class Hierarchy G{classtree: BaseTool} Package tree G{packagetree: cluster_tool} Import Graph G{importgraph: cluster_tool} """ #/usr/bin/python # -*- coding:utf-8 -*- import subprocess from json_generator import JsonGenerator from container_client import ContainerClient DOCKER_SERVER_URL = 'tcp://master:23...
[ 37811, 198, 9487, 36496, 9282, 198, 198, 38, 90, 565, 292, 301, 631, 25, 7308, 25391, 92, 220, 198, 198, 27813, 5509, 198, 38, 90, 8002, 363, 316, 631, 25, 13946, 62, 25981, 92, 220, 198, 198, 20939, 29681, 198, 38, 90, 11748, 349...
4.661734
473
import matplotlib.pyplot as plt
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 628 ]
3
11
from .recount import recount from .admin import admin from .default import default from .migration import migration from .translations import translations commands = [ migration, recount, admin, default, translations ]
[ 6738, 764, 8344, 608, 1330, 16369, 198, 6738, 764, 28482, 1330, 13169, 198, 6738, 764, 12286, 1330, 4277, 198, 6738, 764, 76, 4254, 1330, 13472, 198, 6738, 764, 7645, 49905, 1330, 25231, 198, 9503, 1746, 796, 685, 198, 220, 220, 220, ...
3.463768
69
from elementtree import ElementTree as et import os ROOT_PATH = '' def get_js_files(): """Returns a list of all the javascript files listed in media/js_includes.xml""" files = [] path = os.path.dirname(os.path.abspath(__file__)) tree = et.parse(path + '/../media/js_includes.xml') for f in tre...
[ 6738, 5002, 21048, 1330, 11703, 27660, 355, 2123, 198, 11748, 28686, 198, 198, 13252, 2394, 62, 34219, 796, 10148, 198, 198, 4299, 651, 62, 8457, 62, 16624, 33529, 198, 220, 220, 220, 37227, 35561, 257, 1351, 286, 477, 262, 44575, 3696,...
2.50116
431
import os import pathlib ENV_FILE_PATH = pathlib.Path(__file__).parent / "dev.env" assert ENV_FILE_PATH.exists()
[ 11748, 28686, 198, 11748, 3108, 8019, 628, 198, 1677, 53, 62, 25664, 62, 34219, 796, 3108, 8019, 13, 15235, 7, 834, 7753, 834, 737, 8000, 1220, 366, 7959, 13, 24330, 1, 198, 30493, 12964, 53, 62, 25664, 62, 34219, 13, 1069, 1023, 34...
2.636364
44
#!/usr/bin/python import re import os import sys import json import subprocess DEF_FILE = '.2lane.info' DIRECTIVE_TEMPLATE = '<!-- 2L {body} -->' TYPO_WARNING_FINDER = re.compile('\W2L\W', re.IGNORECASE) MESSAGE_TEMPLATE = '** 2lanemdr {kind} on {filename}:{linenumber} "{message}"' def parseDirective(line, wrcs): ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 302, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 33918, 198, 11748, 850, 14681, 628, 198, 32988, 62, 25664, 796, 45302, 17, 33533, 13, 10951, 6, 198, 17931, 23988, 9306, 62, ...
1.964369
1,712
import os import subprocess from subprocess import CalledProcessError from functools import partial from collections import namedtuple Project = namedtuple('Project', ['name', 'versions']) # all projects using condaci along with the Python version they # need. Note that for non-python projects we can choose any singl...
[ 11748, 28686, 198, 11748, 850, 14681, 198, 6738, 850, 14681, 1330, 34099, 18709, 12331, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 16775, 796, 3706, 83, 29291, 10786, 16775, 3256, 37250, 3...
1.773944
1,681
#!/usr/bin/python # flow_fairness.py # # Runs a simulation with objects continually messaging each other. # The analysis then generates statistics about the actual rates # achieved and the weights. The output can be used to generate # fairness graphs. import sys import subprocess import os.path # FIXME It would be ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 5202, 62, 22043, 1108, 13, 9078, 198, 2, 198, 2, 44743, 257, 18640, 351, 5563, 17451, 19925, 1123, 584, 13, 198, 2, 383, 3781, 788, 18616, 7869, 546, 262, 4036, 3965, 198, 2, 8793...
2.159826
1,608
# Copyright 2017 Databricks, 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 writin...
[ 2, 15069, 2177, 16092, 397, 23706, 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, 19...
3.564014
289
from elixir import setup_all, create_all import os, sys # Initialize these before loading plugins import xsbs.db import xsbs.events import xsbs.log import xsbs.ban import xsbs.users import xsbs.server import xsbs.game import xsbs.teamcontrol import xsbs.persistteam import xsbs.demo import xsbs.http import xsbs.http.js...
[ 6738, 1288, 32345, 1330, 9058, 62, 439, 11, 2251, 62, 439, 198, 11748, 28686, 11, 25064, 198, 198, 2, 20768, 1096, 777, 878, 11046, 20652, 198, 11748, 2124, 82, 1443, 13, 9945, 198, 11748, 2124, 82, 1443, 13, 31534, 198, 11748, 2124, ...
2.768595
121
from __future__ import print_function from __future__ import division from . import _C import os import torch.nn as nn import numpy as np from . import losses as ft_losses from . import metrics as ft_metrics from . import optimizers as ft_optimizers from . import exceptions as ex import fuzzytools.files as files from ...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 764, 1330, 4808, 34, 198, 198, 11748, 28686, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 299, 32152, 355, 45941, 198, 6738, ...
4.411765
170
from _ast import AST, Return, Expr, Str, Call, Attribute, Name, Yield, Raise from abc import ABC from ast import parse, iter_child_nodes from functools import reduce import inspect from textwrap import dedent from typing import Type, List, Tuple, Collection, Optional import re from leyline import Node from leyline.gvi...
[ 6738, 4808, 459, 1330, 29273, 11, 8229, 11, 1475, 1050, 11, 4285, 11, 4889, 11, 3460, 4163, 11, 6530, 11, 575, 1164, 11, 35123, 198, 6738, 450, 66, 1330, 9738, 198, 6738, 6468, 1330, 21136, 11, 11629, 62, 9410, 62, 77, 4147, 198, ...
3.418033
122
list1 =[1,2,3] list2 =["one","two","three"] zipped = list(zip(list1,list2)) print(zipped) print("####################") unzipped =list(zip(*zipped)) print(unzipped) print("####################") for (l1, l2) in zip(list1,list2): print(l1) print(l2) print("####################") items = [...
[ 4868, 16, 796, 58, 16, 11, 17, 11, 18, 60, 201, 198, 4868, 17, 796, 14692, 505, 2430, 11545, 2430, 15542, 8973, 201, 198, 201, 198, 89, 3949, 796, 1351, 7, 13344, 7, 4868, 16, 11, 4868, 17, 4008, 201, 198, 201, 198, 4798, 7, 8...
2.280405
296
""" Interactive kinetics app with sliders (with units). Start by runing: $ bokeh serve interactive.py Add --show argument or navigate to: http://localhost:5006/interactive """ from collections import defaultdict import sys from chempy.util.bkh import integration_with_sliders from chempy.units import SI_base_re...
[ 37811, 198, 9492, 5275, 18967, 14596, 598, 351, 1017, 4157, 357, 4480, 4991, 737, 198, 10434, 416, 1057, 278, 25, 198, 220, 220, 220, 720, 1489, 365, 71, 4691, 14333, 13, 9078, 198, 4550, 1377, 12860, 4578, 393, 16500, 284, 25, 198, ...
2.235294
442
# -*- coding: utf-8 -*- # # Copyright 2017 - Swiss Data Science Center (SDSC) # A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and # Eidgenössische Technische Hochschule Zürich (ETHZ). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compli...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 2177, 532, 14780, 6060, 5800, 3337, 357, 50, 5258, 34, 8, 198, 2, 317, 10413, 1022, 43052, 1073, 293, 12280, 23873, 2350, 376, 2634, 67, 42445, 1000,...
2.772523
1,332
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed May 30 18:49:11 2018 @author: afar """ import os import sys import hashlib from PyQt5.QtWidgets import QDialog from PyQt5.QtWidgets import QStatusBar # importing data accc lib_path = os.path.abspath(os.path.join(__file__, '..', '..', '..')) sys.path....
[ 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, 3300, 1737, 1542, 1248, 25, 2920, 25, 1157, 2864, 198, 198, 31, 9800, 25, 44246, 198, 378...
2.321267
221