org_text stringlengths 761 968k | texts list | scores list | num_lines int64 1 25.7k | avg_score float64 0 0.31 |
|---|---|---|---|---|
#!/usr/bin/env python
""" patrol_smach.py - Version 1.0 2013-04-12
Control a robot to patrol a square area using SMACH
Created for the Pi Robot Project: http://www.pirobot.org
Copyright (c) 2013 Patrick Goebel. All rights reserved.
This program is free software; you can redistribute it and/or modif... | [
"#!/usr/bin/env python\n",
"\n",
"\"\"\" patrol_smach.py - Version 1.0 2013-04-12\n",
"\n",
" Control a robot to patrol a square area using SMACH\n",
"\n",
" Created for the Pi Robot Project: http://www.pirobot.org\n",
" Copyright (c) 2013 Patrick Goebel. All rights reserved.\n",
"\n",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.2,
0,
0,
0,
0,
0.2,
0,
0.14285714285714285,
0,
0,
0,
0,
0,
0,
0,
0,
0.0625,
0,
0,
0.1111111111111111,
0,
0,
0.1111111111111111,
0,
0,
0.1111111111111111,
0,
0,
0,
0,
0,
0,
0,
0.111111... | 109 | 0.022425 |
from __future__ import division, print_function, absolute_import
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import tensorflow as tf
import tflearn
from tflearn.data_utils import to_categorical
import tflearn.data_utils as du
from tflearn.layers.core impor... | [
"from __future__ import division, print_function, absolute_import\n",
"\n",
"import numpy as np # linear algebra\n",
"import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n",
"import tensorflow as tf\n",
"import tflearn\n",
"from tflearn.data_utils import to_categorical\n",
"import t... | [
0,
0,
0.027777777777777776,
0.014084507042253521,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.012345679012345678,
0.012658227848101266,
0,
0.012578616352201259,
0.012903225806451613,
0,
0.058823529411764705,
0,
0.058823529411764705,
0,
0.0625,
0,
0.0625,
... | 125 | 0.009461 |
#!/usr/bin/env python3
# THIS FILE IS PART OF THE CYLC SUITE ENGINE.
# Copyright (C) NIWA & British Crown (Met Office) & Contributors.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either v... | [
"#!/usr/bin/env python3\n",
"\n",
"# THIS FILE IS PART OF THE CYLC SUITE ENGINE.\n",
"# Copyright (C) NIWA & British Crown (Met Office) & Contributors.\n",
"#\n",
"# This program is free software: you can redistribute it and/or modify\n",
"# it under the terms of the GNU General Public License as publis... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 276 | 0 |
#!/usr/bin/env python
#
# 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
# "... | [
"#!/usr/bin/env python\n",
"#\n",
"# Licensed to the Apache Software Foundation (ASF) under one\n",
"# or more contributor license agreements. See the NOTICE file\n",
"# distributed with this work for additional information\n",
"# regarding copyright ownership. The ASF licenses this file\n",
"# to you... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.02857142857142857,
0.16666666666666666,
0,
0,
0.045454545454545456,
0,
0,
0,
0,
0.019230769230769232,
0,
0,... | 119 | 0.007546 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
__metaclass__ = type
# Copyright 2019 Palo Alto 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 ... | [
"#!/usr/bin/env python\n",
"# -*- coding: utf-8 -*-\n",
"\n",
"from __future__ import absolute_import, division, print_function\n",
"__metaclass__ = type\n",
"\n",
"# Copyright 2019 Palo Alto Networks, Inc\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"# yo... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 123 | 0.000273 |
# Copyright 2015, Yahoo Inc.
# Licensed under the terms of the Apache License, Version 2.0. See the LICENSE file associated with the project for terms.
from pyspark.context import SparkContext
import numpy as np
import base64
import cPickle as pkl
from tempfile import NamedTemporaryFile
import os
import subprocess
fro... | [
"# Copyright 2015, Yahoo Inc.\n",
"# Licensed under the terms of the Apache License, Version 2.0. See the LICENSE file associated with the project for terms.\n",
"from pyspark.context import SparkContext\n",
"\n",
"import numpy as np\n",
"import base64\n",
"import cPickle as pkl\n",
"from tempfile imp... | [
0,
0.008130081300813009,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.011904761904761904,
0.011494252873563218,
0.010526315789473684,
0,
0,
0.009259259259259259,
0,
0,
0.034482758620689655,
0,
0.014285714285714285,
0,
0.011111111111111112,
0,
0,
0,
0,
0.01... | 136 | 0.002114 |
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
import logging
import os
from datetime import datetime
try:
import defusedxml.minidom as xml
except ImportError:
import xml.dom.minidom as xml
class instagram:
def __init__(self, cookie):
... | [
"import requests\n",
"from requests.adapters import HTTPAdapter\n",
"from requests.packages.urllib3.util.retry import Retry\n",
"import logging\n",
"import os\n",
"from datetime import datetime\n",
"try:\n",
" import defusedxml.minidom as xml\n",
"except ImportError:\n",
" import xml.dom.min... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.058823529411764705,
0,
0,
0,
0,
0.009259259259259259,
0,
0,
0,
0,
0,
0,
0.025,
0.02,
0.023809523809523808,
0.023529411764705882,
0.022222222222222223,
0.013157894736842105,
0.02631578947368421,
0,
0,
0.013793103448275... | 272 | 0.002124 |
from airflow.hooks.base_hook import BaseHook
from airflow import configuration
try:
snakebite_imported = True
from snakebite.client import Client, HAClient, Namenode
except ImportError:
snakebite_imported = False
from airflow.utils import AirflowException
class HDFSHookException(AirflowException):
p... | [
"from airflow.hooks.base_hook import BaseHook\n",
"from airflow import configuration\n",
"\n",
"try:\n",
" snakebite_imported = True\n",
" from snakebite.client import Client, HAClient, Namenode\n",
"except ImportError:\n",
" snakebite_imported = False\n",
"\n",
"from airflow.utils import... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.03225806451612903,
0.017241379310344827,
0.029411764705882353,
0.008333333333333333,
0,
0,
0.011904761... | 50 | 0.001983 |
import json
import csv
"""
def write_to_text(data, filename):
f = open(filename, 'w', encoding = 'utf-8')
for line in data:
f.write(line + '\n')
f.close()
"""
def read_text_file(filename):
ignore = []
ignore.append('[')
ignore.append(']')
ignore.append('')
f = open(filename, en... | [
"import json\n",
"import csv\n",
"\n",
"\"\"\"\n",
"def write_to_text(data, filename):\n",
" f = open(filename, 'w', encoding = 'utf-8')\n",
" for line in data:\n",
" f.write(line + '\\n')\n",
" f.close()\n",
"\"\"\"\n",
"\n",
"def read_text_file(filename):\n",
" ignore = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.03333333333333333,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.029411764705882353,
0,
0.04081632653061224,
0,
0,
0,
0.05,
0,
0,
0,
0.027777777777777776,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.01... | 49 | 0.024418 |
#!/usr/bin/python -u
from optparse import OptionParser, OptionGroup
from sys import argv as sys_argv, exit
from swiftclient import Client
def upload(options):
values = {
'username': options.os_username,
'password': options.os_password,
'auth_url': options.os_auth_url,
'project_na... | [
"#!/usr/bin/python -u\n",
"\n",
"from optparse import OptionParser, OptionGroup\n",
"from sys import argv as sys_argv, exit\n",
"\n",
"from swiftclient import Client\n",
"\n",
"def upload(options):\n",
"\n",
" values = {\n",
" 'username': options.os_username,\n",
" 'password':... | [
0,
0,
0,
0,
0,
0,
0,
0.047619047619047616,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.043478260869565216,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.038461538461538464,
0,
0,
0,
0,
0,
0,
0,
... | 152 | 0.002443 |
# Copyright (c) 2015 Huawei, Inc. 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 b... | [
"# Copyright (c) 2015 Huawei, Inc. All rights reserved.\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n",
"# not use this file except in compliance with the License. You may obtain\n",
"# a copy of the License at\n",
"#\n",
"# http://www.apache.... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | 32 | 0 |
from __future__ import print_function
from ase.db.table import dict2forces, hill
from ase.data import atomic_masses, chemical_symbols
from ase.db.core import float_to_time_string, now
import numpy as np
class Summary:
def __init__(self, dct, subscript=None):
self.dct = dct
self.cell = [... | [
"from __future__ import print_function\n",
"\n",
"from ase.db.table import dict2forces, hill\n",
"from ase.data import atomic_masses, chemical_symbols\n",
"from ase.db.core import float_to_time_string, now\n",
"\n",
"import numpy as np\n",
"\n",
"\n",
"class Summary:\n",
" def __init__(self, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.1111111111111111,
0,
0.1111111111111111,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.047619047619047616,
0,
0,
0,
0.07692307692307693,
0,
0,
0,
0,
0.07692307692307693,
0,
0,
0,... | 125 | 0.010963 |
import sys
from metatlas import metatlas_objects as metob
import metatlas.helpers.metatlas_get_data_helper_fun as ma_data
import os
from IPython.display import display
import matplotlib.pyplot as plt
try:
import ipywidgets as widgets
except ImportError:
from IPython.html import widgets
try:
import traitl... | [
"import sys\n",
"\n",
"from metatlas import metatlas_objects as metob\n",
"import metatlas.helpers.metatlas_get_data_helper_fun as ma_data\n",
"import os\n",
"\n",
"\n",
"from IPython.display import display\n",
"import matplotlib.pyplot as plt\n",
"try:\n",
" import ipywidgets as widgets\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.03333333333333333,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 221 | 0.00685 |
#!/usr/bin/env python
'''
Plots the gravitational potential of the earth and moon
assumes the earth is at 0,0 and moon is on x-axis.
Inspired by http://www.wired.com/2014/07/contour-plots-with-python-and-plotly/?mbid=social_twitter
and: https://gist.github.com/rhettallain/1aa12b44d59562ce08fc
Practicing plotly
'''
_... | [
"#!/usr/bin/env python\n",
"'''\n",
"Plots the gravitational potential of the earth and moon\n",
"assumes the earth is at 0,0 and moon is on x-axis.\n",
"\n",
"Inspired by http://www.wired.com/2014/07/contour-plots-with-python-and-plotly/?mbid=social_twitter\n",
"and: https://gist.github.com/rhettallain... | [
0,
0,
0,
0,
0,
0.010101010101010102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.02127659574468085,
0,
0,
0,
0.023809523809523808,
0,
0.01680672268907563,
0,
0,
0,
0,
0,
0.08695652173913043,
0,
0,
0,
0,
0,
0,
0,
0,
0.03773584905660377... | 54 | 0.008172 |
"""
EULA APP
This module provides additional functionality to the EUAL app.
Classes:
EULAAcceptedMixin
Functions:
n/a
Created on 23 Oct 2013
@author: michael
"""
from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse_lazy
from django.contrib.auth.decorators import... | [
"\"\"\"\n",
"EULA APP\n",
"\n",
"This module provides additional functionality to the EUAL app.\n",
"\n",
"Classes:\n",
" EULAAcceptedMixin\n",
"\n",
"Functions:\n",
" n/a\n",
"\n",
"Created on 23 Oct 2013\n",
"\n",
"@author: michael\n",
"\n",
"\"\"\"\n",
"from django.core.exce... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.030303030303030304,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.015625,
0.015625,
0,
0,
0,
0,
0,
... | 70 | 0.000879 |
"""Fixtures for tests in this directory."""
import multiprocessing
import multiprocessing.queues
import sys
import httpretty
import pytest
from sphinx import build_main
def run_build_main(docs_dir, html_dir, overflow):
"""Run build_main().
:param str docs_dir: Path to input docs directory.
:param str h... | [
"\"\"\"Fixtures for tests in this directory.\"\"\"\n",
"\n",
"import multiprocessing\n",
"import multiprocessing.queues\n",
"import sys\n",
"\n",
"import httpretty\n",
"import pytest\n",
"from sphinx import build_main\n",
"\n",
"\n",
"def run_build_main(docs_dir, html_dir, overflow):\n",
" ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.010416666666666666,
0.009433962264150943,
0,
0.008403361344537815,
0.008264462809917356,
0,
0,
0.009174311926605505,
0,
0,
0,
0,
0.01,
0,
0,
0,
... | 142 | 0.000756 |
# Copyright 2017 Cisco Systems
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | [
"# Copyright 2017 Cisco Systems\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n",
"# not use this file except in compliance with the License. You may obtain\n",
"# a copy of the License at\n",
"#\n",
"# http://www.apache.org/licenses/LICENSE-2.0\n",
"#\n",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 96 | 0 |
import numpy
from chainer.backends import cuda
from chainer.functions.loss import black_out
from chainer import link
from chainer.utils import walker_alias
from chainer import variable
class BlackOut(link.Link):
"""BlackOut loss layer.
.. seealso:: :func:`~chainer.functions.black_out` for more detail.
... | [
"import numpy\n",
"\n",
"from chainer.backends import cuda\n",
"from chainer.functions.loss import black_out\n",
"from chainer import link\n",
"from chainer.utils import walker_alias\n",
"from chainer import variable\n",
"\n",
"\n",
"class BlackOut(link.Link):\n",
"\n",
" \"\"\"BlackOut los... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 67 | 0 |
#!/usr/bin/python
#
# Copyright 2013 Google 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 a... | [
"#!/usr/bin/python\n",
"#\n",
"# Copyright 2013 Google Inc.\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"# you may not use this file except in compliance with the License.\n",
"# You may obtain a copy of the License at\n",
"#\n",
"# http://www.apache.org/... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.14285714285714285,
0,
0,
0,
0.01818181818181818,
0,
0,
0,
0.013888888888888888,
0,
0,
0,
0.02222222222222... | 389 | 0.009938 |
#
# Copyright (c) SAS Institute, 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 ... | [
"#\n",
"# Copyright (c) SAS Institute, Inc.\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"# you may not use this file except in compliance with the License.\n",
"# You may obtain a copy of the License at\n",
"#\n",
"# http://www.apache.org/licenses/LICENSE-2.... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.029411764705882353,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | 307 | 0.002141 |
'''
Segment_tree creates a segment tree with a given array and function,
allowing queries to be done later in log(N) time
function takes 2 values and returns a same type value
'''
class SegmentTree:
def __init__(self,arr,function):
self.segment = [0 for x in range(3*len(arr)+3)]
self.arr = arr
... | [
"'''\n",
"Segment_tree creates a segment tree with a given array and function,\n",
"allowing queries to be done later in log(N) time\n",
"function takes 2 values and returns a same type value\n",
"'''\n",
"class SegmentTree:\n",
" def __init__(self,arr,function):\n",
" self.segment = [0 for ... | [
0,
0,
0,
0,
0,
0.05263157894736842,
0.05405405405405406,
0,
0,
0,
0.05263157894736842,
0,
0.12903225806451613,
0.11764705882352941,
0,
0.05555555555555555,
0.04081632653061224,
0.0392156862745098,
0.012658227848101266,
0,
0.18181818181818182,
0.10810810810810811,
0,
0.0... | 49 | 0.037076 |
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""SiteCompare command to invoke the same page in two versions of a browser.
Does the easiest compatibility test: equality comparison between two differ... | [
"# Copyright (c) 2011 The Chromium Authors. All rights reserved.\n",
"# Use of this source code is governed by a BSD-style license that can be\n",
"# found in the LICENSE file.\n",
"\n",
"\"\"\"SiteCompare command to invoke the same page in two versions of a browser.\n",
"\n",
"Does the easiest compatib... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.012345679012345678,
0,
0.02666666666666667,
0,
0.046511627906976744,
0,
0,
0,
0.013333333333333334,
0.03571428571428571,
0,
0,
0,
0,
0,
0.05263157894736842,
0,
0,
0.05263157894736842,
0,
0,
0.... | 170 | 0.012805 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from bomlib.columns import ColumnList
from bomlib.preferences import BomPref
import bomlib.units as units
from bomlib.sort import natural_sort
import re
import sys
DNF = [
"dnf",
"dnl",
"dnp",
"do not fit",
"do not place",
"do not... | [
"# -*- coding: utf-8 -*-\n",
"from __future__ import unicode_literals\n",
"\n",
"from bomlib.columns import ColumnList\n",
"from bomlib.preferences import BomPref\n",
"import bomlib.units as units\n",
"from bomlib.sort import natural_sort\n",
"import re\n",
"import sys\n",
"\n",
"DNF = [\n",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.011494252873563218,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.00970... | 577 | 0.002476 |
"""Tests 1D angular weights"""
import numpy as np
import odtbrain
from common_methods import create_test_sino_2d, get_test_parameter_set
def test_angle_offset():
"""
Tests if things are still correct when there is a 2PI offset in the angles.
"""
sino, angles = create_test_sino_2d()
parameters = ... | [
"\"\"\"Tests 1D angular weights\"\"\"\n",
"import numpy as np\n",
"\n",
"import odtbrain\n",
"\n",
"from common_methods import create_test_sino_2d, get_test_parameter_set\n",
"\n",
"\n",
"def test_angle_offset():\n",
" \"\"\"\n",
" Tests if things are still correct when there is a 2PI offs... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 68 | 0 |
from __future__ import absolute_import
import re
from . import Processor
import makerbot_driver
class DualRetractProcessor(Processor):
def __init__(self):
super(DualRetractProcessor, self).__init__()
self.layer_start = re.compile("^(;\s?Slice|\(<layer>) [0-9.]+.*", re.I)
self.snort = re.... | [
"from __future__ import absolute_import\n",
"\n",
"import re\n",
"\n",
"from . import Processor\n",
"import makerbot_driver\n",
"\n",
"\n",
"class DualRetractProcessor(Processor):\n",
" def __init__(self):\n",
" super(DualRetractProcessor, self).__init__()\n",
" self.layer_sta... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.025,
0,
0.01,
0,
0.012048192771084338,
0,
0,
0,
0,
0,
0,
0,
0.05555555555555555,
0,
0,
0,
0,
0,
0,
0.012195121951219513,
0,
0,
0.02564102564102564,
0,
0.011904761904761904,
0,
0,
0,
0,
0,
0,
0,
0... | 304 | 0.008811 |
#!/usr/bin/python
import participantCollection
import re
import datetime
import pyperclip
currentMonthIndex = datetime.date.today().month
#TODO: need to figure out how to get total days in current month...
currentMonthTotalDays = 30
currentMonthPenultimateDayIndex = currentMonthTotalDays - 1
currentMonthName = {1:'Jan... | [
"#!/usr/bin/python\n",
"import participantCollection\n",
"import re\n",
"import datetime\n",
"import pyperclip\n",
"\n",
"currentMonthIndex = datetime.date.today().month\n",
"#TODO: need to figure out how to get total days in current month...\n",
"currentMonthTotalDays = 30\n",
"currentMonthPenult... | [
0,
0,
0,
0,
0,
0,
0,
0.014705882352941176,
0,
0,
0.06914893617021277,
0,
0.07142857142857142,
0,
0,
0,
0,
0.059369202226345084,
0.053691275167785234,
0,
0,
0,
0,
0,
0.015873015873015872,
0,
0,
0.00398406374501992,
0,
0,
0.005128205128205128,
0.0289855072... | 239 | 0.010851 |
# This file is part of Scapy
# See http://www.secdev.org/projects/scapy for more information
# Copyright (C) Philippe Biondi <phil@secdev.org>
# This program is published under a GPLv2 license
"""
Mobile IP.
"""
from scapy.fields import ByteEnumField, ByteField, IPField, LongField, \
ShortField, XByteField
from s... | [
"# This file is part of Scapy\n",
"# See http://www.secdev.org/projects/scapy for more information\n",
"# Copyright (C) Philippe Biondi <phil@secdev.org>\n",
"# This program is published under a GPLv2 license\n",
"\n",
"\"\"\"\n",
"Mobile IP.\n",
"\"\"\"\n",
"\n",
"from scapy.fields import ByteEnu... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | 52 | 0 |
#! /usr/bin/env python3
# -*- coding:utf-8 -*-
###############################################################
# kenwaldek MIT-license
# Title: PyQt5 lesson 8 Version: 1.0
# Date: 08-01-17 Language: python3
# Description: pyqt5 gui messageBox quit applicati... | [
"#! /usr/bin/env python3\n",
"# -*- coding:utf-8 -*-\n",
"###############################################################\n",
"# kenwaldek MIT-license\n",
"\n",
"# Title: PyQt5 lesson 8 Version: 1.0\n",
"# Date: 08-01-17 Language: python3\n",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.01020408163265306,
0,
0,
0,
0,
0.037037037037037035,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | 89 | 0.00197 |
import os
from django.core.exceptions import ImproperlyConfigured
from django.db import models
from django.contrib.auth.models import User
import json
from .managers import BearerTokenManager
class Provider(models.Model):
"""
A resource provider like Facebook, Google Drive, Twitter, ...
It provides OAuth ... | [
"import os\n",
"from django.core.exceptions import ImproperlyConfigured\n",
"from django.db import models\n",
"from django.contrib.auth.models import User\n",
"import json\n",
"from .managers import BearerTokenManager\n",
"\n",
"\n",
"class Provider(models.Model):\n",
" \"\"\"\n",
" A reso... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.011764705882352941,
0,
0.010309278350515464,
0.01020408163265306,
0.011494252873563218,
0,
0.010752688172043012,
0.010416666666666666,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.0... | 170 | 0.003864 |
#coding=utf8
import tushare as ts;
import pymysql;
import time as dt
from datashape.coretypes import string
from pandas.io.sql import SQLDatabase
import sqlalchemy
import datetime
from sqlalchemy import create_engine
from pandas.io import sql
import threading
import pandas as pd;
import sys
sys.path.append('../') #添加配... | [
"#coding=utf8\n",
"\n",
"import tushare as ts;\n",
"import pymysql;\n",
"import time as dt\n",
"from datashape.coretypes import string\n",
"from pandas.io.sql import SQLDatabase\n",
"import sqlalchemy\n",
"import datetime\n",
"from sqlalchemy import create_engine\n",
"from pandas.io import sql\n... | [
0.07692307692307693,
0,
0.045454545454545456,
0.0625,
0,
0,
0,
0,
0,
0,
0,
0,
0.047619047619047616,
0,
0.06451612903225806,
0.0967741935483871,
0,
0.058823529411764705,
0.05714285714285714,
0,
0.037037037037037035,
0.02912621359223301,
0,
0,
0,
0,
0.03703703703703... | 39 | 0.025505 |
"""Tests for the lsstprojectmeta.tex.normalizer module."""
from __future__ import annotations
import re
from pathlib import Path
import pytest
from lander.ext.parser.texutils.normalize import (
input_include_pattern,
read_tex_file,
remove_comments,
remove_trailing_whitespace,
replace_macros,
)
... | [
"\"\"\"Tests for the lsstprojectmeta.tex.normalizer module.\"\"\"\n",
"\n",
"from __future__ import annotations\n",
"\n",
"import re\n",
"from pathlib import Path\n",
"\n",
"import pytest\n",
"\n",
"from lander.ext.parser.texutils.normalize import (\n",
" input_include_pattern,\n",
" rea... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 133 | 0 |
import foauth.providers
from foauth import OAuthDenied
class Elance(foauth.providers.OAuth2):
# General info about the provider
provider_url = 'https://www.elance.com/'
docs_url = 'https://www.elance.com/q/api2'
category = 'Career'
# URLs to interact with the API
authorize_url = 'https://api.... | [
"import foauth.providers\n",
"from foauth import OAuthDenied\n",
"\n",
"\n",
"class Elance(foauth.providers.OAuth2):\n",
" # General info about the provider\n",
" provider_url = 'https://www.elance.com/'\n",
" docs_url = 'https://www.elance.com/q/api2'\n",
" category = 'Career'\n",
"\n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | 33 | 0 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License,
or (at your option) any later version.
This prog... | [
"#!/usr/bin/env python\n",
"# -*- coding: utf-8 -*-\n",
"\"\"\"\n",
" This program is free software; you can redistribute it and/or modify\n",
" it under the terms of the GNU General Public License as published by\n",
" the Free Software Foundation; either version 3 of the License,\n",
" or ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.07142857142857142,
0,
0.014285714285714285,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.010526315789473684,
0.03896103896103896,
0,
0,
0,
0,
0,
... | 63 | 0.021194 |
from PyQt5.QtWidgets import QTreeWidgetItem
from TriblerGUI.utilities import prec_div
class TickWidgetItem(QTreeWidgetItem):
"""
This class represents a widget that displays a tick (either an ask or a bid).
"""
def __init__(self, parent, tick, asset1_prec, asset2_prec):
QTreeWidgetItem.__init... | [
"from PyQt5.QtWidgets import QTreeWidgetItem\n",
"from TriblerGUI.utilities import prec_div\n",
"\n",
"\n",
"class TickWidgetItem(QTreeWidgetItem):\n",
" \"\"\"\n",
" This class represents a widget that displays a tick (either an ask or a bid).\n",
" \"\"\"\n",
"\n",
" def __init__(sel... | [
0,
0,
0,
0,
0,
0,
0.012195121951219513,
0,
0,
0,
0,
0,
0,
0.011764705882352941,
0.01,
0,
0.008849557522123894,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | 41 | 0.001044 |
#YATZY version 1.6
#This is a yatzy game please enjoy
#2 player mode
def reroll(plyr, dice):
for i in range (0,5):
print("%s) %s\n" % (i+1,dice[plyr][i]))
ans=[]
while True:
answ=input("enter 1-5 ")
try:
answ=int(answ)
break
except ValueError:
... | [
"#YATZY version 1.6\n",
"#This is a yatzy game please enjoy\n",
"#2 player mode\n",
"def reroll(plyr, dice):\n",
" for i in range (0,5):\n",
" print(\"%s) %s\\n\" % (i+1,dice[plyr][i]))\n",
" ans=[]\n",
" while True:\n",
" answ=input(\"enter 1-5 \")\n",
" try:\n",
... | [
0.05263157894736842,
0.02857142857142857,
0.06666666666666667,
0,
0.07692307692307693,
0.04081632653061224,
0.09090909090909091,
0,
0.030303030303030304,
0,
0.037037037037037035,
0,
0,
0.04,
0,
0,
0,
0.05263157894736842,
0,
0,
0.03333333333333333,
0,
0.034482758620689655,... | 211 | 0.029587 |
"""Manage host learning on VLANs."""
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer.
# Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2018 The Contributors
#
# Licensed under the Ap... | [
"\"\"\"Manage host learning on VLANs.\"\"\"\n",
"\n",
"# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.\n",
"# Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer.\n",
"# Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd.\n",
"# Copyright (C) 2015--2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.010526315789473684,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | 329 | 0.000547 |
#!/usr/bin/python
# encoding=utf-8
#!coding:utf-8
import re
import sys
import urllib2
import argparse
import commands
import os
import subprocess
if __name__ == "__main__" :
# 测试正则表达式
reload(sys)
sys.setdefaultencoding("utf-8")
if len(sys.argv) > 1: # 如果在程序运行时,传递... | [
"#!/usr/bin/python\r\n",
"# encoding=utf-8\r\n",
"\r\n",
"\r\n",
"#!coding:utf-8\r\n",
"\r\n",
"import re\r\n",
"import sys\r\n",
"import urllib2\r\n",
"import argparse\r\n",
"\r\n",
"import commands\r\n",
"import os\r\n",
"import subprocess\r\n",
"\r\n",
"if __name__ == \"__main__\" :... | [
0,
0,
0,
0,
0.0625,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.034482758620689655,
0,
0,
0,
0,
0.016129032258064516,
0,
0,
0,
0,
0,
0,
0,
0,
0.046511627906976744,
0.14285714285714285,
0,
0,
0,
0,
0,
0,
0,
0.024390243902439025,
0.049019607843137254,
... | 96 | 0.018665 |
"""
Created on 10 Jan 2017
@author: Bruno Beloff (bruno.beloff@southcoastscience.com)
https://www.nmea.org
https://en.wikipedia.org/wiki/NMEA_0183
reference coordinate systems:
https://en.wikipedia.org/wiki/World_Geodetic_System#WGS84
https://en.wikipedia.org/wiki/PZ-90
"""
from collections import OrderedDict
from ... | [
"\"\"\"\n",
"Created on 10 Jan 2017\n",
"\n",
"@author: Bruno Beloff (bruno.beloff@southcoastscience.com)\n",
"\n",
"https://www.nmea.org\n",
"https://en.wikipedia.org/wiki/NMEA_0183\n",
"\n",
"reference coordinate systems:\n",
"https://en.wikipedia.org/wiki/World_Geodetic_System#WGS84\n",
"http... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.058823529411764705,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.0588235294... | 153 | 0.004236 |
"""Plugs are ins and outs for Nodes through which they exchange data."""
from __future__ import print_function
import sys
import warnings
from abc import abstractmethod
from .utilities import get_hash
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
if sys.ver... | [
"\"\"\"Plugs are ins and outs for Nodes through which they exchange data.\"\"\"\n",
"from __future__ import print_function\n",
"\n",
"import sys\n",
"import warnings\n",
"from abc import abstractmethod\n",
"\n",
"from .utilities import get_hash\n",
"\n",
"try:\n",
" from collections import Or... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 459 | 0.000025 |
"""
AWS Lambda execution environment wrapper
@author: David Moss
@copyright: 2017 People Power Company. All rights reserved.
@contact: dmoss@peoplepowerco.com
"""
import botengine
import importlib
import time
def lambda_handler(data, context):
"""
Execution wrapper on AWS Lambda
:param data: I... | [
"\"\"\"\n",
"AWS Lambda execution environment wrapper\n",
"\n",
"@author: David Moss\n",
"\n",
"@copyright: 2017 People Power Company. All rights reserved.\n",
"\n",
"@contact: dmoss@peoplepowerco.com\n",
"\"\"\"\n",
"\n",
"import botengine\n",
"import importlib\n",
"import time\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.2,
0,
0.2,
0,
0,
0,
0.1111111111111111,
0.08333333333333333,
0,
0,
0,
0,
0,
0.008130081300813009,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | 169 | 0.006849 |
"""The tests for the Command line Binary sensor platform."""
import unittest
from homeassistant.const import (STATE_ON, STATE_OFF)
from homeassistant.components.binary_sensor import command_line
from homeassistant import bootstrap
from homeassistant.helpers import template
from tests.common import get_test_home_assis... | [
"\"\"\"The tests for the Command line Binary sensor platform.\"\"\"\n",
"import unittest\n",
"\n",
"from homeassistant.const import (STATE_ON, STATE_OFF)\n",
"from homeassistant.components.binary_sensor import command_line\n",
"from homeassistant import bootstrap\n",
"from homeassistant.helpers import t... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 71 | 0 |
#!/usr/bin/env python
from __future__ import unicode_literals
import collections
import datetime
import functools
import logging
import os
import re
import struct
import sys
import tornado.autoreload
import tornado.ioloop
import tornado.options
import tornado.tcpserver
import tornado.stack_context
from tornado.util im... | [
"#!/usr/bin/env python\n",
"\n",
"from __future__ import unicode_literals\n",
"import collections\n",
"import datetime\n",
"import functools\n",
"import logging\n",
"import os\n",
"import re\n",
"import struct\n",
"import sys\n",
"import tornado.autoreload\n",
"import tornado.ioloop\n",
"i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.0196078431372549,
0,
0,
0,
0,
0,
0,
0,
0.029411764705882353,
0,
0.010416666666666666,
0,
0,
0,
0.011111111111111112,
0,
0.011235955056179775,
0,
0.02564102564102564,
0,
... | 270 | 0.003428 |
import datetime
from django.conf import settings
from django.core import signing
from django.core.mail import send_mail
from django.core.urlresolvers import reverse, reverse_lazy
from django.http import Http404
from django.shortcuts import get_object_or_404, redirect
from django.template import loader
from django.util... | [
"import datetime\n",
"\n",
"from django.conf import settings\n",
"from django.core import signing\n",
"from django.core.mail import send_mail\n",
"from django.core.urlresolvers import reverse, reverse_lazy\n",
"from django.http import Http404\n",
"from django.shortcuts import get_object_or_404, redire... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.02702702702702703,
0,
0,
0,
0,
0,
0,
0,
... | 169 | 0.000618 |
from pyramid.decorator import reify
from pyramid.path import DottedNameResolver
from sandglass.time import _
from sandglass.time.filters import QueryFilter
from sandglass.time.filters import QueryFilterError
class CollectionByPrimaryKey(QueryFilter):
"""
Filter query results for a list of IDs.
This filt... | [
"from pyramid.decorator import reify\n",
"from pyramid.path import DottedNameResolver\n",
"\n",
"from sandglass.time import _\n",
"from sandglass.time.filters import QueryFilter\n",
"from sandglass.time.filters import QueryFilterError\n",
"\n",
"\n",
"class CollectionByPrimaryKey(QueryFilter):\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | 63 | 0 |
from Robot import *
import unittest
class TestTransform(unittest.TestCase):
def test_stop(self):
state = {
"right_analog_x": 0,
"right_analog_y": 0,
}
res1 = map(state)
self.assertEqual(res1, (0, 0))
def test_full_forward(self):
state = {
... | [
"from Robot import *\n",
"\n",
"import unittest\n",
"\n",
"\n",
"class TestTransform(unittest.TestCase):\n",
" def test_stop(self):\n",
" state = {\n",
" \"right_analog_x\": 0,\n",
" \"right_analog_y\": 0,\n",
" }\n",
"\n",
" res1 = map(state)\n"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 95 | 0 |
#!/usr/bin/python3
####################################################################################################
#
# Project : CHEMION Decoder
#
# Program name : decoder.py
#
# Author(s) : Jurre Groenendijk
# Jilles Groenendijk
#
# Date created : 20191220
#
# Purpo... | [
"#!/usr/bin/python3\n",
"####################################################################################################\n",
"#\n",
"# Project : CHEMION Decoder\n",
"#\n",
"# Program name : decoder.py\n",
"#\n",
"# Author(s) : Jurre Groenendijk\n",
"# ... | [
0,
0.009900990099009901,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.0136986301369863,
0,
0.02,
0.011235955056179775,
0,
0,
0,
0.009900990099009901,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.013888888888888888,
0,
... | 123 | 0.02606 |
#
# Copyright (C) 2014 FreeIPA Contributors see COPYING for license
#
import os
import pwd
import grp
import ldap
from ipaserver.install import service
from ipaserver.install import installutils
from ipapython.ipa_log_manager import *
from ipapython.dn import DN
from ipapython import sysrestore, ipautil, ipaldap
fr... | [
"#\n",
"# Copyright (C) 2014 FreeIPA Contributors see COPYING for license\n",
"#\n",
"\n",
"import os\n",
"import pwd\n",
"import grp\n",
"\n",
"import ldap\n",
"\n",
"from ipaserver.install import service\n",
"from ipaserver.install import installutils\n",
"from ipapython.ipa_log_manager i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.0625,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 187 | 0.000585 |
# -*- coding: latin1 -*-
################################################################################################
#
#
import tweepy, datetime, sys, time, json, os, os.path, shutil, time, struct, random
import multi_oauth
#Script que contém as chaves para autenticação do twitter
reload(sys)
sys.setdefaultencod... | [
"# -*- coding: latin1 -*-\n",
"################################################################################################\n",
"#\t\n",
"#\n",
"import tweepy, datetime, sys, time, json, os, os.path, shutil, time, struct, random\n",
"import multi_oauth\n",
"#Script que contém as chaves para autentic... | [
0,
0.010309278350515464,
0.6666666666666666,
0,
0.023809523809523808,
0,
0.017241379310344827,
0,
0,
0,
0,
0.005988023952095809,
0.02,
0.2222222222222222,
0.014925373134328358,
0.0196078431372549,
0.02040816326530612,
0,
0.2857142857142857,
0.017699115044247787,
0,
0.025210... | 268 | 0.06843 |
# Copyright 2013 OpenStack Foundation
# 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 requ... | [
"# Copyright 2013 OpenStack Foundation\n",
"# All Rights Reserved.\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n",
"# not use this file except in compliance with the License. You may obtain\n",
"# a copy of the License at\n",
"#\n",
"# http:... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 217 | 0 |
"""Unit tests for the doorstop.core.types module."""
import unittest
from doorstop.common import DoorstopError
from doorstop.core.types import Prefix, UID, Text, Level, Stamp, Reference
class TestPrefix(unittest.TestCase):
"""Unit tests for the Prefix class.""" # pylint: disable=W0212
def setUp(self):
... | [
"\"\"\"Unit tests for the doorstop.core.types module.\"\"\"\n",
"\n",
"import unittest\n",
"\n",
"from doorstop.common import DoorstopError\n",
"from doorstop.core.types import Prefix, UID, Text, Level, Stamp, Reference\n",
"\n",
"\n",
"class TestPrefix(unittest.TestCase):\n",
"\n",
" \"\"\"U... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 438 | 0 |
#!/usr/bin/env python
#
# Copyright 2010 Facebook
#
# 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 a... | [
"#!/usr/bin/env python\n",
"#\n",
"# Copyright 2010 Facebook\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n",
"# not use this file except in compliance with the License. You may obtain\n",
"# a copy of the License at\n",
"#\n",
"# http://www.apache.org/... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 388 | 0.000979 |
import datetime
import pytz
import recurrence
from django.test import TestCase
from django.test import override_settings
from radioco.apps.programmes.models import Programme
from radioco.apps.radioco.test_utils import TestDataMixin, SPAIN_TZ
from radioco.apps.radioco.tz_utils import transform_dt_to_default_tz
from ra... | [
"import datetime\n",
"\n",
"import pytz\n",
"import recurrence\n",
"from django.test import TestCase\n",
"from django.test import override_settings\n",
"\n",
"from radioco.apps.programmes.models import Programme\n",
"from radioco.apps.radioco.test_utils import TestDataMixin, SPAIN_TZ\n",
"from rad... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.009900990099009901,
0.010101010101010102,
0,
0.008695652173913044,
0.008928571428571428,
0,
0,
0,
0.01020408163265306,
0.010526315789473684,
0,
0.01020408163265306,
0.010526315789473684,
0,
0,
0,
0,
0,
0,
0,
0... | 105 | 0.001338 |
import os
from django.contrib.gis.geos import Point
from data_collection.management.commands import BaseCsvStationsJsonDistrictsImporter
"""
Define a stub implementation of json importer
district_record_to_dict() may return None
station_record_to_dict() may return None or a list
"""
class Command(BaseCsvStationsJsonD... | [
"import os\n",
"from django.contrib.gis.geos import Point\n",
"from data_collection.management.commands import BaseCsvStationsJsonDistrictsImporter\n",
"\n",
"\n",
"\"\"\"\n",
"Define a stub implementation of json importer\n",
"district_record_to_dict() may return None\n",
"station_record_to_dict() ... | [
0,
0,
0.011764705882352941,
0,
0,
0,
0,
0,
0,
0,
0.018867924528301886,
0,
0.03571428571428571,
0.02857142857142857,
0.02631578947368421,
0.029411764705882353,
0.010869565217391304,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.0117... | 51 | 0.003398 |
from __future__ import print_function
from twisted.protocols import amp
class Sum(amp.Command):
arguments = [('a', amp.Integer()),
('b', amp.Integer())]
response = [('total', amp.Integer())]
class Divide(amp.Command):
arguments = [('numerator', amp.Integer()),
('denomin... | [
"from __future__ import print_function\n",
"\n",
"from twisted.protocols import amp\n",
"\n",
"class Sum(amp.Command):\n",
" arguments = [('a', amp.Integer()),\n",
" ('b', amp.Integer())]\n",
" response = [('total', amp.Integer())]\n",
"\n",
"\n",
"class Divide(amp.Command)... | [
0,
0,
0,
0,
0.041666666666666664,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.037037037037037035,
0
] | 42 | 0.001874 |
# -*- coding: utf-8 -*-
import os
import numexpr
from openfisca_core.indexed_enums import EnumArray
def assert_near(value, target_value, absolute_error_margin = None, message = '', relative_error_margin = None):
'''
:param value: Value returned by the test
:param target_value: Value that the test... | [
"# -*- coding: utf-8 -*-\n",
"\n",
"\n",
"import os\n",
"\n",
"import numexpr\n",
"\n",
"from openfisca_core.indexed_enums import EnumArray\n",
"\n",
"\n",
"def assert_near(value, target_value, absolute_error_margin = None, message = '', relative_error_margin = None):\n",
" '''\n",
"\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.0625,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.029850746268656716,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.009615384615384616,
0.022222222222222223,
0,
0,
0.00970873786407766... | 85 | 0.002757 |
# Copyright 2013 B1 Systems GmbH
#
# 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 ag... | [
"# Copyright 2013 B1 Systems GmbH\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n",
"# not use this file except in compliance with the License. You may obtain\n",
"# a copy of the License at\n",
"#\n",
"# http://www.apache.org/licenses/LICENSE-2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.015384615384615385,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.015625,
0,
0,
0,
0,
0,
0,
0,
0,
... | 72 | 0.000635 |
# -*- coding: utf-8 -*-
import struct
from math import asin, atan, cos, exp, log, pi, sin, sqrt, tan
from colorama import init
from networkx.algorithms.clique import find_cliques
import networkx as nx
import numpy as np
from datetime import datetime as dt, timedelta
init()
TIME_PERIODS = (
(60, 'minute'),
... | [
"# -*- coding: utf-8 -*-\n",
"\n",
"import struct\n",
"from math import asin, atan, cos, exp, log, pi, sin, sqrt, tan\n",
"\n",
"from colorama import init\n",
"from networkx.algorithms.clique import find_cliques\n",
"\n",
"import networkx as nx\n",
"import numpy as np\n",
"\n",
"from datetime ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.018867924528301886,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.011627906976744186,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.05,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | 260 | 0.004441 |
from dolfin import *
from dolfin_adjoint import *
n = 30
mesh = UnitSquareMesh(n, n)
V = VectorFunctionSpace(mesh, "CG", 2)
ic = project(Expression(("sin(2*pi*x[0])", "cos(2*pi*x[1])"), degree=2), V)
def main(nu):
u = ic.copy(deepcopy=True)
u_next = Function(V)
v = TestFunction(V)
timestep = Consta... | [
"from dolfin import *\n",
"from dolfin_adjoint import *\n",
"\n",
"n = 30\n",
"mesh = UnitSquareMesh(n, n)\n",
"V = VectorFunctionSpace(mesh, \"CG\", 2)\n",
"\n",
"ic = project(Expression((\"sin(2*pi*x[0])\", \"cos(2*pi*x[1])\"), degree=2), V)\n",
"\n",
"def main(nu):\n",
" u = ic.copy(deepc... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.07142857142857142,
0,
0,
0,
0,
0,
0,
0,
0.02564102564102564,
0.022222222222222223,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.037037037037037035,
0,
0,
0,
0,
0,
0,
0.0196078431372549,
0,
0.024691358024691357,
0... | 47 | 0.004623 |
# Copyright 2013 VMware, Inc.
# 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 ... | [
"# Copyright 2013 VMware, Inc.\n",
"# All rights reserved.\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n",
"# not use this file except in compliance with the License. You may obtain\n",
"# a copy of the License at\n",
"#\n",
"# http://www.ap... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 545 | 0.000369 |
from jsonrpc import ServiceProxy
import sys
import string
# ===== BEGIN USER SETTINGS =====
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======
if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:12064")
else:
access = Se... | [
"from jsonrpc import ServiceProxy\n",
"import sys\n",
"import string\n",
"\n",
"# ===== BEGIN USER SETTINGS =====\n",
"# if you do not set these you will be prompted for a password for every command\n",
"rpcuser = \"\"\n",
"rpcpass = \"\"\n",
"# ====== END USER SETTINGS ======\n",
"\n",
"\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.02040816326530612,
0,
0.0136986301369863,
0,
0,
0,
0.16666666666666666,
0.017857142857142856,
0.029411764705882353,
0.2222222222222222,
0.02631578947368421,
0,
0,
0.16666666666666666,
0.02,
0.03125,
0.2222222222222222,
0... | 324 | 0.069558 |
"""
Netkit common functions
"""
__author__ = """\n""".join(['Simon Knight (simon.knight@adelaide.edu.au)',
'Hung Nguyen (hung.nguyen@adelaide.edu.au)'])
# Copyright (C) 2009-2010 by
# Simon Knight <simon.knight@adelaide.edu.au>
# Hung Nguyen <hung.nguyen@adelaide.edu.au>
# ... | [
"\"\"\"\n",
"Netkit common functions \n",
"\"\"\"\n",
"__author__ = \"\"\"\\n\"\"\".join(['Simon Knight (simon.knight@adelaide.edu.au)',\n",
" 'Hung Nguyen (hung.nguyen@adelaide.edu.au)'])\n",
"# Copyright (C) 2009-2010 by \n",
"# Simon Knight <simon.knight@adelaide.e... | [
0,
0.037037037037037035,
0,
0,
0,
0.030303030303030304,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.16666666666666666,
0.09090909090909091,
0,
0,
0.03333333333333333,
0,
0,
0,
0.029850746268656716,
0,
0,
0.030303030303030304,
0,
0... | 263 | 0.024737 |
import argparse
import cPickle as pickle
import nltk
import string
import os
import numpy as np
import re
import scipy.sparse as ss
from sklearn.feature_extraction.text import TfidfVectorizer
from nltk.stem.porter import PorterStemmer
stemmer = PorterStemmer()
def tokenize(text):
tokens = nltk.word_tokenize(text... | [
"import argparse\n",
"import cPickle as pickle\n",
"import nltk\n",
"import string\n",
"import os\n",
"import numpy as np\n",
"import re\n",
"import scipy.sparse as ss\n",
"\n",
"from sklearn.feature_extraction.text import TfidfVectorizer\n",
"from nltk.stem.porter import PorterStemmer\n",
"\n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.05,
0,
0,
0,
0,
0.029411764705882353,
0,
0,
0,
0,
0,
0.08333333333333333,
0.012658227848101266,
0.011904761904761904,
0.024390243902439025,
0.013157894736842105,
0.015748031496062992,
0.03125,
0,
0.01851851... | 86 | 0.020417 |
# Copyright (C) 2011 Equinor ASA, Norway.
#
# The file 'ecl_subsidence.py' is part of ERT - Ensemble based
# Reservoir Tool.
#
# ERT is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of t... | [
"# Copyright (C) 2011 Equinor ASA, Norway.\n",
"#\n",
"# The file 'ecl_subsidence.py' is part of ERT - Ensemble based\n",
"# Reservoir Tool.\n",
"#\n",
"# ERT is free software: you can redistribute it and/or modify\n",
"# it under the terms of the GNU General Public License as published by\n",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.030303030303030304,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.046296296296296294,
0.023255813953488372,
0.00787401574803149... | 156 | 0.005582 |
# -*- coding: utf-8 -*-
import codecs
import os
import re
from setuptools import setup
script_dir = os.path.dirname(os.path.abspath(__file__))
def read_text_file(path):
with codecs.open(path, 'r', 'utf-8') as f:
return f.read()
def find_version(*path):
contents = read_text_file(os.path.join(scrip... | [
"# -*- coding: utf-8 -*-\n",
"import codecs\n",
"import os\n",
"import re\n",
"\n",
"from setuptools import setup\n",
"\n",
"\n",
"script_dir = os.path.dirname(os.path.abspath(__file__))\n",
"\n",
"\n",
"def read_text_file(path):\n",
" with codecs.open(path, 'r', 'utf-8') as f:\n",
" ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.010638297872340425,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | 63 | 0.000169 |
#===============================================================================
# LICENSE XOT-Framework - CC BY-NC-ND
#===============================================================================
# This work is licenced under the Creative Commons
# Attribution-Non-Commercial-No Derivative Works 3.0 Unported Lic... | [
"#===============================================================================\r\n",
"# LICENSE XOT-Framework - CC BY-NC-ND\r\n",
"#===============================================================================\r\n",
"# This work is licenced under the Creative Commons\r\n",
"# Attribution-Non-Commercial... | [
0.024390243902439025,
0,
0.024390243902439025,
0,
0.012195121951219513,
0,
0,
0,
0.024390243902439025,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.008333333333333333,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 92 | 0.001472 |
#!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
# Copyright (c) 2014 Mozilla Corporation
# set this to run as a cronjob (after backup has comple... | [
"#!/usr/bin/env python\n",
"\n",
"# This Source Code Form is subject to the terms of the Mozilla Public\n",
"# License, v. 2.0. If a copy of the MPL was not distributed with this\n",
"# file, You can obtain one at https://mozilla.org/MPL/2.0/.\n",
"# Copyright (c) 2014 Mozilla Corporation\n",
"\n",
"#... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.011764705882352941,
0,
0,
0.011111111111111112,
0,
0,
0,
0.011904761904761904,
0,
0,
0,
0,
0.012195121951219513,
0,
0,
0,
0,
0,
0,
0,
0.0087719298245... | 89 | 0.000738 |
from BinarySearchTree import BinarySearchTree as _BinarySearchTree
_DEBUG = 0
def _identifyNephews(sibling, parent):
if sibling == parent.getLeft():
return sibling.getRight(),sibling.getLeft()
else:
return sibling.getLeft(),sibling.getRight()
class RedBlackTree(_BinarySearchTree):
"""A r... | [
"from BinarySearchTree import BinarySearchTree as _BinarySearchTree\n",
"\n",
"_DEBUG = 0\n",
"\n",
"def _identifyNephews(sibling, parent):\n",
" if sibling == parent.getLeft():\n",
" return sibling.getRight(),sibling.getLeft()\n",
" else:\n",
" return sibling.getLeft(),sibling.g... | [
0,
0,
0,
0,
0.02564102564102564,
0,
0.019230769230769232,
0,
0.019230769230769232,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.01282051282051282,
0,
0,
0,
0,
0,
0,
0,
0,
0.027027027027027... | 199 | 0.010954 |
# Copyright (c) 2014 Cisco Systems Inc.
# 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 re... | [
"# Copyright (c) 2014 Cisco Systems Inc.\n",
"# All Rights Reserved.\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n",
"# not use this file except in compliance with the License. You may obtain\n",
"# a copy of the License at\n",
"#\n",
"# htt... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | 24 | 0 |
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from polymorphic.models import PolymorphicModel
from autoslug import AutoSlugField
from rest_framework.response import Response
from rest_framework import status
from cms.common import mixins, utils
f... | [
"from django.db import models\n",
"from django.utils.translation import ugettext_lazy as _\n",
"from django.conf import settings\n",
"\n",
"from polymorphic.models import PolymorphicModel\n",
"from autoslug import AutoSlugField\n",
"from rest_framework.response import Response\n",
"from rest_framework... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 158 | 0 |
"""
Copyright (c) 2012, Thomas M. Farrelly
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, publish, distri... | [
"\"\"\"\n",
"Copyright (c) 2012, Thomas M. Farrelly\n",
"\n",
"Permission is hereby granted, free of charge, to any person obtaining a copy of\n",
"this software and associated documentation files (the \"Software\"), to deal in\n",
"the Software without restriction, including without limitation the rights... | [
0,
0,
0,
0,
0,
0,
0.012345679012345678,
0,
0,
0,
0,
0,
0,
0,
0.012345679012345678,
0,
0,
0,
0,
0,
0,
0.15384615384615385,
0.05555555555555555,
0.07142857142857142,
0.08333333333333333,
0.07692307692307693,
0,
0.14285714285714285,
0.0625,
0.04,
0,
0.11111... | 220 | 0.04649 |
import numpy
from functools import partial
moment_types = {
'tnra20m_nt': 'tab-new-recently-active20m-no-tab',
'tnra10s': 'tab-new-recently-active10s',
'window_open': 'window-open',
'athp': 'active-tab-hostname-progress',
'startup': 'start... | [
"import numpy\n",
"from functools import partial\n",
"\n",
"moment_types = {\n",
" 'tnra20m_nt': 'tab-new-recently-active20m-no-tab',\n",
" 'tnra10s': 'tab-new-recently-active10s',\n",
" 'window_open': 'window-open',\n",
" 'athp': 'active-tab... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.038461538461538464,
0.021505376344086023,
0.02666666666666667,
0,
0,
0,
0,
0.038461538461538464,
0,
0,
0.04,
0,
0,
0.05405405405405406,
0,
0,
0,
0.08620689655172414,
0,
0,
0,
0.07142857142857142,
0,
0.058823529411... | 51 | 0.028149 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This prog... | [
"#!/usr/bin/env python\n",
"# -*- coding: utf-8 -*-\n",
"# This program is free software: you can redistribute it and/or modify\n",
"# it under the terms of the GNU General Public License as published by\n",
"# the Free Software Foundation, either version 3 of the License, or\n",
"# (at your o... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.015384615384615385,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | 104 | 0.001648 |
from __future__ import division
import math
import random
import sys
import time
from twisted.internet import defer, protocol, reactor
from twisted.python import failure, log
import p2pool
from p2pool import data as p2pool_data
from p2pool.bitcoin import data as bitcoin_data
from p2pool.util import deferral, p2proto... | [
"from __future__ import division\n",
"\n",
"import math\n",
"import random\n",
"import sys\n",
"import time\n",
"\n",
"from twisted.internet import defer, protocol, reactor\n",
"from twisted.python import failure, log\n",
"\n",
"import p2pool\n",
"from p2pool import data as p2pool_data\n",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.02564102564102564,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.02702702702702703,
0,
0.2,
0,
0.2,
0,
0.010869565217391304,
0,
0,
0.1111111111111111,
0,
0,
0.2,
0,
0,
0.1111111111111111,
0,
0.1111... | 681 | 0.026582 |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import json
from frappe import _
import frappe.desk.query_report
from frappe.utils import cint
from frappe.model.document import Document
from frappe.modules.export_... | [
"# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n",
"# MIT License. See license.txt\n",
"\n",
"from __future__ import unicode_literals\n",
"import frappe\n",
"import json\n",
"from frappe import _\n",
"import frappe.desk.query_report\n",
"from frappe.utils import cint\n",
"fr... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.041666666666666664,
0.047619047619047616,
0.019230769230769232,
0.045454545454545456,
0.013157894736842105,
0,
0.037037037037037035,
0.037037037037037035,
0.05102040816326531,
0.034482758620689655,
0,
0.02,
0.0212765957446808... | 105 | 0.024193 |
import sys
import os
import random
from raytracer.cartesian import *
from raytracer.colour import *
from raytracer.matrix import *
from raytracer.light import *
from raytracer.output import *
from raytracer.shape import *
from raytracer.view import *
from raytracer.scene import *
from raytracer.quadraticshapes import *... | [
"import sys\n",
"import os\n",
"import random\n",
"from raytracer.cartesian import *\n",
"from raytracer.colour import *\n",
"from raytracer.matrix import *\n",
"from raytracer.light import *\n",
"from raytracer.output import *\n",
"from raytracer.shape import *\n",
"from raytracer.view import *\n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.023255813953488372,
0.02564102564102564,
0.022222222222222223,
0,
0,
0,
0.041666666666666664,
0.06451612903225806,
0,
0,
0.0196078431372549,
0,
0,
0.019230769230769232,
0,
0.2,
... | 68 | 0.022647 |
import prairielearn as pl
import lxml.html
from html import escape
import chevron
import os
LANGUAGE_DEFAULT = None
NO_HIGHLIGHT_DEFAULT = False
SOURCE_FILE_NAME_DEFAULT = None
PREVENT_SELECT_DEFAULT = False
HIGHLIGHT_LINES_DEFAULT = None
HIGHLIGHT_LINES_COLOR_DEFAULT = '#b3d7ff'
allowed_languages = [
'armasm',
... | [
"import prairielearn as pl\n",
"import lxml.html\n",
"from html import escape\n",
"import chevron\n",
"import os\n",
"\n",
"LANGUAGE_DEFAULT = None\n",
"NO_HIGHLIGHT_DEFAULT = False\n",
"SOURCE_FILE_NAME_DEFAULT = None\n",
"PREVENT_SELECT_DEFAULT = False\n",
"HIGHLIGHT_LINES_DEFAULT = None\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 181 | 0.0007 |
# -*- coding: utf-8 -*-
# Copyright 2017 IBM RESEARCH. 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
#
# U... | [
"# -*- coding: utf-8 -*-\r\n",
"\r\n",
"# Copyright 2017 IBM RESEARCH. All Rights Reserved.\r\n",
"#\r\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n",
"# you may not use this file except in compliance with the License.\r\n",
"# You may obtain a copy of the License at\r\n",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | 37 | 0 |
#!/usr/bin/python
# ex:set fileencoding=utf-8:
# flake8: noqa
from __future__ import unicode_literals
from django.test import LiveServerTestCase
from django.core.urlresolvers import reverse
from .apps import QuotationConfig
from .models import Quotation
from .models import QuotationProduct
from djangobmf.utils.test... | [
"#!/usr/bin/python\n",
"# ex:set fileencoding=utf-8:\n",
"# flake8: noqa\n",
"\n",
"from __future__ import unicode_literals\n",
"\n",
"from django.test import LiveServerTestCase\n",
"from django.core.urlresolvers import reverse\n",
"\n",
"from .apps import QuotationConfig\n",
"from .models impor... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.012048192771084338,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.012048192771084338,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | 81 | 0.000783 |
# Copyright 2014 Alcatel-Lucent USA 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 l... | [
"# Copyright 2014 Alcatel-Lucent USA Inc.\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n",
"# not use this file except in compliance with the License. You may obtain\n",
"# a copy of the License at\n",
"#\n",
"# http://www.apache.org/licenses/L... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 100 | 0 |
import logging
from sqlalchemy.orm.attributes import InstrumentedAttribute
from sqlalchemy.orm import joinedload
from sqlalchemy.sql.expression import desc
from sqlalchemy import Column, Boolean, func, or_
from flask import flash
from flask.ext.admin._compat import string_types
from flask.ext.admin.babel import gett... | [
"import logging\n",
"\n",
"from sqlalchemy.orm.attributes import InstrumentedAttribute\n",
"from sqlalchemy.orm import joinedload\n",
"from sqlalchemy.sql.expression import desc\n",
"from sqlalchemy import Column, Boolean, func, or_\n",
"\n",
"from flask import flash\n",
"\n",
"from flask.ext.admi... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.010752688172043012,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.012195121951219513,
0,
0,
0,
0,
0.014705882352941176,
0,
0,
... | 898 | 0.000493 |
#!/usr/bin/env python
###
# Copyright 2015, EMBL-EBI
#
# 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 o... | [
"#!/usr/bin/env python\n",
"\n",
"###\n",
"# Copyright 2015, EMBL-EBI\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"# you may not use this file except in compliance with the License.\n",
"# You may obtain a copy of the License at\n",
"#\n",
"# http://www.a... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.009615384615384616,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | 79 | 0.000122 |
# -*- coding: utf-8 -*-
# MD-Tracks is a trajectory analysis toolkit for molecular dynamics
# and monte carlo simulations.
# Copyright (C) 2007 - 2012 Toon Verstraelen <Toon.Verstraelen@UGent.be>, Center
# for Molecular Modeling (CMM), Ghent University, Ghent, Belgium; all rights
# reserved unless otherwise stated.
#
#... | [
"# -*- coding: utf-8 -*-\n",
"# MD-Tracks is a trajectory analysis toolkit for molecular dynamics\n",
"# and monte carlo simulations.\n",
"# Copyright (C) 2007 - 2012 Toon Verstraelen <Toon.Verstraelen@UGent.be>, Center\n",
"# for Molecular Modeling (CMM), Ghent University, Ghent, Belgium; all rights\n",
... | [
0,
0,
0,
0.012345679012345678,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.012345679012345678,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.25,
0,
0,
0,
0.03333333333333333,
0,
0,
0,
0,
0,
0.03333333333333333,
0,
0,
0.012345679012... | 146 | 0.012216 |
#!/usr/bin/env python
#importamos el modulo socket
import socket
#instanciamos un objeto para trabajar con el socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
#Con el metodo bind le indicamos que puerto debe escuchar y de que servidor esperar conexiones
#Es mejor dejarlo en blanco para recibir conexio... | [
"#!/usr/bin/env python\n",
" \n",
"#importamos el modulo socket\n",
"import socket\n",
" \n",
"#instanciamos un objeto para trabajar con el socket\n",
"s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n",
" \n",
"#Con el metodo bind le indicamos que puerto debe escuchar y de que servidor espera... | [
0,
0.5,
0.034482758620689655,
0,
0.5,
0.019230769230769232,
0,
0.5,
0.021052631578947368,
0.0125,
0,
0.5,
0.022727272727272728,
0.01818181818181818,
0,
0.5,
0.034482758620689655,
0.021505376344086023,
0,
0.5,
0.5,
0,
0.5,
0.025,
0.02564102564102564,
0,
0.5,
0.01... | 41 | 0.155838 |
""" Defines the DataLabel class and related trait and function.
"""
# Major library imports
from numpy import array, asarray, inf
from numpy.linalg import norm
# Enthought library imports
from traits.api import Any, Array, Bool, Enum, Float, Int, List, \
Str, Tuple, Trait, on_trait_change, Property
from enable.ap... | [
"\"\"\" Defines the DataLabel class and related trait and function.\n",
"\"\"\"\n",
"# Major library imports\n",
"from numpy import array, asarray, inf\n",
"from numpy.linalg import norm\n",
"\n",
"# Enthought library imports\n",
"from traits.api import Any, Array, Bool, Enum, Float, Int, List, \\\n",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.012195121951219513,
0,
0,
0,
0.011235955056179775,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | 386 | 0.001966 |
"""Tests for Dalite XBLock."""
from unittest import TestCase
import ddt
import mock
from xblock.core import XBlock
from xblock.field_data import DictFieldData
from xblock.fragment import Fragment
from dalite_xblock import dalite_xblock
from dalite_xblock.dalite_xblock import DaliteXBlock
from dalite_xblock.passport_... | [
"\"\"\"Tests for Dalite XBLock.\"\"\"\n",
"from unittest import TestCase\n",
"\n",
"import ddt\n",
"import mock\n",
"\n",
"from xblock.core import XBlock\n",
"from xblock.field_data import DictFieldData\n",
"from xblock.fragment import Fragment\n",
"\n",
"from dalite_xblock import dalite_xblock\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.011627906976744186,
0,
0,
0,
0,
0,
0,
0.010526315789473684,
0,
0.01,
0,
0.010638297872340425,
0,
0.010752688172043012,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.010416666666666666,
0,
0,
... | 365 | 0.001251 |
# -*- coding: utf-8 -*-
'''
Queries for experiments with SEQ operator
'''
import os
from tool.attributes import get_move_attribute_list, get_place_attribute_list
from tool.experiment import SLI, RAN, ALGORITHM, \
CQL_ALG, QUERY, Q_MOVE, Q_PLACE
from tool.io import get_query_dir, write_to_txt, get_out_file, get_en... | [
"# -*- coding: utf-8 -*-\n",
"'''\n",
"Queries for experiments with SEQ operator\n",
"'''\n",
"\n",
"import os\n",
"\n",
"from tool.attributes import get_move_attribute_list, get_place_attribute_list\n",
"from tool.experiment import SLI, RAN, ALGORITHM, \\\n",
" CQL_ALG, QUERY, Q_MOVE, Q_PLACE\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 228 | 0 |
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import base64
import logging
from common import chrome_proxy_metrics as metrics
from telemetry.core import exceptions
from telemetry.page import page_test
... | [
"# Copyright 2014 The Chromium Authors. All rights reserved.\n",
"# Use of this source code is governed by a BSD-style license that can be\n",
"# found in the LICENSE file.\n",
"\n",
"import base64\n",
"import logging\n",
"\n",
"from common import chrome_proxy_metrics as metrics\n",
"from telemetry.... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.01282051282051282,
0,
0,
0,
0,
0,
0,
0.012345679012345678,
0,
0,
0,
0.016129032258064516,
0,
0,
0.022727272727272728,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.02857142857142857,
0,
0,
0,
0,
0.01515151515... | 82 | 0.0043 |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
import json
from frappe.utils import flt, cstr, nowdate, nowtime
class InvalidWarehouseCompany(frappe.ValidationErro... | [
"# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n",
"# License: GNU General Public License v3. See license.txt\n",
"\n",
"from __future__ import unicode_literals\n",
"import frappe\n",
"from frappe import _\n",
"import json\n",
"from frappe.utils import flt, cstr, nowdate, nowtim... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.03333333333333333,
0,
0.013333333333333334,
0.0425531914893617,
0,
0.025,
0,
0.06666666666666667,
0.037037037037037035,
0.02702702702702703,
0,
0.06666666666666667,
0.037037037037037035,
0.023809523809523808,
0,
0.023809523809523808,
0.0... | 175 | 0.030839 |
__author__ = 'mdavid'
import string
import re
class InputValidation:
@staticmethod
def is_valid_domain(text):
if not text:
return False
if '.' not in text:
return False
allowed = set(string.ascii_letters + string.digits + '-.')
if set(text) - allowed:... | [
"__author__ = 'mdavid'\n",
"\n",
"import string\n",
"import re\n",
"\n",
"\n",
"class InputValidation:\n",
" @staticmethod\n",
" def is_valid_domain(text):\n",
" if not text:\n",
" return False\n",
"\n",
" if '.' not in text:\n",
" return False\n",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1
] | 54 | 0.018519 |
from ruamel import yaml
import great_expectations as ge
from great_expectations.core.batch import BatchRequest, RuntimeBatchRequest
context = ge.get_context()
datasource_config = {
"name": "taxi_datasource",
"class_name": "Datasource",
"module_name": "great_expectations.datasource",
"execution_engine... | [
"from ruamel import yaml\n",
"\n",
"import great_expectations as ge\n",
"from great_expectations.core.batch import BatchRequest, RuntimeBatchRequest\n",
"\n",
"context = ge.get_context()\n",
"\n",
"datasource_config = {\n",
" \"name\": \"taxi_datasource\",\n",
" \"class_name\": \"Datasource\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.011627906976744186,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.00909090909090909,
0.011904761904761904,
0,
0,
0,
0,
0,
0.01136363... | 90 | 0.000619 |
# -*- coding: utf-8 -*-
# Copyright 2017 IBM RESEARCH. 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
#
# U... | [
"# -*- coding: utf-8 -*-\r\n",
"\r\n",
"# Copyright 2017 IBM RESEARCH. All Rights Reserved.\r\n",
"#\r\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n",
"# you may not use this file except in compliance with the License.\r\n",
"# You may obtain a copy of the License at\r\n",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | 49 | 0 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from datetime import datetime
import math
import time
import numpy as np
import tensorflow as tf
import predict_steering
FLAGS = tf.app.flags.FLAGS
tf.app.flags.DEFINE_string('eval_dir', '/home/sridhar/code... | [
"from __future__ import absolute_import\n",
"from __future__ import division\n",
"from __future__ import print_function\n",
"\n",
"from datetime import datetime\n",
"import math\n",
"import time\n",
"\n",
"import numpy as np\n",
"import tensorflow as tf\n",
"\n",
"import predict_steering\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.009900990099009901,
0,
0,
0,
0.009708737864077669,
0,
0,
0,
0,
0,
0,
0.015873015873015872,
0,
0,
0.011235955056179775,
0.05,
0,
0,
0,
0,
0,
0,
0.034482758620689655,
0,
0,
0.0303030303030303... | 128 | 0.010086 |
# __init__.py
"""
pygaero
---------
Python tools for the processing of data obtained from HR-ToF-CIMS, with some functions
being specifically designed for data obtained using the Filter Inlet for Gases and
Aerosols (FigAERO) inlet. Time series data is handled by pandas DataFrames, with data
imported... | [
"# __init__.py\n",
"\"\"\"\n",
"pygaero\n",
"---------\n",
" Python tools for the processing of data obtained from HR-ToF-CIMS, with some functions\n",
" being specifically designed for data obtained using the Filter Inlet for Gases and\n",
" Aerosols (FigAERO) inlet. Time series data is ha... | [
0,
0,
0,
0,
0.010526315789473684,
0.011494252873563218,
0.011111111111111112,
0.010752688172043012,
0.01020408163265306,
0.01,
0,
0,
0,
0,
0,
0,
0,
0,
0.01020408163265306,
0,
0,
0,
0.009345794392523364,
0,
0,
0,
0.009433962264150943,
0.009615384615384616,
0.01... | 48 | 0.003009 |
from dispel4py.base import IterativePE
class SeismoStreamPE(IterativePE):
INPUT_NAME = IterativePE.INPUT_NAME
OUTPUT_NAME = IterativePE.OUTPUT_NAME
def __init__(self, compute_fn, params={}):
IterativePE.__init__(self)
self.compute_fn = compute_fn
self.params = params
... | [
"from dispel4py.base import IterativePE\n",
"\n",
"class SeismoStreamPE(IterativePE):\n",
" \n",
" INPUT_NAME = IterativePE.INPUT_NAME\n",
" OUTPUT_NAME = IterativePE.OUTPUT_NAME\n",
" \n",
" def __init__(self, compute_fn, params={}):\n",
" IterativePE.__init__(self)\n",
" ... | [
0,
0,
0.02857142857142857,
0.2,
0,
0,
0.2,
0,
0,
0,
0,
0.1111111111111111,
0,
0,
0,
0,
0,
0,
0,
0.1111111111111111,
0,
0,
0,
0.034482758620689655,
0.030303030303030304,
0,
0,
0,
0.1111111111111111,
0,
0,
0.07692307692307693,
0,
0,
0,
0.0769230769... | 87 | 0.036568 |
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from ast import literal_eval
import pytz
from werkzeug import abort, redirect
from wtforms import Form, TextField, PasswordField, validators
from nereid import jsonify, flash... | [
"# This file is part of Tryton. The COPYRIGHT file at the top level of\n",
"# this repository contains the full copyright notices and license terms.\n",
"from ast import literal_eval\n",
"\n",
"import pytz\n",
"from werkzeug import abort, redirect\n",
"from wtforms import Form, TextField, PasswordField... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.01694915254237288,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | 497 | 0.001274 |
# -*- coding: utf-8 -*-
from flask import render_template, Blueprint, redirect, url_for, flash, request, current_app
from flask.ext.login import login_required, current_user
from ..models import db, User, Story, Upvote
from ..forms import StoryForm, RepostStoryForm, UserForm, PasswordForm
bp = Blueprint('user', __na... | [
"# -*- coding: utf-8 -*-\n",
"\n",
"from flask import render_template, Blueprint, redirect, url_for, flash, request, current_app\n",
"from flask.ext.login import login_required, current_user\n",
"\n",
"from ..models import db, User, Story, Upvote\n",
"from ..forms import StoryForm, RepostStoryForm, User... | [
0,
0,
0.010752688172043012,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.011764705882352941,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.01176470588... | 144 | 0.000546 |
import workflows
# With this import we can use this utils file as the original workflows.utils
from workflows.utils import *
def get_allowed_transitions(obj, user):
"""Returns all allowed transitions for passed object and user. Takes the
current state of the object into account.
**Parameters:**
obj... | [
"\n",
"import workflows\n",
"\n",
"# With this import we can use this utils file as the original workflows.utils\n",
"from workflows.utils import *\n",
"\n",
"def get_allowed_transitions(obj, user):\n",
" \"\"\"Returns all allowed transitions for passed object and user. Takes the\n",
" current... | [
0,
0,
0,
0,
0,
0,
0.025,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.011494252873563218,
0.1111111111111111,
0,
0.04,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.011494252873563218,
0.037037037037037035,
0,
0,
0,
0,
0,
... | 69 | 0.020059 |
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | [
"# ----------------------------------------------------------------------------\n",
"# Copyright (c) 2013--, scikit-bio development team.\n",
"#\n",
"# Distributed under the terms of the Modified BSD License.\n",
"#\n",
"# The full license is in the file COPYING.txt, distributed with this software.\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 584 | 0.000063 |
# -*- coding: utf-8 -*-
"""
pygments.sphinxext
~~~~~~~~~~~~~~~~~~
Sphinx extension to generate automatic documentation of lexers,
formatters and filters.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import print... | [
"# -*- coding: utf-8 -*-\n",
"\"\"\"\n",
" pygments.sphinxext\n",
" ~~~~~~~~~~~~~~~~~~\n",
"\n",
" Sphinx extension to generate automatic documentation of lexers,\n",
" formatters and filters.\n",
"\n",
" :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.\n",
" :l... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.03333333333333333,
... | 155 | 0.000445 |
''' sensor-post reads sensor data from a sql lite database and posts it to the server
Copyright (C) 2013 Sagar G V
E-mail : sagar.writeme@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free S... | [
"'''\tsensor-post reads sensor data from a sql lite database and posts it to the server\n",
"\n",
"\tCopyright (C) 2013 Sagar G V\n",
"\tE-mail : sagar.writeme@gmail.com\n",
"\n",
" This program is free software: you can redistribute it and/or modify\n",
" it under the terms of the GNU Affero Gen... | [
0.011627906976744186,
0,
0.03225806451612903,
0.029411764705882353,
0,
0.0136986301369863,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.043478260869565216,
0,
0,
0,
0,
0.0196078431372549,
0,
0.00684931506849315,
0,
0.041666666666666664,
0.0275229357798... | 70 | 0.038793 |