content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
# Copyright © 2019 Province of British Columbia
#
# 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 agr... | [
2,
15069,
10673,
13130,
22783,
286,
3517,
9309,
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.401598 | 2,378 |
#!/usr/bin/env python
"""
Created on Thu Jan 4 00:27:44 2018
@author: bokorn
"""
try:
from model_renderer.pose_renderer import BpyRenderer
from se3_distributions.datasets.ycb_dataset import ycbRenderTransform
BPY_IMPORTED = True
except ImportError:
BPY_IMPORTED = False
import torch
import torch.mul... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
41972,
319,
26223,
2365,
220,
604,
3571,
25,
1983,
25,
2598,
2864,
198,
198,
31,
9800,
25,
275,
482,
1211,
198,
37811,
198,
198,
28311,
25,
198,
220,
220,
220,
422,
2746,... | 2.866438 | 292 |
status = False
for i in iter(int, 1):
number = int(input())
if not number:
break
if not status:
if not (status % 3) and not (status % 7):
status = True
print('Ahtung!')
elif not (number % 3):
print('Unhappy')
elif not (number % 7):
... | [
13376,
796,
10352,
198,
198,
1640,
1312,
287,
11629,
7,
600,
11,
352,
2599,
198,
220,
220,
220,
1271,
796,
493,
7,
15414,
28955,
198,
220,
220,
220,
611,
407,
1271,
25,
198,
220,
220,
220,
220,
220,
220,
220,
2270,
198,
220,
220,
... | 1.988372 | 172 |
from calendar import timegm
from datetime import datetime, timedelta
import jwt
import pytest
from oauthlib.oauth2 import (
InvalidClientError,
InvalidGrantError,
InvalidRequestFatalError,
)
from h.services.oauth._errors import (
InvalidJWTGrantTokenClaimError,
MissingJWTGrantTokenClaimError,
)
fr... | [
6738,
11845,
1330,
640,
39870,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
198,
11748,
474,
46569,
198,
11748,
12972,
9288,
198,
6738,
267,
18439,
8019,
13,
12162,
1071,
17,
1330,
357,
198,
220,
220,
220,
17665,
1179... | 2.956204 | 137 |
from typing import Any, Iterable
import pytest
from immutables import Map
from mock import Mock, create_autospec, patch
from tickit.core.management.event_router import Wiring
from tickit.core.management.schedulers.base import BaseScheduler
from tickit.core.state_interfaces.state_interface import StateConsumer, StateP... | [
6738,
19720,
1330,
4377,
11,
40806,
540,
198,
198,
11748,
12972,
9288,
198,
6738,
2296,
315,
2977,
1330,
9347,
198,
6738,
15290,
1330,
44123,
11,
2251,
62,
2306,
418,
43106,
11,
8529,
198,
198,
6738,
4378,
270,
13,
7295,
13,
27604,
13... | 2.678862 | 246 |
# -*- coding: utf-8 -*-
# !/bin/env python
import os
class SafeOpen(object):
"""
A safe opening: if the directory doesn't exist, create it, and then open
"""
def makeDir(self, directory):
""" Check if the file directory exists, otherwise create the directory
"""
if not os.pat... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
5145,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
28686,
628,
198,
4871,
19978,
11505,
7,
15252,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
317,
3338,
47... | 2.534247 | 219 |
from __future__ import absolute_import
import logging
import msgpack
from tornado.gen import coroutine
from tornado.iostream import StreamClosedError
from tornado.tcpserver import TCPServer
LOGGER = logging.getLogger(__name__)
| [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
198,
11748,
18931,
198,
198,
11748,
31456,
8002,
198,
6738,
33718,
13,
5235,
1330,
1162,
28399,
198,
6738,
33718,
13,
72,
455,
1476,
1330,
13860,
2601,
1335,
12331,
198,
6738,
33718,
... | 3.609375 | 64 |
from .imdb import IMDB
from .sst5 import SST5
from .sst2 import SST2
from .trec import TREC
from .yelp2 import YELP2
from .yelp5 import YELP5
__all__ = ('IMDB', 'SST2', 'SST5', 'TREC', 'YELP2', 'YELP5')
| [
6738,
764,
320,
9945,
1330,
8959,
11012,
198,
6738,
764,
82,
301,
20,
1330,
311,
2257,
20,
198,
6738,
764,
82,
301,
17,
1330,
311,
2257,
17,
198,
6738,
764,
83,
8344,
1330,
309,
38827,
198,
6738,
764,
88,
417,
79,
17,
1330,
575,
... | 2.135417 | 96 |
from __future__ import annotations
from typing import Optional, TYPE_CHECKING
from spark_auto_mapper_fhir.fhir_types.list import FhirList
from spark_auto_mapper_fhir.fhir_types.string import FhirString
from spark_auto_mapper_fhir.extensions.extension_base import ExtensionBase
from spark_auto_mapper_fhir.base_types.fh... | [
6738,
11593,
37443,
834,
1330,
37647,
198,
6738,
19720,
1330,
32233,
11,
41876,
62,
50084,
2751,
198,
198,
6738,
9009,
62,
23736,
62,
76,
11463,
62,
69,
71,
343,
13,
69,
71,
343,
62,
19199,
13,
4868,
1330,
376,
71,
343,
8053,
198,
... | 2.924689 | 1,766 |
#!/usr/bin/env python3
'''
password file
<pos1-pos2 policy> <letter>: <passwd>
1-3 a: abcde
1-3 b: cdefg
2-9 c: ccccccccc
pos1 and pos2 are the positions (indexed at 1) in the passwd that contain <letter>. Exactly one must match for the passwd to pass.
The first entry passes.
The second entry fails.
The third entry f... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
7061,
6,
198,
28712,
2393,
198,
27,
1930,
16,
12,
1930,
17,
2450,
29,
1279,
9291,
31175,
1279,
6603,
16993,
29,
198,
16,
12,
18,
257,
25,
450,
66,
2934,
198,
16,
12,
18,... | 2.367117 | 444 |
#!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import unittest
import parlai.core.testing_utils as testing_utils
"""
Integration tests for the Controllable Dialogue pr... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
15069,
357,
66,
8,
3203,
11,
3457,
13,
290,
663,
29116,
13,
198,
2,
770,
2723,
2438,
318,
11971,
739,
262,
17168,
5964,
1043,
287,
262,
198,
2,
38559,
24290,
2393,
287,
262... | 2.979899 | 199 |
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
class NoisyNet(nn.Module):
"""
Re-formatted but originally from: https://github.com/higgsfield/RL-Adventure/blob/master/5.noisy%20dqn.ipynb
"""
#
| [
11748,
10688,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
628,
628,
198,
4871,
1400,
13560,
7934,
7,
20471,
13,
26796,
2599,
198,
220,
220,
220,
37227,
198,
220,
22... | 2.642105 | 95 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# =============================================================================
# Created By : medwatt
# Description : Calculating the nth Fibonacci number
# =============================================================================
from time_it import timed
### Bru... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
38093,
25609,
198,
2,
15622,
2750,
220,
220,
1058,
1117,
86,
1078,
198,
2,
12489,
220,
1058,
27131,
803,
262,
... | 3.081731 | 208 |
from core.template_parser.template import Template
| [
6738,
4755,
13,
28243,
62,
48610,
13,
28243,
1330,
37350,
198
] | 4.636364 | 11 |
import sys
import os.path
sys.path.append(
os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)))
from src.tkinterAsync import Tkinter
# TKINTER GUI
# CREATE VARIABLE
root = Tkinter(gui)
# AFTER RUNNING TKINTER, THE PYTHON MUST RUN THE CODE BELOW AT THE SAME TIME
print('Running this after... | [
11748,
25064,
198,
11748,
28686,
13,
6978,
198,
17597,
13,
6978,
13,
33295,
7,
198,
220,
220,
220,
28686,
13,
6978,
13,
397,
2777,
776,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
28686,... | 2.584507 | 142 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/3/21 5:20 PM
__author__ = 'Zhou Ran'
"""
This class is for plotting the site class
"""
import numpy as np
import pysam
from .bamfilter import pafilter
from .utils import checkbam
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2488,
7575,
220,
220,
220,
1058,
13130,
14,
18,
14,
2481,
642,
25,
1238,
3122,
198,
834,
9800,
834,
796,
705,
57... | 2.572917 | 96 |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: demo.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf i... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
262,
8435,
11876,
17050,
13,
220,
8410,
5626,
48483,
0,
198,
2,
2723,
25,
13605,
13,
1676,
1462,
198,
37811,
8645,
515,
8435,
11876,
2438,
526,
1593... | 2.469339 | 28,310 |
"""
helper functions for `goenrich`
"""
import pandas as pd
import numpy as np
def generate_background(annotations, df, go_id, entry_id):
""" generate the backgound from pandas datasets
>>> O = ontology(...)
>>> annotations = goenrich.read.gene2go(...)
>>> background = generate_background(annotations,... | [
37811,
198,
2978,
525,
5499,
329,
4600,
2188,
268,
7527,
63,
198,
37811,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
198,
4299,
7716,
62,
25249,
7,
34574,
602,
11,
47764,
11,
467,
62,
312,
11,
5726... | 2.545741 | 634 |
import pandas as pd
import warnings
warnings.filterwarnings("ignore")
filename = "../data/data.conv.txt.gz"
dataDirectory = '../data/'
if __name__=="__main__":
df = pd.read_csv(filename, header=None, delimiter=" ", names=["date", "time", "sensorid", "measurement", "voltage"],
dtype={"measurem... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
14601,
198,
40539,
654,
13,
24455,
40539,
654,
7203,
46430,
4943,
198,
34345,
796,
366,
40720,
7890,
14,
7890,
13,
42946,
13,
14116,
13,
34586,
1,
198,
7890,
43055,
796,
705,
40720,
7890,
1... | 2.21673 | 526 |
###########################################################################
#
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/l... | [
29113,
29113,
7804,
21017,
198,
2,
198,
2,
220,
15069,
33448,
3012,
11419,
198,
2,
198,
2,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
220,
345,
743,
407,
779,
428,
2393,
2845,
... | 2.049285 | 7,061 |
"""
Solvers for computation of linear systems of the form :math:`\mathbf{A}\mathbf{x}=\mathbf{b}`.
These solvers are used *under-the-hood* by :class:`~equadratures.poly.Poly` when :meth:`~equadratures.poly.Poly.set_model()` is called, with the solver specified by the ``method`` argument.
The solvers can also be used ... | [
37811,
198,
36949,
690,
329,
29964,
286,
14174,
3341,
286,
262,
1296,
1058,
11018,
25,
63,
59,
11018,
19881,
90,
32,
32239,
11018,
19881,
90,
87,
92,
28,
59,
11018,
19881,
90,
65,
92,
44646,
198,
198,
4711,
1540,
690,
389,
973,
1635... | 2.196404 | 14,796 |
import random
| [
11748,
4738,
198
] | 4.666667 | 3 |
from .sheets_api import SheetsApi
from .spreadsheet import Spreadsheet
| [
6738,
764,
42011,
62,
15042,
1330,
1375,
1039,
32,
14415,
198,
6738,
764,
43639,
21760,
1330,
31843,
21760,
198
] | 3.736842 | 19 |
# Copyright 2014 NEC Corporation. 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 ... | [
2,
15069,
1946,
41804,
10501,
13,
220,
1439,
2489,
10395,
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,
220,
407,
779,
428,
2393... | 3.434579 | 214 |
#!/usr/bin/env python
# minimal sanity check
from __future__ import print_function
import sys
import os
from PIL import Image
from PIL import features
try:
Image.core.ping
except ImportError as v:
print("***", v)
sys.exit()
except AttributeError:
pass
def testimage():
"""
PIL lets you crea... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
10926,
34182,
2198,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
25064,
198,
11748,
28686,
198,
198,
6738,
350,
4146,
1330,
7412,
198,
6738,
350,
4146,
1330,
... | 2.234755 | 2,509 |
__author__ = "david" | [
834,
9800,
834,
796,
366,
67,
8490,
1
] | 2.5 | 8 |
import os, sys, re
from PIL import Image, ImageOps, ImageMath
if __name__ == '__main__':
main()
| [
198,
11748,
28686,
11,
25064,
11,
302,
198,
198,
6738,
350,
4146,
1330,
7412,
11,
7412,
41472,
11,
7412,
37372,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419,
198
] | 2.666667 | 39 |
import re
from .utils import get_fallback_view, get_excluding_regex
| [
11748,
302,
198,
198,
6738,
764,
26791,
1330,
651,
62,
7207,
1891,
62,
1177,
11,
651,
62,
42218,
62,
260,
25636,
628
] | 3.181818 | 22 |
""" Example MARL Environment for RLLIB SUMO Utlis
Author: Lara CODECA lara.codeca@gmail.com
See:
https://github.com/lcodeca/rllibsumoutils
https://github.com/lcodeca/rllibsumodocker
for further details.
"""
import collections
import logging
import os
import sys
from pprint import pformat
... | [
37811,
17934,
18805,
43,
9344,
329,
371,
3069,
9865,
35683,
46,
7273,
27999,
628,
220,
220,
220,
6434,
25,
29849,
327,
3727,
36600,
300,
3301,
13,
19815,
31047,
31,
14816,
13,
785,
628,
220,
220,
220,
4091,
25,
198,
220,
220,
220,
2... | 2.404942 | 5,828 |
import os.path
import argparse
import json
import yaml
from datetime import datetime
import numpy as np
import plotly.graph_objects as go
import plotly.express as px
import ctypes
import PySimpleGUI as sg
class Stats:
'''Yliluokka, joka sisältää päivämäärät sekä metodin näiden muuttamiseksi oikeaan muotoon ja meto... | [
11748,
28686,
13,
6978,
198,
11748,
1822,
29572,
198,
11748,
33918,
198,
11748,
331,
43695,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
7110,
306,
13,
34960,
62,
48205,
355,
467,
198,
11748,
... | 1.987167 | 13,481 |
from gensim.models.keyedvectors import KeyedVectors
from konlpy.tag import Twitter
import numpy as np
import numpy.linalg as la
import argparse
import matplotlib.pyplot as plt
import sklearn.decomposition as decomposition
import sys
twitter = Twitter()
if __name__ == "__main__":
parser = argparse.ArgumentPars... | [
6738,
308,
641,
320,
13,
27530,
13,
2539,
276,
303,
5217,
1330,
7383,
276,
53,
478,
669,
198,
6738,
479,
261,
75,
9078,
13,
12985,
1330,
3009,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
299,
32152,
13,
75,
1292,
70,
355,
8591,
... | 2.657817 | 339 |
# Copyright (c) 2019 Manfred Moitzi
# License: MIT License
# created 2019-02-15
import pytest
import ezdxf
from ezdxf.entities.helix import Helix
from ezdxf.lldxf.tagwriter import TagCollector, basic_tags_from_text
HELIX = """0
HELIX
5
0
330
0
100
AcDbEntity
8
0
100
AcDbSpline
70
0
71
3
72
0
73
0
74
0
100
AcDbHelix
90... | [
2,
15069,
357,
66,
8,
13130,
1869,
39193,
4270,
4224,
72,
198,
2,
13789,
25,
17168,
13789,
198,
2,
2727,
13130,
12,
2999,
12,
1314,
198,
11748,
12972,
9288,
198,
11748,
304,
89,
67,
26152,
198,
6738,
304,
89,
67,
26152,
13,
298,
8... | 1.883817 | 241 |
#/usr/bin/python
# -*- coding:utf-8 -*-
import sys
import uuid
from docker_client import *
# opensim related
#HOST_NAME = "virgeo.pku.edu.cn"
#REGIONLOAD_WEB_URL_PREFIX = "http://virgeo.pku.edu.cn:880/region_load/"
HOST_NAME = HOST_IP
REGIONLOAD_WEB_URL_PREFIX = "http://{0}:880/region_load/".format(HOST_NAME)
# bas... | [
2,
14,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
198,
11748,
25064,
198,
11748,
334,
27112,
198,
198,
6738,
36253,
62,
16366,
1330,
1635,
198,
198,
2,
9808,
320,
3519,
198,
2,
39,... | 4.694416 | 985 |
import git
import os
import yaml
import poco.poco as poco
from .abstract_test import AbstractTestSuite
from poco.services.file_utils import FileUtils
from poco.services.cta_utils import CTAUtils
| [
11748,
17606,
198,
11748,
28686,
198,
11748,
331,
43695,
198,
11748,
279,
25634,
13,
79,
25634,
355,
279,
25634,
198,
6738,
764,
397,
8709,
62,
9288,
1330,
27741,
14402,
5606,
578,
198,
6738,
279,
25634,
13,
30416,
13,
7753,
62,
26791,
... | 3.16129 | 62 |
r"""
"""
__all__=[
'BertTokenizer',
"GPT2Tokenizer",
"RobertaTokenizer"
]
from .bert_tokenizer import BertTokenizer
from .gpt2_tokenizer import GPT2Tokenizer
from .roberta_tokenizer import RobertaTokenizer | [
81,
37811,
198,
198,
37811,
198,
834,
439,
834,
41888,
198,
220,
220,
220,
705,
33,
861,
30642,
7509,
3256,
628,
220,
220,
220,
366,
38,
11571,
17,
30642,
7509,
1600,
628,
220,
220,
220,
366,
15924,
8326,
30642,
7509,
1,
198,
60,
... | 2.630952 | 84 |
import os
import sys
import pathlib
import subprocess
if __name__ == '__main__':
if len(sys.argv) == 1:
make_kernel('threebodypes')
else:
kernelname = sys.argv[1]
make_kernel(kernelname)
| [
11748,
28686,
198,
11748,
25064,
198,
11748,
3108,
8019,
198,
11748,
850,
14681,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
611,
18896,
7,
17597,
13,
853,
85,
8,
6624,
352,
25,
198,
220,
... | 2.291667 | 96 |
from .res_client import ResClient
| [
6738,
764,
411,
62,
16366,
1330,
1874,
11792,
198
] | 3.777778 | 9 |
import numpy as np
import control
import matplotlib.pyplot as plt
def predict_lti(b, a, y, u, k=1, d=0):
"""
Returns the k-step ahead prediction for the LTI with pulse-transfer function
H(z) = B(z)/A(z)
The coefficients of the numerator polynomial is contained in the array b, and those of
the de... | [
11748,
299,
32152,
355,
45941,
198,
11748,
1630,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
4299,
4331,
62,
2528,
72,
7,
65,
11,
257,
11,
331,
11,
334,
11,
479,
28,
16,
11,
288,
28,
15,
2599,
198,
22... | 2.166265 | 830 |
import asyncio
from kitsu import KitsuClient
from pprint import pprint as p
client = KitsuClient()
asyncio.get_event_loop().run_until_complete(this())
| [
11748,
30351,
952,
201,
198,
6738,
19183,
84,
1330,
509,
19831,
11792,
201,
198,
6738,
279,
4798,
1330,
279,
4798,
355,
279,
201,
198,
201,
198,
16366,
796,
509,
19831,
11792,
3419,
201,
198,
201,
198,
201,
198,
201,
198,
292,
13361,
... | 2.733333 | 60 |
"""Script to download all the data we need for GPV experiments"""
import argparse
import logging
import os
import shutil
import tarfile
import tempfile
from collections import defaultdict
from os import makedirs
from os.path import exists, join, dirname
from tqdm import tqdm
from gpv2 import file_paths
from gpv2.dat... | [
37811,
7391,
284,
4321,
477,
262,
1366,
356,
761,
329,
14714,
53,
10256,
37811,
198,
198,
11748,
1822,
29572,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
13422,
7753,
198,
11748,
20218,
7753,
198,
6738,
17268,... | 2.364103 | 780 |
# 1A - Theatre Square
# http://codeforces.com/problemset/problem/1/A
n, m, a = map(int, input().split())
t = ((n // a) + (1 if n % a != 0 else 0)) * ((m // a) + (1 if m % a != 0 else 0))
print(t)
| [
2,
352,
32,
532,
15752,
9276,
198,
2,
2638,
1378,
19815,
891,
273,
728,
13,
785,
14,
1676,
22143,
316,
14,
45573,
14,
16,
14,
32,
198,
198,
77,
11,
285,
11,
257,
796,
3975,
7,
600,
11,
5128,
22446,
35312,
28955,
198,
83,
796,
... | 2.290698 | 86 |
import cv2
import numpy as np
import math
import random
| [
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
10688,
198,
11748,
4738,
628
] | 3.352941 | 17 |
from poker_trainer.range.generator.lazy import *
| [
6738,
27101,
62,
2213,
10613,
13,
9521,
13,
8612,
1352,
13,
75,
12582,
1330,
1635,
628
] | 3.125 | 16 |
from typing import Union, List, Tuple
from copy import deepcopy
from math import sqrt
_pyi_Vector2Type_type = Union['Vector2Type', Tuple[Union[float, int], Union[float, int]], List[Union[float, int]]]
_pyi_Vector2Type_item_type = Union[_pyi_Vector2Type_type, int, float]
StaticVector2Type = Vector2Type
DynamicV... | [
6738,
19720,
1330,
4479,
11,
7343,
11,
309,
29291,
198,
6738,
4866,
1330,
2769,
30073,
198,
6738,
10688,
1330,
19862,
17034,
628,
198,
62,
9078,
72,
62,
38469,
17,
6030,
62,
4906,
796,
4479,
17816,
38469,
17,
6030,
3256,
309,
29291,
5... | 2.627451 | 204 |
import mxnet as mx
import logging
import numpy as np
import matplotlib.pyplot as plt
import pdb
from dorefa_ops import get_dorefa
from math_ops import *
from random import randint
import time
logging.getLogger().setLevel(logging.DEBUG)
BITW = 1
BITA = 1
BITG = 32 # TODO: we don't have binarized gradient implementatio... | [
11748,
285,
87,
3262,
355,
285,
87,
198,
11748,
18931,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
279,
9945,
198,
6738,
288,
382,
13331,
62,
2840,
1330,
651,
62,
67,
... | 2.348684 | 608 |
#!/usr/bin/env python3
import asyncio
import time, os
from mavsdk import System
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(run())
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
30351,
952,
198,
11748,
640,
11,
28686,
198,
6738,
285,
615,
21282,
74,
1330,
4482,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
... | 2.608696 | 69 |
# coding: utf-8
"""
VAAS API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: 0.0.1
Generated by: https://openapi-generator.tech
"""
try:
from inspect import getfullargspec
except Import... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
13753,
1921,
7824,
628,
220,
220,
220,
1400,
6764,
2810,
357,
27568,
416,
4946,
15042,
35986,
3740,
1378,
12567,
13,
785,
14,
9654,
499,
270,
10141,
14,
9654,
1504... | 2.350243 | 3,292 |
import logging
import socket
import asyncio
from .cipher import Cipher
BUFFER_SIZE = 1024
Connection = socket.socket
logger = logging.getLogger(__name__)
class SecureSocket:
"""
SecureSocket is a socket,
that has the ability to decode read and encode write.
"""
async def encodeCopy(self, dst: C... | [
11748,
18931,
198,
11748,
17802,
198,
11748,
30351,
952,
198,
198,
6738,
764,
66,
10803,
1330,
44334,
198,
198,
19499,
45746,
62,
33489,
796,
28119,
198,
32048,
796,
17802,
13,
44971,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
... | 2.179775 | 534 |
from urlparse import urlparse
from re import compile as re_compile
from netifaces import AF_INET, AF_INET6
from aplus import Promise
from openmtc.exc import OpenMTCNetworkError
from openmtc_onem2m.model import RemoteCSE, AE
from futile.collections import get_iterable
from openmtc_onem2m.transport import OneM2MErrorRes... | [
6738,
19016,
29572,
1330,
19016,
29572,
198,
6738,
302,
1330,
17632,
355,
302,
62,
5589,
576,
198,
6738,
2010,
361,
2114,
1330,
12341,
62,
1268,
2767,
11,
12341,
62,
1268,
2767,
21,
198,
198,
6738,
257,
9541,
1330,
34920,
198,
6738,
1... | 3.109827 | 173 |
#!/usr/bin/python3
# Script from David Ryder (CEFAS, Weymouth, England)
# Needs ete3 being installed and folder .etetoolkit being present in the home directory
# If folder .etetoolkit is not present in home directory, you need to run ONLY
# the ete3 command once first, delete the output, and then set -e to the
# .ete... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
198,
2,
12327,
422,
3271,
40238,
357,
5222,
37,
1921,
11,
775,
4948,
1536,
11,
4492,
8,
198,
198,
2,
36557,
304,
660,
18,
852,
6589,
290,
9483,
764,
316,
316,
970,
15813,
852,
1944,
... | 2.681733 | 1,062 |
# for python-2 to install this in edit mode
from setuptools import setup
setup()
| [
2,
329,
21015,
12,
17,
284,
2721,
428,
287,
4370,
4235,
198,
6738,
900,
37623,
10141,
1330,
9058,
198,
40406,
3419,
198
] | 3.681818 | 22 |
import datetime
import json
import logging
import os
import sys
import voluptuous as vol
import yaml
CONFIG_DIRECTORY = ".ledfx"
CONFIG_FILE_NAME = "config.json"
OLD_CONFIG_FILE_NAME = "config.yaml"
DEFAULT_PRESETS_FILE_NAME = "default_presets.json"
CORE_CONFIG_SCHEMA = vol.Schema(
{
vol.Optional("host",... | [
11748,
4818,
8079,
198,
11748,
33918,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
25064,
198,
198,
11748,
2322,
37623,
5623,
355,
2322,
198,
11748,
331,
43695,
198,
198,
10943,
16254,
62,
17931,
23988,
15513,
796,
27071,
992,
21373,
... | 2.3707 | 2,587 |
from django.apps import AppConfig
default_app_config = 'extensions.django_rq.ExtDjangoRQConfig'
| [
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
628,
198,
12286,
62,
1324,
62,
11250,
796,
705,
2302,
5736,
13,
28241,
14208,
62,
81,
80,
13,
11627,
35,
73,
14208,
49,
48,
16934,
6,
198
] | 2.8 | 35 |
# Copyright (c) 2019 - The Procedural Generation for Gazebo authors
# For information on the respective copyright owner see the NOTICE file
#
# 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
#
#... | [
2,
15069,
357,
66,
8,
13130,
532,
383,
23652,
1523,
16588,
329,
21347,
1765,
78,
7035,
198,
2,
1114,
1321,
319,
262,
11756,
6634,
4870,
766,
262,
28536,
2393,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
... | 3.911765 | 204 |
# -*- coding: utf-8 -*-
#
# (c) 2018, Toshio Kuratomi <a.badger@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
# Note that the original author of this, Toshio Kuratomi, is trying to submit this to six. If
# successful, the code in six will be available under s... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
357,
66,
8,
2864,
11,
47922,
952,
18132,
265,
12753,
1279,
64,
13,
14774,
1362,
31,
14816,
13,
785,
29,
198,
2,
22961,
3611,
5094,
13789,
410,
18,
13,
1... | 3.039755 | 327 |
from fireworks.core.firework import Firework, Workflow
from fireworks.core.fworker import FWorker
from fireworks.core.launchpad import LaunchPad
from fireworks.core.rocket_launcher import launch_rocket, rapidfire
from fireworks.user_objects.firetasks.script_task import ScriptTask
__author__ = "Anubhav Jain"
__copyrigh... | [
6738,
26056,
13,
7295,
13,
6495,
1818,
1330,
3764,
1818,
11,
5521,
11125,
198,
6738,
26056,
13,
7295,
13,
69,
28816,
1330,
376,
12468,
263,
198,
6738,
26056,
13,
7295,
13,
35681,
15636,
1330,
21225,
26114,
198,
6738,
26056,
13,
7295,
... | 2.910314 | 223 |
#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Rasmus Paetau
# Copyright (c) 2014 Rasmus Paetau
#
# License: MIT
#
"""This module exports the Jslint plugin class."""
from SublimeLinter.lint import Linter, util
class Jslint(Linter):
"""Provides an interfac... | [
2,
198,
2,
300,
3849,
13,
9078,
198,
2,
406,
3849,
329,
3834,
27299,
43,
3849,
18,
11,
257,
2438,
10627,
9355,
329,
3834,
27299,
8255,
513,
198,
2,
198,
2,
22503,
416,
39933,
385,
11243,
316,
559,
198,
2,
15069,
357,
66,
8,
1946... | 2.415771 | 279 |
import requests
user_search = input('search keyword: ')
user_search = user_search.replace(' ','+')
#books search
url = 'https://openlibrary.org/search.json?q='
data = requests.get(url+user_search).json()
for i in range(len(data['docs'])):
try:
print(data['docs'][i]['title_suggest'],' - ',data['docs'][i]['author_na... | [
11748,
7007,
198,
198,
7220,
62,
12947,
796,
5128,
10786,
12947,
21179,
25,
705,
8,
198,
7220,
62,
12947,
796,
2836,
62,
12947,
13,
33491,
10786,
705,
4032,
10,
11537,
198,
198,
2,
12106,
2989,
198,
6371,
796,
705,
5450,
1378,
9654,
... | 2.706349 | 126 |
import discord
from discord.ext import commands
from discord import webhook
| [
11748,
36446,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
6738,
36446,
1330,
3992,
25480,
628
] | 4.8125 | 16 |
# -*- coding: utf-8 -*-
import numpy as np
from itertools import product
from .facility_location_solution import FacilityLocationSolution
from ..stochastic_problem_basis import StochasticProblemBasis
class FacilityLocationProblemMultistage(StochasticProblemBasis):
"""Three-Stage Facility Location Problem.
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
340,
861,
10141,
1330,
1720,
198,
198,
6738,
764,
38942,
879,
62,
24886,
62,
82,
2122,
1330,
29118,
14749,
46344,
198,
673... | 2.252865 | 6,806 |
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="RouteHopColor")
@attr.s(auto_attribs=True)
class RouteHopColor:
""" """
hop: Union[Unset, str] = UNSET
where: Union[Unset, None, str] = UNSET
via: Union[Unset, None, str] =... | [
6738,
19720,
1330,
4377,
11,
360,
713,
11,
7343,
11,
5994,
11,
5994,
19852,
11,
4479,
198,
198,
11748,
708,
81,
198,
198,
6738,
11485,
19199,
1330,
4725,
28480,
11,
791,
2617,
198,
198,
51,
796,
5994,
19852,
7203,
51,
1600,
5421,
26... | 2.550239 | 209 |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pricing.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.proto... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
262,
8435,
11876,
17050,
13,
220,
8410,
5626,
48483,
0,
198,
2,
2723,
25,
13045,
13,
1676,
1462,
198,
198,
11748,
25064,
198,
62,
65,
28,
17597,
1... | 2.347293 | 6,686 |
# -*- coding: utf-8 -*-
"""
You can create a file called `.env` in the root of the repo, containing your local env vars.
It will be automatically loaded when starting the action server.
"""
from dotenv import load_dotenv
# Load environment variables
# needs to happen before anything else (to properly instantia... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
37811,
201,
198,
1639,
460,
2251,
257,
2393,
1444,
4600,
13,
24330,
63,
287,
262,
6808,
286,
262,
29924,
11,
7268,
534,
1957,
17365,
410,
945,
13,
201,
198,
1026,... | 2.396226 | 424 |
#!/usr/bin/env python
"""
This program implements the symbolic dynamic filtering (SDF) algorithm
as a time series feature extraction method, presented in the following paper:
Bahrampour, Soheil, Asok Ray, Soumalya Sarkar,
Thyagaraju Damarla, and Nasser M. Nasrabadi.
"Performance comparison of feature extraction... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
201,
198,
37811,
201,
198,
1212,
1430,
23986,
262,
18975,
8925,
25431,
357,
50,
8068,
8,
11862,
201,
198,
292,
257,
640,
2168,
3895,
22236,
2446,
11,
5545,
287,
262,
1708,
3348,
25,
201,
... | 2.346863 | 3,794 |
# -*- coding: utf-8 -*-
# pylint: disable=too-many-arguments, wrong-import-position
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
279,
2645,
600,
25,
15560,
28,
18820,
12,
21834,
12,
853,
2886,
11,
2642,
12,
11748,
12,
9150,
198,
29113,
29113,
7804,
21017,
198,
2,
15069,
357,
66,
828,
383,
3... | 2.366279 | 688 |
import os
import numpy as np
import pylab as pl
from pdtrend.detrend import PDTrend
from pdtrend.datasets.base import load_lightcurve_set
from pdtrend.utils.logger import Logger
if __name__ == '__main__':
test() | [
11748,
28686,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
279,
2645,
397,
355,
458,
198,
198,
6738,
279,
28664,
10920,
13,
15255,
10920,
1330,
28288,
10920,
198,
6738,
279,
28664,
10920,
13,
19608,
292,
1039,
13,
8692,
1330,
34... | 2.78481 | 79 |
#
# coding: utf-8
# Copyright (c) 2019 DATADVANCE
#
# 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, merge,... | [
2,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
2,
15069,
357,
66,
8,
13130,
360,
1404,
2885,
53,
19240,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
198,
2,
257,
4866,
286,
428,
3... | 2.818754 | 2,858 |
#!/usr/bin/env python
import visvis as vv
app = vv.use()
# Get green channel of lena image
im = vv.imread('lena.png')[:,:,1]
# Make 4 subplots with different colormaps
cmaps = [vv.CM_GRAY, vv.CM_JET, vv.CM_SUMMER, vv.CM_HOT]
for i in range(4):
a = vv.subplot(2,2,i+1)
t = vv.imshow(im, clim=(0,255))
a.axi... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
1490,
4703,
355,
410,
85,
198,
1324,
796,
410,
85,
13,
1904,
3419,
198,
198,
2,
3497,
4077,
6518,
286,
300,
8107,
2939,
198,
320,
796,
410,
85,
13,
320,
961,
10786,
75,... | 2.010363 | 193 |
#
# author: Jungtaek Kim (jtkim@postech.ac.kr)
# last updated: November 5, 2020
#
"""It is utilities for Bayesian optimization."""
import numpy as np
try:
from scipydirect import minimize as directminimize
except: # pragma: no cover
directminimize = None
try:
import cma
except: # pragma: no cover
cma =... | [
2,
198,
2,
1772,
25,
27134,
8326,
988,
6502,
357,
73,
30488,
320,
31,
7353,
3055,
13,
330,
13,
38584,
8,
198,
2,
938,
6153,
25,
3389,
642,
11,
12131,
198,
2,
198,
37811,
1026,
318,
20081,
329,
4696,
35610,
23989,
526,
15931,
198,
... | 2.568384 | 3,378 |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# by Qige <qigezhao@gmail.com> since 2020-08-09
import logging
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
416,
1195,
10045,
1279,
80,
328,
8471,
23778,
31,
14816,
13,
785,
29,
1201,
12131,
12,
2919,
12,
2931,
198,
198,
... | 2.354167 | 48 |
import math
import tensorflow as tf
# TODO: use a more industry standard way to warn the user of invalid behavior (instead of just print....)
# TODO: Add better input validation
# TODO: Add Unit Tests
# TODO: make it work with multiple versions of TF
# Utilities
def calculate_groupwise_splits(filters, min_spl... | [
198,
198,
11748,
10688,
198,
11748,
11192,
273,
11125,
355,
48700,
628,
628,
198,
198,
2,
16926,
46,
25,
779,
257,
517,
2831,
3210,
835,
284,
9828,
262,
2836,
286,
12515,
4069,
357,
38070,
286,
655,
3601,
1106,
8,
198,
2,
16926,
46,... | 2.54938 | 7,736 |
import re
from monitoring import computer
from LibreHardwareMonitor import Hardware
# TODO find a better way to categorize sensors than by name
USED_SPACE_NAME = "Used Space"
READ_RATE_NAME = "Read Rate"
WRITE_RATE_NAME = "Write Rate"
storage_list = list(map(Storage, filter(lambda hw: hw.HardwareType == Hardware.Hard... | [
11748,
302,
198,
6738,
9904,
1330,
3644,
198,
6738,
44384,
49865,
35479,
1330,
28715,
198,
198,
2,
16926,
46,
1064,
257,
1365,
835,
284,
17851,
1096,
15736,
621,
416,
1438,
198,
2937,
1961,
62,
4303,
11598,
62,
20608,
796,
366,
38052,
... | 3.451923 | 104 |
# -*- coding: utf-8 -*-
# ----------------------------------------------------------------------
# <describe module here>
# ----------------------------------------------------------------------
# Copyright (C) 2007-2018 The NOC Project
# See LICENSE for details
# -------------------------------------------------------... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
16529,
23031,
198,
2,
1279,
20147,
4892,
8265,
994,
29,
198,
2,
16529,
23031,
198,
2,
15069,
357,
34,
8,
4343,
12,
7908,
383,
399,
4503,
4935,
198,
2,
4091,
38559... | 5.053191 | 94 |
_disable_notifications = False
__version__ = "1.1.2"
default_app_config = "django_nyt.apps.DjangoNytConfig"
| [
62,
40223,
62,
1662,
6637,
796,
10352,
198,
198,
834,
9641,
834,
796,
366,
16,
13,
16,
13,
17,
1,
198,
198,
12286,
62,
1324,
62,
11250,
796,
366,
28241,
14208,
62,
3281,
83,
13,
18211,
13,
35,
73,
14208,
45,
20760,
16934,
1,
198... | 2.444444 | 45 |
matrix = read_matrix()
result = {
'primary_diagonal': {'values': [], 'sum': 0},
'secondary_diagonal': {'values': [], 'sum': 0}
}
primary_diagonal_sum = 0
secondary_diagonal_sum = 0
for i in range(len(matrix)):
primary_diagonal_sum += matrix[i][i]
result['primary_diagonal']['values'].append(matrix[i... | [
198,
198,
6759,
8609,
796,
1100,
62,
6759,
8609,
3419,
198,
198,
20274,
796,
1391,
198,
220,
220,
220,
705,
39754,
62,
10989,
27923,
10354,
1391,
6,
27160,
10354,
685,
4357,
705,
16345,
10354,
657,
5512,
198,
220,
220,
220,
705,
38238... | 2.50646 | 387 |
#!/usr/bin/env python
'''a CLI for the library
'''
# stdlib
import argparse
import collections
import inspect
import logging
import pprint
import sys
if sys.version_info[0] == 2:
from itertools import izip_longest as zip_longest
elif sys.version_info[0] == 3:
from itertools import zip_longest
# local
from . import ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
7061,
6,
64,
43749,
329,
262,
5888,
198,
7061,
6,
198,
2,
14367,
8019,
198,
11748,
1822,
29572,
198,
11748,
17268,
198,
11748,
10104,
198,
11748,
18931,
198,
11748,
279,
4798,
198,
117... | 2.544768 | 927 |
from hgmca import hgmca_core, wavelets_hgmca, helpers, wavelets_base
import numpy as np
import unittest
import os
import numba
| [
6738,
289,
39870,
6888,
1330,
289,
39870,
6888,
62,
7295,
11,
6769,
5289,
62,
71,
39870,
6888,
11,
49385,
11,
6769,
5289,
62,
8692,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
555,
715,
395,
198,
11748,
28686,
198,
11748,
997,
701... | 2.976744 | 43 |
import pandas as pd
import numpy as np
from Codes.Database_Connection_Files.connect_to_database import connect_to_db
table_info_csv_path = 'Data_Files/all_tables-final.csv'
df_table_info = pd.read_csv(table_info_csv_path)
# df_table_info.shape # (1348, 8)
df_table_info = df_table_info[df_table_info['titleFinal'].no... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
44380,
13,
38105,
62,
32048,
62,
25876,
13,
8443,
62,
1462,
62,
48806,
1330,
2018,
62,
1462,
62,
9945,
628,
198,
11487,
62,
10951,
62,
40664,
62,
6978,
... | 2.434336 | 2,825 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
description: get-list-of-all-column-headings
version: 0.0.1
created: 2018-10-23
author: Ed Nykaza
dependencies:
* donor json data
license: BSD-2-Clause
"""
# %% REQUIRED LIBRARIES
import os
import sys
import pandas as pd
import datetime as dt
import argparse
impo... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
11213,
25,
651,
12,
4868,
12,
1659,
12,
439,
12,
28665,
12,
2256,
654,
198,
9641,
25,
657,
13,
15,
... | 2.342391 | 1,104 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# /*******************************************************
# * Copyright (C) 2013-2014 CloudRunner.io <info@cloudrunner.io>
# *
# * Proprietary and confidential
# * This file is part of CloudRunner Server.
# *
# * CloudRunner S... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
43907,
25,
7400,
11338,
28,
19,
6482,
10394,
28,
19,
2705,
8658,
11338,
28,
19,
198,
198,
2,
1220,
17174,
8412,
2466,
8... | 2.188506 | 1,305 |
"""isort:skip_file"""
import unittest
import gtirb
import uuid
# imports needed because repr's use of unqualified names
from uuid import UUID # noqa: F401,F403,F401
from gtirb import * # noqa: F401,F403,F401
if __name__ == "__main__":
unittest.main()
| [
37811,
271,
419,
25,
48267,
62,
7753,
37811,
198,
198,
11748,
555,
715,
395,
198,
11748,
308,
83,
343,
65,
198,
11748,
334,
27112,
198,
198,
2,
17944,
2622,
780,
41575,
338,
779,
286,
555,
22557,
3891,
198,
6738,
334,
27112,
1330,
4... | 2.568627 | 102 |
# Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
2,
15069,
12131,
383,
309,
22854,
37535,
46665,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,... | 3.761146 | 314 |
import os
import wget
import shutil
json_jar = wget.download('http://repo1.maven.org/maven2/org/json/json/20190722/json-20190722.jar')
tensorflow_jar = wget.download('http://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-1.14.0.jar')
print()
os.system('svn checkout http://github.com/drtnf/LoveLetter/trun... | [
11748,
28686,
198,
11748,
266,
1136,
198,
11748,
4423,
346,
198,
17752,
62,
9491,
796,
266,
1136,
13,
15002,
10786,
4023,
1378,
260,
7501,
16,
13,
2611,
574,
13,
2398,
14,
2611,
574,
17,
14,
2398,
14,
17752,
14,
17752,
14,
23344,
29... | 2.525424 | 295 |
from django.contrib.admin.views.autocomplete import AutocompleteJsonView as BaseAutocompleteJsonView
from django.http import Http404, JsonResponse
class AutocompleteJsonView(BaseAutocompleteJsonView):
"""Overriding AutocompleteJsonView to allow safe snippets
Attributes:
object_list (TYPE): Descripti... | [
6738,
42625,
14208,
13,
3642,
822,
13,
28482,
13,
33571,
13,
2306,
42829,
6677,
1330,
5231,
42829,
6677,
41,
1559,
7680,
355,
7308,
16541,
42829,
6677,
41,
1559,
7680,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
26429,
11,
449,... | 2.158098 | 778 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# __coconut_hash__ = 0x1e7f89f1
# Compiled with Coconut version 2.0.0-a_dev9 [How Not to Be Seen]
"""
Constants for use across all of BBopt.
"""
# Coconut Header: -------------------------------------------------------------
from __future__ import print_function, absolu... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
11593,
66,
420,
16478,
62,
17831,
834,
796,
657,
87,
16,
68,
22,
69,
4531,
69,
16,
198,
198,
2,
3082,
3902,
35... | 2.40685 | 1,927 |
from flask import Flask
from flask_bootstrap import Bootstrap
from flask_moment import Moment
from flask_sqlalchemy import SQLAlchemy
from flask_mail import Mail
from config import config
from flask_login import LoginManager
from flask_pagedown import PageDown
from flask_sslify import SSLify
bootstrap = Bootstrap()
m... | [
6738,
42903,
1330,
46947,
198,
6738,
42903,
62,
18769,
26418,
1330,
18892,
26418,
198,
6738,
42903,
62,
32542,
298,
1330,
29278,
198,
6738,
42903,
62,
25410,
282,
26599,
1330,
16363,
2348,
26599,
198,
6738,
42903,
62,
4529,
1330,
11099,
1... | 3.606667 | 150 |
import attalos.util.log.log as l
logger = l.getLogger(__name__)
| [
11748,
708,
41823,
13,
22602,
13,
6404,
13,
6404,
355,
300,
628,
198,
6404,
1362,
796,
300,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
628
] | 2.481481 | 27 |
import torch
from torch import nn
| [
11748,
28034,
198,
6738,
28034,
1330,
299,
77,
628
] | 3.888889 | 9 |
from abc import ABC
from types import NoneType
import logictest
import http_connector
from log import log
| [
6738,
450,
66,
1330,
9738,
198,
6738,
3858,
1330,
6045,
6030,
198,
198,
11748,
2604,
713,
395,
198,
11748,
2638,
62,
8443,
273,
198,
6738,
2604,
1330,
2604,
628
] | 3.724138 | 29 |
#!/usr/bin/env pyturbubox
import box
import ulz
import pickle
import argparse
from pathlib import Path
import scipy.optimize
import numpy as np
from matplotlib import pylab as plt
pp = argparse.ArgumentParser(description = 'Plotting PDF')
pp.add_argument(
'--destdir',
help='path to store: <dir>/%%03d.png',
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
12972,
83,
5945,
549,
1140,
198,
198,
11748,
3091,
198,
11748,
14856,
89,
198,
11748,
2298,
293,
198,
11748,
1822,
29572,
198,
6738,
3108,
8019,
1330,
10644,
198,
11748,
629,
541,
88,
13,
40085,
1... | 2.947146 | 473 |
from app.middleware.sqlalchemy import SQLAlchemySessionManager
| [
6738,
598,
13,
27171,
1574,
13,
25410,
282,
26599,
1330,
16363,
2348,
26599,
36044,
13511,
628,
628
] | 3.882353 | 17 |
import torch
import torch.nn as nn
import math
import torch.nn.functional as F
import time
from timm.models.registry import register_model
@register_model
if __name__ == '__main__':
model = CSPPeleeNet(num_classes=1000, csp_p1_rate=[0.25, 0.25, 0.25, 0.25]).cuda()
model.load_param("csp_pelee_0... | [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
10688,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
11748,
640,
198,
6738,
4628,
76,
13,
27530,
13,
2301,
4592,
1330,
7881,
62,
19849,
628,
628,
198,
220... | 2.35122 | 205 |
#!/usr/bin/env python
# this script pulls the fasta seqs of WB elements in the CER6 or CELETC2 families
# USE:CER_CELETC2.py in appropriate folder
import sys
import re
import os
from subprocess import Popen, PIPE
OUT_CER6 = open("WB_CER6_fastas.fasta", "w")
OUT_CELETC2 = open("WB_CELETC2_fastas.fasta", "w")
cer6 = {}... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
220,
198,
2,
428,
4226,
16194,
262,
3049,
64,
33756,
82,
286,
36245,
4847,
287,
262,
327,
1137,
21,
393,
18671,
2538,
4825,
17,
4172,
198,
2,
23210,
25,
34,
1137,
62,
5222,
2538,
4825,
... | 2.272124 | 452 |
# coding: utf-8
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
2,
49962,
284,
262,
24843,
10442,
5693,
357,
1921,
37,
8,
739,
530,
198,
2,
393,
517,
18920,
5964,
11704,
13,
220,
4091,
262,
28536,
2393,
198,
2,
9387,
351,
428,
670,
329,
3224,
1321,
1... | 2.566524 | 1,864 |
# Copyright 2014-2016 F5 Networks Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | [
2,
15069,
1946,
12,
5304,
376,
20,
27862,
3457,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,... | 3.313167 | 281 |
import pandas as pd
import sys
import mmsdk
from mmsdk import mmdatasdk
import numpy as np
import csv
openface_path = "/shares/perception-working/minh/openface_mosi/"
dataset=mmdatasdk.mmdataset(openface_path)
#dataset.keys() = 'OpenFace_2' and 'Opinion Segment Labels'
#user id = dataset['OpenFace_2].keys()
#dataset[... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
25064,
198,
11748,
285,
907,
34388,
198,
6738,
285,
907,
34388,
1330,
8085,
19608,
292,
34388,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
269,
21370,
198,
198,
9654,
2550,
62,
6978,
796,... | 2.573333 | 150 |
TEAM_TO_TEAM_ABBR = {
'ATLANTA HAWKS': 'ATL',
'ST. LOUIS HAWKS': 'SLH',
'MILWAUKEE HAWKS': 'MIL',
'TRI-CITIES BLACKHAWKS': 'TCB',
'BOSTON CELTICS': 'BOS',
'BROOKLYN NETS': 'BRK',
'NEW JERSEY NETS' : 'NJN',
'NEW YORK NETS' : 'NYN',
'CHICAGO BULLS': ... | [
9328,
2390,
62,
10468,
62,
9328,
2390,
62,
6242,
11473,
796,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
705,
1404,
25697,
5603,
367,
12298,
27015,
10354,
705,
1404,
43,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
705,
2257,
13,... | 1.726807 | 1,757 |
# Hacked from winnt.h
DELETE = (65536)
READ_CONTROL = (131072)
WRITE_DAC = (262144)
WRITE_OWNER = (524288)
SYNCHRONIZE = (1048576)
STANDARD_RIGHTS_REQUIRED = (983040)
STANDARD_RIGHTS_READ = (READ_CONTROL)
STANDARD_RIGHTS_WRITE = (READ_CONTROL)
STANDARD_RIGHTS_EXECUTE = (READ_CONTROL)
STANDARD_RIGHTS_ALL = (2031616)
SP... | [
2,
367,
6021,
422,
1592,
429,
13,
71,
198,
198,
7206,
2538,
9328,
796,
357,
35916,
2623,
8,
198,
15675,
62,
10943,
5446,
3535,
796,
357,
1485,
940,
4761,
8,
198,
18564,
12709,
62,
35,
2246,
796,
357,
29119,
18444,
8,
198,
18564,
1... | 1.890239 | 12,919 |
#
# @lc app=leetcode.cn id=80 lang=python3
#
# [80] 删除有序数组中的重复项 II
#
# https://leetcode-cn.com/problems/remove-duplicates-from-sorted-array-ii/description/
#
# algorithms
# Medium (57.54%)
# Likes: 452
# Dislikes: 0
# Total Accepted: 105.9K
# Total Submissions: 176.2K
# Testcase Example: '[1,1,1,2,2,3]'
#
# 给你一个... | [
2,
198,
2,
2488,
44601,
598,
28,
293,
316,
8189,
13,
31522,
4686,
28,
1795,
42392,
28,
29412,
18,
198,
2,
198,
2,
685,
1795,
60,
10263,
230,
254,
165,
247,
97,
17312,
231,
41753,
237,
46763,
108,
163,
119,
226,
40792,
21410,
34932... | 1.08007 | 1,711 |
from django import template
register = template.Library()
from django.db.models.aggregates import Count
from myblog.models import Tag
@register.simple_tag()
| [
6738,
42625,
14208,
1330,
11055,
201,
198,
30238,
796,
11055,
13,
23377,
3419,
201,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
13,
9460,
2301,
689,
1330,
2764,
201,
198,
6738,
616,
14036,
13,
27530,
1330,
17467,
201,
198,
201,
198,
... | 3.28 | 50 |