content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
#!/usr/bin/env python
# Programmer(s): Sopan Patil.
""" MAIN PROGRAM FILE
Run this file to optimise the model parameters of the spatially distributed
version of EXP-HYDRO model using Particle Swarm Optimisation (PSO) algorithm.
Type 1 Model:
- This type of distributed model is pixel based (i.e., all sub-components
h... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
6118,
647,
7,
82,
2599,
35643,
272,
3208,
346,
13,
198,
198,
37811,
8779,
1268,
46805,
45811,
198,
10987,
428,
2393,
284,
6436,
786,
262,
2746,
10007,
286,
262,
15246,
1927,
... | 3.365135 | 849 |
import os
from multi_input_multi_output.models import MultiNet
from shared_weights.helpers import config, utils
from shared_weights.helpers.siamese_network import create_encoder
from data.data_tf import fat_dataset
import tensorflow as tf
from tensorflow import keras
# ----------------------
""" Data augmentatio... | [
11748,
28686,
198,
198,
6738,
5021,
62,
15414,
62,
41684,
62,
22915,
13,
27530,
1330,
15237,
7934,
198,
198,
6738,
4888,
62,
43775,
13,
16794,
364,
1330,
4566,
11,
3384,
4487,
198,
6738,
4888,
62,
43775,
13,
16794,
364,
13,
13396,
104... | 2.182627 | 3,258 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import logging
from lookyloo.lookyloo import Indexing, Lookyloo
logging.basicConfig(format='%(asctime)s %(name)s %(levelname)s:%(message)s',
level=logging.INFO)
if __name__ == '__main__':
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
1822,
29572,
198,
11748,
18931,
198,
198,
6738,
804,
2645,
2238,
13,
5460,
2645,
2238,
1330,
12901,
278... | 2.215385 | 130 |
import tensorflow as tf
sess=tf.Session()
#First let's load meta graph and restore weights
saver = tf.train.import_meta_graph('/Users/lipingzhang/Downloads/model/my_tf_model-1000.meta')
saver.restore(sess,tf.train.latest_checkpoint('/Users/lipingzhang/Downloads/model/'))
# Now, let's access and create placeholders v... | [
11748,
11192,
273,
11125,
355,
48700,
198,
198,
82,
408,
28,
27110,
13,
36044,
3419,
198,
2,
5962,
1309,
338,
3440,
13634,
4823,
290,
11169,
19590,
198,
82,
8770,
796,
48700,
13,
27432,
13,
11748,
62,
28961,
62,
34960,
10786,
14,
1449... | 2.542955 | 291 |
from random import randrange
if __name__ == "__main__":
main() | [
6738,
4738,
1330,
43720,
9521,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
197,
12417,
3419
] | 3.095238 | 21 |
# ARRAYS-DS HACKERANK SOLUTION:
# creating a function to reverse the array.
# receiving input.
arr_count = int(input().strip())
arr = list(map(int, input().rstrip().split()))
# printing the output.
print(reverseArray(arr)) | [
2,
5923,
3861,
16309,
12,
5258,
367,
8120,
1137,
15154,
36817,
35354,
25,
201,
198,
201,
198,
2,
4441,
257,
2163,
284,
9575,
262,
7177,
13,
201,
198,
201,
198,
2,
6464,
5128,
13,
201,
198,
3258,
62,
9127,
796,
493,
7,
15414,
22446... | 2.853659 | 82 |
from django.contrib import admin
from django.contrib.admin import SimpleListFilter
from django.db.models import TextChoices
from django.utils.html import format_html
from . import models
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
28482,
1330,
17427,
8053,
22417,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
1330,
8255,
22164,
1063,
198,
6738,
42625,
14208,
13,
26791,
13,
... | 3.603774 | 53 |
/home/runner/.cache/pip/pool/34/e0/75/b2dceb8ef40c652edb20f4e059370015eddc8cdbde039f92ced519a83d | [
14,
11195,
14,
16737,
11757,
23870,
14,
79,
541,
14,
7742,
14,
2682,
14,
68,
15,
14,
2425,
14,
65,
17,
67,
344,
65,
23,
891,
1821,
66,
43193,
276,
65,
1238,
69,
19,
68,
46712,
2718,
405,
1314,
6048,
66,
23,
66,
9945,
2934,
15,... | 1.777778 | 54 |
#https://qiita.com/stkdev/items/a44976fb81ae90a66381
#import imaplib, re, email, six, dateutil.parser
import imaplib, re, email
email_default_encoding = 'iso-2022-jp'
if __name__ == '__main__':
main()
| [
2,
5450,
1378,
40603,
5350,
13,
785,
14,
301,
74,
7959,
14,
23814,
14,
64,
31911,
4304,
21855,
6659,
3609,
3829,
64,
2791,
36626,
198,
2,
11748,
545,
64,
489,
571,
11,
302,
11,
3053,
11,
2237,
11,
3128,
22602,
13,
48610,
198,
1174... | 2.37931 | 87 |
import binascii
import datetime
import hashlib
import mimetypes
import os
import re
import struct
import subprocess
import sys
import time
import urllib
import csv
from Queue import Queue
# 8 byte unique ID generator give a path.
# - first five bytes are first five from sha1 of path name
# - last 3 are the first t... | [
11748,
9874,
292,
979,
72,
198,
11748,
4818,
8079,
198,
11748,
12234,
8019,
198,
11748,
17007,
2963,
12272,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
2878,
198,
11748,
850,
14681,
198,
11748,
25064,
198,
11748,
640,
198,
11748,
2956... | 3.055215 | 163 |
import csv_loader
import moves_names
| [
11748,
269,
21370,
62,
29356,
198,
11748,
6100,
62,
14933,
198
] | 3.363636 | 11 |
import datetime
import decimal
from unittest.mock import patch
import pytest
from click.testing import CliRunner
from psycopg2 import sql
from manage import SUMMARIES, cli, construct_where_fragment
from tests import assert_bad_argument, assert_log_records, assert_log_running, fixture, noop
command = 'add'
TABLES = ... | [
11748,
4818,
8079,
198,
11748,
32465,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
8529,
198,
198,
11748,
12972,
9288,
198,
6738,
3904,
13,
33407,
1330,
1012,
72,
49493,
198,
6738,
17331,
22163,
70,
17,
1330,
44161,
198,
198,
6738,
66... | 2.331507 | 365 |
import os
from docx import Document
from docx.shared import Inches
from docx import section
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.shared import Pt
from docx.shared import Cm
from docx.shared import RGBColor
import docx
| [
11748,
28686,
201,
198,
6738,
2205,
87,
1330,
16854,
201,
198,
6738,
2205,
87,
13,
28710,
1330,
554,
2052,
201,
198,
6738,
2205,
87,
1330,
2665,
201,
198,
6738,
2205,
87,
13,
44709,
13,
5239,
1330,
48963,
62,
1847,
16284,
62,
27082,
... | 3.024691 | 81 |
# Copying files
# Ask user for a list of 3 friends.
# for each friend, we'll tell user whether they're nearby.
# for each nearby friend, we'll save their name to `nearby_friends.txt`.
friends = input('Enter three friends name(separated by commas): ').split(',')
people = open('people.txt', 'r')
people_nearby = [line.s... | [
2,
6955,
1112,
3696,
198,
198,
2,
16981,
2836,
329,
257,
1351,
286,
513,
2460,
13,
198,
2,
329,
1123,
1545,
11,
356,
1183,
1560,
2836,
1771,
484,
821,
6716,
13,
198,
2,
329,
1123,
6716,
1545,
11,
356,
1183,
3613,
511,
1438,
284,
... | 3.007874 | 254 |
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
n, m, x = map(int, input().split())
ca = [0] * n
ca_sum = [0] * (m+1)
for i in range(n):
ca[i] = list(map(int, input().split()))
for j in range(m+1):
ca_sum[j] += ca[i][j]
ans = 10 ** 10
for i in range(2 ** n):
tmp = 0
tmp_ca... | [
11748,
25064,
198,
15414,
796,
25064,
13,
19282,
259,
13,
961,
1370,
198,
17597,
13,
2617,
8344,
24197,
32374,
7,
940,
12429,
767,
8,
198,
198,
77,
11,
285,
11,
2124,
796,
3975,
7,
600,
11,
5128,
22446,
35312,
28955,
198,
6888,
796,... | 1.865633 | 387 |
from django import forms
from .models import Passwords
| [
6738,
42625,
14208,
1330,
5107,
198,
6738,
764,
27530,
1330,
6251,
10879,
628
] | 4.307692 | 13 |
NAME = "Azure BLOB storage"
TYPE = "remote"
FILE = "AzureBlob.yaml"
VARS = [
"AZURE_BLOB_STORAGE_ACCOUNT",
"AZURE_BLOB_STORAGE_ACCOUNT_KEY",
"AZURE_BLOB_CONTAINER_NAME",
]
| [
20608,
796,
366,
26903,
495,
9878,
9864,
6143,
1,
198,
25216,
796,
366,
47960,
1,
198,
25664,
796,
366,
26903,
495,
3629,
672,
13,
88,
43695,
1,
198,
53,
27415,
796,
685,
198,
220,
220,
220,
366,
22778,
11335,
62,
9148,
9864,
62,
... | 2.044444 | 90 |
import unittest
from application import app
from application.helpers import(
requires_authentication,
requires_feature,
signed_in,
group_by_group,
signed_in_no_access,
no_access,
has_user_with_token,
view_helpers,
user_has_feature,
)
from hamcrest import assert_that, equal_to, is_
fr... | [
11748,
555,
715,
395,
198,
6738,
3586,
1330,
598,
198,
6738,
3586,
13,
16794,
364,
1330,
7,
198,
220,
220,
220,
4433,
62,
41299,
3299,
11,
198,
220,
220,
220,
4433,
62,
30053,
11,
198,
220,
220,
220,
4488,
62,
259,
11,
198,
220,
... | 1.869369 | 1,110 |
from random import *
#STRATEGY SUMMARY: DON'T DUCK IF THE OPPONENT HAS NO SNOWBALLS. OTHERWISE, PICK RANDOMLY.
| [
6738,
4738,
1330,
1635,
198,
198,
2,
18601,
6158,
31212,
35683,
44,
13153,
25,
220,
23917,
6,
51,
360,
16696,
16876,
3336,
440,
10246,
1340,
3525,
33930,
8005,
11346,
3913,
33,
1847,
6561,
13,
25401,
54,
24352,
11,
350,
11860,
46920,
... | 2.352941 | 51 |
from rest_framework import viewsets
from customers.models import Customer
from customers.serializers.customers import CustomerSerializer
# Create your views here.
| [
6738,
1334,
62,
30604,
1330,
5009,
1039,
198,
198,
6738,
4297,
13,
27530,
1330,
22092,
198,
6738,
4297,
13,
46911,
11341,
13,
23144,
364,
1330,
22092,
32634,
7509,
198,
198,
2,
13610,
534,
5009,
994,
13,
628
] | 4.486486 | 37 |
"""
Expect action directives
"""
from __future__ import (
absolute_import,
unicode_literals,
)
from pyparsing import (
CaselessLiteral,
LineEnd,
Literal,
Optional,
Suppress,
)
from pysoa.test.plan.grammar.assertions import (
assert_not_expected,
assert_not_present,
assert_subse... | [
37811,
198,
3109,
806,
2223,
34819,
198,
37811,
198,
6738,
11593,
37443,
834,
1330,
357,
198,
220,
220,
220,
4112,
62,
11748,
11,
198,
220,
220,
220,
28000,
1098,
62,
17201,
874,
11,
198,
8,
198,
198,
6738,
279,
4464,
945,
278,
1330... | 2.387722 | 619 |
'''
Script to add uuid to existing records
Also shifts who_code values to original_who_code
'''
import uuid
import pandas as pd
manually_cleaned = pd.read_csv('data/cleansed/mistress_latest_old.csv', low_memory=False)
manually_cleaned['uuid'] = [str(uuid.uuid4()) for x in manually_cleaned.iloc[:, 1]]
manually_cle... | [
7061,
6,
198,
198,
7391,
284,
751,
334,
27112,
284,
4683,
4406,
198,
198,
7583,
15381,
508,
62,
8189,
3815,
284,
2656,
62,
8727,
62,
8189,
198,
198,
7061,
6,
198,
11748,
334,
27112,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
... | 2.718563 | 167 |
"""Tests for `prettyqt` package."""
import pathlib
import pytest
from prettyqt import core, qml
from prettyqt.utils import InvalidParamError
# def test_jsvalue():
# val = qml.JSValue(2)
# val["test"] = 1
# assert val["test"].toInt() == 1
# assert "test" in val
# assert val.get_value() == 2
... | [
37811,
51,
3558,
329,
4600,
37784,
39568,
63,
5301,
526,
15931,
198,
198,
11748,
3108,
8019,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
2495,
39568,
1330,
4755,
11,
10662,
4029,
198,
6738,
2495,
39568,
13,
26791,
1330,
17665,
22973,
... | 2.568 | 125 |
# Simple test for NeoPixels on Raspberry Pi
import time
import board
import neopixel
# Choose an open pin connected to the Data In of the NeoPixel strip, i.e. board.D18
# NeoPixels must be connected to D10, D12, D18 or D21 to work.
pixel_pin = board.D18
# The number of NeoPixels
num_pixels = 30
# The order of the p... | [
2,
17427,
1332,
329,
21227,
47,
14810,
319,
24244,
13993,
198,
11748,
640,
198,
11748,
3096,
198,
11748,
497,
404,
7168,
628,
198,
2,
17489,
281,
1280,
6757,
5884,
284,
262,
6060,
554,
286,
262,
21227,
40809,
10283,
11,
1312,
13,
68,
... | 2.163823 | 586 |
from transitions.extensions import GraphMachine
| [
6738,
27188,
13,
2302,
5736,
1330,
29681,
37573,
628
] | 5.444444 | 9 |
# Copyright (c) 2018 Workonline Communications (Pty) Ltd. All rights reserved.
#
# The contents of this file are licensed under the Apache License version 2.0
# (the "License"); you may not use this file except in compliance with the
# License.
#
# Unless required by applicable law or agreed to in writing, software
# d... | [
2,
15069,
357,
66,
8,
2864,
5521,
25119,
14620,
357,
47,
774,
8,
12052,
13,
1439,
2489,
10395,
13,
198,
2,
198,
2,
383,
10154,
286,
428,
2393,
389,
11971,
739,
262,
24843,
13789,
2196,
362,
13,
15,
198,
2,
357,
1169,
366,
34156,
... | 3.699552 | 223 |
#!/usr/bin/env python
# vim:ts=4:sts=4:sw=4:et
#
# Author: Hari Sekhon
# Date: 2015-11-14 12:21:54 +0000 (Sat, 14 Nov 2015)
#
# https://github.com/HariSekhon/pylib
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn
# and optionally sen... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
220,
43907,
25,
912,
28,
19,
25,
6448,
28,
19,
25,
2032,
28,
19,
25,
316,
198,
2,
198,
2,
220,
6434,
25,
2113,
72,
37558,
24130,
198,
2,
220,
7536,
25,
1853,
12,
1157,
12,
... | 2.824691 | 405 |
import unittest
import pickle
from array import array
import complete_tdf
from floodberry.floodberry_ed25519 import GE25519
from tdf_strucs import TDFMatrix, TDFError
from complete_tdf import CTDFCodec as Codec, CTDFCipherText as CipherText
from utils import int_lst_to_bitarr
TEST_DIR = "legacy/tests/"
PACK_TEST_KEY... | [
11748,
555,
715,
395,
198,
11748,
2298,
293,
198,
6738,
7177,
1330,
7177,
198,
11748,
1844,
62,
83,
7568,
198,
198,
6738,
6947,
8396,
13,
2704,
702,
8396,
62,
276,
13381,
1129,
1330,
22319,
13381,
1129,
198,
6738,
256,
7568,
62,
19554... | 2.269231 | 312 |
import os
from celery import Celery
from django.conf import settings
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'wherethefuck.settings')
# create and run celery workers.
app = Celery(broker=settings.CELERY_BROKER_URL)
app.config_from_object('djan... | [
11748,
28686,
198,
6738,
18725,
1924,
1330,
15248,
1924,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
198,
2,
900,
262,
4277,
37770,
6460,
8265,
329,
262,
705,
7015,
88,
6,
1430,
13,
198,
418,
13,
268,
2268,
13,
2617,
12286,
... | 2.912162 | 148 |
from MLSR.data import DataSet
from MLSR.plot import *
x = DataSet('data/rand_select_400_avg.csv')
x.generate_feature()
y = DataSet('data/not_selected_avg.csv')
y.generate_feature()
z = DataSet.static_merge(x, y)
#plot_tsne(z, 'log/tsne.png')
z = z.convert_to_ssl()
z0, z1 = z.split_by_weak_label()
plot_tsne_ssl(z0, 'lo... | [
6738,
13981,
49,
13,
7890,
1330,
6060,
7248,
198,
6738,
13981,
49,
13,
29487,
1330,
1635,
198,
198,
87,
796,
6060,
7248,
10786,
7890,
14,
25192,
62,
19738,
62,
7029,
62,
615,
70,
13,
40664,
11537,
198,
87,
13,
8612,
378,
62,
30053,
... | 2.135135 | 185 |
import numpy as np
import scipy.io as sio
import os, glob, sys
import h5py_cache as h5c
sys.path.append('/home/yzhang/workspaces/smpl-env-gen-3d-internal')
sys.path.append('/home/yzhang/workspaces/smpl-env-gen-3d-internal/source')
from batch_gen_hdf5 import BatchGeneratorWithSceneMeshMatfile
import torch
'''
In t... | [
11748,
299,
32152,
355,
45941,
198,
11748,
629,
541,
88,
13,
952,
355,
264,
952,
198,
11748,
28686,
11,
15095,
11,
25064,
198,
11748,
289,
20,
9078,
62,
23870,
355,
289,
20,
66,
198,
198,
17597,
13,
6978,
13,
33295,
10786,
14,
11195... | 1.978795 | 3,867 |
from django.db import models
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198
] | 3.625 | 8 |
# -*- coding: utf-8 -*-
from fontbro import Font
from tests import AbstractTestCase
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
10369,
7957,
1330,
24060,
198,
198,
6738,
5254,
1330,
27741,
14402,
20448,
628
] | 3 | 29 |
from amara.bindery import html
from amara.lib import U
import urllib
import urlparse
import time
'''
This script extract data from html pages and write the data into a .json file ready
to create the mediawiki / wikieducator pages
'''
BASE = 'http://academics.smcvt.edu/dmccabe/teaching/Community/'
def parse_notes_... | [
6738,
716,
3301,
13,
21653,
1924,
1330,
27711,
198,
6738,
716,
3301,
13,
8019,
1330,
471,
198,
11748,
2956,
297,
571,
198,
11748,
19016,
29572,
198,
11748,
640,
198,
198,
7061,
6,
198,
1212,
4226,
7925,
1366,
422,
27711,
5468,
290,
35... | 2.323765 | 1,498 |
from scraper import *
s = Scraper(start=138996, end=140777, max_iter=30, scraper_instance=78)
s.scrape_letterboxd() | [
6738,
19320,
525,
1330,
1635,
220,
198,
82,
796,
1446,
38545,
7,
9688,
28,
20107,
38565,
11,
886,
28,
1415,
2998,
3324,
11,
3509,
62,
2676,
28,
1270,
11,
19320,
525,
62,
39098,
28,
3695,
8,
220,
198,
82,
13,
1416,
13484,
62,
9291,... | 2.489362 | 47 |
from django.core.exceptions import PermissionDenied
from django.test import TestCase
from backend.models import UserModel, AwsEnvironmentModel
from unittest import mock
# mock
with mock.patch('backend.models.OperationLogModel.operation_log', lambda executor_index=None, target_method=None, target_arg_index_list=Non... | [
6738,
42625,
14208,
13,
7295,
13,
1069,
11755,
1330,
2448,
3411,
21306,
798,
201,
198,
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
201,
198,
6738,
30203,
13,
27530,
1330,
11787,
17633,
11,
5851,
82,
31441,
17633,
201,
198,
6738,
55... | 2.04252 | 635 |
a=raw_input()
b=raw_input()
i=0
index=0
co=0
if a[0]==b[0]:
co+=1
i+=1
while i<len(a):
index1=check(b,index+1,a[i])
print a[i],index1
if index1!=-1:
index=index1
co+=1
#print index
i+=1
print co
| [
64,
28,
1831,
62,
15414,
3419,
198,
65,
28,
1831,
62,
15414,
3419,
198,
72,
28,
15,
198,
9630,
28,
15,
198,
1073,
28,
15,
198,
361,
257,
58,
15,
60,
855,
65,
58,
15,
5974,
198,
220,
220,
220,
763,
47932,
16,
198,
72,
47932,
... | 1.632258 | 155 |
import os
from pathlib import Path
from shutil import rmtree
# change your parent dir accordingly
try:
directory = "TempDir"
parent_dir = "E:/GitHub/1) Git_Tutorials_Repo_Projects/core-python/Core_Python/"
td1, td2 = "TempA", "TempA"
path = os.path.join(parent_dir, directory)
temp_mul_dirs = os.path... | [
11748,
28686,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
4423,
346,
1330,
374,
16762,
631,
198,
2,
1487,
534,
2560,
26672,
16062,
198,
28311,
25,
198,
220,
220,
220,
8619,
796,
366,
30782,
35277,
1,
198,
220,
220,
220,
2560,
62,
... | 2.379439 | 535 |
from __future__ import absolute_import, division, print_function, unicode_literals
from echomesh.color import WheelColor
from echomesh.util.TestCase import TestCase
EXPECTED = [
[ 0., 1., 0.],
[ 0.3, 0.7, 0. ],
[ 0.6, 0.4, 0. ],
[ 0.9, 0.1, 0. ],
[ 0. , 0.2, 0.8],
[ 0. , 0.5, 0.5],
[ 0. , 0... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
11,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
304,
354,
2586,
71,
13,
8043,
1330,
15810,
10258,
198,
6738,
304,
354,
2586,
71,
13,
22602,
13,
14402,
20... | 1.873874 | 222 |
from modules.CommandData import CommandData
| [
6738,
13103,
13,
21575,
6601,
1330,
9455,
6601,
198
] | 4.888889 | 9 |
# -*- coding: utf-8 -*-
#Used to generate positive building samples from google satellite images
#based on OSM building polygons in geojson format
#
#Note 1: Accuracy of OSM building polygons may vary
#Note 2: Requires downloaded google satellite images(tiles) to
# have the following file name structure
# ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
38052,
284,
7716,
3967,
2615,
8405,
422,
23645,
11210,
4263,
198,
2,
3106,
319,
7294,
44,
2615,
25052,
684,
287,
4903,
13210,
1559,
5794,
198,
2,
198,
2,
6425,
352,... | 2.176235 | 2,247 |
from ctypes import cdll,c_int,c_double,POINTER
_lib = cdll.LoadLibrary('./demo/bin/libmultifuns.dll')
# double dprod(double *x, int n)
# int factorial(int n)
# int isum(int array[], int size);
| [
198,
6738,
269,
19199,
1330,
269,
12736,
11,
66,
62,
600,
11,
66,
62,
23352,
11,
16402,
41358,
198,
198,
62,
8019,
796,
269,
12736,
13,
8912,
23377,
7,
4458,
14,
9536,
78,
14,
8800,
14,
8019,
16680,
361,
13271,
13,
12736,
11537,
1... | 2.385542 | 83 |
from nivo_api.core.db.connection import metadata, create_database_connections
from sqlalchemy.engine import Engine
from sqlalchemy.exc import ProgrammingError
| [
6738,
299,
23593,
62,
15042,
13,
7295,
13,
9945,
13,
38659,
1330,
20150,
11,
2251,
62,
48806,
62,
8443,
507,
198,
6738,
44161,
282,
26599,
13,
18392,
1330,
7117,
198,
6738,
44161,
282,
26599,
13,
41194,
1330,
30297,
12331,
628,
198
] | 3.926829 | 41 |
"""
@Author:lichunhui
@Time:
@Description:
"""
from scrapy import cmdline
# cmdline.execute("scrapy crawl baidu_spider".split())
# cmdline.execute("scrapy crawl baike_spider".split())
# cmdline.execute("scrapy crawl wiki_zh_spider".split())
# cmdline.execute("scrapy crawl wiki_en_spider".split())
cmdline.execute("... | [
37811,
198,
31,
13838,
25,
33467,
403,
71,
9019,
198,
31,
7575,
25,
220,
220,
220,
198,
31,
11828,
25,
220,
198,
37811,
198,
6738,
15881,
88,
1330,
23991,
1370,
198,
198,
2,
23991,
1370,
13,
41049,
7203,
1416,
2416,
88,
27318,
275,
... | 2.776 | 125 |
import PySimpleGUI as sg
layout = [
[sg.Text("Wie heit Du?")],
[sg.Input(key = "-INPUT-")],
[sg.Text(size = (40, 1), key = "-OUTPUT-")],
[sg.Button("Okay"), sg.Button("Quit")]
]
window = sg.Window("Hallo PySimpleGUI", layout)
keep_going = True
while keep_going:
event, valu... | [
11748,
9485,
26437,
40156,
355,
264,
70,
198,
198,
39786,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
685,
45213,
13,
8206,
7203,
54,
494,
339,
270,
10343,
1701,
8,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
220... | 2.146444 | 239 |
import numpy as np
import pathlib
from torch.utils.data import Dataset, DataLoader
import dgl
import torch
from dgl.data.utils import load_graphs
import json
from datasets import util
from tqdm import tqdm
| [
11748,
299,
32152,
355,
45941,
198,
11748,
3108,
8019,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
16092,
292,
316,
11,
6060,
17401,
198,
11748,
288,
4743,
198,
11748,
28034,
198,
6738,
288,
4743,
13,
7890,
13,
26791,
1330,
3440,
62,
... | 3.393443 | 61 |
# Copyright (C) 2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
from mmdet.models.builder import HEADS, build_loss
from mmdet.models.losses import smooth_l1_loss
from mmdet.models.dense_heads.ssd_head import SSDHead
| [
2,
15069,
357,
34,
8,
33160,
8180,
10501,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
24843,
12,
17,
13,
15,
198,
2,
198,
198,
6738,
8085,
15255,
13,
27530,
13,
38272,
1330,
39837,
50,
11,
1382,
62,
22462,
198,
6738,
8085,
... | 3.025974 | 77 |
"""
Copyright 2020 daduz11
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... | [
37811,
198,
220,
220,
15069,
12131,
9955,
10277,
1157,
628,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
220,
220,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789... | 3.555172 | 290 |
def find_from(string, subs, start = None, end = None):
"""
Returns a tuple of the lowest index where a substring in the iterable "subs" was found, and the substring.
If multiple substrings are found, it will return the first one.
If nothing is found, it will return (-1, None)
"""
string = strin... | [
198,
4299,
1064,
62,
6738,
7,
8841,
11,
6352,
11,
923,
796,
6045,
11,
886,
796,
6045,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
16409,
257,
46545,
286,
262,
9016,
6376,
810,
257,
3293,
1806,
287,
262,
11629,
540,
366,
7... | 2.462745 | 255 |
# todos
# - [ ] all dates and date deltas are in time, not integers
from loguru import logger
from typing import Dict
import sys
import datetime
from datetime import timedelta
import numpy as np
from ta_scanner.data.data import load_and_cache, db_data_fetch_between, aggregate_bars
from ta_scanner.data.ib import IbDat... | [
2,
284,
37427,
198,
2,
532,
685,
2361,
477,
9667,
290,
3128,
1619,
83,
292,
389,
287,
640,
11,
407,
37014,
198,
198,
6738,
2604,
14717,
1330,
49706,
198,
6738,
19720,
1330,
360,
713,
198,
11748,
25064,
198,
11748,
4818,
8079,
198,
6... | 2.461358 | 1,281 |
import tkinter as tk
import os
print(tk)
print(dir(tk))
print(tk.TkVersion)
print(os.getcwd())
'''To initialize tkinter, we have to create a Tk root widget, which is a window with a title bar and
other decoration provided by the window manager. The root widget has to be created before any other widgets and
there can... | [
11748,
256,
74,
3849,
355,
256,
74,
198,
11748,
28686,
198,
4798,
7,
30488,
8,
198,
4798,
7,
15908,
7,
30488,
4008,
198,
4798,
7,
30488,
13,
51,
74,
14815,
8,
198,
4798,
7,
418,
13,
1136,
66,
16993,
28955,
198,
198,
7061,
6,
251... | 3.391129 | 248 |
from django.shortcuts import render,redirect,get_object_or_404
from remiljscrumy.models import ScrumyGoals,GoalStatus,ScrumyHistory,User
from django.http import HttpResponse,Http404,HttpResponseRedirect
from .forms import SignupForm,CreateGoalForm,MoveGoalForm,DevMoveGoalForm,AdminChangeGoalForm,QAChangeGoalForm,QAC... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
445,
1060,
11,
1136,
62,
15252,
62,
273,
62,
26429,
201,
198,
6738,
816,
346,
73,
1416,
6582,
88,
13,
27530,
1330,
1446,
6582,
88,
5247,
874,
11,
49045,
19580,
11,
3351,
6582,
88... | 2.21431 | 2,949 |
'''
Cilia classes are used to compute fixed points faster.
- Assume symmetry like in an m-twist (make a plot to see it)
- Assume that symmetries is not broken in time -> define classes of symmetry and interactions between them.
Done:
- Create a ring of cilia.
- Define symmetry classes
- Use classes to solve ODE
- Map... | [
7061,
6,
198,
34,
17517,
6097,
389,
973,
284,
24061,
5969,
2173,
5443,
13,
198,
198,
12,
2195,
2454,
40686,
588,
287,
281,
285,
12,
4246,
396,
357,
15883,
257,
7110,
284,
766,
340,
8,
198,
12,
2195,
2454,
326,
23606,
316,
1678,
31... | 2.486312 | 1,242 |
"""
SCL <scott@rerobots.net>
2018
"""
import json
import os
import tempfile
import time
| [
37811,
198,
198,
50,
5097,
1279,
1416,
1252,
31,
260,
22609,
1747,
13,
3262,
29,
198,
7908,
198,
37811,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
20218,
7753,
198,
11748,
640,
628
] | 2.727273 | 33 |
import numpy as np
import matplotlib.pyplot as plt
import scipy.stats
FIG, (LEFT_AX, MIDDLE_AX, RIGHT_AX) = plt.subplots(1, 3, figsize=(10, 3))
X_RANGE = (-2, 2)
Y_RANGE = (-2, 2)
X_DATA = np.array([])
Y_DATA = np.array([])
BELIEF = SequentialBayes(np.array([0, 0]), np.diag([1, 1]))
set_ax_range()
plot_beli... | [
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
629,
541,
88,
13,
34242,
628,
628,
628,
628,
198,
198,
16254,
11,
357,
2538,
9792,
62,
25922,
11,
25269,
35,
2538,
62,
25922,
1... | 2.158974 | 195 |
import numpy as np
import logging
import matplotlib.pyplot as plt
from sklearn.cluster import KMeans
from ..results import Results
logger = logging.getLogger(__name__)
| [
11748,
299,
32152,
355,
45941,
198,
11748,
18931,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
1341,
35720,
13,
565,
5819,
1330,
509,
5308,
504,
198,
198,
6738,
11485,
43420,
1330,
15691,
198,
198,
6404,
1362... | 3.185185 | 54 |
import sys
import os
import configparser
import argparse
import glob
if __name__ == "__main__":
main()
| [
11748,
25064,
198,
11748,
28686,
198,
11748,
4566,
48610,
198,
11748,
1822,
29572,
198,
11748,
15095,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
3419,
198
] | 3.055556 | 36 |
# All rights reserved by forest fairy.
# You cannot modify or share anything without sacrifice.
# If you don't agree, keep calm and don't look at code bellow!
__author__ = "VirtualV <https://github.com/virtualvfix>"
__date__ = "$Apr 13, 2014 8:47:25 PM$"
import re
from config import CONFIG
from tests.exceptions impor... | [
2,
1439,
2489,
10395,
416,
8222,
25607,
13,
198,
2,
921,
2314,
13096,
393,
2648,
1997,
1231,
11728,
13,
198,
2,
1002,
345,
836,
470,
4236,
11,
1394,
9480,
290,
836,
470,
804,
379,
2438,
8966,
322,
0,
198,
198,
834,
9800,
834,
796,... | 3.603604 | 111 |
import sys
import unittest
import os
import tempfile
import shutil
import contextlib
import json
import subprocess
import PIL
import templatelayer.testing_common
_APP_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
_SCRIPT_PATH = os.path.join(_APP_PATH, 'templatelayer', 'resources', 'scri... | [
11748,
25064,
198,
11748,
555,
715,
395,
198,
11748,
28686,
198,
11748,
20218,
7753,
198,
11748,
4423,
346,
198,
11748,
4732,
8019,
198,
11748,
33918,
198,
11748,
850,
14681,
198,
198,
11748,
350,
4146,
198,
198,
11748,
11055,
29289,
13,
... | 2.806452 | 155 |
import argparse
import torch
import torch.nn as nn
from gpt2.modeling import Transformer
from gpt2.data import Dataset, Vocab, TokenizedCorpus
from gpt2.evaluation import EvaluationSpec, EvaluateConfig, Evaluator
from typing import Dict
| [
11748,
1822,
29572,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
6738,
308,
457,
17,
13,
4666,
10809,
1330,
3602,
16354,
198,
6738,
308,
457,
17,
13,
7890,
1330,
16092,
292,
316,
11,
47208,
397,
11,
29130,
1143,... | 3.380282 | 71 |
from typing import Dict
from src.alerter.alert_data.alert_data import AlertData
| [
6738,
19720,
1330,
360,
713,
198,
198,
6738,
12351,
13,
36213,
353,
13,
44598,
62,
7890,
13,
44598,
62,
7890,
1330,
23276,
6601,
628
] | 3.416667 | 24 |
from processutils.textfilter import Unpack
from utils.simplelog import Logger
import argparse
parser = argparse.ArgumentParser(description="my_unpack")
parser.add_argument('-f', "--file_prefix", required=True)
parser.add_argument('-sep', "--separator", required=True)
# args = parser.parse_args([
# "-f", "../test... | [
6738,
1429,
26791,
13,
5239,
24455,
1330,
791,
8002,
198,
6738,
3384,
4487,
13,
36439,
6404,
1330,
5972,
1362,
198,
198,
11748,
1822,
29572,
198,
198,
48610,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
11213,
2625,
1820,
62,
403,
8002,... | 2.524217 | 351 |
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import os
import json
import urllib.parse
import boto3
import decimal
from decimal import Decimal
from datetime import datetime
from chalice import Chalice
from chalice import IAMAuthorizer
from chalice imp... | [
2,
15069,
33448,
6186,
13,
785,
11,
3457,
13,
393,
663,
29116,
13,
1439,
6923,
33876,
13,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
24843,
12,
17,
13,
15,
198,
198,
11748,
28686,
198,
11748,
33918,
198,
11748,
2956,
297,
... | 2.247651 | 2,661 |
from xml.etree import ElementTree as Etree
from model import *
from astro_unit import *
from io import StringIO
import logging
# Maps field name to tuple of (type, unit)
# Only the following columns will be understood
PLANET_FIELDS = {
"semimajoraxis": FieldMeta("number", 'AU'),
"eccentricity": FieldMeta("nu... | [
6738,
35555,
13,
316,
631,
1330,
11703,
27660,
355,
17906,
631,
198,
6738,
2746,
1330,
1635,
198,
6738,
6468,
305,
62,
20850,
1330,
1635,
198,
6738,
33245,
1330,
10903,
9399,
198,
11748,
18931,
628,
198,
198,
2,
20347,
2214,
1438,
284,
... | 2.722525 | 1,283 |
"""Validate AnVIL workspace(s)."""
import os
from google.cloud.storage import Client
from google.cloud.storage.blob import Blob
from collections import defaultdict
import ipywidgets as widgets
from ipywidgets import interact
from IPython.display import display
import pandas as pd
import firecloud.api as FAPI
from typ... | [
37811,
7762,
20540,
1052,
53,
4146,
44573,
7,
82,
21387,
15931,
198,
198,
11748,
28686,
198,
198,
6738,
23645,
13,
17721,
13,
35350,
1330,
20985,
198,
6738,
23645,
13,
17721,
13,
35350,
13,
2436,
672,
1330,
1086,
672,
198,
6738,
17268,
... | 3.707071 | 99 |
'''
Intermediate C#1, stigid
PROBLEM:
Given a number less than 10^50 and length n, find the sum of all the n -digit
numbers (starting on the left) that are formed such that, after the first n
-digit number is formed all others are formed by deleting the leading digit
and taking the next n -digits.
'''... | [
7061,
6,
198,
220,
220,
220,
42540,
327,
2,
16,
11,
336,
328,
312,
198,
220,
220,
220,
4810,
9864,
2538,
44,
25,
198,
220,
220,
220,
11259,
257,
1271,
1342,
621,
838,
61,
1120,
290,
4129,
299,
11,
1064,
262,
2160,
286,
477,
262,... | 2.339181 | 513 |
# 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
# distributed under t... | [
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
2,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
921,
743,
7330,
198,
2,
257,
4866,
286,
262,
13789,
379,
198,
2,... | 3.740741 | 162 |
# -*- coding: utf-8 -*-
"""Utility file for the HASYv2 dataset.
See https://arxiv.org/abs/1701.08380 for details.
"""
from __future__ import absolute_import
from keras.utils.data_utils import get_file
from keras import backend as K
import numpy as np
import scipy.ndimage
import os
import tarfile
import shutil
import... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
18274,
879,
2393,
329,
262,
367,
26483,
85,
17,
27039,
13,
198,
198,
6214,
3740,
1378,
283,
87,
452,
13,
2398,
14,
8937,
14,
1558,
486,
13,
2919,
23734,
... | 1.942009 | 2,966 |
import logging
from pyvisdk.exceptions import InvalidArgumentError
########################################
# Automatically generated, do not edit.
########################################
log = logging.getLogger(__name__)
def QuiesceDatastoreIOForHAFailed(vim, *args, **kwargs):
'''A QuiesceDatastoreIOForHAFail... | [
198,
11748,
18931,
198,
6738,
12972,
4703,
34388,
13,
1069,
11755,
1330,
17665,
28100,
1713,
12331,
198,
198,
29113,
7804,
198,
2,
17406,
4142,
7560,
11,
466,
407,
4370,
13,
198,
29113,
7804,
198,
198,
6404,
796,
18931,
13,
1136,
11187,... | 2.832547 | 424 |
"""
Based on Extended kalman filter (EKF) localization sample in PythonRobotics by Atsushi Sakai (@Atsushi_twi)
"""
import math
import matplotlib.pyplot as plt
import numpy as np
# Simulation parameter
INPUT_NOISE = np.diag([0.1, np.deg2rad(30.0)]) ** 2
GPS_NOISE = np.diag([0.1, 0.1]) ** 2
# Covariance for EKF ... | [
37811,
198,
198,
15001,
319,
24204,
479,
282,
805,
8106,
357,
36,
42,
37,
8,
42842,
6291,
287,
11361,
14350,
23891,
416,
317,
912,
17731,
13231,
1872,
4275,
32,
912,
17731,
62,
4246,
72,
8,
198,
198,
37811,
198,
198,
11748,
10688,
1... | 2 | 665 |
from unittest import TestCase, main as unittest_main
from q2_winnowing.plugin_setup import plugin as winnowing_plugin
if __name__ == '__main__':
unittest_main() | [
198,
6738,
555,
715,
395,
1330,
6208,
20448,
11,
1388,
355,
555,
715,
395,
62,
12417,
198,
198,
6738,
10662,
17,
62,
5404,
2197,
278,
13,
33803,
62,
40406,
1330,
13877,
355,
1592,
2197,
278,
62,
33803,
628,
198,
361,
11593,
3672,
83... | 2.847458 | 59 |
l = [0, "-", "+"]
n = int(input("Give number"))
list2 = []
for i in range(n):
list2.append(int(input(str(i) + ":")))
backIter()
print("test")
| [
75,
796,
685,
15,
11,
27444,
1600,
43825,
8973,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
77,
796,
493,
7,
15414,
7203,
23318,
1271,
48774,
201,
198,
4868,
17,
796,
17635,
201,
198,
1640,
1312,
287,
283... | 1.988095 | 84 |
from datetime import datetime
from enum import Enum, auto
from random import randint
from time import sleep
from typing import Optional, Tuple
def ask_if_yes(input_text: str) -> bool:
"""
This function asks the player a question,
and returns True if they typed yes,
or False if they type... | [
6738,
4818,
8079,
1330,
4818,
8079,
201,
198,
6738,
33829,
1330,
2039,
388,
11,
8295,
201,
198,
6738,
4738,
1330,
43720,
600,
201,
198,
6738,
640,
1330,
3993,
201,
198,
6738,
19720,
1330,
32233,
11,
309,
29291,
201,
198,
201,
198,
201... | 1.865126 | 16,786 |
from django.db import models
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
628
] | 3.75 | 8 |
import numpy as np
def mds(d, dimensions=3):
"""
Multidimensional Scaling - Given a matrix of interpoint distances,
find a set of low dimensional points that have similar interpoint
distances.
"""
(n, n) = d.shape
E = (-0.5 * d ** 2)
# Use mat to get column and row means to act as co... | [
11748,
299,
32152,
355,
45941,
628,
198,
4299,
285,
9310,
7,
67,
11,
15225,
28,
18,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
7854,
312,
16198,
1446,
4272,
532,
11259,
257,
17593,
286,
987,
4122,
18868,
11,
198,
220,
220,... | 2.490196 | 255 |
#!/usr/bin/env python3
from collections import Counter
# Complete the isValid function below.
if __name__ == "__main__":
s = input()
result = isValid(s)
print(result)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
628,
198,
6738,
17268,
1330,
15034,
628,
198,
2,
13248,
262,
318,
47139,
2163,
2174,
13,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
264,
79... | 2.846154 | 65 |
'''
This file provides data and objects that do not change throughout the runtime.
'''
import converter
import string
import traceback
import warnings
from voussoirkit import sqlhelpers
from voussoirkit import winwhich
# FFmpeg ##########################################################################################... | [
7061,
6,
198,
1212,
2393,
3769,
1366,
290,
5563,
326,
466,
407,
1487,
3690,
262,
19124,
13,
198,
7061,
6,
198,
11748,
38394,
198,
11748,
4731,
198,
11748,
12854,
1891,
198,
11748,
14601,
198,
198,
6738,
410,
516,
568,
14232,
270,
1330... | 2.854307 | 3,425 |
# -*- coding: utf-8 -*-
"""
Spectra analysis utilities
"""
from ._version import __version__
__all__ = ['__version__']
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
49738,
430,
3781,
20081,
198,
198,
37811,
198,
6738,
47540,
9641,
1330,
11593,
9641,
834,
628,
198,
834,
439,
834,
796,
37250,
834,
9641,
834,
20520,
198
] | 2.837209 | 43 |
# Copyright (C) 2020 FUJITSU
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | [
2,
15069,
357,
34,
8,
12131,
376,
52,
41,
2043,
12564,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
2,
220,
220... | 3.20045 | 444 |
# codplayer supporting package
#
# Copyright 2013-2014 Peter Liljenberg <peter.liljenberg@gmail.com>
#
# Distributed under an MIT license, please see LICENSE in the top dir.
# Don't include the audio device modules in the list of modules,
# as they may not be available on all systems
from pkg_resources import get_dis... | [
2,
14873,
7829,
6493,
5301,
198,
2,
198,
2,
15069,
2211,
12,
4967,
5613,
16342,
73,
23140,
1279,
79,
2357,
13,
75,
346,
73,
23140,
31,
14816,
13,
785,
29,
198,
2,
198,
2,
4307,
6169,
739,
281,
17168,
5964,
11,
3387,
766,
38559,
... | 2.677305 | 282 |
"""Common imports for generated bigtableclusteradmin client library."""
# pylint:disable=wildcard-import
import pkgutil
from googlecloudsdk.third_party.apitools.base.py import *
from googlecloudsdk.third_party.apis.bigtableclusteradmin.v1.bigtableclusteradmin_v1_client import *
from googlecloudsdk.third_party.apis.bi... | [
37811,
17227,
17944,
329,
7560,
1263,
11487,
565,
5819,
28482,
5456,
5888,
526,
15931,
198,
2,
279,
2645,
600,
25,
40223,
28,
21992,
9517,
12,
11748,
198,
198,
11748,
279,
10025,
22602,
198,
198,
6738,
23645,
17721,
21282,
74,
13,
17089... | 2.945946 | 148 |
from typing import Tuple, Optional
import click
from cloup import constraint, option, command, pass_context
from cloup.constraints import RequireExactly
from .pagescommands import Create, Remove, Push, Pull, List, Publish, Unpublish
| [
6738,
19720,
1330,
309,
29291,
11,
32233,
198,
198,
11748,
3904,
198,
6738,
537,
10486,
1330,
32315,
11,
3038,
11,
3141,
11,
1208,
62,
22866,
198,
6738,
537,
10486,
13,
1102,
2536,
6003,
1330,
9394,
557,
47173,
198,
198,
6738,
764,
31... | 3.806452 | 62 |
#!/user/bin/python3
import cv2
#loading image
img=cv2.imread("dog.jpeg")
img1=cv2.line(img,(0,0),(200,114),(110,176,123),2)
#print height and width
print(img.shape)
#to display that image
cv2.imshow("dogg",img1)
#image window holder activate
#wait key will destroy by pressing q button
cv2.waitKey(0)
cv2.d... | [
2,
48443,
7220,
14,
8800,
14,
29412,
18,
220,
198,
11748,
269,
85,
17,
220,
198,
198,
2,
25138,
2939,
220,
198,
9600,
28,
33967,
17,
13,
320,
961,
7203,
9703,
13,
73,
22071,
4943,
198,
9600,
16,
28,
33967,
17,
13,
1370,
7,
9600,... | 2.438849 | 139 |
import gensim
import fnmatch
import os
import pickle
import numpy as np
# from symspellpy.symspellpy import SymSpell, Verbosity # import the module
# initial_capacity = 83000
# # maximum edit distance per dictionary precalculation
# max_edit_distance_dictionary = 2
# prefix_length = 7
# sym_spell = SymSpell(initial_c... | [
11748,
308,
641,
320,
198,
11748,
24714,
15699,
198,
11748,
28686,
198,
11748,
2298,
293,
198,
11748,
299,
32152,
355,
45941,
198,
2,
422,
827,
907,
23506,
9078,
13,
1837,
907,
23506,
9078,
1330,
15845,
31221,
11,
49973,
16579,
220,
130... | 2.441781 | 876 |
import pandas as pd
import numpy as np
from hashlib import md5
import datetime
import pyarrow.parquet as pq
import pyarrow as pa
from src.dimension_surrogate_resolver import DimensionSurrogateResolver
| [
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
12234,
8019,
1330,
45243,
20,
198,
11748,
4818,
8079,
198,
11748,
12972,
6018,
13,
1845,
21108,
355,
279,
80,
198,
11748,
12972,
6018,
355,
14187,
198,
6738... | 3.238806 | 67 |
"""Starts a fake fan, lightbulb, garage door and a TemperatureSensor
"""
import logging
import signal
import random
from pyhap.accessory import Accessory, Bridge
from pyhap.accessory_driver import AccessoryDriver
from pyhap.const import (CATEGORY_FAN,
CATEGORY_LIGHTBULB,
... | [
37811,
1273,
5889,
257,
8390,
4336,
11,
1657,
15065,
65,
11,
15591,
3420,
290,
257,
34467,
47864,
198,
37811,
198,
11748,
18931,
198,
11748,
6737,
198,
11748,
4738,
198,
198,
6738,
12972,
45897,
13,
15526,
652,
1330,
8798,
652,
11,
1029... | 2.457071 | 396 |
from django.urls import path
from .views import (
# CRUDS
CommercialList,
CommercialDelete,
CommercialDetail,
CommercialCreate,
CommercialUpdate,
CommercialDelete,
CommercialInactivate,
# QUERY
)
urlpatterns = [
#CRUD
path('', CommercialList.as_view()),
path('create/', Com... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
198,
6738,
764,
33571,
1330,
357,
198,
2,
220,
220,
8740,
52,
5258,
198,
220,
220,
220,
22724,
8053,
11,
198,
220,
220,
220,
22724,
38727,
11,
198,
220,
220,
220,
22724,
11242,
603,... | 2.551111 | 225 |
import folium
if __name__ == '__main__':
pass
| [
11748,
5955,
1505,
628,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1208,
198
] | 2.375 | 24 |
"""Add Hometasks for Students
Revision ID: 6e5e2b4c2433
Revises: b9acba47fd53
Create Date: 2020-01-10 20:52:40.063133
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '6e5e2b4c2433'
down_revision = 'b9acba47fd53'
branch_labels = None
depends_on = None
| [
37811,
4550,
367,
908,
6791,
329,
14882,
198,
198,
18009,
1166,
4522,
25,
718,
68,
20,
68,
17,
65,
19,
66,
1731,
2091,
198,
18009,
2696,
25,
275,
24,
330,
7012,
2857,
16344,
4310,
198,
16447,
7536,
25,
12131,
12,
486,
12,
940,
116... | 2.418605 | 129 |
import time
import math
import fyplot
import o80_roboball2d
from functools import partial
if __name__ == "__main__":
run()
| [
11748,
640,
198,
11748,
10688,
198,
11748,
277,
88,
29487,
198,
11748,
267,
1795,
62,
22609,
672,
439,
17,
67,
198,
6738,
1257,
310,
10141,
1330,
13027,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,... | 2.826087 | 46 |
#
# Copyright (C) 2018 The Android Open Source Project
#
# 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 la... | [
2,
198,
2,
15069,
357,
34,
8,
2864,
383,
5565,
4946,
8090,
4935,
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,
... | 2.958115 | 382 |
from cbapi.response import *
from lrjob import run_liveresponse
from cbapi.example_helpers import get_cb_response_object, build_cli_parser
if __name__ == '__main__':
main() | [
6738,
269,
65,
15042,
13,
26209,
1330,
1635,
198,
6738,
300,
81,
21858,
1330,
1057,
62,
12583,
26209,
198,
6738,
269,
65,
15042,
13,
20688,
62,
16794,
364,
1330,
651,
62,
21101,
62,
26209,
62,
15252,
11,
1382,
62,
44506,
62,
48610,
... | 2.934426 | 61 |
from os import rename
from os.path import isfile
import pickle
import sqlite3
from stasis.DiskMap import DiskMap
from utils import tsToDate, dateToTs
from datetime import timedelta
source = sqlite3.connect('db')
source.row_factory = sqlite3.Row
dest = DiskMap('db-new', create = True, cache = False)
# Some cleanup, be... | [
6738,
28686,
1330,
36265,
198,
6738,
28686,
13,
6978,
1330,
318,
7753,
198,
11748,
2298,
293,
198,
11748,
44161,
578,
18,
198,
6738,
336,
17765,
13,
40961,
13912,
1330,
31664,
13912,
198,
6738,
3384,
4487,
1330,
40379,
2514,
10430,
11,
... | 2.761411 | 2,410 |
import boto3
aws_ebs_client = boto3.client('ebs')
| [
11748,
275,
2069,
18,
198,
198,
8356,
62,
68,
1443,
62,
16366,
796,
275,
2069,
18,
13,
16366,
10786,
68,
1443,
11537,
628
] | 2.26087 | 23 |
'''
Generate slideshows from markdown that use the remark.js script
details here:
https://github.com/gnab/remark
Run it like this:
python MakeSlides.py <source_text.md> <Slidestack Title> index.html
'''
import sys
import os
template = '''
<!DOCTYPE html>
<html>
<head>
<title>{title_string}</title>
<met... | [
7061,
6,
198,
8645,
378,
19392,
71,
1666,
422,
1317,
2902,
326,
779,
262,
6919,
13,
8457,
4226,
198,
198,
36604,
994,
25,
198,
5450,
1378,
12567,
13,
785,
14,
4593,
397,
14,
2787,
668,
628,
198,
10987,
340,
588,
428,
25,
198,
2941... | 2.478088 | 251 |
# -*- coding: utf-8 -*-
from __future__ import division, print_function
from ._mesh import *
from ._openscad import *
from ._threads import *
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
11593,
37443,
834,
1330,
7297,
11,
3601,
62,
8818,
198,
198,
6738,
47540,
76,
5069,
1330,
1635,
198,
6738,
47540,
44813,
66,
324,
1330,
1635,
198,
6738,
47540... | 2.938776 | 49 |
import gzip
import os
import re
import sys
import time
from functools import reduce
from itertools import chain
from multiprocessing import cpu_count
import lmdb
import psutil
import joblib
from joblib import Parallel, delayed
import numpy as np
from pricePrediction import config
from pricePrediction.config import USE... | [
11748,
308,
13344,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
25064,
198,
11748,
640,
198,
6738,
1257,
310,
10141,
1330,
4646,
198,
6738,
340,
861,
10141,
1330,
6333,
198,
6738,
18540,
305,
919,
278,
1330,
42804,
62,
9127,
198,
198... | 2.888454 | 511 |
# import just one function from a module
# to save memory
from module import dowork
#now we can us a different name to get to the imported function
#
dowork(13,45)
dir() | [
2,
1330,
655,
530,
2163,
422,
257,
8265,
220,
198,
2,
284,
3613,
4088,
220,
198,
6738,
8265,
1330,
47276,
967,
198,
198,
2,
2197,
356,
460,
514,
257,
1180,
1438,
284,
651,
284,
262,
17392,
2163,
198,
2,
198,
67,
322,
967,
7,
148... | 3.326923 | 52 |
from PyQt5.QtCore import QThread, pyqtSignal, QMutex
from lanzou.api import LanZouCloud
from lanzou.gui.models import Infos
from lanzou.debug import logger
| [
6738,
9485,
48,
83,
20,
13,
48,
83,
14055,
1330,
1195,
16818,
11,
12972,
39568,
11712,
282,
11,
1195,
41603,
1069,
198,
6738,
26992,
89,
280,
13,
15042,
1330,
14730,
57,
280,
18839,
198,
198,
6738,
26992,
89,
280,
13,
48317,
13,
275... | 2.821429 | 56 |
"""
Source: https://camcairns.github.io/python/2017/09/06/python_watchdog_jobs_queue.html
This class inherits from the Watchdog PatternMatchingEventHandler class. In this code our watchdog will only be
triggered if a file is moved to have a .trigger extension. Once triggered the watchdog places the event object on the... | [
37811,
198,
7416,
25,
3740,
1378,
20991,
37155,
5907,
13,
12567,
13,
952,
14,
29412,
14,
5539,
14,
2931,
14,
3312,
14,
29412,
62,
8340,
9703,
62,
43863,
62,
36560,
13,
6494,
198,
198,
1212,
1398,
10639,
896,
422,
262,
6305,
9703,
23... | 3.95858 | 169 |