content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
from django.core import serializers as django_serializers
from rest_framework import serializers
from ..contracts.models import (
CollectionArtifact,
CollectionJob,
Contract,
Contractor,
Document,
Entity,
Service,
ServiceGroup,
)
from ..contracts.utils import get_current_fiscal_year
IN... | [
6738,
42625,
14208,
13,
7295,
1330,
11389,
11341,
355,
42625,
14208,
62,
46911,
11341,
198,
6738,
1334,
62,
30604,
1330,
11389,
11341,
198,
198,
6738,
11485,
28484,
82,
13,
27530,
1330,
357,
198,
220,
220,
220,
12251,
8001,
29660,
11,
1... | 2.626263 | 198 |
# The purpose of this notebook is to train a **Logistic Regression** model using Keras to classify the tweets' sentiment as positive or negative.
import numpy as np
import pandas as pd
import os
import io
random_seed=1
np.random.seed(random_seed)
import tensorflow as tf
import keras
from keras import backend as K
fr... | [
2,
383,
4007,
286,
428,
20922,
318,
284,
4512,
257,
12429,
11187,
2569,
3310,
2234,
1174,
2746,
1262,
17337,
292,
284,
36509,
262,
12665,
6,
15598,
355,
3967,
393,
4633,
13,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
... | 2.324554 | 3,417 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import sys
import os
import timeit
import re
from pprint import pprint
import copy
# argparse for information
parser = argparse.ArgumentParser()
# parser.add_argument("-d", "--directory", help="input directory of the Pfam family files")
parser.add_argument... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
1822,
29572,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
640,
270,
198,
11748,
302,
198,
6738,
279,
4... | 2.111888 | 2,002 |
#!/usr/bin/env python3
# -*- coding: utf-8; -*-
#
# Copyright (c) 2019 รlan Crรญstoffer
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
26,
532,
9,
12,
198,
2,
198,
2,
15069,
357,
66,
8,
13130,
6184,
223,
9620,
3864,
8836,
301,
47895,
198,
2,
198,
2,
2448,
3411,
... | 2.68107 | 1,458 |
# coding: utf-8
#
# Copyright (c) 2018, Dylan Perry <dylan.perry@gmail.com>. All rights reserved.
# Licensed under BSD 2-Clause License. See LICENSE file for full license.
from pytest import mark
from advent.input import text
from advent.inventory_management_system import is_letter_repeated_2_3_times, part1, part2, c... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
2,
198,
2,
15069,
357,
66,
8,
2864,
11,
21371,
14105,
1279,
67,
18554,
13,
525,
563,
31,
14816,
13,
785,
28401,
1439,
2489,
10395,
13,
198,
2,
49962,
739,
347,
10305,
362,
12,
2601,
682,
1378... | 2.253456 | 434 |
from codecs import open
import re
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
exec(open('what3words/version.py').read())
with open('requirements.txt') as f:
requires = f.read().splitlines()
setup(
name='what3words',
version=__version__,
author='What... | [
6738,
40481,
82,
1330,
1280,
198,
11748,
302,
198,
198,
28311,
25,
198,
220,
220,
220,
422,
900,
37623,
10141,
1330,
9058,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
422,
1233,
26791,
13,
7295,
1330,
9058,
198,
198,
18558,
7,
... | 2.77551 | 441 |
"""
CEASIOMpy: Conceptual Aircraft Design Software
Developed for CFS ENGINEERING, 1015 Lausanne, Switzerland
Balance main module for preliminary design on conventional
aircraft, it evaluates:
* the centre of gravity;
* the Ixx, Iyy, Izz moments of inertia.
WARNING: The code deletes the ToolOutput folder and recre... | [
37811,
198,
5222,
1921,
40,
2662,
9078,
25,
26097,
723,
30767,
8495,
10442,
198,
198,
19246,
276,
329,
327,
10652,
36924,
8881,
1137,
2751,
11,
8949,
20,
4689,
385,
21952,
11,
14679,
198,
198,
45866,
1388,
8265,
329,
15223,
1486,
319,
... | 2.450044 | 4,544 |
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | [
2,
15069,
13130,
3012,
11419,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
733... | 2.978038 | 683 |
# Copyright 2014 PerfKitBenchmarker 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 appli... | [
2,
15069,
1946,
2448,
69,
20827,
44199,
4102,
263,
46665,
13,
1439,
2489,
10395,
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,
... | 2.588974 | 2,866 |
"""
from:
https://simpleisbetterthancomplex.com/tutorial/2017/02/18/how-to-create-user-sign-up-view.html
dependent on Profile model
"""
from django.contrib.auth.tokens import PasswordResetTokenGenerator
from django.utils import six
account_activation_token = AccountActivationTokenGenerator()
| [
37811,
198,
6738,
25,
198,
5450,
1378,
36439,
271,
27903,
14813,
41887,
13,
785,
14,
83,
44917,
14,
5539,
14,
2999,
14,
1507,
14,
4919,
12,
1462,
12,
17953,
12,
7220,
12,
12683,
12,
929,
12,
1177,
13,
6494,
198,
198,
21186,
319,
1... | 3.215054 | 93 |
#!/usr/bin/env python3
"""
Created on 30 Jan 2018
@author: Bruno Beloff (bruno.beloff@southcoastscience.com)
"""
from scs_host.bus.i2c import I2C
from scs_host.sys.host import Host
from scs_ndir.gas.ndir.spi_ndir_x1.spi_ndir_x1 import SPINDIRx1
# -------------------------------------------------------------------... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
37811,
198,
41972,
319,
1542,
2365,
2864,
198,
198,
31,
9800,
25,
31045,
3944,
2364,
357,
1671,
36909,
13,
6667,
2364,
31,
35782,
1073,
5773,
4234,
13,
785,
8,
198,
37811,
1... | 2.454039 | 359 |
from django.db import models
from django.contrib.auth.models import User | [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787
] | 3.6 | 20 |
import sys
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5 import QtCore, QtWidgets
import pyqtgraph as pg
import numpy as np
from pyqtgraph.Qt import QtGui, QtCore
import pyqtgraph as pg
import collections
import random
import time
import math
import numpy as np
from ma... | [
11748,
25064,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
14055,
1330,
1635,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
54,
312,
11407,
1330,
1635,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
8205,
72,
1330,
1635,
198,
6738,
9485,
48,
... | 2.904255 | 282 |
"""Custom routing classes."""
import warnings
from typing import Callable, Dict, Optional, Type
import rasterio
from fastapi.routing import APIRoute
from starlette.requests import Request
from starlette.responses import Response
def apiroute_factory(env: Optional[Dict] = None) -> Type[APIRoute]:
"""
Creat... | [
37811,
15022,
28166,
6097,
526,
15931,
198,
198,
11748,
14601,
198,
6738,
19720,
1330,
4889,
540,
11,
360,
713,
11,
32233,
11,
5994,
198,
198,
11748,
374,
1603,
952,
198,
198,
6738,
3049,
15042,
13,
81,
13660,
1330,
3486,
4663,
13192,
... | 3.08046 | 348 |
from PIL import Image
import numpy as np
from chexnet import ChexNet
import os
from flask import Flask, render_template, request
from werkzeug import secure_filename
import csv
DISEASES = np.array(['Atelectasis', 'Cardiomegaly', 'Effusion', 'Infiltration', 'Mass', 'Nodule', 'Pneumonia',
'Pneumothorax', ... | [
6738,
350,
4146,
1330,
7412,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
6738,
1125,
87,
3262,
1330,
2580,
87,
7934,
201,
198,
11748,
28686,
201,
198,
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
11,
2581,
201,
198,
6738,
266... | 2.400685 | 292 |
# Your MinStack object will be instantiated and called as such:
# obj = MinStack()
# obj.push(x)
# obj.pop()
# param_3 = obj.top()
# param_4 = obj.getMin()
| [
198,
198,
2,
3406,
1855,
25896,
2134,
481,
307,
9113,
12931,
290,
1444,
355,
884,
25,
198,
2,
26181,
796,
1855,
25896,
3419,
198,
2,
26181,
13,
14689,
7,
87,
8,
198,
2,
26181,
13,
12924,
3419,
198,
2,
5772,
62,
18,
796,
26181,
1... | 2.677966 | 59 |
from sre_parse import fix_flags
from cv2 import FileStorage_UNDEFINED
import numpy as np
import pandas as pd
from pandas.io import sql
import matplotlib.pyplot as plt
plt.style.use('fivethirtyeight')
df= pd.read_csv('HINDALCO.csv', index_col=False, delimiter = ',')
df = df.set_index(pd.DatetimeIndex(df[... | [
6738,
264,
260,
62,
29572,
1330,
4259,
62,
33152,
201,
198,
6738,
269,
85,
17,
1330,
9220,
31425,
62,
4944,
7206,
20032,
1961,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
11748,
19798,
292,
355,
279,
67,
201,
198,
6738,
19798,
... | 2.276316 | 1,216 |
import dadi
import pickle
import pytest
import subprocess
import glob
import os
import signal
import time
from src.InferDFE import infer_dfe
try:
if not os.path.exists("./tests/test_results"):
os.makedirs("./tests/test_results")
except:
pass
| [
11748,
288,
9189,
198,
11748,
2298,
293,
198,
11748,
12972,
9288,
198,
11748,
850,
14681,
198,
11748,
15095,
198,
11748,
28686,
198,
11748,
6737,
198,
11748,
640,
198,
6738,
12351,
13,
818,
2232,
8068,
36,
1330,
13249,
62,
67,
5036,
198... | 2.656566 | 99 |
#!/usr/bin/env python3
"""
Written by Elena, rewritten by Dylan. This script gets the dust counts in a
night and prints it
Changelog:
2020-06-20 DG Moving main contents into a function for import functionality
"""
import argparse
import datetime
from astropy.time import Time
import numpy as np
from bin import sjd,... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
198,
25354,
416,
37254,
11,
30101,
416,
21371,
13,
770,
4226,
3011,
262,
8977,
9853,
287,
257,
198,
1755,
290,
20842,
340,
198,
198,
1925,
8368,
519,
25,
198,
42334,
12,
3... | 2.75419 | 179 |
print """
CALCULO DE KM/H
***************
Selecciona la marca
*******************
1)Audi
2)Bugatti
3)Chevy
4)Toyota
*******************
"""
mi_auto = Auto(50)
mi_auto.opcion()
| [
4798,
37227,
198,
33290,
34,
6239,
46,
5550,
46646,
14,
39,
198,
220,
46068,
8162,
198,
198,
4653,
293,
535,
32792,
8591,
1667,
6888,
198,
8412,
8162,
198,
198,
16,
8,
16353,
72,
198,
17,
8,
25624,
34891,
198,
18,
8,
7376,
7670,
1... | 2.447368 | 76 |
# builtins stub with non-generic primitive types
| [
2,
3170,
1040,
17071,
351,
1729,
12,
41357,
20049,
3858,
198
] | 4.454545 | 11 |
"""Top-level package for PyJazzCash."""
__author__ = """Rana Shahraiz Ali"""
__email__ = 'shahraizali10@yahoo.com'
__version__ = '0.1.0'
integrity_salt = None
merchant_id = None
merchant_password = None
from pyjazzcash import *
from pyjazzcash.card import *
| [
37811,
9126,
12,
5715,
5301,
329,
9485,
41,
8101,
35361,
526,
15931,
628,
198,
834,
9800,
834,
796,
37227,
49,
2271,
18381,
430,
528,
12104,
37811,
198,
834,
12888,
834,
796,
705,
1477,
993,
430,
528,
7344,
940,
31,
40774,
13,
785,
... | 2.708333 | 96 |
import tarfile
import zipfile
from os.path import abspath, dirname
from os.path import join as pjoin
from unittest.mock import call, patch
from testpath import assert_isfile, modified_env
from testpath.tempdir import TemporaryDirectory
from pep517.envbuild import BuildEnvironment, build_sdist, build_wheel
SAMPLES_DI... | [
11748,
13422,
7753,
198,
11748,
19974,
7753,
198,
6738,
28686,
13,
6978,
1330,
2352,
6978,
11,
26672,
3672,
198,
6738,
28686,
13,
6978,
1330,
4654,
355,
279,
22179,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
869,
11,
8529,
198,
198,... | 3.071006 | 169 |
#!/usr/bin/env python3
import os
from datetime import datetime
from argparse import ArgumentParser
if __name__ == "__main__":
parser = ArgumentParser()
parser.add_argument("builddir")
args = parser.parse_args()
td = TestDirectory(args.builddir)
td.create_new_test_dir()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
28686,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
1822,
29572,
1330,
45751,
46677,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
... | 2.872549 | 102 |
from collections import deque
from aocd import models
from src.utils import parse_data
# create puzzle
puzzle = models.Puzzle(year=2021, day=6)
# regex pattern
line_pattern = r'(?P<numbers>.*)'
# format data
input_data = parse_data(puzzle.input_data, is_lines=True, is_numbers=True, regex=line_pattern)
fishes = dequ... | [
6738,
17268,
1330,
390,
4188,
198,
198,
6738,
257,
420,
67,
1330,
4981,
198,
6738,
12351,
13,
26791,
1330,
21136,
62,
7890,
198,
198,
2,
2251,
15027,
198,
79,
9625,
796,
4981,
13,
47,
9625,
7,
1941,
28,
1238,
2481,
11,
1110,
28,
2... | 2.456522 | 460 |
import re
import os
from pathlib import Path
import sublime, sublime_plugin
| [
11748,
302,
198,
11748,
28686,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
11748,
41674,
11,
41674,
62,
33803,
198
] | 3.85 | 20 |
from .Interface import Interface
from .Enumeration import Enumeration
from .Structure import Structure
from .Agent import Agent
from .TypeInfo import TypeInfo
from .Time import Time
from .Utils import Utils
from .ValueObject import ValueObject
#
# exceptions
#
| [
6738,
764,
39317,
1330,
26491,
198,
6738,
764,
4834,
6975,
341,
1330,
2039,
6975,
341,
198,
6738,
764,
1273,
5620,
1330,
32522,
198,
6738,
764,
36772,
1330,
15906,
198,
6738,
764,
6030,
12360,
1330,
5994,
12360,
198,
6738,
764,
7575,
13... | 3.855072 | 69 |
"""
test_deckmanager_normal.py:
tests a default DeckManager()
"""
from cardgame.classes.card import Card
from cardgame.classes.deckmanager import DeckManager, EmptyDeckError
from tests.test_card import TestCard
from .helper import Helper
class TestDeckManager(TestCard):
"""
TestDeckManager():
tes... | [
37811,
198,
9288,
62,
35875,
37153,
62,
11265,
13,
9078,
25,
198,
220,
220,
220,
5254,
257,
4277,
20961,
13511,
3419,
198,
37811,
198,
6738,
2657,
6057,
13,
37724,
13,
9517,
1330,
5172,
198,
6738,
2657,
6057,
13,
37724,
13,
35875,
371... | 2.329849 | 1,722 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import json
import math
import os
import shutil
import sys
import time
from os.path import exists, join, split
import numpy as np
import torch
import torch.backends.cudnn as cudnn
import torch.nn as nn
import torch.nn.functional as F
from PIL import Image
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
1822,
29572,
198,
11748,
33918,
198,
11748,
10688,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
2506... | 2.403561 | 1,011 |
import numpy as np
import sklearn.metrics as metrics
| [
11748,
299,
32152,
355,
45941,
198,
11748,
1341,
35720,
13,
4164,
10466,
355,
20731,
198
] | 3.533333 | 15 |
@w1 # f1 = w1(f1)
# innerFunc = w1(f1)
# innerFunc()
# f1 = w1(f1)
# f1()
f1() | [
198,
31,
86,
16,
1303,
277,
16,
796,
266,
16,
7,
69,
16,
8,
198,
198,
2,
8434,
37,
19524,
796,
266,
16,
7,
69,
16,
8,
198,
2,
8434,
37,
19524,
3419,
198,
198,
2,
277,
16,
796,
266,
16,
7,
69,
16,
8,
198,
2,
277,
16,
34... | 1.482143 | 56 |
from django.contrib import admin
from .models import Orchestrator, OrchestratorAuth
# Register your models here.
admin.site.register(Orchestrator, OrchestratorAdmin)
admin.site.register(OrchestratorAuth, OrchestratorAuthAdmin)
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
764,
27530,
1330,
30369,
2536,
1352,
11,
30369,
2536,
1352,
30515,
198,
198,
2,
17296,
534,
4981,
994,
13,
628,
628,
198,
28482,
13,
15654,
13,
30238,
7,
5574,
2395,
2536,
135... | 3.411765 | 68 |
# -*- encoding: utf8 -*-
from itertools import (combinations, groupby)
from linguistica.util import NULL
# noinspection PyPep8
def make_bisignatures(wordlist, min_stem_length, max_affix_length, suffixing):
"""
This function finds pairs of words which make a valid signature,
and makes Dictionary... | [
2,
532,
9,
12,
21004,
25,
3384,
69,
23,
532,
9,
12,
198,
198,
6738,
340,
861,
10141,
1330,
357,
24011,
7352,
11,
1448,
1525,
8,
198,
198,
6738,
29929,
64,
13,
22602,
1330,
15697,
628,
628,
628,
628,
628,
198,
198,
2,
645,
1040,
... | 2.130009 | 1,123 |
""" Cisco_IOS_XR_segment_routing_ms_oper
This module contains a collection of YANG definitions
for Cisco IOS\-XR segment\-routing\-ms package operational data.
This module contains definitions
for the following management objects\:
srms\: Segment Routing Mapping Server operational data
srlb\: srlb
Copyright (c)... | [
37811,
28289,
62,
40,
2640,
62,
55,
49,
62,
325,
5154,
62,
81,
13660,
62,
907,
62,
3575,
220,
198,
198,
1212,
8265,
4909,
257,
4947,
286,
575,
15567,
17336,
198,
1640,
28289,
314,
2640,
41441,
55,
49,
10618,
41441,
81,
13660,
41441,... | 1.403835 | 36,037 |
from peewee import *
database = MySQLDatabase('debatovani', **{'passwd': '12345', 'host': '10.0.0.100', 'port': 3306, 'user': 'debatovani'})
| [
6738,
613,
413,
1453,
1330,
1635,
198,
198,
48806,
796,
33476,
38105,
10786,
11275,
265,
709,
3216,
3256,
12429,
90,
6,
6603,
16993,
10354,
705,
10163,
2231,
3256,
705,
4774,
10354,
705,
940,
13,
15,
13,
15,
13,
3064,
3256,
705,
634,
... | 2.459016 | 61 |
# -*- coding: UTF-8 -*-
__copyright__ = """\
Copyright (c) 2012-2013 Rumma & Ko Ltd.
This software comes with ABSOLUTELY NO WARRANTY and is
distributed under the terms of the GNU Lesser General Public License.
See file COPYING.txt for more information."""
| [
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
628,
198,
834,
22163,
4766,
834,
796,
37227,
59,
198,
15269,
357,
66,
8,
2321,
12,
6390,
25463,
2611,
1222,
17634,
12052,
13,
198,
1212,
3788,
2058,
351,
29950,
3535,
3843,
3094... | 3.350649 | 77 |
"""
Revision ID: 0335_broadcast_msg_content
Revises: 0334_broadcast_message_number
Create Date: 2020-12-04 15:06:22.544803
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
revision = '0335_broadcast_msg_content'
down_revision = '0334_broadcast_message_number'
| [
37811,
198,
198,
18009,
1166,
4522,
25,
657,
27326,
62,
36654,
2701,
62,
19662,
62,
11299,
198,
18009,
2696,
25,
657,
31380,
62,
36654,
2701,
62,
20500,
62,
17618,
198,
16447,
7536,
25,
12131,
12,
1065,
12,
3023,
1315,
25,
3312,
25,
... | 2.792793 | 111 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.4'
# jupytext_version: 1.1.4
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# # s_vi... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
11420,
198,
2,
474,
929,
88,
353,
25,
198,
2,
220,
220,
474,
929,
88,
5239,
25,
198,
2,
220,
220,
220,
2... | 2.174693 | 1,059 |
from ScienceDynamics.config.configs import SFRAMES_BASE_DIR
MAG_URL_DICT = {"Affiliations":"https://zenodo.org/record/2628216/files/Affiliations.txt.gz?download=1",
"Authors":"https://zenodo.org/record/2628216/files/Authors.txt.gz?download=1",
"ConferenceInstances":"https://zenodo.org/re... | [
6738,
5800,
35,
4989,
873,
13,
11250,
13,
11250,
82,
1330,
311,
10913,
29559,
62,
33,
11159,
62,
34720,
628,
198,
45820,
62,
21886,
62,
35,
18379,
796,
19779,
35191,
2403,
602,
2404,
5450,
1378,
4801,
24313,
13,
2398,
14,
22105,
14,
... | 2.293617 | 940 |
#!/usr/bin/env python3
from __future__ import print_function
import future
import builtins
import past
import six
from builtins import input
from colorama import Fore
from colorama import Style
from threading import RLock
from threading import Thread
import argcomplete
import argparse
import os
import readline
import... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
11748,
2003,
198,
11748,
3170,
1040,
198,
11748,
1613,
198,
11748,
2237,
198,
6738,
3170,
1040,
1330,
5128,
198,
198,
6738,
... | 2.493204 | 515 |
""" let's make an iterator """
class Reverse:
"Iterator class for looping over a sequence backwards" | [
198,
37811,
1309,
338,
787,
281,
41313,
37227,
198,
4871,
31849,
25,
198,
220,
220,
220,
220,
198,
220,
220,
220,
220,
366,
37787,
1398,
329,
9052,
278,
625,
257,
8379,
16196,
1
] | 3.363636 | 33 |
import pyb
import math
print("Test Timers")
t2 = pyb.Timer(2)
print(t2)
t2.init(freq=1)
t2.callback(callb)
while True:
pyb.delay(1000)
| [
11748,
12972,
65,
198,
11748,
10688,
628,
198,
4798,
7203,
14402,
5045,
364,
4943,
628,
198,
83,
17,
796,
12972,
65,
13,
48801,
7,
17,
8,
198,
198,
4798,
7,
83,
17,
8,
198,
198,
83,
17,
13,
15003,
7,
19503,
80,
28,
16,
8,
198,... | 2.101449 | 69 |
import re
#search for literal strings in sentence
patterns = [ 'Tuffy', 'Pie', 'Loki' ]
text = 'Tuffy eats pie, Loki eats peas!'
for pattern in patterns:
print('"%s"์์ "%s" ๊ฒ์ ์ค ->' % (text, pattern),)
if re.search(pattern, text):
print('์ฐพ์์ต๋๋ค!')
else:
print('์ฐพ์ ์ ์์ต๋๋ค!')
#search a substr... | [
11748,
302,
198,
198,
2,
12947,
329,
18875,
13042,
287,
6827,
198,
33279,
82,
796,
685,
705,
51,
15352,
3256,
705,
48223,
3256,
705,
43,
18228,
6,
2361,
198,
5239,
796,
705,
51,
15352,
25365,
2508,
11,
31771,
25365,
22589,
13679,
198,... | 2.017301 | 289 |
#
# -*- coding: utf-8 -*-
# Copyright 2021 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
The junos ntp_global fact class
It is in this file the configuration is collected from the device
for a given resource, parsed, and the facts tree is populated
based on t... | [
2,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
33448,
2297,
10983,
198,
2,
22961,
3611,
5094,
13789,
410,
18,
13,
15,
10,
198,
2,
357,
3826,
27975,
45761,
393,
3740,
1378,
2503,
13,
41791,
13,
2... | 1.937919 | 6,266 |
import pyxel
import random
from pymunk import Space, Body, Circle, Poly, Segment, BB, Arbiter, Vec2d
FPS = 30
WIDTH, HEIGHT = SCREEN = (256, 196)
game = Game()
pyxel.init(WIDTH, HEIGHT, fps=FPS)
pyxel.mouse(True)
pyxel.run(game.update, game.draw)
| [
11748,
12972,
87,
417,
198,
11748,
4738,
198,
6738,
279,
4948,
2954,
1330,
4687,
11,
12290,
11,
16291,
11,
12280,
11,
1001,
5154,
11,
12597,
11,
33619,
263,
11,
38692,
17,
67,
198,
198,
37,
3705,
796,
1542,
198,
54,
2389,
4221,
11,
... | 2.367925 | 106 |
import trw
import torch.nn as nn
import torch.nn.functional as F
import os
if __name__ == '__main__':
# configure and run the training/evaluation
options = trw.train.Options(num_epochs=600)
trainer = trw.train.TrainerV2(callbacks_post_training=None)
transforms = [
trw.transforms.TransformRa... | [
11748,
491,
86,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
11748,
28686,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1303,
17425... | 2.423341 | 437 |
from PIL import Image
import os, time, discord
| [
6738,
350,
4146,
1330,
7412,
198,
11748,
28686,
11,
640,
11,
36446,
198
] | 3.615385 | 13 |
from django.contrib import admin
from admin_honeypot.admin import LoginAttemptAdmin
from admin_honeypot.models import LoginAttempt
from django.utils.safestring import mark_safe
from django.utils.translation import gettext_lazy as _
admin.site.unregister(LoginAttempt)
@admin.register(LoginAttempt)
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
198,
6738,
13169,
62,
71,
1419,
13059,
13,
28482,
1330,
23093,
37177,
46787,
198,
6738,
13169,
62,
71,
1419,
13059,
13,
27530,
1330,
23093,
37177,
198,
6738,
42625,
14208,
13,
26791,
... | 3.471264 | 87 |
from django.shortcuts import render
from django.http import HttpResponse
from datetime import datetime
from rezepte.models import Rezept
# Create your views here.
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
220,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
302,
2736,
457,
68,
13,
27530,
1330,
797,
2736,
457,
198,
198,
2,
1... | 3.510638 | 47 |
from setuptools import find_packages, Extension, Command
from distutils.core import setup
from Cython.Build import cythonize
from clustertree import __version__
extensions = []
extensions.append( Extension( "clustertree.src.clustertree",
[ "clustertree/src/clustertree.pyx",
... | [
198,
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
11,
27995,
11,
9455,
198,
6738,
1233,
26791,
13,
7295,
1330,
9058,
628,
198,
6738,
327,
7535,
13,
15580,
1330,
3075,
400,
261,
1096,
198,
198,
6738,
32966,
861,
631,
1330,
11593,
96... | 2.306667 | 375 |
from PIL import Image
import numpy as np
from torchvision.transforms import functional as F
import torchvision.transforms as transforms
import torch
from torch.autograd import Variable
import torch.backends.cudnn as cudnn
from tqdm import tqdm
from evaluation.recall import recall_at_ks
import time
cudnn.ben... | [
6738,
350,
4146,
1330,
7412,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
201,
198,
6738,
28034,
10178,
13,
7645,
23914,
1330,
10345,
355,
376,
201,
198,
11748,
28034,
10178,
13,
7645,
23914,
355,
31408,
201,
198,
11748,
28034,
20... | 2.184859 | 1,136 |
import numpy as np
| [
11748,
299,
32152,
355,
45941,
628,
628
] | 3.142857 | 7 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
@author: bo
@file: manage.py
@version:
@time: 2019/11/06
@function๏ผ ่ฟ่กflask
"""
from cookiespool.api import app
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8888)
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
220,
198,
31,
9800,
25,
1489,
198,
31,
7753,
25,
6687,
13,
9078,
220,
198,
31,
9641,
25,
198,
31,
2435,
25,
13130,
... | 2.082569 | 109 |
# Note: you need to add Chromedriver to your env var path:
# In fish that means running:
# set PATH $HOME/bin $PATH
import time
import datetime
from splinter import Browser
browser = Browser('chrome', headless=False)
url = 'https://library.st-andrews.ac.uk/patroninfo~S5/'
browser.visit(url)
login()
due_status = g... | [
2,
5740,
25,
345,
761,
284,
751,
18255,
276,
38291,
284,
534,
17365,
1401,
3108,
25,
198,
2,
554,
5916,
326,
1724,
2491,
25,
198,
2,
900,
46490,
720,
39069,
14,
8800,
720,
34219,
198,
198,
11748,
640,
198,
11748,
4818,
8079,
198,
... | 2.895954 | 173 |
#! /usr/bin/env python3
"""
Convert MIT Press XML files for CL and TACL to Anthology XML.
version 0.5 - reads from new MIT Press format.
version 0.4 - now updates XML directly, skips existing papers, sorts by page number
version 0.3 - produces anthology ID in new format 2020.cl-1.1
Example usage: unpack the ZIP file ... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
198,
3103,
1851,
17168,
4332,
23735,
3696,
329,
7852,
290,
309,
2246,
43,
284,
8451,
1435,
23735,
13,
198,
198,
9641,
657,
13,
20,
532,
9743,
422,
649,
17168,
4332,
5794... | 2.456746 | 2,809 |
from tkinter import *
import tkinter as tk
import sqlite3
from tkinter import messagebox as MessageBox
raiz = Tk()
myframe = Frame(raiz, width = 800, height = 300)
raiz.geometry("280x160")
raiz.resizable(0,0)
myframe['bg'] = '#49A'
raiz['bg'] = '#49A'
myframe.pack()
raiz.title("CRUD PERSONAS")
c11 = StringVar()
c22 = ... | [
6738,
256,
74,
3849,
1330,
1635,
198,
11748,
256,
74,
3849,
355,
256,
74,
198,
11748,
44161,
578,
18,
220,
198,
6738,
256,
74,
3849,
1330,
3275,
3524,
355,
16000,
14253,
198,
430,
528,
796,
309,
74,
3419,
198,
1820,
14535,
796,
2518... | 2.330969 | 846 |
from qface.generator import FileSystem, Generator
import logging.config
import argparse
from path import Path
import qface
import subprocess
import sys
import os
parser = argparse.ArgumentParser(description='Generates bindings for Tmds based on the qface IDL.')
parser.add_argument('--input', dest='input', type=str, re... | [
6738,
10662,
2550,
13,
8612,
1352,
1330,
9220,
11964,
11,
35986,
198,
11748,
18931,
13,
11250,
198,
11748,
1822,
29572,
198,
6738,
3108,
1330,
10644,
198,
11748,
10662,
2550,
198,
11748,
850,
14681,
198,
11748,
25064,
198,
11748,
28686,
1... | 2.613238 | 1,254 |
from flask_login import UserMixin
from woeclipse.website import db, login_manager
# Tables
# Link Table USER EVENT
user_event = db.Table(
'user_event', db.Column('user_id', db.Integer, db.ForeignKey('user.id')),
db.Column('event_id', db.Integer, db.ForeignKey('event.id')))
# Models
# TODO: delete user +... | [
6738,
42903,
62,
38235,
1330,
11787,
35608,
259,
198,
198,
6738,
266,
2577,
17043,
13,
732,
12485,
1330,
20613,
11,
17594,
62,
37153,
628,
198,
2,
33220,
198,
198,
2,
7502,
8655,
1294,
1137,
49261,
198,
7220,
62,
15596,
796,
20613,
13... | 3.021127 | 142 |
from typing import List
import scrapy
| [
6738,
19720,
1330,
7343,
198,
198,
11748,
15881,
88,
628
] | 4 | 10 |
from pdb import DefaultConfig
| [
6738,
279,
9945,
1330,
15161,
16934,
628
] | 4.428571 | 7 |
#
# PySNMP MIB module HUAWEI-GTSM-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HUAWEI-GTSM-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:44:51 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27... | [
2,
198,
2,
9485,
15571,
7378,
337,
9865,
8265,
367,
34970,
8845,
40,
12,
38,
4694,
44,
12,
8895,
33,
357,
4023,
1378,
16184,
76,
489,
8937,
13,
785,
14,
79,
893,
11632,
8,
198,
2,
7054,
45,
13,
16,
2723,
2393,
1378,
14,
14490,
... | 2.802748 | 9,242 |
from django.contrib import admin
from . models import project,skill,Contact
admin.site.register(project)
admin.site.register(skill)
admin.site.register(Contact) | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
198,
6738,
764,
4981,
1330,
1628,
11,
42401,
11,
17829,
198,
198,
28482,
13,
15654,
13,
30238,
7,
16302,
8,
198,
28482,
13,
15654,
13,
30238,
7,
42401,
8,
198,
28482,
13,
15654,
1... | 3.446809 | 47 |
import math
user_num = int(input())
sumfind = int(0)
a = []
b = []
if(user_num != 0):
size = int(math.log10(user_num)+1)
splitter(size, user_num)
das_finder()
else:
print(1)
| [
11748,
10688,
198,
198,
7220,
62,
22510,
796,
493,
7,
15414,
28955,
628,
198,
16345,
19796,
796,
493,
7,
15,
8,
628,
198,
64,
796,
17635,
198,
65,
796,
17635,
628,
628,
198,
361,
7,
7220,
62,
22510,
14512,
657,
2599,
198,
220,
220... | 2.105263 | 95 |
import os
import geopandas as gpd
import io
import requests
import zipfile
from zipfile import BadZipfile
def open_zips(url, shapefile):
"""opens zipped shapefiles from a url and clips data according to a
region of interest defined by a shapefile before saving as a geopandas dataframe
Parameters
-----... | [
11748,
28686,
198,
11748,
30324,
392,
292,
355,
27809,
67,
198,
11748,
33245,
198,
11748,
7007,
198,
11748,
19974,
7753,
198,
6738,
19974,
7753,
1330,
7772,
41729,
7753,
198,
198,
4299,
1280,
62,
89,
2419,
7,
6371,
11,
5485,
7753,
2599,... | 2.352047 | 855 |
"""
## ะะฟะธัะฐะฝะธะต ะทะฐะดะฐัะธ
ะะฐะฟะธัะฐัั ััะฝะบัะธั `squareSequenceDigit()`, ะณะดะต ัะตัะฐะปะฐัั ะฑั
ัะปะตะดัััะฐั ะทะฐะดะฐัะฐ. ะะฐะนัะธ n-ั ัะธััั ะฟะพัะปะตะดะพะฒะฐัะตะปัะฝะพััะธ ะธะท ะบะฒะฐะดัะฐัะพะฒ
ัะตะปัั
ัะธัะตะป: `149162536496481100121144...`
ะะฐะฟัะธะผะตั, 2-ั ัะธััะฐ ัะฐะฒะฝะฐ 4, 7-ั 5, 12-ั 6. ะัะฟะพะปัะทะพะฒะฐัั ะพะฟะตัะฐัะธะธ
ัะพ ัััะพะบะฐะผะธ ะฒ ััะพะน ะทะฐะดะฐัะต ะทะฐะฟัะตัะฐะตััั.
... | [
37811,
198,
220,
220,
220,
22492,
12466,
252,
140,
123,
18849,
21727,
16142,
22177,
18849,
16843,
12466,
115,
16142,
43666,
16142,
141,
229,
18849,
198,
220,
220,
220,
12466,
251,
16142,
140,
123,
18849,
21727,
16142,
20375,
45367,
220,
1... | 1.396774 | 620 |
'''
Created on May 31, 2016
@author: yglazner
'''
import unittest
import threading
from cheesyweb import *
import logging
import time
import requests
_app = None
log = logging.getLogger("Logger")
if __name__ == "__main__":
#import sys;sys.argv = ['', 'Test.testName']
logging.basicConfig(level=logging.DEBU... | [
7061,
6,
198,
41972,
319,
1737,
3261,
11,
1584,
198,
198,
31,
9800,
25,
331,
4743,
1031,
1008,
198,
7061,
6,
198,
11748,
555,
715,
395,
198,
11748,
4704,
278,
198,
6738,
45002,
12384,
1330,
1635,
198,
11748,
18931,
198,
11748,
640,
... | 2.684211 | 133 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Tests for the file filters.
"""
from grepfunc import grep, grep_iter
import unittest
# test file path
test_file_path = "test.txt"
class TestGrep(unittest.TestCase):
"""
Unittests to test grep.
"""
# test words (read from file)
with open(test_file... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
51,
3558,
329,
262,
2393,
16628,
13,
198,
37811,
198,
6738,
42717,
20786,
1330,
42717,
11,
42717,
62,
2676,... | 2.158444 | 3,547 |
""" -----------------------------------------------------
# TECHNOGIX
# -------------------------------------------------------
# Copyright (c) [2022] Technogix SARL
# All rights reserved
# -------------------------------------------------------
# Keywords to manage cloudtrail tasks
# ---------------------------... | [
37811,
20368,
19351,
12,
201,
198,
2,
44999,
45,
7730,
10426,
201,
198,
2,
20368,
19351,
6329,
201,
198,
2,
15069,
357,
66,
8,
685,
1238,
1828,
60,
5429,
519,
844,
47341,
43,
201,
198,
2,
1439,
2489,
10395,
201,
198,
2,
20368,
193... | 2.318455 | 1,165 |
# -*- coding: utf-8 -*-
from valverest.database import db4 as db
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
22580,
2118,
13,
48806,
1330,
20613,
19,
355,
20613,
628,
628
] | 2.615385 | 26 |
def maxEvents(self, events: List[List[int]]) -> int:
"""
>>> Greedy
Add the events to the min heap and always attend the event that ends
earliest if possible.
"""
events.sort(reverse=True)
heap = []
ans, curDay = 0, 0
while events or heap... | [
4299,
3509,
37103,
7,
944,
11,
2995,
25,
7343,
58,
8053,
58,
600,
11907,
8,
4613,
493,
25,
198,
220,
220,
220,
220,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
13163,
11955,
4716,
198,
220,
220,
220,
220,
220,
... | 1.944664 | 506 |
#!/usr/bin/env python
"""
Program to re-assign already annotated items to a new set of annotators.
This reads in the retrieved annotations from several annotators, combines them and assigns to
a list of annotators, trying to allocate the same number of items to each randomly, without
assigning an item to the same annot... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
15167,
284,
302,
12,
562,
570,
1541,
24708,
515,
3709,
284,
257,
649,
900,
286,
24708,
2024,
13,
198,
1212,
9743,
287,
262,
29517,
37647,
422,
1811,
24708,
2024,
11,
21001,... | 2.388839 | 2,240 |
#coding:utf8
import sys
import xlrd
cur_dir = "";
# @param {string} fileName xlsxfilename
# @param {string} sheetName sheet name
# @returns data
# @returns {map}
#
# @param {string} excelfilename
# @param {string} sheet_name
# @param {string} js_name
# @returns {string} js content
# @param {excel_table} exce... | [
2,
66,
7656,
25,
40477,
23,
198,
198,
11748,
25064,
198,
11748,
2124,
75,
4372,
198,
198,
22019,
62,
15908,
796,
366,
8172,
628,
198,
2,
2488,
17143,
1391,
8841,
92,
2393,
5376,
2124,
7278,
87,
34345,
198,
2,
2488,
17143,
1391,
8841... | 2.47032 | 438 |
# -*- coding: utf-8 -*-
from __future__ import print_function
import sys
import os
import codecs
import numpy as np
import hashlib
import random
import preprocess
class Preparation(object):
'''Convert dataset of different text matching tasks into a unified format as the input of deep matching modules. Users pro... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
40481,
82,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
12234,
801... | 2.06798 | 2,589 |
from pcraft.PluginsContext import PluginsContext
import dns.resolver
import random
| [
6738,
279,
3323,
13,
23257,
1040,
21947,
1330,
22689,
1040,
21947,
198,
11748,
288,
5907,
13,
411,
14375,
198,
11748,
4738,
198
] | 3.772727 | 22 |
#!/usr/bin/env python3
import json
import logging
import os
import requests
import flask
from flask import Flask, redirect, url_for, session, request, send_from_directory
from flask_oauthlib.client import OAuth, OAuthRemoteApp
from urllib.parse import urlparse
logging.basicConfig(level=logging.DEBUG)
logging.getLogge... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
33918,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
7007,
198,
11748,
42903,
198,
6738,
42903,
1330,
46947,
11,
18941,
11,
19016,
62,
1640,
11,
6246,
11,
2581,
11,
... | 2.770115 | 609 |
amigos=int(input("Quantidade de pessoas: "))
acerolas=int(input("Quantidade de frutas colhidas: "))
suco(amigos,acerolas)
| [
198,
198,
321,
328,
418,
28,
600,
7,
15414,
7203,
24915,
312,
671,
390,
279,
408,
78,
292,
25,
366,
4008,
198,
11736,
12456,
28,
600,
7,
15414,
7203,
24915,
312,
671,
390,
1216,
315,
292,
951,
71,
24496,
25,
366,
4008,
198,
198,
... | 2.272727 | 55 |
import sys, os, nltk, pickle, argparse, gzip, csv, json, torch, numpy as np, torch.nn as nn
from collections import defaultdict
sys.path.append('..')
from utils import Logger, get_logfiles, tokenize, architect_prefix, builder_prefix, type2id, initialize_rngs
class Vocabulary(object):
"""Simple vocabulary wrapper."... | [
11748,
25064,
11,
28686,
11,
299,
2528,
74,
11,
2298,
293,
11,
1822,
29572,
11,
308,
13344,
11,
269,
21370,
11,
33918,
11,
28034,
11,
299,
32152,
355,
45941,
11,
28034,
13,
20471,
355,
299,
77,
198,
6738,
17268,
1330,
4277,
11600,
1... | 2.910324 | 3,022 |
from typing import Type
from klayout.db import Layout
def layout_read_cell(layout: Type[Layout], cell_name: str, filepath: str):
"""Imports a cell from a file into current layout.
layout [pya.Layout]: layout to insert cell into
cell_name [str]: cell name from the file in filepath
filepath [str]: loca... | [
6738,
19720,
1330,
5994,
198,
6738,
479,
39786,
13,
9945,
1330,
47639,
628,
198,
4299,
12461,
62,
961,
62,
3846,
7,
39786,
25,
5994,
58,
32517,
4357,
2685,
62,
3672,
25,
965,
11,
2393,
6978,
25,
965,
2599,
198,
220,
220,
220,
37227,... | 2.93007 | 286 |
import datetime
from itertools import chain
from celery.task import task
from courses.models import Course, Semester
from django.contrib.auth.models import User, Group
@task
def expire_course_visibility():
'''
Will run at the end of the semester.
Courses set to private in the current semester will have t... | [
11748,
4818,
8079,
198,
198,
6738,
340,
861,
10141,
1330,
6333,
198,
6738,
18725,
1924,
13,
35943,
1330,
4876,
198,
6738,
10902,
13,
27530,
1330,
20537,
11,
12449,
7834,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330... | 2.857671 | 541 |
# Tai Sakuma <tai.sakuma@gmail.com>
import os
import sys
import pytest
import unittest.mock as mock
has_jupyter_notebook = False
try:
import ipywidgets as widgets
from IPython.display import display
has_jupyter_notebook = True
except ImportError:
pass
from atpbar.presentation.create import create_pr... | [
2,
11144,
13231,
7487,
1279,
83,
1872,
13,
82,
461,
7487,
31,
14816,
13,
785,
29,
198,
11748,
28686,
198,
11748,
25064,
198,
198,
11748,
12972,
9288,
198,
198,
11748,
555,
715,
395,
13,
76,
735,
355,
15290,
198,
198,
10134,
62,
73,
... | 3.542751 | 269 |
from x_rebirth_station_calculator.station_data.station_base import Ware
names = {'L044': 'Novadrones',
'L049': 'Novadrohnen'}
Novadrones = Ware(names)
| [
6738,
2124,
62,
260,
24280,
62,
17529,
62,
9948,
3129,
1352,
13,
17529,
62,
7890,
13,
17529,
62,
8692,
1330,
28593,
198,
198,
14933,
796,
1391,
6,
43,
43977,
10354,
705,
20795,
324,
9821,
3256,
198,
220,
220,
220,
220,
220,
220,
220... | 2.382353 | 68 |
import sys
import pygame
if __name__ == '__main__':
main()
| [
11748,
25064,
198,
198,
11748,
12972,
6057,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419,
198
] | 2.481481 | 27 |
#!/usr/bin/env python
import unittest
import numpy as np
from arte.types.scalar_bidimensional_function import \
ScalarBidimensionalFunction
from arte.types.domainxy import DomainXY
if __name__ == "__main__":
# import sys;sys.argv = ['', 'Test.testName']
unittest.main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
555,
715,
395,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
46252,
13,
19199,
13,
1416,
282,
283,
62,
14065,
16198,
62,
8818,
1330,
3467,
198,
220,
220,
220,
34529,
283,
33,
... | 2.821782 | 101 |
# ----------------------------------------------------------------------
# |
# | DebugRelationalPlugin.py
# |
# | David Brownell <db@DavidBrownell.com>
# | 2020-02-05 15:04:00
# |
# ----------------------------------------------------------------------
# |
# | Copyright David Brownell 2020-21
# | Dis... | [
2,
16529,
23031,
201,
198,
2,
930,
201,
198,
2,
930,
220,
31687,
6892,
864,
37233,
13,
9078,
201,
198,
2,
930,
201,
198,
2,
930,
220,
3271,
4373,
695,
1279,
9945,
31,
11006,
20644,
695,
13,
785,
29,
201,
198,
2,
930,
220,
220,
... | 3.72327 | 318 |
from flutter_utils.material_icons_parser.material_icons_specs_utils import parse_as_icons_spec
# generates icon_name: IconData mapped dart code
if __name__ == "__main__":
mappings_gen() | [
6738,
781,
10381,
62,
26791,
13,
33665,
62,
34280,
62,
48610,
13,
33665,
62,
34280,
62,
4125,
6359,
62,
26791,
1330,
21136,
62,
292,
62,
34280,
62,
16684,
198,
198,
2,
18616,
7196,
62,
3672,
25,
26544,
6601,
27661,
35970,
2438,
628,
... | 3.096774 | 62 |
"""
200. Number of Islands
Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water.
Example 1:
Input:
11110
11010
1100... | [
37811,
198,
2167,
13,
7913,
286,
12010,
198,
15056,
257,
362,
67,
10706,
3975,
286,
705,
16,
338,
357,
1044,
8,
290,
705,
15,
338,
357,
7050,
828,
954,
262,
1271,
286,
14807,
13,
1052,
7022,
318,
11191,
416,
1660,
290,
318,
7042,
... | 3.344538 | 119 |
import os
import shutil
import zipfile
import argparse
import kaggle
import pandas as pd
if __name__ == '__main__':
main()
| [
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
19974,
7753,
198,
11748,
1822,
29572,
198,
11748,
479,
9460,
293,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
... | 2.844444 | 45 |
"""Base functionality for distribution configurations."""
import logging
from jade.jobs.job_configuration import JobConfiguration
from jade.jobs.job_container_by_key import JobContainerByKey
from jade.utils.utils import load_data
logger = logging.getLogger(__name__)
class DistributionConfiguration(JobConfiguratio... | [
37811,
14881,
11244,
329,
6082,
25412,
526,
15931,
198,
198,
11748,
18931,
198,
198,
6738,
474,
671,
13,
43863,
13,
21858,
62,
11250,
3924,
1330,
15768,
38149,
198,
6738,
474,
671,
13,
43863,
13,
21858,
62,
34924,
62,
1525,
62,
2539,
... | 2.155172 | 696 |
# Copyright 2021 - 2022 Universitรคt Tรผbingen, DKFZ and EMBL
# for the German Human Genome-Phenome Archive (GHGA)
#
# 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/... | [
2,
15069,
33448,
532,
33160,
26986,
270,
11033,
83,
309,
9116,
4623,
268,
11,
32975,
37,
57,
290,
17228,
9148,
198,
2,
329,
262,
2679,
5524,
5215,
462,
12,
47,
831,
462,
20816,
357,
17511,
9273,
8,
198,
2,
198,
2,
49962,
739,
262,... | 3.095602 | 523 |
import json
import asyncio
import aiohttp
BASE = "https://mee6.xyz/api/plugins/levels/leaderboard/"
GUILD_ID = "YOUR_ID"
user_list = []
LEVEL_API_URL = BASE + str(GUILD_ID) + "?page="
asyncio.run(main()) | [
11748,
33918,
198,
198,
11748,
30351,
952,
198,
11748,
257,
952,
4023,
628,
198,
33,
11159,
796,
366,
5450,
1378,
1326,
68,
21,
13,
5431,
89,
14,
15042,
14,
37390,
14,
46170,
14,
27940,
3526,
30487,
198,
38022,
26761,
62,
2389,
796,
... | 2.370787 | 89 |
import os
import re
from azure.storage.blob import BlobServiceClient, ContainerClient
from loguru import logger
from urllib.parse import urlparse
def extract_file_path(path: str) -> str:
"""Extract the file path after from a blob storage URL.
Container name (the first path segment) is excluded.
>>> path... | [
11748,
28686,
198,
11748,
302,
198,
198,
6738,
35560,
495,
13,
35350,
13,
2436,
672,
1330,
1086,
672,
16177,
11792,
11,
43101,
11792,
198,
6738,
2604,
14717,
1330,
49706,
198,
6738,
2956,
297,
571,
13,
29572,
1330,
19016,
29572,
198,
19... | 2.916201 | 179 |
#
# ใใณใใฌใผใๆงๆใฎใในใ
#
from json import JSONDecodeError
from unittest import TestCase
from src.blueprintpy.cli.config_loader import ConfigLoader
| [
2,
198,
2,
14524,
228,
6527,
30965,
24186,
12045,
230,
162,
100,
233,
22755,
238,
5641,
24336,
43302,
198,
2,
198,
198,
6738,
33918,
1330,
19449,
10707,
1098,
12331,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
198,
198,
6738,
12351,
... | 2.618182 | 55 |
import emg3d
import empymod
import numpy as np
import ipywidgets as widgets
import scipy.interpolate as si
import matplotlib.pyplot as plt
from IPython.display import display
from scipy.signal import find_peaks
# Define all errors we want to catch with the variable-checks and setting of
# default values. This is not p... | [
11748,
795,
70,
18,
67,
198,
11748,
795,
9078,
4666,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
20966,
88,
28029,
11407,
355,
40803,
198,
11748,
629,
541,
88,
13,
3849,
16104,
378,
355,
33721,
198,
11748,
2603,
29487,
8019,
13,
9... | 1.95014 | 15,002 |
import urllib
import base64
from secrets import token_hex
from mitama.app import Middleware
from mitama.app.http import Response
from mitama.models import User
class SessionMiddleware(Middleware):
"""ใญใฐใคใณๅคๅฎใใใซใฆใงใข
ใญใฐใคใณใใฆใใชใใฆใผใถใผใใขใฏใปในใใๅ ดๅใ/login?redirect_to=<URL>ใซใชใใคใฌใฏใใใพใใ
"""
class BasicMiddleware(Midd... | [
11748,
2956,
297,
571,
198,
11748,
2779,
2414,
198,
6738,
13141,
1330,
11241,
62,
33095,
198,
198,
6738,
10255,
1689,
13,
1324,
1330,
6046,
1574,
198,
6738,
10255,
1689,
13,
1324,
13,
4023,
1330,
18261,
198,
6738,
10255,
1689,
13,
27530... | 2.185185 | 162 |
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import pytest
import time
import mdg
from utils import generate_random_problem
A, G, W = generate_random_problem(10)
@pytest.mark.parametrize("solver_type", [mdg.CBC, mdg.BOP, mdg.SAT])
| [
2,
15069,
6186,
13,
785,
11,
3457,
13,
393,
663,
29116,
13,
1439,
6923,
33876,
13,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
24843,
12,
17,
13,
15,
198,
198,
11748,
12972,
9288,
198,
11748,
640,
198,
11748,
45243,
70,
198... | 2.723214 | 112 |
import pyautogui # This Python library is required in order to run this code; If you don't have this 3rd party module installed, Google it and install prior to running this code.
import time # This is a standard Python library, used in this example to delay the time between each press of the "shift" key.
pyautogu... | [
11748,
12972,
2306,
519,
9019,
1303,
770,
11361,
5888,
318,
2672,
287,
1502,
284,
1057,
428,
2438,
26,
1002,
345,
836,
470,
423,
428,
513,
4372,
2151,
8265,
6589,
11,
3012,
340,
290,
2721,
3161,
284,
2491,
428,
2438,
13,
198,
11748,
... | 3.474394 | 371 |
#!/usr/bin/python
import sys
import re
end_characters = ";{}" # all the characters to be moved
# regex makes five groups: [indentation, end_chars, body, idk, end_chars, body]
# most are optional and will have the value None when checked
# regex = "([ \t]*)?([{0}]+)?([^{0}]+)([{0}]+)?(.*)$".format(end_characters)
rege... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
11748,
25064,
198,
11748,
302,
198,
198,
437,
62,
10641,
19858,
796,
366,
26,
90,
36786,
1303,
477,
262,
3435,
284,
307,
3888,
198,
2,
40364,
1838,
1936,
2628,
25,
685,
521,
298,
341,
... | 2.228544 | 1,037 |
'''
File: crop_img.py
Project: sketchKeras
File Created: Thursday, 18th October 2018 7:31:16 pm
Author: xiaofeng (sxf1052566766@163.com)
-----
Last Modified: Friday, 19th October 2018 5:32:45 pm
Modified By: xiaofeng (sxf1052566766@163.com>)
-----
Copyright 2018.06 - 2018 onion Math, onion Math
'''
import cv2
import ... | [
198,
7061,
6,
198,
8979,
25,
13833,
62,
9600,
13,
9078,
198,
16775,
25,
17548,
42,
263,
292,
198,
8979,
15622,
25,
3635,
11,
1248,
400,
3267,
2864,
767,
25,
3132,
25,
1433,
9114,
198,
13838,
25,
2124,
544,
1659,
1516,
357,
82,
261... | 2.616162 | 198 |
import torch.nn as nn
from model_training.common.modules import ResBlock
if __name__ == '__main__':
from torchsummary import summary
net = UNetAddNet(in_channels=4, out_channels=3)
summary(net, (4, 240, 240), device='cpu')
| [
11748,
28034,
13,
20471,
355,
299,
77,
198,
6738,
2746,
62,
34409,
13,
11321,
13,
18170,
1330,
1874,
12235,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
422,
28034,
49736,
1330,
10638,
6... | 2.77907 | 86 |
STEPS = [(1,1), (3,1), (5,1), (7,1), (1,2)]
file = open('input.txt')
slope_map = file.readlines()
trees_multi = 1
line_len = len(slope_map[0])
for step in STEPS:
pos = 0
trees_hit = 0
for tree_row in slope_map[step[1]::step[1]]:
pos = (pos + step[0]) % (line_len - 1)
if is_tree(tree_row... | [
30516,
3705,
796,
47527,
16,
11,
16,
828,
357,
18,
11,
16,
828,
357,
20,
11,
16,
828,
357,
22,
11,
16,
828,
357,
16,
11,
17,
15437,
198,
198,
7753,
796,
1280,
10786,
15414,
13,
14116,
11537,
198,
6649,
3008,
62,
8899,
796,
2393,... | 2.085714 | 210 |