repo_name stringlengths 5 100 | path stringlengths 4 299 | copies stringclasses 990
values | size stringlengths 4 7 | content stringlengths 666 1.03M | license stringclasses 15
values | hash int64 -9,223,351,895,964,839,000 9,223,297,778B | line_mean float64 3.17 100 | line_max int64 7 1k | alpha_frac float64 0.25 0.98 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
mlperf/training_results_v0.7 | Google/benchmarks/maskrcnn/implementations/maskrcnn-research-TF-tpu-v4-512/object_detection/region_similarity_calculator.py | 5 | 4537 | # Copyright 2017 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... | apache-2.0 | 2,971,167,608,454,835,700 | 32.607407 | 80 | 0.692528 | false |
davidoj/nervanagpu | benchmarks/gemm_test.py | 4 | 2797 | #!/usr/bin/python
# Copyright 2014 Nervana 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 req... | apache-2.0 | -4,568,549,063,002,603,500 | 35.324675 | 93 | 0.52306 | false |
SivagnanamCiena/asa-capture | asa-capture.py | 2 | 2741 | # 2014-07-10/DN - attempting to implement argparse so that user, pwd & IP can be
# passed in from CLI.
# 2014-07-10/DN - Works with my ASA but I had to add an enable option as the enable pwd
# is different. Might be nice to default the enable password to the user password if
# that was supplied.
import pexp... | mit | -7,041,156,504,277,109,000 | 36.547945 | 119 | 0.736228 | false |
PythonCharmers/FunkLoad | src/funkload/ReportRenderHtmlGnuPlot.py | 3 | 25471 | # (C) Copyright 2009 Nuxeo SAS <http://nuxeo.com>
# Author: bdelbosc@nuxeo.com
# Contributors: Kelvin Ward
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as published
# by the Free Software Foundation.
#
# This program is distrib... | gpl-2.0 | 2,208,883,042,714,381,300 | 40.483713 | 276 | 0.54509 | false |
jayhetee/coveragepy | tests/test_process.py | 2 | 37293 | # coding: utf8
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""Tests for process behavior of coverage.py."""
import glob
import os
import os.path
import re
import sys
import textwrap
import coverage
from cov... | apache-2.0 | -291,478,364,422,682,300 | 35.047389 | 97 | 0.570708 | false |
Daniel-CA/odoo-addons | stock_lot_lifespan/models/stock_production_lot.py | 1 | 1228 | # -*- coding: utf-8 -*-
# Copyright 2017 Ainara Galdona - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import models, fields, api
from dateutil.relativedelta import relativedelta
class StockProductionLot(models.Model):
_inherit = 'stock.production.lot'
@api.onchang... | agpl-3.0 | -2,681,940,370,119,119,000 | 41.344828 | 74 | 0.665309 | false |
ExpHP/crank | plotutil.py | 1 | 1861 |
from colorsys import hls_to_rgb
import numpy as np
import math
class WavePlotter:
def plot(self, ax, psigrid, evo):
''' Produces a plot on ax. Returns the produced drawable, and records it for later modification through update(). '''
raise NotImplementedError
def update(self, psigrid, evo):
''' Updates the p... | mit | -7,844,894,315,189,843,000 | 22.858974 | 120 | 0.648576 | false |
gnumdk/lollypop | lollypop/helper_passwords.py | 1 | 7833 | # Copyright (c) 2017 Cedric Bellegarde <cedric.bellegarde@adishatz.org>
# 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.
... | gpl-3.0 | 2,650,566,165,039,561,000 | 35.774648 | 75 | 0.469424 | false |
KellyChan/Python | javascript/backbone/backbone-templates/backbone-fileupload/fileupload/manage.py | 3 | 3855 | #!/usr/bin/env python
"""
Usage: manage.py {lms|cms} [--settings env] ...
Run django management commands. Because edx-platform contains multiple django projects,
the first argument specifies which project to run (cms [Studio] or lms [Learning Management System]).
By default, those systems run in with a settings file ... | mit | 5,578,937,510,015,899,000 | 27.984962 | 113 | 0.638392 | false |
LiveZenLK/CeygateERP | addons/account/wizard/account_invoice_refund.py | 23 | 6463 | # -*- coding: utf-8 -*-
from openerp import models, fields, api, _
from openerp.tools.safe_eval import safe_eval as eval
from openerp.exceptions import UserError
class AccountInvoiceRefund(models.TransientModel):
"""Refunds invoice"""
_name = "account.invoice.refund"
_description = "Invoice Refund"
... | gpl-3.0 | 3,315,044,040,145,152,000 | 49.889764 | 205 | 0.520037 | false |
andersk/zulip | tools/lib/test_script.py | 5 | 4370 | import glob
import os
import subprocess
import sys
from argparse import ArgumentParser
from distutils.version import LooseVersion
from typing import Iterable, List, Optional, Tuple
from scripts.lib.zulip_tools import get_dev_uuid_var_path
from version import PROVISION_VERSION
ZULIP_PATH = os.path.dirname(os.path.dirn... | apache-2.0 | 4,889,622,500,786,676,000 | 32.358779 | 173 | 0.671396 | false |
testalt/electrum-dgc | gui/qt/qrtextedit.py | 1 | 1725 | from electrum_dgc.i18n import _
from PyQt4.QtGui import *
from PyQt4.QtCore import *
class QRTextEdit(QPlainTextEdit):
def __init__(self, text=None):
QPlainTextEdit.__init__(self, text)
self.button = QToolButton(self)
self.button.setIcon(QIcon(":icons/qrcode.png"))
self.button.setS... | gpl-3.0 | -3,892,015,273,093,110,300 | 34.204082 | 101 | 0.588986 | false |
MyRobotLab/pyrobotlab | home/scruffy-bob/faceidentification.py | 1 | 36627 | #
# This file will NOT run under MRL. I've uploaded it to give an example
# in Python of a face recognition algorithm. It has the ability to normalize
# training pictures (including resizing, tilting, and shifting), so all the
# training pictures are aligned to the others, making identification easier.
#
# On... | apache-2.0 | 2,895,189,796,406,926,300 | 40.957569 | 172 | 0.60486 | false |
muzixing/ryu | ryu/gui/controller.py | 5 | 2813 | #!/usr/bin/env python
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
#
# 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
#
# Un... | apache-2.0 | 4,218,499,066,368,941,000 | 29.247312 | 77 | 0.659438 | false |
rui7157/Daily-code | proxyip/proxyip.py | 1 | 2079 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2016-05-17 17:29:31
# @Author : NvRay (nvray@foxmail.com)
import requests
import re
import os
from gevent import monkey
monkey.patch_socket()
import gevent
address = {
"国内高匿": "nn",
"国内高透": "nt",
"国外高匿": "wn",
"国外高透": "wt"
}
save_file = os.pa... | gpl-3.0 | 8,107,028,449,022,860,000 | 30.369231 | 107 | 0.503188 | false |
h4ck3rm1k3/gobject-introspection | giscanner/maintransformer.py | 1 | 55890 | # -*- Mode: Python -*-
# Copyright (C) 2010 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# T... | gpl-2.0 | 2,615,259,377,961,729,500 | 41.534247 | 95 | 0.564019 | false |
jonathanmeier5/teamstore | saleor/dashboard/order/urls.py | 7 | 1645 | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.order_list, name='orders'),
url(r'^(?P<order_pk>\d+)/$',
views.order_details, name='order-details'),
url(r'^(?P<order_pk>\d+)/add-note/$',
views.order_add_note, name='order-add-note'),
url(r'^(?P<ord... | bsd-3-clause | 9,109,589,587,332,569,000 | 46 | 75 | 0.598176 | false |
bazz-erp/erpnext | erpnext/schools/doctype/assessment_result/assessment_result.py | 18 | 1392 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import flt
from frappe.model.document import Document
from erpnext.schools.api impo... | gpl-3.0 | 2,132,014,199,482,007,300 | 37.666667 | 111 | 0.744253 | false |
marratj/ansible | lib/ansible/modules/network/illumos/dladm_linkprop.py | 29 | 7824 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Adam Števko <adam.stevko@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | 3,472,987,972,616,592,000 | 25.879725 | 93 | 0.538737 | false |
AndyHuu/flocker | flocker/provision/_ssh/_model.py | 8 | 7061 | from collections import MutableSequence
from pipes import quote as shell_quote
from pyrsistent import PRecord, field
from effect import Effect, sync_performer
def identity(arg):
"""Return argument untouched."""
return arg
class RunRemotely(PRecord):
"""
Run some commands on a remote host.
:ivar... | apache-2.0 | 1,975,530,347,451,023,000 | 28.919492 | 79 | 0.672709 | false |
jbedorf/tensorflow | tensorflow/python/kernel_tests/diag_op_test.py | 7 | 23049 | # Copyright 2015 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... | apache-2.0 | -55,699,534,788,896,450 | 39.939609 | 80 | 0.536986 | false |
compston/TAP-Workshop | utilities/Gnip-Python-Search-API-Utilities/gnip_search.py | 1 | 11170 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
__author__="Scott Hendrickson, Josh Montague"
import sys
import json
import codecs
import argparse
import datetime
import time
import os
import ConfigParser
from search.results import *
reload(sys)
sys.stdout = codecs.getwriter('utf-8')(sys.stdout)
sys.stdin = codecs.ge... | mit | 4,436,343,099,066,533,000 | 48.866071 | 181 | 0.537959 | false |
Pytlicek/MailgunMailer | app/models/Newsletters.py | 1 | 2753 | from flask import session
from app.log import get_logger
from app.models.SQL_DB import Newsletter, db
logger = get_logger(__name__)
def user_newsletters(email):
newsletters = Newsletter.query.filter_by(username=email).all()
return newsletters
def add_newsletter(username, subject, message, recipients, send... | mit | 2,927,432,413,659,847,700 | 27.978947 | 88 | 0.678533 | false |
Kjili/analysis-preservation.cern.ch | tests/unit/fixtures/test_fixtures_cli.py | 3 | 2099 | # -*- coding: utf-8 -*-
#
# This file is part of CERN Analysis Preservation Framework.
# Copyright (C) 2016 CERN.
#
# CERN Analysis Preservation Framework 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... | gpl-2.0 | -6,740,100,909,940,735,000 | 37.163636 | 78 | 0.722249 | false |
janusnic/ecommerce | ecommerce/extensions/dashboard/users/views.py | 1 | 1719 | import logging
from django.conf import settings
from django.contrib import messages
from django.utils.translation import ugettext_lazy as _
from oscar.apps.dashboard.users.views import UserDetailView as CoreUserDetailView
import requests
import waffle
logger = logging.getLogger(__name__)
class UserDetailView(CoreUs... | agpl-3.0 | 5,146,681,864,673,447,000 | 36.369565 | 117 | 0.640489 | false |
Naarukarmic/itr | SA_BE_Manipulation/grasp_ball_in_box.py | 1 | 5048 | from math import sqrt
from hpp import Transform
from hpp.corbaserver.manipulation import ConstraintGraph
from manipulation import robot, vf, ps, Ground, Box, Pokeball, PathPlayer, gripperName, ballName
vf.loadEnvironmentModel (Ground, 'ground')
vf.loadEnvironmentModel (Box, 'box')
vf.moveObstacle ('box/base_link_0', [... | mit | -131,080,501,755,695,420 | 49.48 | 146 | 0.696117 | false |
blagasz/python-ann | neurolab/train/gd.py | 1 | 11660 | # -*- coding: utf-8 -*-
"""
Train algorithm based gradients algorithms
"""
import numpy as np
from neurolab.core import Train
import neurolab.tool as tool
class TrainGD(Train):
"""
Gradient descent backpropogation
:Support networks:
newff (multi-layers perceptron)
:Parameters:
inp... | gpl-2.0 | 8,233,483,902,903,956,000 | 28.661578 | 77 | 0.529982 | false |
Houzz/luigi | test/contrib/salesforce_test.py | 9 | 3894 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Simply Measured
#
# 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... | apache-2.0 | 1,970,273,524,199,984,600 | 30.918033 | 104 | 0.632768 | false |
mpattyn/fumiste | prototypePython/steamapi/requests/__init__.py | 1 | 1856 | # -*- coding: utf-8 -*-
# __
# /__) _ _ _ _ _/ _
# / ( (- (/ (/ (- _) / _)
# /
"""
requests HTTP library
~~~~~~~~~~~~~~~~~~~~~
Requests is an HTTP library, written in Python, for human beings. Basic GET
usage:
>>> import requests
>>> r = requests.get('http://python.org')
>>> r.sta... | mit | 7,162,068,231,538,493,000 | 23.103896 | 77 | 0.631466 | false |
NewCaliforniaWaterAtlas/ca-freshwater-species-backend-rest-framework | api/settings.py | 1 | 2252 | """
Django settings for api project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import... | mit | 3,608,196,549,639,135,700 | 22.458333 | 78 | 0.700266 | false |
bdyetton/prettychart | website/models.py | 5 | 1195 | # -*- coding: utf-8 -*-
"""Consolidates all necessary models from the framework and website packages.
"""
from framework.auth.core import User
from framework.guid.model import Guid, BlacklistGuid
from framework.sessions.model import Session
from website.project.model import (
Node, NodeLog,
Tag, WatchConfig, ... | apache-2.0 | 2,030,941,442,163,092,500 | 35.212121 | 77 | 0.794142 | false |
Cal-CS-61A-Staff/ok | server/jobs/__init__.py | 1 | 3089 | import functools
import io
import logging
from flask_login import current_user
from flask_rq import get_connection, get_queue
import redis.exceptions
import rq
from server.constants import APPLICATION_ROOT
from server.models import db, Job
class JobLogHandler(logging.StreamHandler):
"""Stream log contents to buf... | apache-2.0 | 5,238,284,720,155,805,000 | 26.096491 | 80 | 0.597604 | false |
ykaneko/neutron | neutron/tests/base.py | 4 | 2827 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010-2011 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/l... | apache-2.0 | -7,705,615,731,703,952,000 | 33.901235 | 77 | 0.678458 | false |
HybridF5/nova | nova/api/openstack/compute/assisted_volume_snapshots.py | 33 | 3881 | # Copyright 2013 Red Hat, Inc.
# Copyright 2014 IBM Corp.
# 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.... | apache-2.0 | -9,150,551,308,493,265,000 | 34.605505 | 78 | 0.662716 | false |
chromium2014/src | tools/telemetry/telemetry/web_perf/metrics/responsiveness_metric.py | 9 | 2009 | # 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 logging
from telemetry.web_perf import timeline_interaction_record as tir_module
from telemetry.web_perf.metrics import mainthread_jank_stats
from tel... | bsd-3-clause | 2,616,633,755,200,080,400 | 41.744681 | 80 | 0.72673 | false |
openstack/sahara-tests | sahara_tests/unit/scenario/test_base.py | 1 | 32865 | # Copyright (c) 2015 Mirantis 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 writ... | apache-2.0 | 3,546,009,782,637,582,300 | 47.545052 | 79 | 0.54094 | false |
fusionbox/django-extensions | django_extensions/management/commands/runserver_plus.py | 2 | 6895 | from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django_extensions.management.utils import setup_logger, RedirectHandler
from optparse import make_option
import os
import sys
import time
try:
from django.contrib.staticfiles.handlers import StaticFilesHandler
... | mit | 8,625,338,265,703,211,000 | 43.772727 | 161 | 0.589848 | false |
MITHyperloopTeam/software_core | software/UI/braking_control.py | 1 | 2694 | #!/usr/bin/env python
#signif reference to http://pastebin.com/k87sfiEf
import sys
import math
import signal
import time
import os
import math, random
import numpy as np
from numpy import linalg
from PIL import Image
#interface stuff
from PyQt4 import QtCore, QtGui, QtOpenGL
import pyqtgraph as pg
#comms stuff
i... | lgpl-3.0 | -6,407,577,211,359,666,000 | 27.0625 | 88 | 0.673719 | false |
mikhaelharswanto/ryu | ryu/tests/unit/packet/test_ipv6.py | 4 | 25463 | # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
#
# 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 applicab... | apache-2.0 | 5,943,678,540,030,711,000 | 30.749377 | 75 | 0.547972 | false |
anryko/ansible | lib/ansible/modules/utilities/logic/import_role.py | 17 | 2834 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
'metadata_version': '1.1',
'status': ['... | gpl-3.0 | -3,672,238,618,073,113,000 | 27.918367 | 118 | 0.679605 | false |
marcellodesales/svnedge-console | ext/linux/pkg-toolkit/pkg/vendor-packages/pkg/client/imageplan.py | 4 | 40807 | #!/usr/bin/python2.4
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://w... | agpl-3.0 | -8,538,805,666,062,762,000 | 45.057562 | 96 | 0.453329 | false |
vmthunder/nova | nova/tests/virt/xenapi/image/test_bittorrent.py | 12 | 5657 | # 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... | apache-2.0 | 4,690,896,497,726,723,000 | 33.919753 | 78 | 0.599434 | false |
sivertkh/gtrackcore | gtrackcore/track_operations/benchmarking/UnionRuntime.py | 1 | 6134 |
from line_profiler import LineProfiler
import time
import timeit
import sys
import os
import glob
from collections import OrderedDict
from cStringIO import StringIO
from gtrackcore.track_operations.operations._Union import Union
from gtrackcore.track_operations.TrackContents import TrackContents
from gtrackcore.me... | gpl-3.0 | -621,302,844,013,529,500 | 28.63285 | 78 | 0.60613 | false |
Intel-Corporation/tensorflow | tensorflow/python/ops/ragged/ragged_gather_ops.py | 2 | 10731 | # Copyright 2018 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... | apache-2.0 | 907,893,956,134,233,600 | 40.114943 | 80 | 0.625198 | false |
ZHAW-INES/rioxo-uClinux-dist | user/python/python-2.4.4/Lib/distutils/util.py | 1 | 19647 | """distutils.util
Miscellaneous utility functions -- anything that doesn't fit into
one of the other *util.py modules.
"""
__revision__ = "$Id: util.py 4802 2007-01-23 21:26:03Z vapier $"
import sys, os, string, re
from distutils.errors import DistutilsPlatformError
from distutils.dep_util import newer
from distutil... | gpl-2.0 | 8,010,245,731,755,182,000 | 37.223735 | 78 | 0.586044 | false |
ThomasYeoLab/CBIG | stable_projects/fMRI_dynamics/Kong2021_pMFM/examples/scripts/CBIG_pMFM_basic_functions_example.py | 1 | 31953 | # /usr/bin/env python
'''
Written by Kong Xiaolu and CBIG under MIT license:
https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md
'''
import csv
import math
import time
import numpy as np
import torch
import scipy.io as sio
'''********** Functions for computing simulated BOLD signals ***********'''
def CBI... | mit | 273,375,267,091,063,580 | 35.601375 | 79 | 0.577943 | false |
lionelz/networking-bambuk | networking_bambuk/ml2/bambuk_l2pop.py | 1 | 1674 |
from neutron.agent import rpc as agent_rpc
from neutron.common import topics
from neutron.plugins.ml2.drivers.l2pop.rpc_manager import l2population_rpc
from oslo_log import log
LOG = log.getLogger(__name__)
class BambukL2Pop(l2population_rpc.L2populationRpcCallBackTunnelMixin):
def __init__(self):
sel... | apache-2.0 | 1,707,994,943,119,956,200 | 34.617021 | 75 | 0.597372 | false |
jtackaberry/stagehand | external/metadata/image/IPTC.py | 1 | 5744 | # -*- coding: iso-8859-1 -*-
# -----------------------------------------------------------------------------
# IPTC.py
# -----------------------------------------------------------------------------
# $Id$
#
# -----------------------------------------------------------------------------
# kaa-Metadata - Media Metadata ... | mit | -2,915,659,367,457,643,500 | 29.073298 | 79 | 0.576253 | false |
hfp/tensorflow-xsmm | tensorflow/python/distribute/__init__.py | 5 | 1086 | # Copyright 2017 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... | apache-2.0 | 4,622,346,670,216,164,000 | 42.44 | 80 | 0.726519 | false |
celstark/bidskit | dcm2ndar.py | 1 | 22745 | #!/usr/bin/env python3
"""
Convert flat DICOM file set into an NDAR-compliant fileset
Usage
----
dcm2ndar.py -i <DICOM Directory> -o <NDAR Directory>
Example
----
% dcm2ndar.py -i sub-001 -o sub-001.ndar
Authors
----
Mike Tyszka, Caltech Brain Imaging Center
Dates
----
2016-08-09 JMT Adapt from dcm2bids.py
MIT Lic... | mit | -5,248,550,081,232,596,000 | 34.65047 | 144 | 0.625588 | false |
diogommartins/ryu | ryu/lib/packet/ipv4.py | 28 | 5481 | # Copyright (C) 2012 Nippon Telegraph and Telephone Corporation.
#
# 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 appli... | apache-2.0 | 3,032,456,156,906,829,000 | 35.785235 | 78 | 0.574713 | false |
mpacula/AutoCorpus | src/tests/driver.py | 1 | 2990 | #!/usr/bin/env python
"""
AutoCorpus: automatically extracts clean natural language corpora from
publicly available datasets.
driver.py: tests Autocorpus tools based on a test text file.
Copyright (C) 2011 Maciej Pacula
This program is free software: you can redistribute it and/or modify
... | agpl-3.0 | -833,297,781,155,915,000 | 28.60396 | 76 | 0.622742 | false |
nthmost/rheti-python | rheti/question.py | 1 | 1051 | import random
class InvalidChoice(Exception):
pass
class Choice(class):
""" Describes a question option (choice), its reference code (e.g. Q21a), and the value that
selecting this Choice represents to the test.
"""
def __init__(self, text, code, value):
self.text = text
self.valu... | mit | -739,113,703,456,876,900 | 25.275 | 103 | 0.613701 | false |
alexschiller/osf.io | scripts/approve_embargo_terminations.py | 6 | 2822 | """EmbargoTerminationApprovals are the Sanction subclass that allows users
to make Embargoes public before the official end date. Like RegistrationAprpovals
and Embargoes, if an admin fails to approve or reject this request within 48
hours it is approved automagically.
Run nightly, this script will approve any embarg... | apache-2.0 | 8,636,664,773,812,053,000 | 37.657534 | 178 | 0.694543 | false |
pombredanne/pants | contrib/jax_ws/src/python/pants/contrib/jax_ws/targets/jax_ws_library.py | 4 | 1290 | # coding=utf-8
# Copyright 2017 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import logging
from... | apache-2.0 | -3,646,351,395,191,158,000 | 33.864865 | 93 | 0.682171 | false |
denzow/ipymessenger | test_ipymessenger.py | 1 | 2490 | #!/usr/bin/env python
# coding:utf-8
from __future__ import print_function, unicode_literals
import sys
import time
import traceback
from logging import StreamHandler
from ipymessenger.IpmsgServer import IpmsgServer
if __name__ == "__main__":
dest_host = "192.168.26.189"
# デバッグメッセージが必要な場合はloggingのHandlerを渡す
... | mit | 1,984,475,330,241,876,200 | 34.15942 | 130 | 0.596455 | false |
eduNEXT/edx-platform | lms/djangoapps/survey/utils.py | 4 | 2181 | """
Utilities for determining whether or not a survey needs to be completed.
"""
from django.utils.translation import ugettext as _
from lms.djangoapps.courseware.access import has_access
from lms.djangoapps.courseware.access_response import AccessError
from lms.djangoapps.courseware.access_utils import ACCESS_GRANTE... | agpl-3.0 | 4,444,762,562,629,214,700 | 33.619048 | 89 | 0.724438 | false |
nictuku/nwu | nwu/common/aptmethod.py | 1 | 6400 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2008 Stephan Peijnik (sp@gnu.org)
#
# This file is part of NWU.
#
# NWU 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 versi... | gpl-3.0 | -3,385,302,614,599,720,000 | 31.820513 | 79 | 0.542031 | false |
doungni/selenium | py/selenium/webdriver/firefox/firefox_profile.py | 60 | 14669 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 | -7,991,479,225,724,271,000 | 37.704485 | 100 | 0.591042 | false |
JonathanSalwan/Triton | src/examples/pin/runtime_register_modification.py | 1 | 1350 | #!/usr/bin/env python2
## -*- coding: utf-8 -*-
##
## Output:
##
## $ ./build/triton ./src/examples/pin/runtime_register_modification.py ./src/samples/crackmes/crackme_xor a
## 4005f9: mov dword ptr [rbp - 4], eax
## #180 = ((_ extract 31 24) (_ bv0 32)) ; byte reference - MOV operation
## #181 = ((... | apache-2.0 | 3,029,729,380,985,088,000 | 34.526316 | 183 | 0.593333 | false |
ccpgames/eve-metrics | web2py/gluon/custom_import.py | 1 | 7867 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import __builtin__
import os
import re
import sys
import threading
import traceback
from gluon import current
NATIVE_IMPORTER = __builtin__.__import__
INVALID_MODULES = set(('', 'gluon', 'applications', 'custom_import'))
# backward compatibility API
de... | mit | -1,467,487,067,982,207,000 | 37.139303 | 87 | 0.535655 | false |
BinPy/BinPy | BinPy/examples/source/Gates/XNOR.py | 4 | 1114 | # -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <headingcell level=2>
# Examples for XNOR class.
# <codecell>
from __future__ import print_function
from BinPy.gates import *
# <codecell>
# Initializing the XNOR class
gate = XNOR(0, 1)
# <codecell>
# Output of the XNOR gate
print (gate.output())
# <codec... | bsd-3-clause | 6,761,703,741,280,542,000 | 11.516854 | 51 | 0.67684 | false |
BNIA/tidydate | src/modules/tidyall.py | 2 | 3960 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""tidyall
"""
from os import remove
import sys
from textwrap import dedent
import pandas as pd
import numpy as np
from .settings import VALID_COLS
from .tidybnl import TidyBlockNLot
from .tidydate import TidyDate
class TidyAll(object):
def __init__(self, file_p... | mit | -5,601,075,572,408,982,000 | 23 | 77 | 0.490152 | false |
rwaldron/depthjs | old/backend/tornado/simple_httpclient.py | 1 | 12056 | #!/usr/bin/env python
from __future__ import with_statement
from cStringIO import StringIO
from tornado.httpclient import HTTPRequest, HTTPResponse, HTTPError
from tornado.httputil import HTTPHeaders
from tornado.ioloop import IOLoop
from tornado.iostream import IOStream, SSLIOStream
from tornado import stack_context
... | agpl-3.0 | 6,752,048,948,973,244,000 | 40.006803 | 101 | 0.587094 | false |
robbert-harms/mri-tools | mri_tools/plots/layouts.py | 1 | 2237 | import itertools
import math
from matplotlib import pyplot as plt
from matplotlib.gridspec import GridSpec
__author__ = 'Robbert Harms'
__date__ = "2015-11-06"
__maintainer__ = "Robbert Harms"
__email__ = "robbert.harms@maastrichtuniversity.nl"
class GridLayout(object):
def __init__(self):
self.spacings... | bsd-3-clause | -8,466,810,770,695,110,000 | 28.826667 | 76 | 0.602593 | false |
frank-y-liu/gatk | src/main/resources/org/broadinstitute/hellbender/tools/walkers/vqsr/training.py | 2 | 46416 | # Imports
import os
import sys
import vcf
import math
import h5py
import time
import pysam
import vqsr_cnn
import numpy as np
from Bio import Seq, SeqIO
from collections import Counter
# Keras Imports
import keras.backend as K
def run():
args = vqsr_cnn.parse_args()
if 'write_reference_and_annotation_tensors'... | bsd-3-clause | 4,743,806,703,012,307,000 | 39.327541 | 120 | 0.607829 | false |
felipenaselva/repo.felipe | plugin.video.exodus/resources/lib/indexers/movies.py | 2 | 41974 | # -*- coding: utf-8 -*-
'''
Exodus Add-on
Copyright (C) 2016 Exodus
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 l... | gpl-2.0 | 7,360,804,568,550,957,000 | 41.100301 | 420 | 0.523324 | false |
alsrgv/tensorflow | tensorflow/python/kernel_tests/substr_op_test.py | 27 | 20553 | # Copyright 2016 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... | apache-2.0 | -4,213,583,889,679,557,000 | 40.354125 | 80 | 0.503576 | false |
sekikn/incubator-airflow | tests/providers/google/cloud/operators/test_video_intelligence_system.py | 10 | 2040 | #
# 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"); you may not... | apache-2.0 | 3,666,093,671,625,131,000 | 40.632653 | 110 | 0.730392 | false |
mojwang/selenium | py/test/selenium/webdriver/common/w3c_interaction_tests.py | 6 | 6270 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 | -8,803,629,755,663,828,000 | 31.319588 | 82 | 0.712281 | false |
gdi2290/rethinkdb | scripts/generate_serialize_macros.py | 2 | 13439 | #!/usr/bin/env python
# Copyright 2010-2014 RethinkDB, all rights reserved.
import sys
"""This script is used to generate the RDB_MAKE_SERIALIZABLE_*() and
RDB_MAKE_ME_SERIALIZABLE_*() macro definitions. Because there are so
many variations, and because they are so similar, it's easier to just
have a Python script to ... | agpl-3.0 | 6,451,273,809,676,396,000 | 47.692029 | 130 | 0.603393 | false |
GinnyN/towerofdimensions-django | tests/regressiontests/localflavor/pl/tests.py | 33 | 22496 | from django.contrib.localflavor.pl.forms import (PLProvinceSelect,
PLCountySelect, PLPostalCodeField, PLNIPField, PLPESELField, PLNationalIDCardNumberField, PLREGONField)
from django.test import SimpleTestCase
class PLLocalFlavorTests(SimpleTestCase):
def test_PLProvinceSelect(self):
f = PLProvinceSe... | bsd-3-clause | -7,811,433,784,382,097,000 | 46.062762 | 116 | 0.755201 | false |
nimeshkumar11/Implementation-of-Adaptive-CoDel-in-ns-3 | src/flow-monitor/bindings/modulegen__gcc_ILP32.py | 14 | 453979 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... | gpl-2.0 | 6,589,814,336,349,080,000 | 63.97481 | 934 | 0.60809 | false |
Coaxis-ASP/opt | daemon/api/tests/test_scanner.py | 2 | 4136 | import unittest
from scanner import Scanner
from tests.stub_network_tools import NetworkToolsStub
class ScannerTestCase(unittest.TestCase):
def test_scan_detect_devices_on_optbox_network(self):
scanner = Scanner(network_tools=NetworkToolsStub(), hostname='127.0.0.1')
scan = scanner.scan(port=9100... | gpl-3.0 | 6,971,212,879,150,504,000 | 44.955556 | 138 | 0.566006 | false |
NTesla/pattern | pattern/graph/commonsense.py | 21 | 11504 | #### PATTERN | COMMONSENSE #########################################################################
# Copyright (c) 2010 University of Antwerp, Belgium
# Author: Tom De Smedt <tom@organisms.be>
# License: BSD (see LICENSE.txt for details).
# http://www.clips.ua.ac.be/pages/pattern
####################################... | bsd-3-clause | 1,701,638,733,746,475,300 | 39.939502 | 107 | 0.549896 | false |
GNOME/conduit | conduit/Logging.py | 2 | 2552 | import os
import logging
import conduit
#The terminal has 8 colors with codes from 0 to 7
BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8)
#These are the sequences need to get colored ouput
RESET_SEQ = "\033[0m"
COLOR_SEQ = "\033[1;%dm"
BOLD_SEQ = "\033[1m"
#The background is set with 40 plus the nu... | gpl-2.0 | 8,459,186,740,951,520,000 | 37.089552 | 141 | 0.655564 | false |
tszym/ansible | lib/ansible/modules/system/java_cert.py | 9 | 9582 | #!/usr/bin/python
#
# (c) 2013, RSD Services S.A
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['preview'],... | gpl-3.0 | 612,301,913,122,521,700 | 34.227941 | 110 | 0.604675 | false |
weedge/doubanFmSpeackerPi | test/photo.py | 1 | 5591 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# look this: http://picamera.readthedocs.io/en/release-1.2/recipes1.html
import io
import os
import sys
import time
import struct
import socket
import picamera
from PIL import Image
import cv2
import numpy as np
def photographToFile():
# Explicitly open a new file cal... | apache-2.0 | 8,029,562,247,687,052,000 | 33.701863 | 96 | 0.612851 | false |
theseyi/WhereHows | wherehows-etl/src/main/resources/jython/LdapTransform.py | 3 | 9172 | #
# Copyright 2015 LinkedIn Corp. 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 applicable law or ... | apache-2.0 | -8,960,257,338,707,552,000 | 40.315315 | 192 | 0.557457 | false |
OpenXT/sync-cli | sync_cli/modify_vm_instance_name.py | 1 | 1885 | #
# Copyright (c) 2013 Citrix Systems, Inc.
#
# 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 2 of the License, or
# (at your option) any later version.
#
# This program is dist... | gpl-2.0 | 3,020,705,549,315,304,000 | 36.7 | 75 | 0.636074 | false |
akariv/redash | tests/handlers/test_authentication.py | 4 | 2213 | from tests import BaseTestCase
import mock
import time
from redash.models import User
from redash.authentication.account import invite_token
from tests.handlers import get_request, post_request
class TestInvite(BaseTestCase):
def test_expired_invite_token(self):
with mock.patch('time.time') as patched_ti... | bsd-2-clause | -5,353,357,023,087,710,000 | 37.824561 | 118 | 0.671487 | false |
Mecanon/morphing_wing | dynamic_model/optimization/deap_optimizer.py | 1 | 11813 | # -*- coding: utf-8 -*-
"""
Created on Wed Jul 06 17:40:21 2016
@author: Pedro Leal
"""
# This file is part of DEAP.
#
# DEAP is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version... | mit | 5,493,566,711,815,010,000 | 32.5625 | 128 | 0.521205 | false |
rzr/synapse | tests/unittest.py | 4 | 3179 | # -*- coding: utf-8 -*-
# Copyright 2014 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 | 686,168,607,075,789,600 | 33.554348 | 78 | 0.630387 | false |
wkevina/feature-requests-app | features/migrations/0002_featurerequest.py | 1 | 1267 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-08 21:14
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('features', '0001_initial'),
]
operations = [
... | mit | -7,412,387,663,296,785,000 | 42.689655 | 153 | 0.621152 | false |
sebastianwelsh/artifacts | tests/source_type_test.py | 4 | 2142 | # -*- coding: utf-8 -*-
"""Tests for the source type objects."""
import unittest
from artifacts import errors
from artifacts import source_type
class SourceTypeTest(unittest.TestCase):
"""Class to test the artifact source type."""
class ArtifactSourceTypeTest(unittest.TestCase):
"""Class to test the artifacts... | apache-2.0 | -4,044,806,728,929,062,000 | 27.945946 | 64 | 0.693277 | false |
yl565/statsmodels | statsmodels/sandbox/tools/cross_val.py | 33 | 11875 | """
Utilities for cross validation.
taken from scikits.learn
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>,
# Gael Varoquaux <gael.varoquaux@normalesup.org>
# License: BSD Style.
# $Id$
changes to code by josef-pktd:
- docstring formatting: underlines of headers
"""
from statsmodels.compat... | bsd-3-clause | 2,122,738,916,550,013,400 | 30.922043 | 96 | 0.476884 | false |
artemrizhov/pymorphy | pymorphy/django_utils.py | 1 | 5368 | #coding: utf-8
import re
from django import template
from django.utils.encoding import force_unicode
from pymorphy.django_conf import default_morph, MARKER_OPEN, MARKER_CLOSE
from pymorphy.contrib import tokenizers
register = template.Library()
markup_re = re.compile('(%s.+?%s)' % (MARKER_OPEN, MARKER_CLOSE), re.U)
... | mit | -7,947,730,506,973,715,000 | 35.12931 | 81 | 0.651634 | false |
serverdensity/sd-agent-core-plugins | yarn/test_yarn.py | 1 | 8597 | # (C) Datadog, Inc. 2010-2017
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
# stdlib
from urlparse import urljoin
import os
# 3rd party
import mock
import json
from tests.checks.common import AgentCheckTest, Fixtures
# IDs
CLUSTER_NAME = 'SparkCluster'
# Resource manager URI
RM_ADDRES... | bsd-3-clause | -8,459,230,094,924,040,000 | 31.198502 | 110 | 0.591951 | false |
mgit-at/ansible | lib/ansible/modules/cloud/amazon/redshift_facts.py | 21 | 10951 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | 8,607,319,947,037,392,000 | 29.33518 | 134 | 0.664779 | false |
shakhat/os-failures | examples/due.py | 1 | 1568 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | apache-2.0 | 1,203,793,679,706,250,800 | 29.745098 | 75 | 0.638393 | false |
dienerpiske/QSabe | QSabe/settings.py | 1 | 3692 | """
Django settings for QSabe project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR,... | gpl-2.0 | -2,893,252,307,346,829,000 | 27.301587 | 116 | 0.691495 | false |
pyfisch/servo | tests/wpt/web-platform-tests/tools/third_party/hpack/test/test_hpack.py | 36 | 28446 | # -*- coding: utf-8 -*-
from hpack.hpack import Encoder, Decoder, _dict_to_iterable, _to_bytes
from hpack.exceptions import (
HPACKDecodingError, InvalidTableIndex, OversizedHeaderListError,
InvalidTableSizeError
)
from hpack.struct import HeaderTuple, NeverIndexedHeaderTuple
import itertools
import pytest
fro... | mpl-2.0 | 2,928,928,070,157,458,000 | 33.355072 | 79 | 0.549181 | false |
kenCode-de/bitshares-wallet | dev/app/dl/programs/bloom.py | 17 | 1188 | #!/usr/bin/env python3
# Matching exmaple:
# ./bloom.py BTS87mopaNqLDjT1BvzqQR3QjWzWSTgkWnMcwt5sqxHuavCBi1s3m
# Sample program by theoriticalbts used to create js implementation
import hashlib
import sys
k = sys.argv[1]
# specified with -s parameter
size = 8388608
# specified with -n parameter
hashes = 3
with op... | gpl-3.0 | 8,034,388,661,803,937,000 | 26.627907 | 67 | 0.578283 | false |
uniite/imd | src v1/accel-old.py | 1 | 1757 | def check_input ():
global X
global Y
global Xavg
global Yavg
global Xavgc
global Yavgc
c = 0
avg = 0
for i in range(0, 15):
#tty.write("x")
X = eval(tty.read(30)[4:9])
if X < 700 and X > 300:
avg += X
c += 1
print "XAvg: %s" % (avg / c)
X = avg / c
print "Xavg: %s" % (Xavg / Xavgc)
if X > (Xa... | mit | -6,176,184,541,109,291,000 | 16.067961 | 80 | 0.525896 | false |
sanguinariojoe/FreeCAD | src/Mod/Fem/femexamples/meshes/mesh_square_pipe_end_twisted_tria6.py | 16 | 130810 | def create_nodes(femmesh):
# nodes
femmesh.addNode(-142.5, 142.5, 0.0, 1)
femmesh.addNode(-142.5, -142.5, 0.0, 2)
femmesh.addNode(-142.5, 142.5, 1000.0, 3)
femmesh.addNode(-142.5, -142.5, 1000.0, 4)
femmesh.addNode(-142.5, 95.0, 0.0, 5)
femmesh.addNode(-142.5, 47.5, 0.0, 6)
femmesh.addNo... | lgpl-2.1 | 7,943,723,131,867,216,000 | 51.745968 | 59 | 0.63486 | false |
Diti24/python-ivi | ivi/agilent/agilentDSO6054A.py | 1 | 1686 | """
Python Interchangeable Virtual Instrument Library
Copyright (c) 2012-2016 Alex Forencich
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... | mit | -8,314,626,367,419,297,000 | 37.318182 | 86 | 0.736655 | false |
mapnik/mapnik | scons/scons-local-4.1.0/SCons/Variables/EnumVariable.py | 4 | 3741 | # MIT License
#
# Copyright The SCons Foundation
#
# 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, ... | lgpl-2.1 | 1,671,740,163,989,472,000 | 33.962617 | 122 | 0.677092 | false |
foursquare/pants | contrib/python/tests/python/pants_test/contrib/python/checks/tasks/checkstyle/test_common.py | 1 | 7647 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import ast
import textwrap
import unittest
from builtins import range, str
from pants_te... | apache-2.0 | 439,934,107,544,829,600 | 35.241706 | 100 | 0.630574 | false |
singhj/locality-sensitive-hashing | cass_result.py | 2 | 19282 | import sys, os, re, time, math, random, struct, zipfile, operator, csv, hashlib, uuid, pdb
from collections import defaultdict
dir_path = os.path.dirname([p for p in sys.path if p][0])
sys.path.insert(0, 'libs')
import logging
LOG_FILENAME = dir_path+'/CassDriver.log'
logging.basicConfig(filename=LOG_FILENAME, level=l... | mit | 4,054,122,226,710,723,000 | 40.466667 | 139 | 0.524946 | false |
polyaxon/polyaxon | sdks/python/http_client/v1/polyaxon_sdk/api/queues_v1_api.py | 1 | 61918 | #!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, 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 ... | apache-2.0 | -87,165,576,405,714,510 | 46.265649 | 132 | 0.564618 | false |
Subsets and Splits
Gradio Code Samples
Limits the results to entries containing the word 'gradio' in the repo_name, content, or path, providing a filtered subset of the dataset.