content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
from socket import *
a=input("IP")
b=input("")
ADDR = ("176.17.12.178", 31414)
giao = socket(AF_INET, SOCK_DGRAM)
while 1:
m = input(":")
if not m:
break
else:
giao.sendto(m.encode(), ADDR)
d, a = giao.recvfrom(1024)
print("", d.decode())
giao.close()
| [
6738,
17802,
1330,
1635,
198,
64,
28,
15414,
7203,
4061,
4943,
198,
65,
28,
15414,
7203,
4943,
198,
2885,
7707,
796,
5855,
24096,
13,
1558,
13,
1065,
13,
23188,
1600,
34085,
1415,
8,
198,
70,
13481,
796,
17802,
7,
8579,
62,
1268,
27... | 1.910256 | 156 |
from django.conf.urls import url
from django.conf import settings
from panel.views import *
urlpatterns = [
url(r'^$', index, name='index'),
]
| [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
6103,
13,
33571,
1330,
1635,
198,
198,
6371,
33279,
82,
796,
685,
628,
220,
220,
220,
19016,
7,
81,
6,
61,
3,
3256,... | 2.849057 | 53 |
import turtle
color=["green", "yellow",'orange','blue','pruple','red','pink']
x=10
y= 270
i=0
turtle.bgcolor("black")
while True:
turtle.color(color[0])
turtle.forward(x)
turtle.left(y)
x+=10
y-=1
i+=1
turtle.mainloop()
| [
11748,
28699,
198,
8043,
28,
14692,
14809,
1600,
366,
36022,
1600,
6,
43745,
41707,
17585,
41707,
79,
622,
1154,
41707,
445,
41707,
79,
676,
20520,
198,
87,
28,
940,
198,
88,
28,
20479,
198,
72,
28,
15,
198,
83,
17964,
13,
35904,
80... | 2.178571 | 112 |
"""Model definitions."""
# Authors: Afshine Amidi <lastname@mit.edu>
# Shervine Amidi <firstname@stanford.edu>
# MIT License
import numpy as np
from enzynet import constants
from keras import initializers
from keras import layers
from keras.layers import advanced_activations
from keras import models
from k... | [
37811,
17633,
17336,
526,
15931,
198,
198,
2,
46665,
25,
2483,
19489,
1703,
19830,
1279,
12957,
3672,
31,
2781,
13,
15532,
29,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6528,
26818,
1703,
19830,
1279,
11085,
3672,
31,
14192... | 2.072881 | 1,180 |
from db import db
| [
6738,
20613,
1330,
20613,
628
] | 3.8 | 5 |
import os
import click
import requests
from FeatureCloud.api.imp.exceptions import FCException
from FeatureCloud.api.imp.test import commands
from FeatureCloud.api.cli.test.workflow.commands import workflow
test.add_command(workflow)
if __name__ == "__main__":
test()
| [
11748,
28686,
201,
198,
201,
198,
11748,
3904,
201,
198,
11748,
7007,
201,
198,
201,
198,
6738,
27018,
18839,
13,
15042,
13,
11011,
13,
1069,
11755,
1330,
10029,
16922,
201,
198,
201,
198,
6738,
27018,
18839,
13,
15042,
13,
11011,
13,
... | 2.586777 | 121 |
import subprocess
import logging
import os, time
from pathlib import Path
from shutil import copyfile
import pandas as pd
from datetime import datetime
def res_plot(filename, config, checkpoint_file):
"""
base_commands = ['axicli', filename, '--config', config, '--mode', 'res_plot']
end_commands = ['-o', c... | [
11748,
850,
14681,
198,
11748,
18931,
198,
11748,
28686,
11,
640,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
4423,
346,
1330,
4866,
7753,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
4299,... | 2.424658 | 657 |
#!/usr/bin/env python
import argparse
parser = argparse.ArgumentParser(prog="region_optimize.py", description="Find the kernel parameters for Gaussian region zones.")
parser.add_argument("spectrum", help="JSON file containing the data, model, and residual.")
parser.add_argument("--sigma0", type=float, default=2, help=... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
1822,
29572,
198,
48610,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
1676,
70,
2625,
36996,
62,
40085,
1096,
13,
9078,
1600,
6764,
2625,
16742,
262,
9720,
10007,
329,
12822,... | 2.615199 | 1,658 |
import requests
from urllib.request import urlopen
from bs4 import BeautifulSoup
print('Pegando informaes para download das bases...')
urls_bases, last_updates = get_urls_and_last_updates()
if len(urls_bases) > 0:
print('Iniciando Downloads...')
progress = 0
for url in urls_bases:
print(f'Baixa... | [
11748,
7007,
198,
6738,
2956,
297,
571,
13,
25927,
1330,
19016,
9654,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
628,
628,
198,
4798,
10786,
47,
1533,
25440,
4175,
64,
274,
31215,
4321,
288,
292,
12536,
986,
11537,
198,
6371,
82,... | 2.414747 | 217 |
# Copyright 2022 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | [
2,
15069,
33160,
3012,
11419,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,... | 2.809896 | 384 |
import asyncio
from fusionsid import Decorators
deco = Decorators
do_roast = deco.roast
loop = asyncio.new_event_loop()
loop.run_until_complete(main())
| [
11748,
30351,
952,
198,
6738,
277,
15880,
312,
1330,
4280,
273,
2024,
198,
198,
12501,
78,
796,
4280,
273,
2024,
198,
198,
4598,
62,
305,
459,
796,
875,
78,
13,
305,
459,
628,
198,
198,
26268,
796,
30351,
952,
13,
3605,
62,
15596,
... | 2.706897 | 58 |
# Basiskonfigurationsfile
_base_ = '../centripetalnet/centripetalnet_hourglass104_mstest_16x6_210e_coco.py'
model = dict(
type='CornerNet',
backbone=dict(
type='HourglassNet',
downsample_times=5,
num_stacks=2,
stage_channels=[256, 256, 384, 384, 384, 512],
stage_blocks=... | [
2,
6455,
1984,
261,
5647,
20074,
7753,
198,
62,
8692,
62,
796,
705,
40720,
1087,
5528,
316,
282,
3262,
14,
1087,
5528,
316,
282,
3262,
62,
9769,
20721,
13464,
62,
76,
301,
395,
62,
1433,
87,
21,
62,
21536,
68,
62,
66,
25634,
13,
... | 2.07852 | 1,108 |
import json
import mock
import os
from django.contrib.auth import get_user_model
from django.core import mail
from django.core.urlresolvers import reverse
from django.test import Client
from firecares.firestation.models import FireDepartment, FireStation, DataFeedback
from firecares.firecares_core.tests.base import Bas... | [
11748,
33918,
198,
11748,
15290,
198,
11748,
28686,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
651,
62,
7220,
62,
19849,
198,
6738,
42625,
14208,
13,
7295,
1330,
6920,
198,
6738,
42625,
14208,
13,
7295,
13,
6371,
411,
349,... | 3.47619 | 105 |
from .gtkscheduler import GtkScheduler
from .pygamescheduler import PyGameScheduler
from .qtscheduler import QtScheduler
from .tkinterscheduler import TkinterScheduler
from .wxscheduler import WxScheduler
__all__ = [
"GtkScheduler",
"PyGameScheduler",
"QtScheduler",
"TkinterScheduler",
"WxScheduler... | [
6738,
764,
13655,
591,
1740,
18173,
1330,
402,
30488,
50,
1740,
18173,
198,
6738,
764,
9078,
19966,
1740,
18173,
1330,
9485,
8777,
50,
1740,
18173,
198,
6738,
764,
80,
912,
1740,
18173,
1330,
33734,
50,
1740,
18173,
198,
6738,
764,
83,
... | 2.480916 | 131 |
import map2annotation
if __name__ == '__main__':
map2annotation.main() | [
11748,
3975,
17,
1236,
14221,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
3975,
17,
1236,
14221,
13,
12417,
3419
] | 2.678571 | 28 |
import dataclasses
from dataclasses import dataclass
| [
11748,
4818,
330,
28958,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
628
] | 3.857143 | 14 |
#!/usr/bin/python
# ----------------------------------------------------------------------------
# cocos2d "install" plugin
#
# Authr: Luis Parravicini
#
# License: MIT
# ----------------------------------------------------------------------------
'''
"run" plugin for cocos2d command line tool
'''
__docformat__ = 'res... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
16529,
10541,
198,
2,
8954,
418,
17,
67,
366,
17350,
1,
13877,
198,
2,
198,
2,
26828,
81,
25,
20894,
2547,
4108,
291,
5362,
198,
2,
198,
2,
13789,
25,
17168,
198,
2,
16529,
10541,
19... | 4.133333 | 90 |
import configparser
| [
11748,
4566,
48610,
198
] | 5 | 4 |
import datetime
import json
from flask import Response, request, Blueprint
from flask_jwt_extended import jwt_required
from flask_restplus import Api, Namespace, Resource, reqparse
from sqlalchemy.exc import IntegrityError
from api.core.db_execptions import bad_db_response
from api.core.models import SensorInfoModel,... | [
11748,
4818,
8079,
198,
11748,
33918,
198,
198,
6738,
42903,
1330,
18261,
11,
2581,
11,
39932,
198,
6738,
42903,
62,
73,
46569,
62,
2302,
1631,
1330,
474,
46569,
62,
35827,
198,
6738,
42903,
62,
2118,
9541,
1330,
5949,
72,
11,
28531,
... | 3.400966 | 207 |
# -*- coding: utf-8 -*-
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198
] | 1.714286 | 14 |
import tkinter, hashlib
root = tkinter.Tk()
root.title("Hash Calculator")
label = tkinter.Label(text="Write the string to hash")
label.pack()
option = tkinter.StringVar()
option.set("sha224")
string = tkinter.StringVar()
entry = tkinter.Entry(root, textvariable=string, width=150, justify="center")
entr... | [
11748,
256,
74,
3849,
11,
12234,
8019,
201,
198,
201,
198,
15763,
796,
256,
74,
3849,
13,
51,
74,
3419,
201,
198,
15763,
13,
7839,
7203,
26257,
43597,
4943,
201,
198,
201,
198,
18242,
796,
256,
74,
3849,
13,
33986,
7,
5239,
2625,
... | 2.574194 | 310 |
# Bring in all of the public TensorFlow interface into this
# module.
# pylint: disable=wildcard-import
from tensorflow.python import *
| [
2,
24347,
287,
477,
286,
262,
1171,
309,
22854,
37535,
7071,
656,
428,
198,
2,
8265,
13,
198,
2,
279,
2645,
600,
25,
15560,
28,
21992,
9517,
12,
11748,
198,
6738,
11192,
273,
11125,
13,
29412,
1330,
1635,
198
] | 3.487179 | 39 |
# -*- coding: utf-8 -*-
# Copyright 2016 Dana James Traversie and Check Point Software Technologies, Ltd. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:/... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
15069,
1584,
22937,
3700,
4759,
690,
494,
290,
6822,
6252,
10442,
21852,
11,
12052,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
1... | 3.853881 | 219 |
# -*- coding: utf-8 -*-
from channels.staticfiles import StaticFilesConsumer
from tandlr.notifications import consumers
channel_routing = {
'http.request': StaticFilesConsumer(),
# Wire up websocket channels to our consumers:
'websocket.connect': consumers.ws_connect,
'websocket.receive': consumers.... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
9619,
13,
12708,
16624,
1330,
36125,
25876,
49106,
198,
198,
6738,
256,
392,
14050,
13,
1662,
6637,
1330,
7008,
198,
198,
17620,
62,
81,
13660,
796,
1391,
198... | 3.023438 | 128 |
from collections import defaultdict, Counter
from itertools import product
import re
with open('03.txt') as fd:
inp = []
for l in fd.readlines():
groups = re.findall(r'\d+', l)
inp.append(list(map(int, groups)))
claims = defaultdict(int)
for (id, l,t, w,h) in inp:
for y in range(t,t+h):
... | [
6738,
17268,
1330,
4277,
11600,
11,
15034,
201,
198,
6738,
340,
861,
10141,
1330,
1720,
201,
198,
11748,
302,
201,
198,
201,
198,
4480,
1280,
10786,
3070,
13,
14116,
11537,
355,
277,
67,
25,
201,
198,
220,
287,
79,
796,
17635,
201,
... | 2 | 323 |
import os
import sys
import logging
import boto3 | [
11748,
28686,
198,
11748,
25064,
198,
11748,
18931,
198,
11748,
275,
2069,
18
] | 3.692308 | 13 |
#
# Copyright John Reid 2010
#
"""
Code to deal with the Bergman curated set of fly motifs.
"""
import os, biopsy.data as D, numpy as N
import xml.etree.ElementTree as ET
def xms_filename():
"@return: The filename of the XMS file where the motifs are stored."
return os.path.join(D.data_dir(), "Bergman-Fly-M... | [
2,
198,
2,
15069,
1757,
16095,
3050,
198,
2,
198,
198,
37811,
198,
10669,
284,
1730,
351,
262,
24626,
805,
36768,
900,
286,
6129,
32702,
82,
13,
198,
37811,
198,
198,
11748,
28686,
11,
3182,
44522,
13,
7890,
355,
360,
11,
299,
32152... | 2.357367 | 1,276 |
"""Holds the HTTP handlers for the addressbook app."""
from django import db
from django import http
from django.views import generic
import json
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from addressbook import models
JSON_XSSI_PREFIX = ")]}'\n"
... | [
37811,
39,
10119,
262,
14626,
32847,
329,
262,
2209,
2070,
598,
526,
15931,
198,
198,
6738,
42625,
14208,
1330,
20613,
198,
6738,
42625,
14208,
1330,
2638,
198,
6738,
42625,
14208,
13,
33571,
1330,
14276,
198,
11748,
33918,
198,
6738,
426... | 3.214592 | 233 |
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.utils.translation import gettext_lazy as _
| [
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
7738,
1060,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
651,
5239,
62,
75,
12582,
355,
4808,
198
] | 3.567568 | 37 |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import tensorflow as tf
import keras
import os
print(os.listdir("../input"))
print("Success")
# Any results you write to the current directory are saved as output.
# importing models/layers
from keras.models ... | [
198,
198,
11748,
299,
32152,
355,
45941,
1303,
14174,
37139,
198,
11748,
19798,
292,
355,
279,
67,
1303,
1366,
7587,
11,
44189,
2393,
314,
14,
46,
357,
68,
13,
70,
13,
279,
67,
13,
961,
62,
40664,
8,
198,
11748,
11192,
273,
11125,
... | 2.860051 | 393 |
"""remove unique constraint from user table
Revision ID: 29e48091912e
Revises: f73df8de1f1f
Create Date: 2021-12-22 22:26:20.918461
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '29e48091912e'
down_revision = 'f73df8de1f1f'
branch_labels = None
depends_on = N... | [
37811,
28956,
3748,
32315,
422,
2836,
3084,
198,
198,
18009,
1166,
4522,
25,
2808,
68,
22148,
24,
1129,
1065,
68,
198,
18009,
2696,
25,
277,
4790,
7568,
23,
2934,
16,
69,
16,
69,
198,
16447,
7536,
25,
33448,
12,
1065,
12,
1828,
2534... | 2.566929 | 127 |
'''ResNet in PyTorch.
For Pre-activation ResNet, see 'preact_resnet.py'.
Reference:
[1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun
Deep Residual Learning for Image Recognition. arXiv:1512.03385
'''
import torch
import torch.nn as nn
import torch.nn.functional as F
import math
def ResNet101(feat_dim... | [
7061,
6,
4965,
7934,
287,
9485,
15884,
354,
13,
198,
198,
1890,
3771,
12,
48545,
1874,
7934,
11,
766,
705,
3866,
529,
62,
411,
3262,
13,
9078,
4458,
198,
198,
26687,
25,
198,
58,
16,
60,
509,
1385,
278,
679,
11,
45641,
24767,
1943... | 2.734463 | 177 |
import json
from django import forms
from django.contrib.postgres.search import SearchQuery, SearchRank, SearchVector
from django.core.exceptions import ValidationError
from django.db.models import F
from django.db.models.functions import ACos, Cos, Radians, Sin
import requests
from bc.recruitment.constants import J... | [
11748,
33918,
198,
198,
6738,
42625,
14208,
1330,
5107,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
7353,
34239,
13,
12947,
1330,
11140,
20746,
11,
11140,
27520,
11,
11140,
38469,
198,
6738,
42625,
14208,
13,
7295,
13,
1069,
11755,
1330,
... | 3.002725 | 367 |
import argparse
import os
import shutil
import time, math, datetime, re
from collections import OrderedDict
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
import torch.optim
import torch.utils.data
import torchvision.transform... | [
11748,
1822,
29572,
201,
198,
11748,
28686,
201,
198,
11748,
4423,
346,
201,
198,
11748,
640,
11,
10688,
11,
4818,
8079,
11,
302,
201,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
201,
198,
11748,
28034,
201,
198,
11748,
28034,
13,
2... | 3.18932 | 206 |
import matplotlib.pyplot as plt
import numpy as np
from visHullTwoD import Scene, SegmentType
#%%
#%%
world0 = Scene()
world1 = Scene()
world2 = Scene()
world3 = Scene()
world4 = Scene()
world5 = Scene()
world6 = Scene()
world7 = Scene()
world8 = Scene()
world9 = Scene()
world10 = Scene()
world11 = Scene()
w... | [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
1490,
39,
724,
7571,
35,
1330,
28315,
11,
1001,
5154,
6030,
198,
198,
2,
16626,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198... | 2.093257 | 2,788 |
import numpy as np
from scipy.sparse import issparse
from sklearn.utils import sparsefuncs
import anndata
from typing import Union
from ..dynamo_logger import LoggerManager, main_tqdm
from ..utils import copy_adata
def lambda_correction(
adata: anndata.AnnData,
lambda_key: str = "lambda",
inplace: bool = ... | [
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
13,
82,
29572,
1330,
1189,
29572,
198,
6738,
1341,
35720,
13,
26791,
1330,
29877,
12543,
6359,
198,
11748,
281,
358,
1045,
198,
6738,
19720,
1330,
4479,
198,
6738,
11485,
67,
4989,... | 2.156905 | 2,766 |
#!/usr/bin/env nemesis
#
# ----------------------------------------------------------------------
#
# Brad T. Aagaard, U.S. Geological Survey
# Charles A. Williams, GNS Science
# Matthew G. Knepley, University at Buffalo
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://g... | [
2,
48443,
14629,
14,
8800,
14,
24330,
36945,
9339,
198,
2,
198,
2,
16529,
23031,
198,
2,
198,
2,
8114,
309,
13,
317,
8126,
446,
11,
471,
13,
50,
13,
34246,
13084,
198,
2,
7516,
317,
13,
6484,
11,
402,
8035,
5800,
198,
2,
9308,
... | 4.080275 | 436 |
# util functions about data
from scipy.stats import rankdata, iqr, trim_mean
from sklearn.metrics import f1_score, mean_squared_error
import numpy as np
from numpy import percentile
# calculate F1 scores
| [
2,
7736,
5499,
546,
1366,
198,
198,
6738,
629,
541,
88,
13,
34242,
1330,
4279,
7890,
11,
1312,
80,
81,
11,
15797,
62,
32604,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
277,
16,
62,
26675,
11,
1612,
62,
16485,
1144,
62,
18224,
... | 3.285714 | 63 |
import gym, random, copy, string, uuid
import numpy as np
rddl_template = string.Template('''
non-fluents nf_sysadmin_inst_$uid {
domain = sysadmin_mdp;
objects {
computer : {$objects};
};
non-fluents {
REBOOT-PROB = $reboot_prob;
$connections
};
}
instance sysadmin_inst_$uid {
domain = sysadmin_mdp;
non... | [
11748,
11550,
11,
4738,
11,
4866,
11,
4731,
11,
334,
27112,
198,
11748,
299,
32152,
355,
45941,
198,
198,
81,
1860,
75,
62,
28243,
796,
4731,
13,
30800,
7,
7061,
6,
198,
13159,
12,
35522,
658,
299,
69,
62,
17597,
28482,
62,
8625,
... | 2.493333 | 525 |
import torch
import torch.optim as optim
from transformers import AutoTokenizer
from .utils import epsilon_greedy_transform_label, uid_variance_fn, OPTIMIZER_DIC
import pytorch_lightning as pl
| [
11748,
28034,
198,
11748,
28034,
13,
40085,
355,
6436,
198,
6738,
6121,
364,
1330,
11160,
30642,
7509,
198,
6738,
764,
26791,
1330,
304,
862,
33576,
62,
16694,
4716,
62,
35636,
62,
18242,
11,
334,
312,
62,
25641,
590,
62,
22184,
11,
3... | 3.288136 | 59 |
from unittest import TestCase
from elastic_workplace_search.client import Client
| [
6738,
555,
715,
395,
1330,
6208,
20448,
198,
198,
6738,
27468,
62,
1818,
5372,
62,
12947,
13,
16366,
1330,
20985,
198
] | 3.904762 | 21 |
from neotext.lib.neotext_quote_context.quote import Quote
t0 = Quote(
citing_quote="""<p>I am sick and tired of watching folks like Boris Johnson, Marine Le Pen, Donald Trump and others appeal to the worst racial instincts of our species, only to be shushed by folks telling me that it’s not <i>really</i> rac... | [
6738,
497,
1258,
742,
13,
8019,
13,
710,
1258,
742,
62,
22708,
62,
22866,
13,
22708,
1330,
19879,
198,
198,
83,
15,
796,
19879,
7,
198,
220,
220,
220,
12988,
62,
22708,
2625,
15931,
27,
79,
29,
40,
716,
6639,
290,
10032,
286,
4964... | 3.263817 | 1,357 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Test suite for the daily average Toggl API process."""
from random import random
from tempfile import NamedTemporaryFile
from time import sleep, time
from unittest import TestCase
from recipes.imperative_vs_reactive.get_daily_average_imp import \
get_avg_daily_wor... | [
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,
14402,
18389,
329,
262,
4445,
2811,
309,
519,
4743,
7824,
1429,
526,
15931,
198,
198,
6738,
4738,
1330,
4738... | 2.936416 | 173 |
# Copyright 2013 Oscar Araque
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | [
2,
15069,
2211,
15694,
30574,
4188,
220,
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,
92... | 3.235897 | 585 |
import os
import datetime
import secrets
import json
from flask import Flask, abort, request, jsonify
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
from werkzeug.security import safe_str_cmp
from flask_stateless_auth import (
StatelessAuthError,
Sta... | [
11748,
28686,
198,
11748,
4818,
8079,
198,
11748,
13141,
198,
11748,
33918,
198,
198,
6738,
42903,
1330,
46947,
11,
15614,
11,
2581,
11,
33918,
1958,
198,
6738,
42903,
62,
25410,
282,
26599,
1330,
16363,
2348,
26599,
198,
6738,
44161,
282... | 2.758491 | 265 |
from microbit import *
import music
A = False
B = False
PITCH = 440
# PIN2 read_analog()
ACTION_VALUE = 50
VOLUMEUP_VALUE = 150
VOLUMEDOWN_VALUE = 350
#nothing: 944
prev_l = False
prev_r = False
l = False
r = False
while True:
v = pin2.read_analog()
if v < ACTION_VALUE:
l,r = True, True
elif v <... | [
6738,
4580,
2545,
1330,
1635,
198,
11748,
2647,
198,
198,
32,
796,
10352,
198,
33,
796,
10352,
198,
47,
31949,
796,
33879,
198,
198,
2,
34279,
17,
1100,
62,
272,
11794,
3419,
198,
44710,
62,
39488,
796,
2026,
198,
44558,
38340,
8577,
... | 1.759082 | 523 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
6738,
42625,
14208,
13,
10414,
1330,
... | 3.111111 | 45 |
# Generated by Django 3.1.5 on 2021-05-02 05:27
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
20,
319,
33448,
12,
2713,
12,
2999,
8870,
25,
1983,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
... | 2.818182 | 44 |
try:
print(5/0)
except ZeroDivisionError:
print('!')
else:
print('') | [
28311,
25,
198,
220,
220,
220,
3601,
7,
20,
14,
15,
8,
198,
16341,
12169,
24095,
1166,
12331,
25,
198,
220,
220,
220,
3601,
10786,
0,
11537,
198,
17772,
25,
198,
220,
220,
220,
3601,
7,
7061,
8
] | 2.105263 | 38 |
import pdbCleanup as pc
import fxndefinitions as f
import numpy as np
from numpy.linalg import eig
pc.takeInput1()
DataFrame1 = []
pc.CsvToDataframe(DataFrame1)
pc.takeInput2()
DataFrame2 = []
pc.CsvToDataframe(DataFrame2)
xtil = [0, 0, 0]
ytil = [0, 0, 0]
x = np.array(DataFrame1)
y = np.array(DataFrame2)
# This f... | [
11748,
279,
9945,
32657,
929,
355,
40653,
198,
11748,
277,
87,
358,
891,
50101,
355,
277,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
299,
32152,
13,
75,
1292,
70,
1330,
304,
328,
198,
198,
14751,
13,
20657,
20560,
16,
3419,
198,
... | 2 | 962 |
# l1 = [1095, 1094, 1095]
# del l1[:]
# l1.extend([1005, 1094, 1095])
# print(l1)
l1 = [8676, 4444, 3333, 2222, 1111]
for i, n in enumerate(l1):
print(i, n)
if int(n / 1000) == 1:
l1[i] = n + 8000
elif int(n / 1000) == 2:
l1[i] = n + 6000
elif int(n / 1000) == 3:
l1[i] = n + 40... | [
2,
300,
16,
796,
685,
940,
3865,
11,
838,
5824,
11,
838,
3865,
60,
198,
2,
1619,
300,
16,
58,
47715,
198,
2,
300,
16,
13,
2302,
437,
26933,
3064,
20,
11,
838,
5824,
11,
838,
3865,
12962,
198,
2,
3601,
7,
75,
16,
8,
628,
198,... | 1.715068 | 365 |
import requests
LANGUAGES_LIST = [
'en-US', 'en-GB', 'en-AU', 'en-HK', 'en-NZ', 'en-SG', 'en-ZA', 'de-DE',
'ar-XA', 'ar-SA', 'bn-IN', 'bg-BG', 'ca-ES', 'cmn-CN', 'zh-HK', 'cmn-TW',
'cy-GB', 'cs-CZ', 'da-DK', 'de-CH', 'es-AR', 'es-CO', 'es-US', 'ga-IE',
'gu-IN', 'hr-HR', 'mr-IN', 'ms-MY', 'mt-MT', 'nl-N... | [
11748,
7007,
198,
198,
43,
15567,
52,
25552,
62,
45849,
796,
685,
198,
220,
220,
220,
705,
268,
12,
2937,
3256,
705,
268,
12,
4579,
3256,
705,
268,
12,
26830,
3256,
705,
268,
12,
38730,
3256,
705,
268,
12,
37371,
3256,
705,
268,
1... | 1.728337 | 427 |
import tensorflow as tf
import numpy as np
from sklearn.datasets import fetch_california_housing
housing = fetch_california_housing()
m, n = housing.data.shape
housing_data_plus_bias = np.c_[np.ones((m, 1)), housing.data]
X = tf.constant(housing_data_plus_bias, dtype=tf.float32, name="X")
y = tf.constant(housing.targ... | [
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
1341,
35720,
13,
19608,
292,
1039,
1330,
21207,
62,
9948,
361,
3317,
62,
50028,
198,
198,
50028,
796,
21207,
62,
9948,
361,
3317,
62,
50028,
3419,
198,... | 2.519608 | 408 |
# -*- coding: utf-8 -*-
"""
@author: Matthew Beauregard Smith (UT Austin)
"""
from common.peptide import Peptide
from plotting.plot_pr_curve import plot_pr_curve
from numpy import load
from simulate.label_peptides import label_peptides
TRUE_Y_FILE = 'C:/Users/Matthew/ICES/MarcotteLab/data/classification/c... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
37811,
201,
198,
31,
9800,
25,
9308,
1355,
64,
495,
19977,
4176,
357,
3843,
9533,
8,
201,
198,
37811,
201,
198,
201,
198,
6738,
2219,
13,
431,
457,
485,
1330,
2... | 2.135328 | 702 |
################# BEGIN AUTOMATICALLY GENERATED FIT PROFILE ##################
########################### DO NOT EDIT THIS FILE ############################
####### EXPORTED PROFILE FROM SDK VERSION 20.33 AT 2017-05-17 22:36:12 #######
########## PARSED 118 TYPES (1699 VALUES), 76 MESSAGES (950 FIELDS) ##########
fro... | [
14468,
2,
347,
43312,
47044,
2662,
1404,
2149,
19807,
24700,
1137,
11617,
376,
2043,
21965,
25664,
1303,
14468,
2,
198,
14468,
7804,
21017,
8410,
5626,
48483,
12680,
45811,
1303,
14468,
7804,
21017,
198,
4242,
21017,
7788,
15490,
1961,
2196... | 1.535366 | 219,816 |
import requests
from bs4 import BeautifulSoup
if __name__ == "__main__":
kospi = get_tickers(market=2)
kosdaq = get_tickers(market=3)
print(len(kospi))
print(len(kosdaq))
print(get_dvr("005930")) | [
11748,
7007,
220,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
479,
2117,
72,
796,
651,
62,
83,
21630,
7,
10728,
28,
17,
8,
198,
220,
220,
... | 2.28125 | 96 |
from django.contrib import admin
from django.utils.html import format_html
from django.shortcuts import redirect
from .models import *
# Register your models here.
admin.site.register(CategoryDes)
admin.site.register(Destination, DestinationAdmin)
admin.site.register(Besttrip, BesttripAdmin)
admin.site.register(Testo... | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
26791,
13,
6494,
1330,
5794,
62,
6494,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
18941,
198,
198,
6738,
764,
27530,
1330,
1635,
198,
2,
17296,
534,
4981... | 3.267281 | 217 |
# Cookie clicker auto-clicker
# Works for the classic version here: https://orteil.dashnet.org/experiments/cookie/
import pyautogui
def locate_cookie():
"""
Returns the locations of the Big Cookie
Does not return until the cookie is found
"""
loc = None
while loc == None:
loc = pyaut... | [
2,
39606,
3904,
263,
8295,
12,
12976,
263,
198,
2,
10933,
329,
262,
6833,
2196,
994,
25,
3740,
1378,
419,
68,
346,
13,
42460,
3262,
13,
2398,
14,
23100,
6800,
14,
44453,
14,
198,
198,
11748,
12972,
2306,
519,
9019,
198,
198,
4299,
... | 2.2848 | 625 |
# -*- coding: utf-8 -*-
#
# Copyright 2015, Ekevoo.com.
#
# 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 l... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
1853,
11,
412,
365,
85,
2238,
13,
785,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
3... | 3.635246 | 244 |
# ------------------------------------------------------------------------------
# This module renders and writes HTML pages to disk.
# ------------------------------------------------------------------------------
import re
import os
from . import site
from . import events
from . import filters
from . import utils
f... | [
2,
16529,
26171,
198,
2,
770,
8265,
30111,
290,
6797,
11532,
5468,
284,
11898,
13,
198,
2,
16529,
26171,
198,
198,
11748,
302,
198,
11748,
28686,
198,
198,
6738,
764,
1330,
2524,
198,
6738,
764,
1330,
2995,
198,
6738,
764,
1330,
16628... | 5.511364 | 88 |
"""Main module."""
from copy import deepcopy
from datetime import datetime
from difflib import Differ
from io import StringIO
from typing import IO, Iterable, AnyStr
from datadiff.tools import assert_equal
from ruamel.yaml import YAML
from ruamel.yaml.comments import CommentedMap
def as_yaml(data: Iterable) -> Any... | [
37811,
13383,
8265,
526,
15931,
198,
6738,
4866,
1330,
2769,
30073,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
814,
8019,
1330,
10631,
263,
198,
6738,
33245,
1330,
10903,
9399,
198,
6738,
19720,
1330,
24418,
11,
40806,
540,
11,
... | 2.304609 | 998 |
import unittest
from unittest import TestCase
| [
11748,
555,
715,
395,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
628
] | 3.615385 | 13 |
from elasticsearch_dsl import Q, TermsFacet
from flask import has_request_context
from flask_login import current_user
from invenio_search import RecordsSearch
from invenio_search.api import DefaultFilter
from .permissions import admin_permission_factory
def deposits_filter():
"""Filter list of deposits.
... | [
198,
6738,
27468,
12947,
62,
67,
6649,
1330,
1195,
11,
17637,
37,
23253,
198,
198,
6738,
42903,
1330,
468,
62,
25927,
62,
22866,
198,
6738,
42903,
62,
38235,
1330,
1459,
62,
7220,
198,
198,
6738,
287,
574,
952,
62,
12947,
1330,
13407,... | 2.84 | 275 |
import numpy as np
from determine_source_type import determine_source_type
#function to figure out how many sources are in cutout
#and set up necessary tractor input for those sources
| [
11748,
299,
32152,
355,
45941,
198,
6738,
5004,
62,
10459,
62,
4906,
1330,
5004,
62,
10459,
62,
4906,
198,
198,
2,
8818,
284,
3785,
503,
703,
867,
4237,
389,
287,
2005,
448,
198,
2,
392,
900,
510,
3306,
38278,
5128,
329,
883,
4237,
... | 3.897959 | 49 |
from distutils.core import setup
DISTNAME='earthdragon'
FULLVERSION='0.1'
setup(
name=DISTNAME,
version=FULLVERSION,
packages=['earthdragon'],
install_requires = [
'asttools',
'toolz',
'typeguard',
'more_itertools',
]
)
| [
6738,
1233,
26791,
13,
7295,
1330,
9058,
198,
198,
35,
8808,
20608,
11639,
16442,
14844,
6,
198,
37,
9994,
43717,
11639,
15,
13,
16,
6,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
28,
35,
8808,
20608,
11,
198,
220,
220,
220,
219... | 2.140625 | 128 |
import os
a = os.system("g++ sumatoria.cpp -o sumatoria.x")
a = os.system("./sumatoria.x")
| [
11748,
28686,
198,
198,
64,
796,
28686,
13,
10057,
7203,
70,
4880,
2160,
1352,
544,
13,
20322,
532,
78,
2160,
1352,
544,
13,
87,
4943,
198,
64,
796,
28686,
13,
10057,
7,
1911,
14,
16345,
1352,
544,
13,
87,
4943,
198
] | 2.243902 | 41 |
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('consultaticket', views.consultaticket, name='consultaticket'),
path('consultadecredito', views.consultadecredito, name='consultadecredito'),
path('mostrarticket', views.mostrarticket, name='most... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
764,
1330,
5009,
628,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
3108,
10786,
3256,
5009,
13,
9630,
11,
1438,
11639,
9630,
33809,
198,
220,
220,
220,
3108,
10786,
5936,... | 2.904348 | 115 |
import streamlit as st
from db_functions import *
| [
11748,
4269,
18250,
355,
336,
198,
6738,
20613,
62,
12543,
2733,
1330,
1635,
198
] | 3.571429 | 14 |
import discord
from discord.ext import commands
import random
| [
11748,
36446,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
11748,
4738,
628,
198
] | 4.571429 | 14 |
# code golf challenge
# https://code.golf/fizz-buzz#python
# wren 20210607
# Print the numbers from 1 to 100 inclusive, each on their own line.
# If, however, the number is a multiple of three then print Fizz instead,
# and if the number is a multiple of five then print Buzz.
# For numbers which are multiples of both ... | [
2,
2438,
13126,
4427,
198,
2,
3740,
1378,
8189,
13,
70,
4024,
14,
69,
6457,
12,
65,
4715,
2,
29412,
198,
2,
266,
918,
1160,
21536,
31980,
198,
198,
2,
12578,
262,
3146,
422,
352,
284,
1802,
19889,
11,
1123,
319,
511,
898,
1627,
... | 3.238202 | 445 |
from setuptools import setup
setup(
name='install-raspberry',
version='',
packages=[''],
url='https://github.com/grro/httpstreamproxy',
license='Apache Software License',
author='grro',
author_email='gregor.roth@web.de',
description='test'
)
| [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
17350,
12,
81,
17653,
3256,
198,
220,
220,
220,
2196,
11639,
3256,
198,
220,
220,
220,
10392,
41888,
7061,
4357,
198,
220,
220,
220,
19016,
1163... | 2.644231 | 104 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import unittest
import inspect
from py_privatekonomi.utilities import common
from py_privatekonomi.tests.test_base import TestBase
from py_privatekonomi.tes... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
6738,
115... | 2.894068 | 236 |
import sys
import os
import json
import gzip
if __name__ == '__main__':
jsonReader('2019-09-19-10.json.gz',1) | [
11748,
25064,
198,
11748,
28686,
198,
11748,
33918,
198,
11748,
308,
13344,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
628,
220,
220,
220,
33918,
33634,
10786,
23344,
12,
2931,
12,
1129,
12,
940,
13,
17752,
13,
... | 2.555556 | 45 |
#!/usr/bin/python
import pycurl
from io import BytesIO
| [
2,
48443,
14629,
14,
8800,
14,
29412,
201,
198,
201,
198,
11748,
12972,
66,
6371,
201,
198,
6738,
33245,
1330,
2750,
4879,
9399,
201
] | 2.458333 | 24 |
# Imports
from egg.resources.console import get, clearConsole
from egg.resources.constants import *
from egg.resources.modules import install, upgrade, Repo
from egg.resources.help import help
from egg.resources.auth import login, register
"""
FUNCTION eggConsole(condition: bool = True)
Display the Egg Console
Curren... | [
2,
1846,
3742,
198,
6738,
5935,
13,
37540,
13,
41947,
1330,
651,
11,
1598,
47581,
198,
6738,
5935,
13,
37540,
13,
9979,
1187,
1330,
1635,
198,
6738,
5935,
13,
37540,
13,
18170,
1330,
2721,
11,
8515,
11,
1432,
78,
198,
6738,
5935,
13... | 3.423077 | 312 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from PIL import Image, ImageDraw, ImageFont, ImageFilter
import random
im = Image.open('F:/workspace/python/data/backpink.jpg')
im2 = im.filter(ImageFilter.BLUR)
im2.save('F:/workspace/python/data/backpink_blur.png', 'png')
im2.save('F:/workspace/python/data/backpink_blu... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
350,
4146,
1330,
7412,
11,
7412,
25302,
11,
7412,
23252,
11,
7412,
22417,
198,
198,
11748,
4738,
198,
198,
... | 2.46049 | 367 |
# Generated by Django 2.1.9 on 2019-07-16 10:15
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
13,
24,
319,
13130,
12,
2998,
12,
1433,
838,
25,
1314,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
from aws_cdk import Stack
from aws_lambda_handler_cookbook.service_stack.configuration.configuration_construct import ConfigurationStore
from aws_lambda_handler_cookbook.service_stack.constants import CONFIGURATION_NAME, ENVIRONMENT, SERVICE_NAME
from constructs import Construct
| [
6738,
3253,
82,
62,
10210,
74,
1330,
23881,
198,
6738,
3253,
82,
62,
50033,
62,
30281,
62,
27916,
2070,
13,
15271,
62,
25558,
13,
11250,
3924,
13,
11250,
3924,
62,
41571,
1330,
28373,
22658,
198,
6738,
3253,
82,
62,
50033,
62,
30281,
... | 3.797297 | 74 |
from django.contrib.auth.models import AbstractUser
from ..notifications.utils import TemplateKey, TemplateMailManager
| [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
27741,
12982,
198,
198,
6738,
11485,
1662,
6637,
13,
26791,
1330,
37350,
9218,
11,
37350,
25804,
13511,
628
] | 4.172414 | 29 |
import collections
import math
import numpy as np
def escribir_pixel(img, columna, linea, canal, valor):
'''funcion encargada de escribir pixel por pixel la imagen'''
if linea >= img.height:
return
if canal == "lum":
prev = img.getpixel((columna,linea-1))
datapixel = (mapeadora(val... | [
11748,
17268,
198,
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
198,
198,
4299,
3671,
822,
343,
62,
32515,
7,
9600,
11,
951,
388,
2616,
11,
1627,
64,
11,
29365,
11,
1188,
273,
2599,
198,
220,
220,
220,
705,
7061,
20786,
295,
22... | 2.060136 | 1,031 |
"""
Pong game by Michael Mishkanian
"""
import turtle
wn = turtle.Screen()
wn.title("Pong by Michael Mishkanian")
wn.bgcolor("black")
wn.setup(width=800, height=600)
wn.tracer(0)
# Paddle A
paddle_a = turtle.Turtle()
paddle_a.speed(0)
paddle_a.shape("square")
paddle_a.color("white")
paddle_a.shapesize(stretch_wid=5, ... | [
37811,
198,
47,
506,
983,
416,
3899,
39523,
27541,
666,
198,
37811,
198,
11748,
28699,
198,
198,
675,
796,
28699,
13,
23901,
3419,
198,
675,
13,
7839,
7203,
47,
506,
416,
3899,
39523,
27541,
666,
4943,
198,
675,
13,
35904,
8043,
7203,... | 2.249384 | 1,624 |
number = int(input())
counter = 1
while counter <= number:
print(counter)
counter = 2 * counter + 1 | [
17618,
796,
493,
7,
15414,
28955,
198,
24588,
796,
352,
198,
198,
4514,
3753,
19841,
1271,
25,
198,
220,
220,
220,
3601,
7,
24588,
8,
198,
220,
220,
220,
3753,
796,
362,
1635,
3753,
1343,
352
] | 3 | 36 |
from pathlib import Path
from string_finder.constants import TEST_DATA_DIR
from typing import List
import pytest
| [
6738,
3108,
8019,
1330,
10644,
198,
6738,
4731,
62,
22805,
13,
9979,
1187,
1330,
43001,
62,
26947,
62,
34720,
198,
6738,
19720,
1330,
7343,
198,
198,
11748,
12972,
9288,
628
] | 3.833333 | 30 |
import csv
from utils import get_valid_colum_indices | [
11748,
269,
21370,
198,
6738,
3384,
4487,
1330,
651,
62,
12102,
62,
4033,
388,
62,
521,
1063
] | 3.058824 | 17 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-11-06 15:41
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
1157,
13,
1433,
319,
2864,
12,
1157,
12,
3312,
1315,
25,
3901,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,... | 2.888889 | 63 |
###############################################################################
# Univesidade Federal de Pernambuco -- UFPE (http://www.ufpe.br)
# Centro de Informatica -- CIn (http://www.cin.ufpe.br)
# Bacharelado em Sistemas de Informacao
# IF968 -- Programacao 1
#
# Autor: Bernardo Gomes de Melo
# ... | [
29113,
29113,
7804,
4242,
21017,
201,
198,
2,
791,
1083,
312,
671,
5618,
390,
350,
1142,
4131,
84,
1073,
1377,
471,
5837,
36,
357,
4023,
1378,
2503,
13,
3046,
431,
13,
1671,
8,
201,
198,
2,
1979,
305,
390,
45255,
1512,
64,
1377,
3... | 2.178773 | 2,299 |
"""DB utilities.
"""
__author__ = 'Md Jahidul Hamid <jahidulhamid@yahoo.com>'
__copyright__ = 'Copyright Md Jahidul Hamid <https://github.com/neurobin/>'
__license__ = '[BSD](http://www.opensource.org/licenses/bsd-license.php)'
__version__ = '0.1.0'
import collections
import re
import asyncio
import nest_asyncio # ... | [
37811,
11012,
20081,
13,
198,
37811,
198,
198,
834,
9800,
834,
796,
705,
44,
67,
48984,
312,
377,
4345,
312,
1279,
31558,
312,
377,
2763,
312,
31,
40774,
13,
785,
29,
6,
198,
834,
22163,
4766,
834,
796,
705,
15269,
220,
39762,
48984... | 2.314419 | 7,067 |
"""
gistsig
Derek Merck
Winter 2019
Sign and verify Python packages using public gists.
"""
import logging
from pprint import pformat
from datetime import datetime
import click
from . import get_gist, update_gist
from . import get_pkg_info, get_pkg_gist
def find_gist_id(pkg_name):
# Check the package
gist... | [
37811,
198,
70,
1023,
328,
198,
35,
18238,
4638,
694,
198,
35376,
13130,
198,
198,
11712,
290,
11767,
11361,
10392,
1262,
1171,
308,
1023,
13,
198,
37811,
198,
198,
11748,
18931,
198,
6738,
279,
4798,
1330,
279,
18982,
198,
6738,
4818,
... | 2.560403 | 298 |
"""
Copyright 2018 Riley Murray
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, software
d... | [
37811,
198,
15269,
2864,
22637,
12164,
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,
351,
262,
13789,
13,
198,
1639,
743,
7... | 3.43379 | 219 |
product_type = input("Enter the product type(coffee, water, coke, snacks): ")
quantity = int(input("Enter the quantity: "))
print(f"{price():.2f}") | [
11167,
62,
4906,
796,
5128,
7203,
17469,
262,
1720,
2099,
7,
1073,
5853,
11,
1660,
11,
763,
365,
11,
28487,
2599,
366,
8,
198,
40972,
414,
796,
493,
7,
15414,
7203,
17469,
262,
12040,
25,
366,
4008,
198,
198,
4798,
7,
69,
1,
90,
... | 2.901961 | 51 |
import torch
import torch.nn as nn
import torch.nn.functional as F
import math
import time
import random
import matlab.engine
#panel_x, panel_y = panel dimensions
#n_freq = n frequency bins
#x, y = top left of gaussian
#spread = spread of the gaussian
#NB that x-spread > 0, y-spread > 0, x+spread < panel_x... | [
11748,
28034,
201,
198,
11748,
28034,
13,
20471,
355,
299,
77,
201,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
201,
198,
11748,
10688,
201,
198,
11748,
640,
201,
198,
11748,
4738,
201,
198,
11748,
2603,
23912,
13,
18392,
201,
... | 2.314961 | 889 |
# Copyright (c) 2020 SBA- MIT License
import getpass
import argparse
import sys
import cmd
import shlex
from urllib.error import HTTPError
from cryptography.hazmat.primitives import serialization
from client.clientlib import login, Connection
from client import smartcard
# noinspection PyArgumentList
if __n... | [
2,
220,
15069,
357,
66,
8,
12131,
311,
4339,
12,
17168,
13789,
198,
198,
11748,
651,
6603,
198,
11748,
1822,
29572,
198,
11748,
25064,
198,
11748,
23991,
198,
11748,
427,
2588,
198,
198,
6738,
2956,
297,
571,
13,
18224,
1330,
14626,
1... | 3.241071 | 112 |
import tweepy
import datetime
import os
# get keys from evironment variable "TWITTER_KEYS"
TWITTER_API_KEYS = (os.environ.get("TWITTER_KEYS").split(","))
consumer_key,consumer_secret,access_token_key,access_token_secret = TWITTER_API_KEYS
# Authenticate to Twitter
auth = tweepy.OAuthHandler(consumer_key, consumer_se... | [
11748,
4184,
538,
88,
198,
11748,
4818,
8079,
198,
11748,
28686,
198,
198,
2,
651,
8251,
422,
819,
1934,
434,
7885,
366,
34551,
2043,
5781,
62,
7336,
16309,
1,
198,
34551,
2043,
5781,
62,
17614,
62,
7336,
16309,
796,
357,
418,
13,
2... | 2.603905 | 717 |
# https://medium.com/datadriveninvestor/deep-autoencoder-using-keras-b77cd3e8be95
from keras.datasets import mnist
from keras.layers import Input, Dense
from keras.models import Model
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
(X_train, _), (X_test, _) = mnist.load_data()
X_train = X_trai... | [
2,
3740,
1378,
24132,
13,
785,
14,
19608,
324,
380,
574,
24859,
273,
14,
22089,
12,
2306,
6571,
66,
12342,
12,
3500,
12,
6122,
292,
12,
65,
3324,
10210,
18,
68,
23,
1350,
3865,
198,
198,
6738,
41927,
292,
13,
19608,
292,
1039,
133... | 2.255069 | 937 |
import random
import typing
from datetime import datetime, timedelta
from random import randint
from google.cloud import ndb
from data_service.config.stocks import currency_symbols
from data_service.store.mixins import AmountMixin
from data_service.views.memberships import MembershipsView
from data_service.store.member... | [
11748,
4738,
198,
11748,
19720,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
6738,
4738,
1330,
43720,
600,
198,
6738,
23645,
13,
17721,
1330,
299,
9945,
198,
6738,
1366,
62,
15271,
13,
11250,
13,
29522,
1330,
7395,
62... | 3.317647 | 340 |
from padmini import filters as f
from padmini import operations as op
from padmini.constants import Tag as T
from padmini.sounds import s
from padmini.prakriya import Term, Prakriya
from padmini.term_views import TermView
from padmini.prakarana.utils import eka_ac
| [
6738,
14841,
45313,
1330,
16628,
355,
277,
198,
6738,
14841,
45313,
1330,
4560,
355,
1034,
198,
6738,
14841,
45313,
13,
9979,
1187,
1330,
17467,
355,
309,
198,
6738,
14841,
45313,
13,
82,
3733,
1330,
264,
198,
6738,
14841,
45313,
13,
79... | 3.35 | 80 |
import unittest | [
11748,
555,
715,
395
] | 3.75 | 4 |
import logging
logger = logging.getLogger("dbnd-scheduler")
try:
from dbnd_airflow.scheduler.scheduler_dags_provider import get_dags
# airflow will only scan files containing the text DAG or airflow. This comment performs this function
dags = get_dags()
if dags:
for dag in dags:
... | [
11748,
18931,
628,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7203,
9945,
358,
12,
1416,
704,
18173,
4943,
628,
198,
28311,
25,
198,
220,
220,
220,
422,
20613,
358,
62,
958,
11125,
13,
1416,
704,
18173,
13,
1416,
704,
18173,
... | 2.656805 | 169 |
import datetime
from django.contrib.contenttypes.models import ContentType
from django.db.models import FieldDoesNotExist
from django.db.models.base import ObjectDoesNotExist
def create_model_type(instance, model_type, key, slugify, **kwargs):
"""
Create object by model type
:param instance: Model manager... | [
11748,
4818,
8079,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
11299,
19199,
13,
27530,
1330,
14041,
6030,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
1330,
7663,
13921,
3673,
3109,
396,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
1... | 2.6675 | 1,600 |
from dtest import Tester
import os, sys, time
from ccmlib.cluster import Cluster
from tools import require, since
from jmxutils import make_mbean, JolokiaAgent
| [
6738,
288,
9288,
1330,
309,
7834,
198,
198,
11748,
28686,
11,
25064,
11,
640,
198,
6738,
36624,
4029,
571,
13,
565,
5819,
1330,
38279,
198,
6738,
4899,
1330,
2421,
11,
1201,
198,
6738,
474,
36802,
26791,
1330,
787,
62,
76,
14289,
11,
... | 3.4375 | 48 |