content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
"""Test VirtualPIPoint calculus."""
# Copyright 2017 Hugo van den Berg, Stijn de Jong
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the ri... | [
37811,
14402,
15595,
47,
4061,
1563,
41443,
526,
15931,
198,
2,
15069,
2177,
25930,
5719,
2853,
24626,
11,
520,
48848,
390,
17960,
198,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
1... | 2.566761 | 1,775 |
"""
HTTPクライアントや認証、環境設定などの共通処理用ディレクトリ
"""
from . import config
from . import auth
from . import utils
from . import locust
from .locust import AppLocust
| [
37811,
198,
40717,
14099,
9263,
11482,
11839,
6527,
13298,
1792,
226,
45739,
235,
164,
101,
120,
23513,
163,
240,
108,
161,
95,
225,
164,
101,
255,
22522,
248,
26945,
2515,
102,
15474,
227,
109,
34460,
248,
49035,
99,
49426,
228,
18796,... | 1.876543 | 81 |
import numpy as np
import cmath
import torch
def rot(euler: tuple) -> torch.tensor:
"""
General rotation matrix
:param euler: (a, b, r) rotation in rad in ZYX
:return R: a rotation matrix R
"""
from math import sin, cos
a, b, r = euler[0], euler[1], euler[2]
row1 = torch.tensor([c... | [
11748,
299,
32152,
355,
45941,
198,
11748,
269,
11018,
198,
11748,
28034,
628,
198,
4299,
5724,
7,
68,
18173,
25,
46545,
8,
4613,
28034,
13,
83,
22854,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
3611,
13179,
17593,
198,
220,
... | 2.056999 | 2,579 |
import pandas as pd
import numpy as np
import datetime
import math
import binning
from ..core.status import Status
config = Config()
analysis = Analysis(config)
| [
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
4818,
8079,
198,
11748,
10688,
198,
11748,
9874,
768,
198,
198,
6738,
11485,
7295,
13,
13376,
1330,
12678,
198,
198,
11250,
796,
17056,
3419,
198,
20930,
7... | 3.565217 | 46 |
import pytest
import sell_stats
| [
11748,
12972,
9288,
198,
11748,
3677,
62,
34242,
628,
628,
198
] | 3.272727 | 11 |
import re
import allure
from model.contact import Contact
| [
11748,
302,
198,
11748,
477,
495,
198,
6738,
2746,
13,
32057,
1330,
14039,
628,
628,
198
] | 3.875 | 16 |
# This program has been developed by students from the bachelor Computer Science at Utrecht University within the
# Software and Game project course
# ©Copyright Utrecht University Department of Information and Computing Sciences.
"""
Django settings for mofa project.
Generated by 'django-admin startproject' using Dja... | [
2,
770,
1430,
468,
587,
4166,
416,
2444,
422,
262,
29384,
13851,
5800,
379,
7273,
260,
21474,
2059,
1626,
262,
198,
2,
10442,
290,
3776,
1628,
1781,
198,
2,
10673,
15269,
7273,
260,
21474,
2059,
2732,
286,
6188,
290,
38589,
13473,
13,... | 2.307483 | 2,205 |
from conans import ConanFile, CMake, tools
import os
| [
6738,
369,
504,
1330,
31634,
8979,
11,
327,
12050,
11,
4899,
198,
11748,
28686,
628
] | 3.6 | 15 |
""" The (Linear) Integer Partition Problem into k equal parts """
l = [7, 3, 2, 1, 5, 4, 8]
k = 3
n = len(l)
mat = [[l[0] for j in range(k)] for i in range(n)]
div = [[0 for i in range(k)] for i in range(n)]
for i in range(n):
mat[i][0] = sum(l[:i+1])
for i in range(1, k):
for j in range(1, n):
x = l... | [
37811,
383,
357,
14993,
451,
8,
34142,
2142,
653,
20647,
656,
479,
4961,
3354,
37227,
198,
75,
796,
685,
22,
11,
513,
11,
362,
11,
352,
11,
642,
11,
604,
11,
807,
60,
198,
74,
796,
513,
198,
198,
77,
796,
18896,
7,
75,
8,
198,... | 1.883562 | 292 |
from transformers import ViltProcessor, ViltModel
from PIL import Image
import requests
import os
# prepare image and text
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)
text = "hello world"
processor = ViltProcessor.from_pretrained("dandelin/vilt... | [
198,
6738,
6121,
364,
1330,
569,
2326,
18709,
273,
11,
569,
2326,
17633,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
7007,
198,
11748,
28686,
198,
2,
8335,
2939,
290,
2420,
198,
6371,
796,
366,
4023,
1378,
17566,
13,
66,
420,
375,
... | 2.812834 | 187 |
"""Honkai battle chronicle models."""
from __future__ import annotations
import datetime
import re
import typing
import pydantic
from genshin.models.honkai import battlesuit
from genshin.models.model import Aliased, APIModel, Unique
__all__ = [
"Boss",
"ELF",
"ElysianRealm",
"MemorialArena",
"Me... | [
37811,
29478,
32765,
3344,
16199,
1548,
4981,
526,
15931,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
11748,
4818,
8079,
198,
11748,
302,
198,
11748,
19720,
198,
198,
11748,
279,
5173,
5109,
198,
198,
6738,
308,
641,
20079,
13,
... | 2.614998 | 3,187 |
import download_genomes
import process_Gnomon
import generate_gene_map
import gene_clustering
from gene_modelling_utils import resolve_args
if __name__=='__main__':
args = resolve_args()
if 'download_genomes' in args.scripts:
download_genomes.main()
if 'process_Gnomon' in args.scripts:
proc... | [
11748,
4321,
62,
5235,
2586,
198,
11748,
1429,
62,
38,
77,
16698,
198,
11748,
7716,
62,
70,
1734,
62,
8899,
198,
11748,
9779,
62,
565,
436,
1586,
198,
6738,
9779,
62,
4666,
9417,
62,
26791,
1330,
10568,
62,
22046,
198,
198,
361,
115... | 2.497436 | 195 |
from pyxbos.process import run_loop
from pyxbos.drivers import pbc
import logging
logging.basicConfig(level="INFO", format='%(asctime)s - %(name)s - %(message)s')
import random
class democontroller(pbc.LPBCProcess):
"""
To implement a LPBC, subclass pbc.LPBCProcess
and implement the step() method as docume... | [
6738,
12972,
30894,
418,
13,
14681,
1330,
1057,
62,
26268,
198,
6738,
12972,
30894,
418,
13,
36702,
1330,
279,
15630,
198,
11748,
18931,
198,
6404,
2667,
13,
35487,
16934,
7,
5715,
2625,
10778,
1600,
5794,
11639,
4,
7,
292,
310,
524,
... | 1.837121 | 1,320 |
# Copyright (c) Microsoft Corporation
# Licensed under the MIT License.
"""Responsible AI Utilities package."""
from .version import name, version
__name__ = name
__version__ = version
| [
2,
15069,
357,
66,
8,
5413,
10501,
198,
2,
49962,
739,
262,
17168,
13789,
13,
198,
198,
37811,
19309,
684,
856,
9552,
41086,
5301,
526,
15931,
198,
198,
6738,
764,
9641,
1330,
1438,
11,
2196,
198,
198,
834,
3672,
834,
796,
1438,
198... | 3.836735 | 49 |
import requests
import json
from datetime import datetime, timedelta
import dateutil.parser
import pytz
API_SERVER_URI = 'https://api.copyleaks.com'
IDENTITY_SERVER_URI = 'https://id.copyleaks.com'
USER_AGENT = 'python-sdk/3.0'
| [
11748,
7007,
198,
11748,
33918,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
11748,
3128,
22602,
13,
48610,
198,
11748,
12972,
22877,
628,
198,
17614,
62,
35009,
5959,
62,
47269,
796,
705,
5450,
1378,
15042,
13,
22163,
... | 2.77381 | 84 |
"""Unit testing with python coding as following Plurasight course*
* Unit Testing with Python
https://app.pluralsight.com/library/courses/ec92942a-62c7-466e-ba92-56201eaf900f/table-of-contents
By Emily Bache
""" | [
37811,
26453,
4856,
351,
21015,
19617,
355,
1708,
1345,
17786,
432,
1781,
9,
198,
198,
9,
11801,
23983,
351,
11361,
198,
5450,
1378,
1324,
13,
489,
333,
874,
432,
13,
785,
14,
32016,
14,
66,
39975,
14,
721,
24,
1959,
3682,
64,
12,
... | 2.90411 | 73 |
import numpy as np
from scipy.special import logsumexp
import params
def forward_backward(lls, tr, ip):
"""
Inputs:
lls - matrix of per-frame log HMM state output probabilities
tr - transition probability matrix
ip - vector of initial state probabilities (i.e. statrting in the state)... | [
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
13,
20887,
1330,
2604,
16345,
11201,
198,
11748,
42287,
628,
198,
4299,
2651,
62,
1891,
904,
7,
297,
82,
11,
491,
11,
20966,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220... | 2.260337 | 1,306 |
from typing import List
from pytest import fixture
from pytest_bdd import scenarios, given, when, then
from pytest_bdd.parsers import parse
from game import Game
from puzzle import HintType, Puzzle
from dictionary import Dictionary
@fixture(scope="session")
scenarios("")
@given(
parse('a puzzle where the co... | [
6738,
19720,
1330,
7343,
198,
198,
6738,
12972,
9288,
1330,
29220,
198,
6738,
12972,
9288,
62,
65,
1860,
1330,
13858,
11,
1813,
11,
618,
11,
788,
198,
6738,
12972,
9288,
62,
65,
1860,
13,
79,
945,
364,
1330,
21136,
198,
198,
6738,
9... | 2.389344 | 732 |
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 16 11:27:49 2020
@author: cmccurley
"""
"""
***********************************************************************
* File: Out_of_Sample.py
*
* Desc: This file contains code for out-of-sample embedding methods.
*
* Written by: Connor H. McCurle... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
26223,
2758,
1467,
1367,
25,
1983,
25,
2920,
12131,
198,
198,
31,
9800,
25,
12067,
535,
333,
1636,
198,
37811,
198,
198,
37811,
198,
17174,
17174... | 2.47168 | 3,125 |
# Copyright 2021 The Feast Authors
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | [
2,
15069,
33448,
383,
42936,
46665,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
74... | 3.010917 | 916 |
""" Module providing unit-testing for the `~halotools.mock_observables.angular_tpcf` function.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import numpy as np
from astropy.tests.helper import pytest
from astropy.utils.misc import NumpyRNGContext
from ..angular_tpcf import ang... | [
37811,
19937,
4955,
4326,
12,
33407,
329,
262,
4600,
93,
14201,
313,
10141,
13,
76,
735,
62,
672,
3168,
2977,
13,
21413,
62,
34788,
12993,
63,
2163,
13,
198,
37811,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
11,
... | 3.226415 | 159 |
# Traffic flow
#
# Copyright (c) 2018 Yurii Khomiak
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merg... | [
2,
23624,
5202,
198,
2,
198,
2,
15069,
357,
66,
8,
2864,
575,
333,
4178,
5311,
12753,
461,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
198,
2,
286,
428,
3788,
290,
391... | 2.723901 | 728 |
from onto.context import Context as CTX
CTX.load()
engine = CTX.services.engine
from onto.view import Mediator
# class TodoMediatorLc(Mediator):
#
# from onto.source.leancloud import hook
# from onto.sink.json_rpc import sink
#
# src = hook('Todo')
# snk = sink(uri=f'{JSONRPC_URI}/todo')
#
# @... | [
6738,
4291,
13,
22866,
1330,
30532,
355,
16356,
55,
198,
198,
4177,
55,
13,
2220,
3419,
198,
198,
18392,
796,
16356,
55,
13,
30416,
13,
18392,
628,
198,
6738,
4291,
13,
1177,
1330,
2019,
38585,
628,
198,
2,
1398,
309,
24313,
9921,
3... | 2.258575 | 379 |
"""
Work with folders
---------------------
Please also see the entry on files. After files, folders are the other fundamental operating system primitive users might find themselves working with. The Flyte IDL's support of folders take the form of `multi-part blobs <https://github.com/lyft/flyteidl/blob/cee566b2e6e109... | [
37811,
198,
12468,
351,
24512,
198,
19351,
12,
198,
198,
5492,
635,
766,
262,
5726,
319,
3696,
13,
2293,
3696,
11,
24512,
389,
262,
584,
7531,
5361,
1080,
20049,
2985,
1244,
1064,
2405,
1762,
351,
13,
383,
13575,
660,
4522,
43,
338,
... | 2.918421 | 760 |
"""Analyzes the contents of ntuple dicts, track property dicts, and
value lists.
Do things like get the efficiency of an ntuple dict, bin values and
take a measure on each set of binned values, and create custom value
lists that wouldn't be found in the original ntuple.
Also contains a function for finding the error ... | [
37811,
37702,
12271,
262,
10154,
286,
299,
83,
29291,
8633,
82,
11,
2610,
3119,
8633,
82,
11,
290,
198,
8367,
8341,
13,
198,
198,
5211,
1243,
588,
651,
262,
9332,
286,
281,
299,
83,
29291,
8633,
11,
9874,
3815,
290,
198,
20657,
257,... | 2.510431 | 5,656 |
import os
from os import listdir
import matplotlib.pyplot as plt
import numpy as np
plots = {}
plotnames_x = []
plotnames_y = []
plotnames_rot = []
for file in listdir():
# read .txt files
if file.endswith('_x.txt'):
name = file[:-4]
plots[name] = []
plotnames_x.append(name)
... | [
11748,
28686,
198,
6738,
28686,
1330,
1351,
15908,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
628,
628,
198,
489,
1747,
796,
23884,
198,
29487,
14933,
62,
87,
796,
17635,
198,
29487... | 1.92625 | 800 |
"""Methods which send SQL queries to the MariaDB docker database."""
from docker.models.containers import Container, ExecResult
def _get_epidata_db_size(container: Container) -> ExecResult:
"""
Query the size of the epidata database in megabytes.
Parameters
----------
container: Container
... | [
37811,
46202,
543,
3758,
16363,
20743,
284,
262,
14200,
11012,
36253,
6831,
526,
15931,
198,
6738,
36253,
13,
27530,
13,
3642,
50221,
1330,
43101,
11,
8393,
23004,
628,
198,
4299,
4808,
1136,
62,
538,
312,
1045,
62,
9945,
62,
7857,
7,
... | 2.961702 | 940 |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilitie... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
17202,
39410,
25,
428,
2393,
373,
7560,
416,
262,
21624,
12994,
24118,
687,
10290,
357,
27110,
5235,
8,
16984,
13,
17202,
198,
2,
17202,
2141,
407,
4370,
416,
1021,
4556,
345,
821,
1728,
345,
760... | 2.429484 | 1,879 |
# Abdulnaser Sheikh
# https://www.linkedin.com/in/abdulnasersheikh/
# ZIP password cracker
# This script iterates through a user provided dictionary and finds the password for the encrypted
import zipfile
'''
zipfile has a method call extractall().
extractall(self, path=None, members=None, pwd=None)
... | [
2,
23547,
77,
6005,
30843,
201,
198,
2,
3740,
1378,
2503,
13,
25614,
259,
13,
785,
14,
259,
14,
397,
67,
377,
77,
19865,
258,
13848,
14,
201,
198,
201,
198,
2,
42977,
9206,
8469,
263,
201,
198,
201,
198,
2,
770,
4226,
11629,
689... | 3.106383 | 188 |
import os
import sys
import soundfile as sf
import librosa
id1, id2 = 61, 70968
input_dir = os.path.join(sys.argv[1], "test-clean", str(id1), str(id2))
output_dir = os.path.join("..", "test_data")
transcript_file = os.path.join(input_dir, "%d-%d.trans.txt" % (id1, id2))
output_file = os.path.join(output_dir, "transcri... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
2128,
7753,
355,
264,
69,
198,
11748,
9195,
4951,
64,
198,
198,
312,
16,
11,
4686,
17,
796,
8454,
11,
767,
2931,
3104,
198,
15414,
62,
15908,
796,
28686,
13,
6978,
13,
22179,
7,
17597,
13... | 2.087824 | 501 |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import uuid
import rospy
import cv2
import os
from cv_bridge import CvBridge
from sensor_msgs.msg import Image
from pyuwds3.reasoning.detection.foreground_detector import ForegroundDetector
from pyuwds3.reasoning.tracking.multi_object_tracker import MultiObjectTracker, iou_... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
198,
11748,
334,
27112,
198,
11748,
686,
2777,
88,
198,
11748,
269,
85,
17,
198,
11748,
28686,
198,
6738,
269,
85,
62,
9458,
... | 2.680628 | 191 |
try:
from collections.abc import Sequence as Sequence_co, Callable as Callable_co
except ImportError:
from collections import Sequence as Sequence_co, Callable as Callable_co
from datetime import datetime
from typing import (
Any,
Callable,
ClassVar,
Collection,
Dict,
List,
Mapping,
... | [
28311,
25,
198,
220,
220,
220,
422,
17268,
13,
39305,
1330,
45835,
355,
45835,
62,
1073,
11,
4889,
540,
355,
4889,
540,
62,
1073,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
422,
17268,
1330,
45835,
355,
45835,
62,
1073,
11,
4... | 2.275442 | 4,186 |
"""
entradas
salidas
"""
i=0
l=[]
for i in range(1,101,2):
if(i%7!=0):
l.append(i)
continue
print(l)
| [
37811,
198,
298,
6335,
292,
220,
198,
198,
82,
10751,
292,
198,
198,
37811,
198,
72,
28,
15,
198,
75,
28,
21737,
198,
1640,
1312,
287,
2837,
7,
16,
11,
8784,
11,
17,
2599,
198,
220,
220,
220,
611,
7,
72,
4,
22,
0,
28,
15,
25... | 1.631579 | 76 |
"""Image normalization related functions"""
import numpy as np
import sys
from skimage.exposure import equalize_adapthist
def zscore(input_image, im_mean=None, im_std=None):
"""
Performs z-score normalization. Adds epsilon in denominator for robustness
:param np.array input_image: input image for intensi... | [
37811,
5159,
3487,
1634,
3519,
5499,
37811,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
25064,
198,
6738,
1341,
9060,
13,
1069,
26205,
1330,
4961,
1096,
62,
324,
499,
400,
396,
628,
198,
4299,
1976,
26675,
7,
15414,
62,
9060,
11,
... | 2.739574 | 1,175 |
#!/usr/bin/python
#coding=utf-8
import sys
import pexpect
import random
if __name__ == '__main__':
try:
newPassword = changepassword('用户名','sudo 密码')
print "IP:xxx.xxx.xxx.xxx"
print "Port:端口"
print "UserName:用户名"
print "NewPassword: %s" %(newPassword)
except Exceptio... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
66,
7656,
28,
40477,
12,
23,
198,
198,
11748,
25064,
198,
11748,
613,
87,
806,
198,
11748,
4738,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
... | 1.92228 | 193 |
import logging
import datetime
from src.summarize_schedules.calendar_summarizer import GoogleCalendarSummarizer
| [
11748,
18931,
198,
11748,
4818,
8079,
198,
198,
6738,
12351,
13,
16345,
3876,
1096,
62,
1416,
704,
5028,
13,
9948,
9239,
62,
16345,
3876,
7509,
1330,
3012,
9771,
9239,
13065,
3876,
7509,
628,
628
] | 3.411765 | 34 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging
from os.path import join
import numpy as np
from collections import deque
import matplotlib.pyplot as plt
from gym.spaces.box import Box
| [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
11748,
18931,
198,
6738,
28686,
13,
6978,
1330,
4654,
198,
11748,
299,
32152,
355,
45941,
... | 3.852941 | 68 |
# Generated by Django 2.1.5 on 2019-04-24 17:05
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
13,
20,
319,
13130,
12,
3023,
12,
1731,
1596,
25,
2713,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
#!/usr/bin/env python3
import sys
from datetime import datetime
from pathlib import Path
from PyQt5.QtCore import QSize
from PyQt5.QtWidgets import (QAction, QApplication, QDialog, QFileDialog, QGridLayout, QLabel,
QLineEdit, QMainWindow, QPushButton, QTableWidget, QTableWidgetItem, qApp)... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
25064,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
14055,
1330,
1195,
10699,
198,
6738,
... | 2.393574 | 249 |
from ..util import register, circle
from PIL import Image
import os
plugin_dir = os.path.dirname(os.path.abspath(__file__))
@register(["ori", "拥抱光明", "奥日", "奥里"], "制作Ori拥抱光明图", '''\
/ori - 机器人拥抱光明
/ori <对方> - 对方拥抱光明
可以使用头像,也可以使用图片链接''')
| [
6738,
11485,
22602,
1330,
7881,
11,
9197,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
28686,
198,
198,
33803,
62,
15908,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
397,
2777,
776,
7,
834,
7753,
834,
4008,
198,
19... | 1.422619 | 168 |
#!/usr/bin/env python
import numpy as np
from numpy.testing import assert_allclose
from astropy.tests.helper import pytest
from pkg_resources import resource_filename
try:
from BurstCube.bcSim import simFile
except ImportError:
pass
try:
from BurstCube.bcSim import simFiles
except ImportError:
pass
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
299,
32152,
13,
33407,
1330,
6818,
62,
439,
19836,
198,
6738,
6468,
28338,
13,
41989,
13,
2978,
525,
1330,
12972,
9288,
198,
6738,
279,
1... | 2.983516 | 182 |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# xuehaiyang: xuehaiyang@sogou-inc.com
#
"""
Eval Test
"""
import sys
import os
import threading
if __name__ == "__main__":
checkpoint_path = "/search/odin/haiyang/fairseq_exp/e2e_trans/fairseq/demo/cp"
# item = ["asr_baseline_lr03_noise02/checkpoint17.pt",
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
2,
198,
2,
2124,
518,
44488,
17859,
25,
2124,
518,
44488,
17859,
31,
82,
519,
280,
12,
1939,
13,
785,
198,
2,
198,
198... | 2.118613 | 548 |
import html4Symbols
REMOVED_SYMBOLS = ['acronym','applet','basefont','big','center','dir','font','frame','frameset','noframes','strike','tt']
NEW_ELEMENTS = [
'canvas',
'audio' ,
'video',
'source',
'embed',
'track',
'datalist', #Specifies a list of pre-defined options for input controls
'keygen', #Defines a key-pa... | [
11748,
27711,
19,
13940,
2022,
10220,
198,
198,
40726,
8874,
1961,
62,
23060,
10744,
3535,
50,
796,
37250,
330,
1313,
4948,
41707,
1324,
1616,
41707,
8692,
10331,
41707,
14261,
41707,
16159,
41707,
15908,
41707,
10331,
41707,
14535,
41707,
... | 3.089869 | 612 |
import os
import shutil
import time
from flask_apscheduler import APScheduler
import numpy as np
import pandas as pd
from keras.preprocessing.image import ImageDataGenerator
from keras.models import load_model
from PIL import Image
import gdown
from flask import Flask, render_template, request, redirect, flash, send_fr... | [
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
640,
198,
6738,
42903,
62,
499,
1416,
704,
18173,
1330,
3486,
50,
1740,
18173,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
41927,
292,
13,
3866,
... | 3.52889 | 8,913 |
import torch.tensor
import joblib
import numpy as np
tensor_dict = joblib.load("TENSORS_FILE")
print(tensor_dict["beta"]) # tensor obtido a partir de model.get_beta() no ETM
print(tensor_dict["beta"].size()) # dimensoes do tensor parecem ser KxV (topicos x vocabulario)
beta_sum = torch.sum(tensor_dict["beta"], 1)
pri... | [
11748,
28034,
13,
83,
22854,
198,
11748,
1693,
8019,
198,
11748,
299,
32152,
355,
45941,
198,
198,
83,
22854,
62,
11600,
796,
1693,
8019,
13,
2220,
7203,
51,
16938,
20673,
62,
25664,
4943,
220,
198,
4798,
7,
83,
22854,
62,
11600,
1469... | 2.612091 | 397 |
import os
import neptune
from neptunecontrib.versioning.data import log_data_version
from neptunecontrib.api.utils import get_filepaths
from src.features.const import V0_CAT_COLS
from src.utils import read_config, check_env_vars
from src.features.utils import load_and_merge
check_env_vars()
CONFIG = read_config(conf... | [
11748,
28686,
198,
198,
11748,
497,
457,
1726,
198,
6738,
497,
457,
403,
721,
756,
822,
13,
9641,
278,
13,
7890,
1330,
2604,
62,
7890,
62,
9641,
198,
6738,
497,
457,
403,
721,
756,
822,
13,
15042,
13,
26791,
1330,
651,
62,
7753,
6... | 2.71831 | 213 |
"""Support for Goal Zero Yeti Sensors."""
from __future__ import annotations
from typing import cast
from goalzero import Yeti
from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntity,
SensorEntityDescription,
SensorStateClass,
)
from homeassistant.config_entries import ConfigEnt... | [
37811,
15514,
329,
25376,
12169,
6430,
72,
14173,
669,
526,
15931,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
19720,
1330,
3350,
198,
198,
6738,
3061,
22570,
1330,
6430,
72,
198,
198,
6738,
1363,
562,
10167,
13,
5589,
39... | 2.359264 | 2,391 |
#!/usr/bin/python3
# WallGen v0.2'/'
#You nd yaml, pyyaml modules...
from util import parser
template_filename=""
rules_filename=""
# Get argvs of user's input
template_filename,rules_filename = parser.arguments()
# load rules of firewall at directory rules
try:
rules_wall=parser.Get_config(rules_filename)
exce... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
2,
5007,
13746,
410,
15,
13,
17,
26488,
6,
198,
2,
1639,
299,
67,
331,
43695,
11,
12972,
88,
43695,
13103,
986,
220,
198,
6738,
7736,
1330,
30751,
198,
198,
28243,
62,
34345,
33151,
1... | 2.994898 | 196 |
from html.parser import HTMLParser
from unittest import mock
import pytest
from duffy.app.main import app, init_model
from duffy.exceptions import DuffyConfigurationError
from ..util import noop_context
@pytest.mark.client_auth_as(None)
@pytest.mark.asyncio
| [
6738,
27711,
13,
48610,
1330,
11532,
46677,
198,
6738,
555,
715,
395,
1330,
15290,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
288,
15352,
13,
1324,
13,
12417,
1330,
598,
11,
2315,
62,
19849,
198,
6738,
288,
15352,
13,
1069,
11755,
... | 3.207317 | 82 |
# This program saves a list of strings to a file.
# Call the main function.
main()
| [
2,
770,
1430,
16031,
257,
1351,
286,
13042,
284,
257,
2393,
13,
201,
198,
201,
198,
2,
4889,
262,
1388,
2163,
13,
201,
198,
12417,
3419,
201,
198
] | 3.142857 | 28 |
#!/usr/bin/env python
import pytest
from sonic_package_manager.database import PackageEntry
from sonic_package_manager.errors import (
PackageNotFoundError,
PackageAlreadyExistsError,
PackageManagerError
)
from sonic_package_manager.version import Version
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
36220,
62,
26495,
62,
37153,
13,
48806,
1330,
15717,
30150,
198,
6738,
36220,
62,
26495,
62,
37153,
13,
48277,
1330,
357,
198,
220,
220,
220,
1... | 3.426829 | 82 |
'''
MIT License
Copyright (c) 2018 Stanford Computational Imaging Lab
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, mo... | [
7061,
6,
198,
36393,
13789,
198,
198,
15269,
357,
66,
8,
2864,
13863,
22476,
864,
48656,
3498,
198,
198,
5990,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
198,
1659,
428,
3788,
290,
3917,
10314,
... | 3.183702 | 724 |
# Django settings for testproj project.
import os
import sys
# import source code dir
sys.path.insert(0, os.getcwd())
sys.path.insert(0, os.path.join(os.getcwd(), os.pardir))
SITE_ID = 300
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ROOT_URLCONF = "urls"
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
TEST_RUN... | [
2,
37770,
6460,
329,
1332,
1676,
73,
1628,
13,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
2,
1330,
2723,
2438,
26672,
198,
17597,
13,
6978,
13,
28463,
7,
15,
11,
28686,
13,
1136,
66,
16993,
28955,
198,
17597,
13,
6978,
13,
2846... | 1.830154 | 1,101 |
import nomad
import numpy as np
# This was a one-time use script to confirm that the RA swatch ranges are >= and <.
# Found:
# LOW MATCH:
# 0021 18.0 18.0 18.2499899074
# LOW MATCH:
# 0064 15.25 15.25 15.4999305556
# LOW MATCH:
# 73 4.75 4.75 4.99976037037
# before I then cut off the run. Good enough for me, showin... | [
11748,
4515,
324,
198,
11748,
299,
32152,
355,
45941,
198,
198,
2,
770,
373,
257,
530,
12,
2435,
779,
4226,
284,
6216,
326,
262,
17926,
1509,
963,
16069,
389,
18189,
290,
1279,
13,
198,
198,
2,
220,
4062,
25,
198,
2,
46663,
337,
1... | 2.164295 | 773 |
import json
import logging
import os
import sys
import traceback
from typing import Union, Dict, List
import requests
from teams_logger import TeamsHandler, Office365CardFormatter
import validators
from pigeons.filter import TeamsFilter
def init_logger(
endpoint: Union[str, Dict[str, str]],
endpoint_key: s... | [
11748,
33918,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
12854,
1891,
198,
6738,
19720,
1330,
4479,
11,
360,
713,
11,
7343,
198,
198,
11748,
7007,
198,
6738,
3466,
62,
6404,
1362,
1330,
24690,
25060,
11,
4452,
... | 2.555695 | 799 |
n = int(input("Enter a number: "))
statement = "is a prime number."
for x in range(2,n):
if n%x == 0:
statement = 'is not a prime number.'
print(n,statement)
| [
201,
198,
77,
796,
493,
7,
15414,
7203,
17469,
257,
1271,
25,
366,
4008,
201,
198,
26090,
796,
366,
271,
257,
6994,
1271,
526,
201,
198,
1640,
2124,
287,
2837,
7,
17,
11,
77,
2599,
201,
198,
220,
220,
220,
611,
299,
4,
87,
6624,... | 2.271605 | 81 |
"""Friedrich Schotte, May 1, 2015 - May 1, 2015"""
from ftplib import FTP
from io import BytesIO
from struct import pack
data = ""
data += pack(">bbHIII",0x03,0x000,0x0001,0xF0FFB044,0x00000001,0x00000000)
data += pack(">bbHIII",0x03,0x000,0x0001,0xF0FFB044,0x00000001,0x00000001)
##file("/tmp/sequence.bin","w").write(... | [
37811,
37,
2228,
7527,
3059,
11404,
11,
1737,
352,
11,
1853,
532,
1737,
352,
11,
1853,
37811,
198,
6738,
10117,
489,
571,
1330,
45854,
198,
6738,
33245,
1330,
2750,
4879,
9399,
198,
6738,
2878,
1330,
2353,
198,
198,
7890,
796,
13538,
... | 2.339056 | 233 |
from plugins.adversary.app.commands import cmd
from plugins.adversary.app.operation.operation import Step, OPFile, OPHost, OPRat, OPVar
class DirListCollection(Step):
"""
Description:
This step enumerates files on the target machine. Specifically, it looks for files with 'password' or
'admin' ... | [
6738,
20652,
13,
324,
690,
560,
13,
1324,
13,
9503,
1746,
1330,
23991,
198,
6738,
20652,
13,
324,
690,
560,
13,
1324,
13,
27184,
13,
27184,
1330,
5012,
11,
13349,
8979,
11,
440,
11909,
455,
11,
440,
4805,
265,
11,
13349,
19852,
628,... | 2.62069 | 406 |
# lec10memo1.py
# Code shown in Lecture 10, memo 1
# An iterative "Pythonic" search procedure:
# The recursive way:
# A recursive "Pythonic" binary search procedure:
| [
2,
443,
66,
940,
11883,
78,
16,
13,
9078,
198,
198,
2,
6127,
3402,
287,
31209,
495,
838,
11,
16155,
352,
198,
198,
2,
1052,
11629,
876,
366,
37906,
291,
1,
2989,
8771,
25,
628,
198,
2,
383,
45115,
835,
25,
628,
198,
2,
317,
45... | 3.127273 | 55 |
#%%
import tarfile
from io import BytesIO
from PIL import Image
import os
from pathlib import Path
import pandas as pd
basefolder_loc = Path(__file__).parents[1]
TARFILE = tarfile.open(
os.path.join(basefolder_loc, "1.download-data", "data", "training.tar.gz"),
"r:gz",
)
def load_img(
target: str = "adr... | [
2,
16626,
198,
11748,
13422,
7753,
198,
6738,
33245,
1330,
2750,
4879,
9399,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
28686,
198,
6738,
3108,
8019,
1330,
10644,
198,
11748,
19798,
292,
355,
279,
67,
628,
198,
8692,
43551,
62,
17946... | 2.261905 | 1,428 |
"""Resource files for INDRA CoGEx."""
from pathlib import Path
from typing import List
__all__ = [
"ensure_disprot",
]
HERE = Path(__file__).parent.resolve()
#: URL for downloading most recent version of DisProt
DISPROT_URL = "https://www.disprot.org/api/search?release=current&show_ambiguous=true&show_obsolete=... | [
37811,
26198,
3696,
329,
24413,
3861,
1766,
38,
3109,
526,
15931,
198,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
19720,
1330,
7343,
198,
198,
834,
439,
834,
796,
685,
198,
220,
220,
220,
366,
641,
495,
62,
6381,
11235,
1600,
198,... | 2.626335 | 281 |
from aetherling.modules.fifo import DefineFIFO
from magma import *
from magma.bitutils import *
from magma.simulator.coreir_simulator import CoreIRSimulator
from magma.scope import Scope
| [
6738,
257,
6750,
1359,
13,
18170,
13,
32041,
78,
1330,
2896,
500,
37,
5064,
46,
198,
6738,
2153,
2611,
1330,
1635,
198,
6738,
2153,
2611,
13,
2545,
26791,
1330,
1635,
198,
6738,
2153,
2611,
13,
14323,
8927,
13,
7295,
343,
62,
14323,
... | 3.298246 | 57 |
# -*- coding: utf-8 -*-
"""
:Created: 3/12/14
:Author: timic
"""
import datetime
import os
from lxml import etree
from .._base import BaseSmev, BaseSmevWsdl
from .._utils import EmptyCtx, el_name_with_ns
from .. fault import ApiError as _ApiError
from .. import _xmlns as ns
from model import MessageType, ServiceTyp... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
25,
41972,
25,
513,
14,
1065,
14,
1415,
198,
25,
13838,
25,
4628,
291,
198,
37811,
198,
11748,
4818,
8079,
198,
11748,
28686,
198,
198,
6738,
300,
198... | 1.901967 | 3,254 |
"""
REST API Documentation for the NRS TFRS Credit Trading Application
The Transportation Fuels Reporting System is being designed to streamline compliance reporting for transportation fuel suppliers in accordance with the Renewable & Low Carbon Fuel Requirements Regulation.
OpenAPI spec version: v1
... | [
37811,
198,
220,
220,
220,
30617,
7824,
43925,
329,
262,
40034,
24958,
6998,
10504,
25469,
15678,
628,
220,
220,
220,
383,
15198,
13333,
1424,
29595,
4482,
318,
852,
3562,
284,
4269,
1370,
11846,
6447,
329,
9358,
5252,
20499,
287,
10213,
... | 3.94863 | 292 |
import os
import datetime as dt
import moviepy.video.io.ImageSequenceClip
image_folder = 'images/natural'
fps = 15
beg = dt.datetime.now()
image_files = [image_folder + '/' + img for img in os.listdir(image_folder) if img.endswith(".png")]
print(image_files)
clip = moviepy.video.io.ImageSequenceClip.ImageSe... | [
11748,
28686,
201,
198,
11748,
4818,
8079,
355,
288,
83,
201,
198,
11748,
3807,
9078,
13,
15588,
13,
952,
13,
5159,
44015,
594,
2601,
541,
201,
198,
9060,
62,
43551,
796,
705,
17566,
14,
11802,
6,
201,
198,
29647,
796,
1315,
201,
19... | 2.494505 | 182 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
if __name__ == "__main__":
diction = {1: 'Атос', 2: 'Портос', 3: 'Арамис'}
print(diction)
diction_swap = {v:k for k, v in diction.items()}
print(diction_swap)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
48589,
796,
1391,
16,
25,
705,
... | 1.890756 | 119 |
"""Test min heap."""
import pytest
import random
@pytest.fixture
def empty_heap():
"""Instantiate a heap for testing."""
from binheap import BinHeap
min_heap = BinHeap()
return min_heap
@pytest.fixture
def random_heap():
"""Generate a list for use in a heap."""
from binheap import BinHeap
... | [
37811,
14402,
949,
24575,
526,
15931,
198,
11748,
12972,
9288,
198,
11748,
4738,
628,
198,
31,
9078,
9288,
13,
69,
9602,
198,
4299,
6565,
62,
258,
499,
33529,
198,
220,
220,
220,
37227,
49933,
9386,
257,
24575,
329,
4856,
526,
15931,
... | 2.427393 | 1,212 |
import json
import logging
import os
import boto3
import pandas as pd
import numpy as np
import base64
import io
logger = logging.getLogger()
client = boto3.client("sagemaker-runtime")
region = os.environ["region"]
endpoint_name = os.environ["endpoint_name"]
content_type = os.environ["content_type"]
fg_name = os.en... | [
11748,
33918,
198,
11748,
18931,
198,
11748,
28686,
198,
198,
11748,
275,
2069,
18,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2779,
2414,
198,
11748,
33245,
198,
198,
6404,
1362,
796,
18931,
1... | 2.923858 | 197 |
import os
import sys
import matplotlib.pyplot as plt
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),
'..')))
from galaxy_model.galaxy import Galaxy # noqa
gal = Galaxy()
if __name__ == "__main__":
test_add_and_remove_coords()
te... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
17597,
13,
6978,
13,
28463,
7,
15,
11,
28686,
13,
6978,
13,
397,
2777,
776,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
159... | 2.05 | 200 |
from abc import ABCMeta, abstractmethod
if __name__ == "__main__":
c = Concrete()
| [
6738,
450,
66,
1330,
9738,
48526,
11,
12531,
24396,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
269,
796,
1482,
38669,
3419,
198
] | 2.8125 | 32 |
'''input
huaauhahhuahau
'''
inp = input('')
vowel = ""
for i in inp:
if i == "a" or i == "i" or i == "u" or i == "e" or i == "o":
vowel += i
if vowel == vowel[::-1]:
print("S")
else:
print("N") | [
7061,
6,
15414,
198,
33061,
559,
71,
993,
13415,
993,
559,
198,
7061,
6,
198,
259,
79,
796,
5128,
7,
7061,
8,
198,
85,
322,
417,
796,
13538,
198,
1640,
1312,
287,
287,
79,
25,
198,
197,
361,
1312,
6624,
366,
64,
1,
393,
1312,
... | 1.98 | 100 |
"""
This connects to an IRC network/channel and launches an 'bot' onto it.
The bot then pipes what is being said between the IRC channel and one or
more Evennia channels.
"""
# TODO: This is deprecated!
from twisted.words.protocols import irc
from twisted.internet import protocol
from twisted.internet import ... | [
37811,
201,
198,
1212,
20417,
284,
281,
30039,
3127,
14,
17620,
290,
18617,
281,
705,
13645,
6,
4291,
340,
13,
201,
198,
464,
10214,
788,
19860,
644,
318,
852,
531,
1022,
262,
30039,
6518,
290,
530,
393,
201,
198,
3549,
3412,
18142,
... | 2.713499 | 363 |
# (C) Copyright 1996-2016 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergov... | [
2,
357,
34,
8,
15069,
8235,
12,
5304,
13182,
14326,
37,
13,
198,
2,
220,
198,
2,
770,
3788,
318,
11971,
739,
262,
2846,
286,
262,
24843,
10483,
594,
10628,
362,
13,
15,
198,
2,
543,
460,
307,
6492,
379,
2638,
1378,
2503,
13,
430... | 2.37455 | 833 |
# source: https://github.com/awjuliani/DeepRL-Agents/blob/master/Vanilla-Policy.ipynb
# https://medium.com/@awjuliani/super-simple-reinforcement-learning-tutorial-part-2-ded33892c724
import tensorflow as tf
import tensorflow.contrib.slim as slim
import numpy as np
import gym
import matplotlib as plt
env = gym.make('C... | [
2,
2723,
25,
3740,
1378,
12567,
13,
785,
14,
707,
73,
377,
25111,
14,
29744,
7836,
12,
10262,
658,
14,
2436,
672,
14,
9866,
14,
25298,
5049,
12,
36727,
13,
541,
2047,
65,
198,
2,
3740,
1378,
24132,
13,
785,
14,
31,
707,
73,
377,... | 1.974048 | 1,156 |
# coding: utf-8
__version__ = "0.3.3"
| [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
834,
9641,
834,
796,
366,
15,
13,
18,
13,
18,
1,
198
] | 1.857143 | 21 |
from tkinter import *
import tkinter.filedialog
import os
import os.path
from check_input import Input, InputError
import chroma_clade
from PIL import Image, ImageTk
# colour choices:
#https://sashat.me/2017/01/11/list-of-20-simple-distinct-colors/
# py2app saves data files in "<project>.app/Contents/Resources/", whi... | [
6738,
256,
74,
3849,
1330,
1635,
198,
11748,
256,
74,
3849,
13,
69,
3902,
498,
519,
198,
11748,
28686,
198,
11748,
28686,
13,
6978,
198,
6738,
2198,
62,
15414,
1330,
23412,
11,
23412,
12331,
198,
11748,
15358,
64,
62,
565,
671,
198,
... | 2.486505 | 2,927 |
from __future__ import print_function
import os
import re
import numpy as np
import pdb
from scipy import stats
line_num = -1
seed_range = range(1, 6)
datasets = ['yahoo_music', 'douban', 'flixster']
prefixs = ['_s']
print()
for prefix in prefixs:
print('Results of ' + prefix)
for dataset in datasets:
... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
279,
9945,
198,
6738,
629,
541,
88,
1330,
9756,
198,
198,
1370,
62,
22510,
796,
532,
16,
198,
198,
2882... | 2.060948 | 443 |
import random
import sys
import time
import re
import os
from contextlib import contextmanager
from uuid import uuid4
import logbook
import click
from .bootstrapping import requires_env
_DATABASE_URI_RE = re.compile(r"(?P<driver>(?P<db_type>sqlite|postgresql)(\+.*)?):\/\/(?P<host>[^/]*)\/(?P<db>.+)")
@click.group... | [
11748,
4738,
198,
11748,
25064,
198,
11748,
640,
198,
11748,
302,
198,
11748,
28686,
198,
6738,
4732,
8019,
1330,
4732,
37153,
198,
6738,
334,
27112,
1330,
334,
27112,
19,
198,
198,
11748,
2604,
2070,
198,
198,
11748,
3904,
198,
198,
67... | 2.626609 | 233 |
# Bank Program
import sqlite3
import os.path
# Gets the directory path where the db is located and links the program to the db
dirPath = os.path.dirname(os.path.abspath(__file__))
db = os.path.join(dirPath, "bankari.db")
conn = sqlite3.connect(db)
source = conn.execute(''' SELECT user, checking, savings FROM... | [
2,
5018,
6118,
201,
198,
201,
198,
11748,
44161,
578,
18,
201,
198,
11748,
28686,
13,
6978,
201,
198,
201,
198,
2,
29620,
262,
8619,
3108,
810,
262,
20613,
318,
5140,
290,
6117,
262,
1430,
284,
262,
20613,
201,
198,
15908,
15235,
79... | 2.885375 | 253 |
# -----------------------------------------------------------------------------
# A Three-Pronged Approach to Exploring the Limits of Static Malware Analyses:
# Callsite Parameter Cardinality (CPC) Counting: ida_cpc_extract.py
#
# The driver for ennumerating CPC for a Linux AMD64 binary using IDA Pro.
#
# Luke Jones (l... | [
2,
16529,
32501,
198,
2,
317,
7683,
12,
6836,
506,
276,
38066,
284,
5905,
3255,
262,
44943,
286,
36125,
4434,
1574,
1052,
43710,
25,
198,
2,
4889,
15654,
25139,
2357,
25564,
414,
357,
34,
5662,
8,
2764,
278,
25,
220,
3755,
62,
13155... | 1.989154 | 14,107 |
import graphene
from graphene_django import DjangoObjectType
from graphql import GraphQLError
from django.db.models import Q
from .models import Track, Like
from users.schema import UserType
| [
11748,
42463,
198,
6738,
42463,
62,
28241,
14208,
1330,
37770,
10267,
6030,
198,
6738,
4823,
13976,
1330,
29681,
48,
2538,
81,
1472,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
1330,
1195,
198,
198,
6738,
764,
27530,
1330,
17762,
11,
... | 3.636364 | 55 |
############################################################
# GPU Implementation of Random Forest Classifier - Training
# v0.1
# Seymour Knowles-Barley
############################################################
# Based on c code from:
# http://code.google.com/p/randomforest-matlab/
# License: GPLv2
#################... | [
29113,
14468,
7804,
4242,
198,
2,
11362,
46333,
286,
14534,
9115,
5016,
7483,
532,
13614,
198,
2,
410,
15,
13,
16,
198,
2,
42843,
9365,
829,
12,
10374,
1636,
198,
29113,
14468,
7804,
4242,
198,
2,
13403,
319,
269,
2438,
422,
25,
198... | 2.314016 | 8,490 |
import fire
import pandas as pd
if __name__ == '__main__':
fire.Fire(splicing_exon_position)
| [
11748,
2046,
198,
11748,
19798,
292,
355,
279,
67,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
2046,
13,
13543,
7,
22018,
6345,
62,
1069,
261,
62,
9150,
8,
198
] | 2.564103 | 39 |
import os
from codecs import open
from setuptools import find_packages, setup
import backend
ROOT_DIR = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(ROOT_DIR, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
install_requires = read_requirements('requirements.txt')
dev_r... | [
11748,
28686,
198,
6738,
40481,
82,
1330,
1280,
198,
198,
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
11,
9058,
198,
198,
11748,
30203,
198,
198,
13252,
2394,
62,
34720,
796,
28686,
13,
6978,
13,
397,
2777,
776,
7,
418,
13,
6978,
... | 2.591324 | 438 |
from rest_framework import viewsets, filters, permissions
from rest_framework import status
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from django_filters.rest_framework import DjangoFilterBackend
from core.serializers import (
CardCreateSerializer,
Car... | [
6738,
1334,
62,
30604,
1330,
5009,
1039,
11,
16628,
11,
21627,
198,
6738,
1334,
62,
30604,
1330,
3722,
198,
6738,
1334,
62,
30604,
13,
525,
8481,
1330,
1148,
47649,
3474,
198,
6738,
1334,
62,
30604,
13,
26209,
1330,
18261,
198,
198,
6... | 3.559524 | 168 |
#!/usr/bin/env python3-64
from __future__ import absolute_import, division, print_function, unicode_literals
# Install TensorFlow
import numpy as np
import networkx as nx
import json
import os
import sys
import yaml
loader = yaml.Loader
topology = nx.Graph()
LABEL_END = "_erlang"
with open("../Yml/topology.y... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
12,
2414,
198,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
11,
28000,
1098,
62,
17201,
874,
198,
198,
2,
15545,
309,
22854,
37535,
628,
198,
117... | 1.767749 | 1,817 |
from behave import given, when
from flask import json
@when("the last returned thread is closed")
@given("the last returned thread is closed")
def step_impl_the_response_message_thread_is_closed(context):
"""close the conversation of the last saved message"""
thread_id = context.bdd_helper.single_message_resp... | [
6738,
17438,
1330,
1813,
11,
618,
198,
6738,
42903,
1330,
33918,
628,
198,
31,
12518,
7203,
1169,
938,
4504,
4704,
318,
4838,
4943,
198,
31,
35569,
7203,
1169,
938,
4504,
4704,
318,
4838,
4943,
198,
4299,
2239,
62,
23928,
62,
1169,
62... | 2.691589 | 214 |
from __future__ import print_function
import os
import numpy as np
import argparse
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from torchvision import datasets, transforms
from PIL import Image
import matplotlib.pyplot as plt
from src.nets_test import *
parser... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
1822,
29572,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
... | 2.421351 | 1,939 |
import logging
from fraud_detection.settings import FILE_DIRS
logger = logging.getLogger(__name__)
| [
198,
11748,
18931,
198,
198,
6738,
7394,
62,
15255,
3213,
13,
33692,
1330,
45811,
62,
34720,
50,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
628,
628,
198
] | 3.028571 | 35 |
"""Contains tests for the query module"""
import unittest
from cubejsclientasync import (
Cube,
DateRange,
Order,
Query,
TimeDimension,
TimeGranularity,
)
from cubejsclientasync.enums import FilterOperator
from cubejsclientasync.filters import And, Filter
class QueryTests(unittest.TestCase):... | [
37811,
4264,
1299,
5254,
329,
262,
12405,
8265,
37811,
198,
198,
11748,
555,
715,
395,
198,
198,
6738,
23441,
8457,
16366,
292,
13361,
1330,
357,
198,
220,
220,
220,
23315,
11,
198,
220,
220,
220,
7536,
17257,
11,
198,
220,
220,
220,
... | 1.680421 | 1,236 |
#!/usr/bin/env python3
# Copyright 2004-present Facebook. All Rights Reserved.
import enum
import functools
import json
from collections import defaultdict
from datetime import datetime
from typing import Any, Iterable, Dict
from aiohttp import web
from sqlalchemy import insert, select
from tglib.clients import APISe... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
15069,
5472,
12,
25579,
3203,
13,
1439,
6923,
33876,
13,
198,
198,
11748,
33829,
198,
11748,
1257,
310,
10141,
198,
11748,
33918,
198,
6738,
17268,
1330,
4277,
11600,
198,
6738,
... | 2.163664 | 1,998 |
from setuptools import setup
with open('requirements.txt') as f:
required = f.read().splitlines()
setup(
install_requires=required,
name='monitoringHisto',
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# htt... | [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
4480,
1280,
10786,
8897,
18883,
13,
14116,
11537,
355,
277,
25,
198,
220,
220,
220,
2672,
796,
277,
13,
961,
22446,
35312,
6615,
3419,
198,
198,
40406,
7,
628,
220,
220,
220,
2721,
62,
... | 3.099751 | 401 |
# All content Copyright (C) 2018 Genomics plc
from wecall.bamutils.sequence_quality import SequenceQuality
import pysam
from wecall.bamutils.sample_bank import SampleBank
from wecall_test_drivers.ascii_wecall_runner import DEFAULT_SAMPLE_NAME
from wecall_test_drivers.base_test import BaseTest
from wecall_test_drivers.v... | [
2,
1439,
2695,
15069,
357,
34,
8,
2864,
5215,
31994,
458,
66,
198,
6738,
356,
13345,
13,
65,
321,
26791,
13,
43167,
62,
13237,
1330,
45835,
35013,
198,
11748,
279,
893,
321,
198,
6738,
356,
13345,
13,
65,
321,
26791,
13,
39873,
62,
... | 3.405172 | 116 |
import cv2
from matplotlib import pyplot as plt
import matplotlib.image as mpimg
import numpy as np
# import image
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from sklearn import datasets
from sklearn import svm
from sklearn import metrics
from sklearn.ensemble import RandomForestCla... | [
11748,
269,
85,
17,
201,
198,
6738,
2603,
29487,
8019,
1330,
12972,
29487,
355,
458,
83,
201,
198,
11748,
2603,
29487,
8019,
13,
9060,
355,
29034,
9600,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
2,
1330,
2939,
201,
198,
11748... | 1.877119 | 1,652 |
"""Support for Roku selects."""
from __future__ import annotations
from collections.abc import Awaitable, Callable
from dataclasses import dataclass
from rokuecp import Roku
from rokuecp.models import Device as RokuDevice
from homeassistant.components.select import SelectEntity, SelectEntityDescription
from homeassi... | [
37811,
15514,
329,
46194,
40573,
526,
15931,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
17268,
13,
39305,
1330,
5851,
4548,
540,
11,
4889,
540,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
198,
6738,
686,
74... | 2.644162 | 1,259 |
from dataclasses import replace
import datetime
import secrets
from neuro_sdk import ResourceNotFound
from typing import (
AbstractSet,
AsyncIterator,
Dict,
Iterable,
List,
Mapping,
Optional,
Sequence,
Type,
Union,
)
from yarl import URL
from neuro_flow.storage.base import (
... | [
6738,
4818,
330,
28958,
1330,
6330,
198,
198,
11748,
4818,
8079,
198,
11748,
13141,
198,
6738,
7669,
62,
21282,
74,
1330,
20857,
3673,
21077,
198,
6738,
19720,
1330,
357,
198,
220,
220,
220,
27741,
7248,
11,
198,
220,
220,
220,
1081,
... | 2.550173 | 289 |
# Generated by Django 3.0.2 on 2020-01-24 10:10
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
17,
319,
12131,
12,
486,
12,
1731,
838,
25,
940,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208... | 3.019231 | 52 |
import base64 as b64
import re
import threading
import time
import flask as f
import requests
import samehadaku as s
app = f.Flask(__name__, template_folder='.')
app.cache = {}
app.init_time = time.time()
app.bounded_semaphore = threading.BoundedSemaphore(12)
app.client_bsemaphores = {}
@app.before_request
@app.... | [
11748,
2779,
2414,
355,
275,
2414,
198,
11748,
302,
198,
11748,
4704,
278,
198,
11748,
640,
198,
198,
11748,
42903,
355,
277,
198,
11748,
7007,
198,
198,
11748,
976,
18108,
8719,
355,
264,
198,
198,
1324,
796,
277,
13,
7414,
2093,
7,
... | 2.532995 | 197 |
from aiohttp import ClientSession
from aiohttp.client import ClientTimeout
from aiohttp.web_exceptions import HTTPError, HTTPForbidden, HTTPNotFound
from holobot.sdk.ioc.decorators import injectable
from holobot.sdk.lifecycle import StartableInterface
from holobot.sdk.logging import LogInterface
from holobot.sdk.networ... | [
6738,
257,
952,
4023,
1330,
20985,
36044,
198,
6738,
257,
952,
4023,
13,
16366,
1330,
20985,
48031,
198,
6738,
257,
952,
4023,
13,
12384,
62,
1069,
11755,
1330,
14626,
12331,
11,
14626,
1890,
37978,
11,
14626,
3673,
21077,
198,
6738,
60... | 3.183486 | 218 |
###########################################################################################
# assets - javascript and css asset handling
#
# Date Author Reason
# ---- ------ ------
# 03/04/20 Lou King Create
#
# Copyright 2020 Lou King. All righ... | [
29113,
29113,
14468,
7804,
21017,
198,
2,
6798,
532,
44575,
290,
269,
824,
11171,
9041,
198,
2,
198,
2,
220,
220,
220,
220,
220,
220,
7536,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
6434,
220,
220,
220,
220,
220,
220,... | 2.25602 | 6,105 |