content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
"""
This script tests the library powerdaq (minimal API from python).
output 0 should be plugged in input 0.
"""
from __future__ import division, print_function
import numpy as np
import time
from fluidlab.powerdaq import PowerDAQBoard
from fluidlab.timer import Timer
from fluidlab.createfigs import CreateFigs
SA... | [
37811,
198,
1212,
4226,
5254,
262,
5888,
1176,
48539,
357,
1084,
4402,
7824,
422,
21015,
737,
198,
198,
22915,
657,
815,
307,
30601,
287,
5128,
657,
13,
198,
37811,
198,
198,
6738,
11593,
37443,
834,
1330,
7297,
11,
3601,
62,
8818,
19... | 2.917098 | 193 |
from django.conf.urls.defaults import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from version1.api import *
from tastypie.api import Api
from django.contrib import admin
admin.autodiscover()
v1_api = Api(api_name='v1')
v1_api.register(CashWithdrawalResource())
v1_api.re... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
13,
12286,
82,
1330,
7572,
11,
2291,
11,
19016,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
12708,
16624,
13,
6371,
82,
1330,
9037,
16624,
62,
6371,
33279,
82,
198,
6738,
2196,
16,
13,
15... | 2.594714 | 1,362 |
#coding: utf-8
from django.db import models
# Create your models here. | [
2,
66,
7656,
25,
3384,
69,
12,
23,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
198,
2,
13610,
534,
4981,
994,
13
] | 2.958333 | 24 |
"""Quick running benchmarks for :mod:`esmf_regrid.esmf_regridder`."""
import numpy as np
from esmf_regrid.esmf_regridder import GridInfo
def _make_small_grid_args():
"""
Not importing the one in test_GridInfo - if that changes, these benchmarks
would 'invisibly' change too.
"""
small_x = 2
... | [
37811,
21063,
2491,
31747,
329,
1058,
4666,
25,
63,
45798,
69,
62,
260,
25928,
13,
45798,
69,
62,
260,
25928,
1082,
63,
526,
15931,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
1658,
76,
69,
62,
260,
25928,
13,
45798,
69... | 2.294118 | 323 |
from __future__ import with_statement
import redis
import time
from redis_netlock import dist_lock
client = redis.Redis(connection_pool=redis.BlockingConnectionPool(max_connections=15, host='localhost', port=6379))
with dist_lock('test', client):
print 'hello'
| [
6738,
11593,
37443,
834,
1330,
351,
62,
26090,
198,
11748,
2266,
271,
198,
11748,
640,
198,
6738,
2266,
271,
62,
3262,
5354,
1330,
1233,
62,
5354,
198,
198,
16366,
796,
2266,
271,
13,
7738,
271,
7,
38659,
62,
7742,
28,
445,
271,
13,... | 3.216867 | 83 |
import sys
IS_PY_2 = sys.version_info.major < 3 | [
11748,
25064,
198,
198,
1797,
62,
47,
56,
62,
17,
796,
25064,
13,
9641,
62,
10951,
13,
22478,
1279,
513
] | 2.4 | 20 |
julia_doctest_factory = util.BuildFactory()
julia_doctest_factory.useProgress = True
julia_doctest_factory.addSteps([
# Fetch first (allowing failure if no existing clone is present)
steps.ShellCommand(
name="git fetch",
command=["git", "fetch", "--tags", "--all", "--force"],
flunkOnFail... | [
73,
43640,
62,
4598,
310,
395,
62,
69,
9548,
796,
7736,
13,
15580,
22810,
3419,
198,
73,
43640,
62,
4598,
310,
395,
62,
69,
9548,
13,
1904,
32577,
796,
6407,
198,
73,
43640,
62,
4598,
310,
395,
62,
69,
9548,
13,
2860,
8600,
82,
... | 2.257008 | 3,603 |
import arcade
import time
from packets import GameStateUpdate, CardPlaced, CardBurned, CardPull, InfoUsed, NextTurn
from gui_elements import NameTab, TextButton, CardTab, CardTabList
from settings import *
| [
11748,
27210,
198,
11748,
640,
198,
6738,
24624,
1330,
3776,
9012,
10260,
11,
5172,
3646,
2286,
11,
5172,
29053,
276,
11,
5172,
42940,
11,
14151,
38052,
11,
7406,
17278,
198,
6738,
11774,
62,
68,
3639,
1330,
6530,
33349,
11,
8255,
21864... | 3.833333 | 54 |
#==============================================================================
# IMPORT NECESSARY MODULES
#==============================================================================
# C:\temp>abaqus viewer -noGUI (this requires a CAE license)
# C:\temp>abaqus python (this does not require a license)
impo... | [
2,
23926,
25609,
855,
198,
2,
30023,
9863,
41804,
7597,
13153,
19164,
6239,
1546,
198,
2,
23926,
25609,
855,
198,
2,
327,
7479,
29510,
29,
15498,
45260,
19091,
532,
3919,
40156,
220,
357,
5661,
4433,
257,
7257,
36,
5964,
8,
198,
2,
... | 2.943188 | 1,725 |
"""Module that holds success messages template"""
audit_messages = {
'created': 'created a new {} ',
'retrieved': 'retrieved {} successfully',
'updated': 'updated {} with id {} ',
'deleted': 'deleted favorite things with id {}'
}
| [
37811,
26796,
326,
6622,
1943,
6218,
11055,
37811,
198,
198,
3885,
270,
62,
37348,
1095,
796,
1391,
198,
220,
220,
220,
705,
25598,
10354,
705,
25598,
257,
649,
23884,
46083,
198,
220,
220,
220,
705,
1186,
28130,
10354,
705,
1186,
28130... | 3.166667 | 78 |
"""
ipy misc/gen_tar_lists.py -- --dataset YouCook2
"""
import copy
import json
import argparse
from typing import Dict, List, Tuple
from pathlib import Path
import tqdm
from beartype import beartype
from zsvision.zs_utils import load_json_config
from gen_readme import dataset_paths, model_specs2path
@beartype
if... | [
37811,
198,
541,
88,
12747,
14,
5235,
62,
18870,
62,
20713,
13,
9078,
1377,
1377,
19608,
292,
316,
921,
28937,
17,
198,
37811,
198,
11748,
4866,
198,
11748,
33918,
198,
11748,
1822,
29572,
198,
6738,
19720,
1330,
360,
713,
11,
7343,
1... | 2.848 | 125 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 23 22:19:32 2022
@author: baecker
"""
import sys
sys.path.append('./napari_j/_tests/surrogate')
if __name__ == '__main__':
from surrogate.surrogate import surrogate
else:
from surrogate import surrogate
from unittest.mock import patch
from ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
3825,
2365,
2242,
2534,
25,
1129,
25,
2624,
33160,
198,
198,
31,
9800,
25,
275,
3609,
152... | 2.537037 | 918 |
from __future__ import annotations
from datetime import datetime
from uuid import uuid4
import pytest
from protean import (
BaseCommand,
BaseCommandHandler,
BaseEvent,
BaseEventHandler,
BaseEventSourcedAggregate,
apply,
handle,
)
from protean.fields import DateTime, Identifier, String, Te... | [
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
334,
27112,
1330,
334,
27112,
19,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
5915,
272,
1330,
357,
198,
220,
220,
220,
7308,
21575,
11,
... | 3.09396 | 149 |
# Copyright (c) 2015 The Johns Hopkins University/Applied Physics Laboratory
# 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/LICEN... | [
2,
15069,
357,
66,
8,
1853,
383,
25824,
21183,
2059,
14,
4677,
18511,
23123,
18643,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
... | 3.595 | 600 |
from fastapi_users import models
from fastapi_users.authentication.strategy.db import BaseAccessToken
| [
6738,
3049,
15042,
62,
18417,
1330,
4981,
198,
6738,
3049,
15042,
62,
18417,
13,
41299,
3299,
13,
2536,
4338,
13,
9945,
1330,
7308,
15457,
30642,
628,
628,
628
] | 3.821429 | 28 |
import unittest
from ..hashes import Hash
import random
if __name__ == '__main__':
unittest.main()
| [
11748,
555,
715,
395,
198,
6738,
11485,
71,
7465,
1330,
21059,
198,
11748,
4738,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
198
] | 2.789474 | 38 |
#!/usr/bin/env python
# coding: utf-8
# In[1]:
import os
# In[2]:
os.chdir('//172.17.129.234/d/gdrive/ueda-note/Outlookuファイル/recovered')
# In[3]:
#os.getcwd()
# In[26]:
import glob
targets = glob.glob('*.csv')
# In[5]:
#import pandas
#
#
## In[6]:
#
#
#import pandas as pd
#
#
## In[7]:
#
#
#file='01-... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
2,
554,
58,
16,
5974,
628,
198,
11748,
28686,
628,
198,
2,
554,
58,
17,
5974,
628,
198,
418,
13,
354,
15908,
10786,
1003,
23628,
13,
155... | 2.048673 | 1,582 |
# Copyright 2016, FBPIC contributors
# Authors: Remi Lehe, Manuel Kirchen
# License: 3-Clause-BSD-LBNL
"""
This file is part of the Fourier-Bessel Particle-In-Cell code (FB-PIC)
It defines the optimized fields methods that use numba on a CPU
"""
from scipy.constants import c, epsilon_0, mu_0
c2 = c**2
import numba
from... | [
2,
15069,
1584,
11,
13186,
47,
2149,
20420,
198,
2,
46665,
25,
3982,
72,
1004,
258,
11,
25995,
509,
1980,
831,
198,
2,
13789,
25,
513,
12,
2601,
682,
12,
21800,
12,
43,
15766,
43,
198,
37811,
198,
1212,
2393,
318,
636,
286,
262,
... | 1.779766 | 10,784 |
import binascii
import os
from base64 import urlsafe_b64encode
from urllib.parse import urlencode
from django.conf import settings
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.utils.encoding import force_str
from olympia.amo.utils import is_safe_url, use_fake_fxa
| [
11748,
9874,
292,
979,
72,
198,
11748,
28686,
198,
198,
6738,
2779,
2414,
1330,
2956,
7278,
8635,
62,
65,
2414,
268,
8189,
198,
6738,
2956,
297,
571,
13,
29572,
1330,
2956,
11925,
8189,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6... | 3.088235 | 102 |
STRATEGY_NAME = "ultimate2"
IS_SUBMIT = False
EPOCH_NUM = 1
SUBMIT_NAME = "🍪CookEs-" + STRATEGY_NAME + "(Version " + str(EPOCH_NUM) + ") github@ToiletCommander" | [
18601,
6158,
31212,
62,
20608,
796,
366,
44818,
17,
1,
198,
1797,
62,
50,
10526,
36393,
796,
10352,
198,
8905,
46,
3398,
62,
41359,
796,
352,
198,
50,
10526,
36393,
62,
20608,
796,
366,
8582,
235,
103,
28937,
23041,
21215,
1343,
19269... | 2.318841 | 69 |
import numpy as np
# update m robots position: cur_position
# robot waiting at estimating running point
# robot running back to the center
# update position while pickers are picking
#update position of pickers while it is walking
# reset environment randomly
# execute one action
# render current state to... | [
11748,
299,
32152,
355,
45941,
220,
198,
197,
197,
2,
4296,
285,
14193,
2292,
25,
1090,
62,
9150,
198,
197,
197,
2,
9379,
4953,
379,
39539,
2491,
966,
198,
197,
197,
2,
9379,
2491,
736,
284,
262,
3641,
198,
197,
197,
2,
4296,
2292... | 3.92 | 100 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-03-11 00:58
from __future__ import unicode_literals
from django.db import migrations, models
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
940,
319,
2177,
12,
3070,
12,
1157,
3571,
25,
3365,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,... | 2.8 | 55 |
def strategy(history, memory):
"""
If opponent defected, respond with defection. *UNLESS* we defected the turn before.
"""
opponents_last_move = history[1, -1] if history.shape[1] >= 1 else 1
our_second_last_move = history[0, -2] if history.shape[1] >= 2 else 1
choice = 1 if (opponents_last_move... | [
4299,
4811,
7,
23569,
11,
4088,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1002,
6125,
825,
11197,
11,
3031,
351,
825,
3213,
13,
1635,
4944,
48481,
9,
356,
825,
11197,
262,
1210,
878,
13,
198,
220,
220,
220,
37227,
198,
... | 2.784173 | 139 |
'''
Copyright 2017, Fujitsu Network Communications, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in w... | [
7061,
6,
198,
15269,
2177,
11,
32671,
19831,
7311,
14620,
11,
3457,
13,
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,
... | 2.376102 | 1,021 |
from oauth2_provider.contrib.rest_framework import authentication
from django.utils import timezone
| [
6738,
267,
18439,
17,
62,
15234,
1304,
13,
3642,
822,
13,
2118,
62,
30604,
1330,
18239,
198,
6738,
42625,
14208,
13,
26791,
1330,
640,
11340,
628
] | 3.884615 | 26 |
begin() | [
628,
198,
27471,
3419
] | 2.5 | 4 |
from django.core.urlresolvers import reverse
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Permission
from django.core.paginator import Paginator
from go.base import utils
from go.base.tests.helpers import GoDjangoTestCase, DjangoVumiApiHelper
from go.vumitools.api import VumiAp... | [
6738,
42625,
14208,
13,
7295,
13,
6371,
411,
349,
690,
1330,
9575,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
651,
62,
7220,
62,
19849,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
2448,
3411,
198,... | 3.395833 | 144 |
#!/usr/bin/env python3
"""RSA"""
import math
import random
from tkinter import *
from tkinter import ttk
#SPECIFICATION
"""Public key
P and Q are prime number
N = P * Q
M = ( P - 1) * (Q -1)
C = prime number of M, GCD(C,M) = 1
Public key = (N,C)
"""
"""
Private key
We have need U
C * U + M * V = 1
U is ]2,M[
2 < U ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
37811,
49,
4090,
37811,
198,
198,
11748,
10688,
198,
11748,
4738,
198,
6738,
256,
74,
3849,
1330,
1635,
198,
6738,
256,
74,
3849,
1330,
256,
30488,
198,
198,
2,
48451,
30643,
... | 2.470588 | 459 |
from flask import Blueprint
from flask import request
import sys, random, time
sys.path.append(sys.path[0] + '/Helpers')
from Motors_Helper import Motors_Helper
from Virtual_Rubiks_Cube_Helper import Virtual_Rubiks_Cube_Helper
| [
6738,
42903,
1330,
39932,
198,
6738,
42903,
1330,
2581,
198,
11748,
25064,
11,
4738,
11,
640,
198,
198,
17597,
13,
6978,
13,
33295,
7,
17597,
13,
6978,
58,
15,
60,
1343,
31051,
12621,
19276,
11537,
198,
6738,
19292,
62,
47429,
1330,
1... | 3.454545 | 66 |
# Generated by Django 3.2.4 on 2021-06-02 11:11
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
19,
319,
33448,
12,
3312,
12,
2999,
1367,
25,
1157,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14... | 3.04918 | 61 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from glob import glob
from os.path import basename
from os.path import splitext
from setuptools import setup
from setuptools import find_packages
setup(
name="",
use_scm_version=True,
license="",
description="",
author="",
url="",
packages=fi... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
15095,
1330,
15095,
198,
6738,
28686,
13,
6978,
1330,
1615,
12453,
198,
6738,
28686,
13,
6978,
1330,
4328,
578,
7... | 2.580645 | 248 |
import os
import random
import time
import json
from locust import HttpLocust, TaskSet, task
from task_sets.baseTaskSet import baseTaskSet
import task_funcs.keystone_v2_base as keystone_base
import task_funcs.heat_v1_base as heat_base
import task_funcs.heat_v1_utility as heat_util
import task_funcs.nova_v2_utility as... | [
11748,
28686,
198,
11748,
4738,
198,
11748,
640,
198,
11748,
33918,
198,
198,
6738,
1179,
436,
1330,
367,
29281,
33711,
436,
11,
15941,
7248,
11,
4876,
198,
198,
6738,
4876,
62,
28709,
13,
8692,
25714,
7248,
1330,
2779,
25714,
7248,
198... | 2.234848 | 396 |
import cv2
import os
import numpy as np
import pickle
from src.lib import detect_face
github_readme = "https://github.com/mlabarrere/webcam-recognition/blob/master/README.md"
dictionary_people = dict()
dir_name = "data"
subject_folder_names = os.listdir(dir_name)
assert subject_folder_names, "You forgot to place a ... | [
11748,
269,
85,
17,
198,
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2298,
293,
198,
6738,
12351,
13,
8019,
1330,
4886,
62,
2550,
198,
198,
12567,
62,
961,
1326,
796,
366,
5450,
1378,
12567,
13,
785,
14,
4029,
397,
... | 2.954839 | 310 |
# coding: utf-8
# Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department
# Distributed under the terms of "New BSD License", see the LICENSE file.
import os
import unittest
from pyiron.base.project.generic import Project
from pyiron.base.job.wrapper import job_wrappe... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
2,
15069,
357,
66,
8,
5436,
12,
20854,
694,
12,
6310,
270,
315,
277,
25151,
22633,
69,
669,
354,
2150,
402,
2022,
39,
532,
22476,
864,
24310,
8495,
357,
24187,
8,
2732,
198,
2,
4307,
6169,
73... | 3.387755 | 98 |
from django.views.generic import TemplateView
| [
6738,
42625,
14208,
13,
33571,
13,
41357,
1330,
37350,
7680,
628,
628,
628,
198
] | 3.714286 | 14 |
from __future__ import absolute_import
from __future__ import unicode_literals
from dateutil.relativedelta import relativedelta
from custom.icds_reports.const import AGG_DAILY_FEEDING_TABLE
from custom.icds_reports.utils.aggregation_helpers import month_formatter
from custom.icds_reports.utils.aggregation_helpers.dist... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
3128,
22602,
13,
2411,
265,
1572,
12514,
1330,
48993,
1572,
12514,
198,
6738,
2183,
13,
291,
9310,
62,
4892... | 3.5 | 108 |
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import mechanize
import sys
reload(sys)#python的str默认是ascii编码,和unicode编码冲突,这一部分可以载入utf8
sys.setdefaultencoding('utf8')
br = mechanize.Browser()
br.set_handle_equiv(True)
br.set_handle_redirect(True)
br.set_handle_referer(True)
br.set_handle_robots(False)
br.set_handle_gzip(... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
12,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
3962,
1096,
198,
11748,
25064,
198,
260,
2220,
7,
17597,
8,
2,
29412,
21410,
2536,
165,
119,
246,
164,
106... | 2.065527 | 351 |
from django.shortcuts import render
from config.utils import get_active_event
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
198,
6738,
4566,
13,
26791,
1330,
651,
62,
5275,
62,
15596,
628,
628,
628,
198
] | 3.541667 | 24 |
from selenium.webdriver.common.by import By
import time
from random import uniform | [
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11321,
13,
1525,
1330,
2750,
198,
198,
11748,
640,
198,
6738,
4738,
1330,
8187
] | 3.772727 | 22 |
import numpy as np
import math | [
11748,
299,
32152,
355,
45941,
198,
11748,
10688
] | 3.75 | 8 |
#!/usr/bin/env python
# coding: utf-8
"""
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
37811,
198,
49962,
284,
262,
24843,
10442,
5693,
357,
1921,
37,
8,
739,
530,
393,
517,
198,
18920,
5964,
11704,
13,
220,
4091,
262,
28536,
2393,
... | 2.921875 | 896 |
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^(?P<slide_id>\w+)/$', views.slide),
url(r'^(?P<slug>\w+).dzi$', views.dzi),
url(r'^(?P<slug>\w+).dzi.json$', views.properties),
url(r'^(?P<slug>\w+)_files/(?P<level>\d+)/(?P<col>\d+)_(?P<row>\d+)\.(?P<slideformat>jpeg|png)$', ... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
198,
198,
6738,
764,
1330,
5009,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
7,
30,
47,
27,
6649,
485,
62,
312,
29,
59,
86,
10,
20679,
... | 1.765625 | 256 |
# pip3 install gym
# pip3 install neat-python
# for gym stuff:
# apt install xvfb ffmpeg xorg-dev libsdl2-dev swig cmake
# pip3 install gym[box2d]
import multiprocessing
import os
import pickle
import neat
import numpy as np
import bird
import pygame
clock = pygame.time.Clock()
runs_per_net = 2
# Use the NN n... | [
2,
7347,
18,
2721,
11550,
198,
2,
7347,
18,
2721,
15049,
12,
29412,
198,
198,
2,
329,
11550,
3404,
25,
220,
198,
2,
15409,
2721,
2124,
85,
21855,
31246,
43913,
2124,
2398,
12,
7959,
9195,
21282,
75,
17,
12,
7959,
1509,
328,
12067,
... | 2.923611 | 144 |
#!/usr/bin/env python3
# Check if number is prime, return TRUE or FALSE
print(is_prime(5))
print(is_prime(12))
print(is_prime(15))
print(is_prime(21))
print(is_prime(32))
print(is_prime(51))
print(is_prime(101))
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
6822,
611,
1271,
318,
6994,
11,
1441,
26751,
393,
26563,
198,
198,
4798,
7,
271,
62,
35505,
7,
20,
4008,
198,
4798,
7,
271,
62,
35505,
7,
1065,
4008,
198,
4798,
7,
27... | 2.45977 | 87 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.891892 | 37 |
# import dependencies
import os
import sqlite3
import pandas as pd
# read the dataset in to panads
data_url = "https://github.com/matterholt/APP_CRUD-v1/blob/master/iris.csv"
headers = ["sepal_length", "sepal_width", "petal_length", "petal_width", "species"]
data_tabel = pd.read_csv(data_url, header=None, names=header... | [
2,
1330,
20086,
198,
11748,
28686,
198,
11748,
44161,
578,
18,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
2,
1100,
262,
27039,
287,
284,
3425,
5643,
198,
7890,
62,
6371,
796,
366,
5450,
1378,
12567,
13,
785,
14,
47635,
3937,
83... | 2.644279 | 402 |
#Faça um programa que leia uma temperatura em graus celsius e converta
#para fahrenheit.
celsius = float(input('Informe a temperatura em ºC: '))
fahrenheit = (celsius * 9/5) + 32
print('O valor convertido de {}ºC em fahrenheit é {}ºF'.format(celsius, fahrenheit))
| [
2,
50110,
50041,
23781,
1430,
64,
8358,
443,
544,
334,
2611,
4124,
2541,
64,
795,
7933,
385,
269,
32495,
304,
10385,
64,
198,
2,
1845,
64,
277,
993,
34032,
13,
198,
198,
5276,
82,
3754,
796,
12178,
7,
15414,
10786,
818,
687,
68,
2... | 2.598039 | 102 |
import time
import mlbgame
| [
11748,
640,
198,
11748,
285,
23160,
6057,
628,
628
] | 3.333333 | 9 |
""" Module for interacting with Grafana HTTP API
View https://docs.grafana.org/http_api/ for comprehensive
documentation
"""
from typing import Mapping, Optional, Any
from requests import Session, Response
from .generic import update
class BaseApi():
""" Base class for Grafana HTTP API
"""
| [
37811,
19937,
329,
24986,
351,
7037,
69,
2271,
14626,
7824,
198,
7680,
3740,
1378,
31628,
13,
70,
32188,
2271,
13,
2398,
14,
4023,
62,
15042,
14,
329,
9815,
198,
22897,
341,
198,
37811,
198,
6738,
19720,
1330,
337,
5912,
11,
32233,
11... | 3.619048 | 84 |
from pony import *
p = Print ()
filename = "-i hpgl/p2.hpgl"
num = 50
for i in range (1, num):
#[0,1)
scl = float(i)/float(num)
#reset
args = "-r -l "
#select pen
args += "-sp 8 "
#draw border
args += "-b "
#scale
args += "-sr " + str(scl) + " " + str(scl)+ " "
#line type... | [
6738,
26902,
1330,
1635,
198,
198,
79,
796,
12578,
7499,
198,
198,
34345,
796,
27444,
72,
27673,
4743,
14,
79,
17,
13,
24831,
4743,
1,
198,
198,
22510,
796,
2026,
198,
198,
1640,
1312,
287,
2837,
357,
16,
11,
997,
2599,
198,
220,
... | 1.974093 | 386 |
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from typing import Union, cast
| [
37811,
198,
492,
2438,
9800,
3712,
23459,
88,
13704,
367,
2381,
12144,
1279,
912,
4669,
13704,
13,
71,
2381,
12144,
31,
14816,
13,
785,
29,
198,
37811,
198,
198,
6738,
19720,
1330,
4479,
11,
3350,
628
] | 2.916667 | 36 |
#
# PySNMP MIB module CISCO-WPAN-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-WPAN-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:21:30 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... | [
2,
198,
2,
9485,
15571,
7378,
337,
9865,
8265,
36159,
8220,
12,
25527,
1565,
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,
14,
67,
615... | 2.880211 | 5,877 |
"""
Exception raised when a body request can not be decode from JSON and/or it's content doesn't match the minimum
specified values by the app
"""
from rinzler.exceptions import RinzlerHttpException
__author__ = "Rinzler<github.com/feliphebueno>"
class InvalidInputException(RinzlerHttpException):
"""
Invalid... | [
37811,
198,
16922,
4376,
618,
257,
1767,
2581,
460,
407,
307,
36899,
422,
19449,
290,
14,
273,
340,
338,
2695,
1595,
470,
2872,
262,
5288,
198,
23599,
3815,
416,
262,
598,
198,
37811,
198,
6738,
374,
259,
89,
1754,
13,
1069,
11755,
... | 3.225806 | 124 |
from torch.autograd import Function
from .backend import _backend
__all__ = ['ball_query']
def ball_query(centers_coords, points_coords, radius, num_neighbors):
"""
:param centers_coords: coordinates of centers, FloatTensor[B, 3, M]
:param points_coords: coordinates of points, FloatTensor[B,... | [
6738,
28034,
13,
2306,
519,
6335,
1330,
15553,
198,
198,
6738,
764,
1891,
437,
1330,
4808,
1891,
437,
198,
198,
834,
439,
834,
796,
37250,
1894,
62,
22766,
20520,
628,
198,
4299,
2613,
62,
22766,
7,
1087,
364,
62,
1073,
3669,
11,
21... | 2.513699 | 292 |
'''
Created on Aug 1, 2012
@author: Lukasz Kreczko
Email: Lukasz.Kreczko@cern.ch
'''
import FILES
import tools.ROOTFileReader as FileReader
from ROOT import gROOT
import tools.FileUtilities as FileUtils
fileTemplate = 'data/correctionFactors/correctionFactors_%s_%s_JSON.txt'
samples = [
'TTJet',
'PO... | [
7061,
6,
198,
41972,
319,
2447,
352,
11,
2321,
198,
198,
31,
9800,
25,
28102,
292,
89,
509,
8344,
89,
7204,
198,
198,
15333,
25,
28102,
292,
89,
13,
42,
8344,
89,
7204,
31,
30903,
13,
354,
198,
7061,
6,
198,
198,
11748,
34020,
1... | 1.955655 | 2,007 |
# Copyright 2014-2017 Luc Saffre
# License: BSD (see file COPYING for details)
"""See :doc:`/specs/clients`.
.. autosummary::
:toctree:
desktop
"""
from lino.api import ad, _
| [
2,
15069,
1946,
12,
5539,
7598,
311,
2001,
260,
198,
2,
13789,
25,
347,
10305,
357,
3826,
2393,
27975,
45761,
329,
3307,
8,
628,
198,
37811,
6214,
1058,
15390,
25,
63,
14,
4125,
6359,
14,
565,
2334,
44646,
198,
198,
492,
44619,
388,... | 2.439024 | 82 |
#
# PySNMP MIB module AP553-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/AP553-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:22:57 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23... | [
2,
198,
2,
9485,
15571,
7378,
337,
9865,
8265,
3486,
48096,
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,
14,
67,
615,
47562,
19,
14,
... | 2.868472 | 34,312 |
# Usage: python3 main.py --mode dev --model bilstm \
# --load tmp/lstm_epochs=4 --num_examples 100
from collections import defaultdict
import time
import datetime
import biLstm_with_chars # word + char model biLSTM model
import biLstm_char_only # char only biLSTM model
import biLstm
#from biLstm_with_chars import BiLS... | [
2,
29566,
25,
21015,
18,
1388,
13,
9078,
1377,
14171,
1614,
1377,
19849,
275,
11750,
76,
3467,
198,
2,
1377,
2220,
45218,
14,
75,
301,
76,
62,
538,
5374,
82,
28,
19,
1377,
22510,
62,
1069,
12629,
1802,
198,
6738,
17268,
1330,
4277,
... | 2.467853 | 3,764 |
from django.db import migrations, models, reset_queries
import django.db.models.deletion
def code_remap_document_version_pages_ocr_content(apps, schema_editor):
"""
The document_page_id field is pointing to the document file page.
This migration will remap that to point it for the corresponding
docume... | [
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
11,
13259,
62,
421,
10640,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
628,
198,
4299,
2438,
62,
2787,
499,
62,
22897,
62,
9641,
62,
31126,
62,
1696,
... | 2.501155 | 866 |
# Encoding: utf-8
""" Behavior module for loading data from RT linux behavior controller.
"""
from __future__ import print_function
import copy
import matplotlib.pyplot as plt
import logging
import numpy as np
import os
import sys
from prep.Embedding import getExampleVol
from prep.HeaderReader import... | [
2,
14711,
7656,
25,
3384,
69,
12,
23,
201,
198,
37811,
20181,
8265,
329,
11046,
1366,
422,
11923,
32639,
4069,
10444,
13,
201,
198,
201,
198,
37811,
201,
198,
201,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
201,
198,
201,
1... | 2.274598 | 4,228 |
from setuptools import setup
with open('README.md', encoding='utf-8') as f:
README = f.read()
setup(
name='pyminiCLI',
version='0.2.1',
packages=['minicli'],
license='MIT',
author='HDIctus',
tests_require=['pytest'],
author_email='h.t.dictus@gmail.com',
description='quick and easy ... | [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
4480,
1280,
10786,
15675,
11682,
13,
9132,
3256,
21004,
11639,
40477,
12,
23,
11537,
355,
277,
25,
198,
220,
220,
220,
20832,
11682,
796,
277,
13,
961,
3419,
198,
198,
40406,
7,
198,
220,... | 2.473958 | 192 |
# Copyright 2014-2018 ARM Limited
#
# 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 w... | [
2,
220,
220,
220,
15069,
1946,
12,
7908,
20359,
15302,
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,
... | 2.728383 | 4,013 |
import http
from functools import wraps
from flask import json, jsonify
from flask import render_template, flash, redirect, request
from ewi.api import app
from ewi.forms import LoginForm
from common.request import jsoned, send_request
@app.route("/")
@app.route("/index")
@app.route("/login", methods = ["GET", "... | [
11748,
2638,
198,
6738,
1257,
310,
10141,
1330,
27521,
198,
198,
6738,
42903,
1330,
33918,
11,
33918,
1958,
198,
6738,
42903,
1330,
8543,
62,
28243,
11,
7644,
11,
18941,
11,
2581,
198,
198,
6738,
304,
37686,
13,
15042,
1330,
598,
198,
... | 3.131579 | 114 |
# Copyright (C) 2014 Sony Mobile Communications AB.
# All rights, including trade secret rights, reserved.
| [
2,
15069,
357,
34,
8,
1946,
10184,
12173,
14620,
9564,
13,
198,
2,
1439,
2489,
11,
1390,
3292,
3200,
2489,
11,
10395,
13,
198
] | 4.458333 | 24 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Module of execption classes."""
class PygitaException(Exception):
"""Base class for exceptions."""
pass
class ServerConnectionError(PygitaException):
"""Unable to connect with server."""
pass
class BadRequestError(PygitaException):
"""Bad Request... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
26796,
286,
2452,
1159,
6097,
526,
15931,
628,
198,
4871,
9485,
70,
5350,
16922,
7,
16922,
2599,
198,
220,
220,
... | 3.181818 | 319 |
import argparse
import json
import os
import pathlib
import re
import shutil
import subprocess
import unicodedata
from datetime import datetime
from pathlib import Path
from ruamel.yaml import YAML
yaml = YAML()
allowed = {'name', 'description', 'author', 'url', 'documentation', 'version', 'vendor', 'license', 'avata... | [
11748,
1822,
29572,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
3108,
8019,
198,
11748,
302,
198,
11748,
4423,
346,
198,
11748,
850,
14681,
198,
11748,
28000,
9043,
1045,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
3108,
801... | 1.98279 | 1,104 |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (t... | [
2,
220,
220,
220,
220,
220,
220,
49962,
284,
262,
24843,
10442,
5693,
357,
1921,
37,
8,
739,
530,
198,
2,
220,
220,
220,
220,
220,
220,
393,
517,
18920,
5964,
11704,
13,
220,
4091,
262,
28536,
2393,
198,
2,
220,
220,
220,
220,
2... | 3.284457 | 341 |
#=======================================================================
# Copyright (c) 2020, Tahmid Khan
# All rights reserved.
#
# Licensed under the BSD 3-Clause license found in the LICENSE file
#=======================================================================
from flask import Flask
from flask_wtf.csrf... | [
2,
23926,
1421,
18604,
198,
2,
220,
15069,
357,
66,
8,
12131,
11,
26293,
13602,
11356,
198,
2,
220,
1439,
2489,
10395,
13,
198,
2,
198,
2,
220,
49962,
739,
262,
347,
10305,
513,
12,
2601,
682,
5964,
1043,
287,
262,
38559,
24290,
2... | 3.411243 | 338 |
#import logging
import os
import time
DEBUG = False
API_URL_PREFIX = "/anuvaad-etl/document-processor/gv-document-digitization"
HOST = '0.0.0.0'
PORT = 5001
BASE_DIR = 'upload'
#BASE_DIR = '/home/naresh/anuvaad/anuvaad-etl/anuvaad-extractor/document-processor/gv-document-digitization/upload'
download_folder ... | [
2,
11748,
18931,
198,
11748,
28686,
198,
11748,
640,
198,
198,
30531,
796,
10352,
198,
17614,
62,
21886,
62,
47,
31688,
10426,
796,
12813,
42357,
6862,
324,
12,
316,
75,
14,
22897,
12,
41341,
14,
70,
85,
12,
22897,
12,
27003,
1634,
... | 2.236926 | 1,874 |
import seaborn as sns
import matplotlib.pyplot as plt
from matplotlib.ticker import FormatStrFormatter
import sys
import pandas
import re
from cycler import cycler
if __name__ == '__main__':
dfs = {}
files = sys.argv[1:]
for file in files:
df = pandas.read_csv(file, sep='\t').set_index(['file'])
... | [
11748,
384,
397,
1211,
355,
3013,
82,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
6738,
2603,
29487,
8019,
13,
83,
15799,
1330,
18980,
13290,
8479,
1436,
198,
198,
11748,
25064,
198,
11748,
19798,
292,
198,
... | 2.057751 | 658 |
import requests
import datetime as dt
import time
import base64
from Crypto.Cipher import AES
from Crypto.Random import get_random_bytes
from Crypto.Hash import SHA3_384
from Crypto.Util.Padding import pad
import validators
import random
import re
import string
from collections import Counter
from loguru import logger
... | [
11748,
7007,
198,
11748,
4818,
8079,
355,
288,
83,
198,
11748,
640,
198,
11748,
2779,
2414,
198,
6738,
36579,
13,
34,
10803,
1330,
34329,
198,
6738,
36579,
13,
29531,
1330,
651,
62,
25120,
62,
33661,
198,
6738,
36579,
13,
26257,
1330,
... | 3.458333 | 216 |
import time
from gyminput import check_input
from gymdisplay import set_display, set_display_individual
from gymbuzz import beep
# EMOM style
# Tabata style
| [
11748,
640,
198,
198,
6738,
21486,
1084,
1996,
1330,
2198,
62,
15414,
198,
6738,
11550,
13812,
1330,
900,
62,
13812,
11,
900,
62,
13812,
62,
43129,
198,
6738,
21486,
2022,
4715,
1330,
307,
538,
198,
198,
2,
17228,
2662,
3918,
198,
198... | 3.404255 | 47 |
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import os
import subprocess
from textwrap import dedent
from colors import blue
from pants.backend.python.tasks.gather_sources import GatherSources
from pants.backend.python.tasks.python... | [
2,
15069,
1584,
41689,
1628,
20420,
357,
3826,
27342,
9865,
3843,
20673,
13,
9132,
737,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
3826,
38559,
24290,
737,
198,
198,
11748,
28686,
198,
11748,
850,
14681,
198,
... | 3.58427 | 178 |
import requests,json,warnings
from distutils.version import LooseVersion
# This use to ignore sorting *LooseVersion.
# You can remove it if you want.
warnings.filterwarnings('ignore')
| [
11748,
7007,
11,
17752,
11,
40539,
654,
198,
6738,
1233,
26791,
13,
9641,
1330,
6706,
577,
14815,
198,
2,
770,
779,
284,
8856,
29407,
1635,
27654,
577,
14815,
13,
220,
198,
2,
921,
460,
4781,
340,
611,
345,
765,
13,
198,
40539,
654,... | 3.627451 | 51 |
import random as r
get_friendship_meter('sam', 'purnima') | [
11748,
4738,
355,
374,
198,
220,
220,
220,
220,
198,
1136,
62,
6726,
6720,
62,
27231,
10786,
37687,
3256,
705,
79,
700,
8083,
11537
] | 2.583333 | 24 |
import load
from utils import dna_io
from nose.tools import eq_, ok_
from nose import SkipTest
import nose, functools
import os
import numpy as np
### Basset DNase data fixtures
path = os.path.expanduser("~/projects/SeqDemote/data/DNase/encode_roadmap_all.h5")
chunk_size = 4096
batch_size = 128
batch_train_shape = (... | [
11748,
3440,
198,
6738,
3384,
4487,
1330,
288,
2616,
62,
952,
198,
198,
6738,
9686,
13,
31391,
1330,
37430,
62,
11,
12876,
62,
198,
6738,
9686,
1330,
32214,
14402,
198,
11748,
9686,
11,
1257,
310,
10141,
198,
11748,
28686,
198,
11748,
... | 2.338789 | 4,277 |
from django.contrib import admin
from . import models
# Register your models here.
admin.site.register(models.Group)
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
201,
198,
6738,
764,
1330,
4981,
201,
198,
201,
198,
2,
17296,
534,
4981,
994,
13,
201,
198,
201,
198,
28482,
13,
15654,
13,
30238,
7,
27530,
13,
13247,
8,
201,
198
] | 3.125 | 40 |
import sys
import spotipy
import spotipy.util as util
import time
import keys
| [
11748,
25064,
198,
11748,
4136,
541,
88,
198,
11748,
4136,
541,
88,
13,
22602,
355,
7736,
198,
11748,
640,
198,
11748,
8251,
628,
628
] | 3.375 | 24 |
import sublime
import os
import shutil
import tempfile
from .. import DeferrableTestCase
class TempDirectoryTestCase(DeferrableTestCase):
"""Create a temp directory and open it."""
_temp_dir = None
@classmethod
def setUpClass(cls):
"""Create a temp directory for testing."""
cls._temp... | [
11748,
41674,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
20218,
7753,
198,
6738,
11485,
1330,
2896,
8056,
540,
14402,
20448,
628,
198,
4871,
24189,
43055,
14402,
20448,
7,
7469,
8056,
540,
14402,
20448,
2599,
198,
220,
220,
220... | 2.657233 | 318 |
import textwrap
import requests
| [
11748,
2420,
37150,
198,
11748,
7007,
628,
198
] | 4.25 | 8 |
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/11_performance.ipynb (unless otherwise specified).
__all__ = ['TBPerformace', 'actual_vs_predict', 'ReceiverOperatingCharacteristic', 'PrecisionRecall']
# Cell
import tabint
from .utils import *
from .dataset import *
from .visual import *
from .learner import *
from sk... | [
2,
47044,
7730,
1677,
1137,
11617,
0,
8410,
5626,
48483,
0,
9220,
284,
4370,
25,
299,
1443,
14,
1157,
62,
26585,
13,
541,
2047,
65,
357,
25252,
4306,
7368,
737,
198,
198,
834,
439,
834,
796,
37250,
22737,
5990,
687,
558,
3256,
705,
... | 3.092308 | 130 |
from unittest import TestCase
from games.tic_tac_toe import TicTacToeGameSpec
from techniques.min_max import min_max_alpha_beta, min_max
| [
6738,
555,
715,
395,
1330,
6208,
20448,
198,
198,
6738,
1830,
13,
13370,
62,
83,
330,
62,
44579,
1330,
309,
291,
51,
330,
2514,
68,
8777,
22882,
198,
6738,
7605,
13,
1084,
62,
9806,
1330,
949,
62,
9806,
62,
26591,
62,
31361,
11,
9... | 2.957447 | 47 |
import struct
import socket
import sys
if len(sys.argv) != 2:
print("Usage: %s IP" % (sys.argv[0]))
exit()
smb_payload ="000000b2fe534d4240000100000000000000210010000000000000000000000000000000fffe00000000000000000000000000000000000000000000000000000000000024000500010000007f000000aa9952d87063ea118a76005056b886b07... | [
11748,
2878,
198,
11748,
17802,
198,
11748,
25064,
198,
198,
361,
18896,
7,
17597,
13,
853,
85,
8,
14512,
362,
25,
198,
197,
4798,
7203,
28350,
25,
4064,
82,
6101,
1,
4064,
357,
17597,
13,
853,
85,
58,
15,
60,
4008,
198,
197,
3702... | 2.364303 | 409 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'VisualizationWindow.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
5178,
7822,
7560,
422,
3555,
334,
72,
2393,
705,
36259,
1634,
27703,
13,
9019,
6,
198,
2,
198,
2,
15622,
416,
25,
9485,
48,
83,
20,
12454,
2438,
17301,
642,
... | 3.117117 | 111 |
import os
from app import create_app
from config.production import ProductionConfig
if __name__ == '__main__':
app = create_app(ProductionConfig)
if 'SECRET_KEY' not in os.environ:
print('[WARN] SECRET KEY is not set in the environment variable !!')
app.run(**app.config['RUN_SETTING'])
| [
11748,
28686,
198,
198,
6738,
598,
1330,
2251,
62,
1324,
198,
6738,
4566,
13,
25493,
1330,
19174,
16934,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
598,
796,
2251,
62,
1324,
7,
35027,
16934... | 2.915888 | 107 |
# =============================================================================
# IMPORTS
# =============================================================================
import torch
import espaloma as esp
# =============================================================================
# MODULE CLASSES
# ============... | [
2,
38093,
25609,
198,
2,
30023,
33002,
198,
2,
38093,
25609,
198,
11748,
28034,
198,
198,
11748,
15024,
282,
6086,
355,
15024,
628,
198,
2,
38093,
25609,
198,
2,
33893,
42715,
1546,
198,
2,
38093,
25609,
198,
4871,
2365,
793,
88,
2720... | 1.589037 | 6,458 |
import pytest
from pytest import raises
from vyper import compiler
from vyper.exceptions import TypeMismatch
fail_list = [
"""
@public
def foo():
y: int128 = min(7, 0x1234567890123456789012345678901234567890)
"""
]
@pytest.mark.parametrize("bad_code", fail_list)
| [
11748,
12972,
9288,
198,
6738,
12972,
9288,
1330,
12073,
198,
198,
6738,
410,
88,
525,
1330,
17050,
198,
6738,
410,
88,
525,
13,
1069,
11755,
1330,
5994,
44,
1042,
963,
198,
198,
32165,
62,
4868,
796,
685,
198,
220,
220,
220,
37227,
... | 2.469027 | 113 |
"""
Super-resolution of CelebA using Generative Adversarial Networks.
The dataset can be downloaded from: https://www.dropbox.com/sh/8oqt9vytwxb3s4r/AADIKlz8PR9zr6Y20qbkunrba/Img/img_align_celeba.zip?dl=0
(if not available there see if options are listed at http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html)
Instrustion ... | [
37811,
198,
12442,
12,
29268,
286,
35688,
32,
1262,
2980,
876,
1215,
690,
36098,
27862,
13,
198,
464,
27039,
460,
307,
15680,
422,
25,
3740,
1378,
2503,
13,
14781,
3524,
13,
785,
14,
1477,
14,
23,
78,
39568,
24,
7670,
4246,
30894,
1... | 2.447483 | 3,913 |
import click
from . import alice_images_api as api
@click.group()
@click.option('--skill-id', prompt='Skill id', required=True, help='Alice skill id')
@click.option('--oauth-token', prompt='OAuth token', required=True, help='Account OAuth token')
@click.pass_context
@cli.command('upload')
@click.argument('image_pa... | [
11748,
3904,
198,
198,
6738,
764,
1330,
435,
501,
62,
17566,
62,
15042,
355,
40391,
628,
198,
31,
12976,
13,
8094,
3419,
198,
31,
12976,
13,
18076,
10786,
438,
42401,
12,
312,
3256,
6152,
11639,
35040,
4686,
3256,
2672,
28,
17821,
11,... | 2.902439 | 205 |
from FreeTAKServer.model.FTSModel.fts_protocol_object import FTSProtocolObject
from FreeTAKServer.model.FTSModel.ChecklistColumns import ChecklistColumns
from FreeTAKServer.model.FTSModel.ChecklistDetails import ChecklistDetails
from FreeTAKServer.model.FTSModel.ChecklistTasks import ChecklistTasks | [
6738,
3232,
5603,
42,
10697,
13,
19849,
13,
37,
4694,
17633,
13,
35594,
62,
11235,
4668,
62,
15252,
1330,
376,
4694,
19703,
4668,
10267,
198,
6738,
3232,
5603,
42,
10697,
13,
19849,
13,
37,
4694,
17633,
13,
9787,
4868,
39470,
82,
1330... | 3.397727 | 88 |
#! /usr/bin/env python
# Picon Plus Fireled Test
# Flashes Fireleds attached to Fireled Output
# Press Ctrl-C to stop
from __future__ import print_function
from piconplus import PiconPlus
from time import sleep
pp = PiconPlus(0x24)
rev = pp.getRevision()
print ('Board:', rev[1], " Revision:", rev[0])
for i in rang... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
350,
4749,
8227,
3764,
992,
6208,
198,
2,
1610,
7465,
3764,
992,
82,
7223,
284,
3764,
992,
25235,
198,
2,
4332,
19212,
12,
34,
284,
2245,
198,
198,
6738,
11593,
37443,
834,
13... | 2.068571 | 350 |
while True:
try:
x = int(input("Please enter a number: "))
break
except ValueError:
print("Oops! That was no valid number. Try again...")
try:
arquivo = open("arquivo.txt", "r")
except OSError:
# será executado caso haja uma exceção
print("arquivo inexistente")
else:
... | [
4514,
6407,
25,
198,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
796,
493,
7,
15414,
7203,
5492,
3802,
257,
1271,
25,
366,
4008,
198,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
220,
2845,
... | 2.39823 | 226 |
# Description: The re.findall Function
import re
"""
Note
1. The syntax: re.finditer(pattern, string, flags=0)
2. This function returns an iterator yielding MatchObject instances over all non-overlapping matches for the RE pattern
in the string. The string is scanned left-to-right, and matches are returned in the ... | [
2,
12489,
25,
383,
302,
13,
19796,
439,
15553,
198,
198,
11748,
302,
198,
198,
37811,
198,
6425,
198,
16,
13,
383,
15582,
25,
302,
13,
19796,
2676,
7,
33279,
11,
4731,
11,
9701,
28,
15,
8,
198,
17,
13,
770,
2163,
5860,
281,
4131... | 3.261603 | 237 |
#!/usr/bin/python
#-*- encoding:utf-8 -*-
#title:workyi_Talent system SQL injection
#author: xx00
#ref: http://www.wooyun.org/bugs/wooyun-2010-065810
if __name__ == '__main__':
from dummy import *
audit(assign('kxmail', 'http://mail.cdzk.org:8888/')[1]) | [
2,
48443,
14629,
14,
8800,
14,
29412,
201,
198,
2,
12,
9,
12,
21004,
25,
40477,
12,
23,
532,
9,
12,
201,
198,
2,
7839,
25,
1818,
48111,
62,
31466,
298,
1080,
16363,
16954,
201,
198,
2,
9800,
25,
31383,
405,
201,
198,
2,
5420,
... | 2.138462 | 130 |
import logging
from emarkdown.System.Tool import File
from emarkdown.Controller.ConverterController import ConverterController
from emarkdown.Controller.ExtractController import ExtractController
from emarkdown.System.Mode import Mode
from emarkdown.www.dark import Dark_HTML
| [
11748,
18931,
198,
198,
6738,
795,
668,
2902,
13,
11964,
13,
25391,
1330,
9220,
198,
6738,
795,
668,
2902,
13,
22130,
13,
3103,
332,
353,
22130,
1330,
35602,
353,
22130,
198,
6738,
795,
668,
2902,
13,
22130,
13,
11627,
974,
22130,
133... | 4.028986 | 69 |
#!/usr/bin/env python3
"""Crete mafft combination commands from directory with alignments."""
import os, re, sys, argparse, itertools, glob
sys.path.append(os.path.dirname(os.path.abspath(__name__)))
def read_parse_doc_file(prosite_path):
'''
Reads the doc file from PROSITE and creates a dictionary of keys PDCs and ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
34,
8374,
285,
2001,
83,
6087,
9729,
422,
8619,
351,
10548,
902,
526,
15931,
198,
11748,
28686,
11,
302,
11,
25064,
11,
1822,
29572,
11,
340,
861,
10141,
11,
15095,
198,
1... | 2.428323 | 2,881 |
#!/usr/bin/env python
#
# 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... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2... | 2.156989 | 1,860 |
pessoa = dict()
numero_pessoas = abaixo_peso = normal = sobrepeso = obesidade = obesidade_grave = 0
while True:
pessoa['nome'] = str(input('Digite o nome:')).strip().upper()
numero_pessoas += 1
pessoa['peso'] = float(input('Digite o peso:'))
pessoa['altura'] = float(input('Digite a altura'))
pessoa[... | [
79,
408,
12162,
796,
8633,
3419,
198,
22510,
3529,
62,
79,
408,
78,
292,
796,
450,
64,
844,
78,
62,
12272,
78,
796,
3487,
796,
523,
4679,
12272,
78,
796,
909,
274,
312,
671,
796,
909,
274,
312,
671,
62,
41711,
796,
657,
198,
451... | 1.975117 | 643 |
import httpx
import json
import asyncio
| [
11748,
2638,
87,
198,
11748,
33918,
198,
11748,
30351,
952,
198
] | 3.636364 | 11 |
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.11.4
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# <img align="right" src="images/tf.png" width="128"/>... | [
2,
11420,
198,
2,
474,
929,
88,
353,
25,
198,
2,
220,
220,
474,
929,
88,
5239,
25,
198,
2,
220,
220,
220,
220,
2420,
62,
15603,
341,
25,
198,
2,
220,
220,
220,
220,
220,
220,
7552,
25,
764,
9078,
198,
2,
220,
220,
220,
220,
... | 3.078612 | 3,918 |