repo_name stringlengths 6 100 | path stringlengths 4 294 | copies stringlengths 1 5 | size stringlengths 4 6 | content stringlengths 606 896k | license stringclasses 15
values |
|---|---|---|---|---|---|
borgaster/SpaceWarsEvolved | main.py | 1 | 16816 | import time
from animation import *
from asteroidField import *
from background import *
from loader import *
from physics import *
from player import *
from powerup import *
import pygame
from pygame.locals import *
from rotatingMenu_img import *
from spacemenu import *
from starField import *
# teclas dos jogadore... | mit |
kgullikson88/GSSP_Analyzer | gsspy/fitting.py | 1 | 19991 | from __future__ import print_function, division, absolute_import
import numpy as np
import matplotlib.pyplot as plt
import os
import sys
import subprocess
from astropy.io import fits
from astropy import time
import DataStructures
from ._utils import combine_orders, read_grid_points, ensure_dir
from .analyzer import ... | mit |
gussmith23/babble_bot | mangle.py | 1 | 3519 | import random
import configparser
from enum import Enum
import googletrans
# get config
config = configparser.ConfigParser()
config.read("babble_bot.cfg")
class MangleMethod(Enum):
flipflop = 1
straight = 2
manual = 3
def __str__(self):
if self == MangleMethod.flipflop:
return "f... | gpl-3.0 |
webmasterraj/GaSiProMo | flask/lib/python2.7/site-packages/pandas/computation/eval.py | 14 | 8348 | #!/usr/bin/env python
"""Top level ``eval`` module.
"""
import tokenize
from pandas.core import common as com
from pandas.computation.expr import Expr, _parsers, tokenize_string
from pandas.computation.scope import _ensure_scope
from pandas.compat import DeepChainMap, builtins
from pandas.computation.engines import _... | gpl-2.0 |
orchidinfosys/odoo | addons/crm/report/crm_opportunity_report.py | 3 | 5126 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from openerp.addons.crm import crm_stage
from openerp.osv import fields, osv
from openerp import tools
class crm_opportunity_report(osv.Model):
""" CRM Opportunity Analysis """
_name = "crm.opportunity.report"
... | gpl-3.0 |
aitormf/JdeRobot | src/libs/comm_py/comm/ice/pose3dIceClient.py | 7 | 6073 | #
# Copyright (C) 1997-2017 JDE Developers Team
#
# 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 program... | gpl-3.0 |
ychfan/tensorflow | tensorflow/contrib/rnn/python/tools/checkpoint_convert.py | 37 | 10962 | # 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 |
asimshankar/tensorflow | tensorflow/contrib/tensorrt/test/batch_matmul_test.py | 3 | 4304 | # 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 |
prescott66/devedeng | src/devedeng/settings.py | 4 | 4803 | # Copyright 2014 (C) Raster Software Vigo (Sergio Costas)
#
# This file is part of DeVeDe-NG
#
# DeVeDe-NG 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)... | gpl-3.0 |
PopCap/GameIdea | Engine/Source/ThirdParty/HTML5/emsdk/Win64/python/2.7.5.3_64bit/Lib/site-packages/win32/Demos/win32wnet/testwnet.py | 17 | 3432 | import win32api
import win32wnet
import sys
from winnetwk import *
import os
possible_shares = []
def _doDumpHandle(handle, level = 0):
indent = " " * level
while 1:
items = win32wnet.WNetEnumResource(handle, 0)
if len(items)==0:
break
for item in items:
try:
if item.dwDisplayType == RESOURC... | bsd-2-clause |
Icenowy/shadowsocks | shadowsocks/encrypt.py | 990 | 5180 | #!/usr/bin/env python
#
# Copyright 2012-2015 clowwindy
#
# 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 |
liamgh/liamgreenhughes-sl4a-tf101 | python/gdata/src/gdata/tlslite/X509.py | 279 | 4287 | """Class representing an X.509 certificate."""
from utils.ASN1Parser import ASN1Parser
from utils.cryptomath import *
from utils.keyfactory import _createPublicRSAKey
class X509:
"""This class represents an X.509 certificate.
@type bytes: L{array.array} of unsigned bytes
@ivar bytes: The DER-encoded ASN... | apache-2.0 |
Nicop06/ansible | lib/ansible/module_utils/cnos_devicerules.py | 87 | 91037 | # This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by
# Ansible still belong to the author of the module, and may assign their
# own license to the complete wo... | gpl-3.0 |
tomka/CATMAID | django/applications/catmaid/control/useranalytics.py | 2 | 20452 | # -*- coding: utf-8 -*-
from datetime import timedelta, datetime
from dateutil import parser as dateparser
import io
import logging
import numpy as np
import pytz
from typing import Any, Dict, List, Tuple
from django.db import connection
from django.http import HttpRequest, HttpResponse
from django.utils import timez... | gpl-3.0 |
laslabs/odoo | addons/account/tests/test_reconciliation.py | 5 | 29317 | from openerp.addons.account.tests.account_test_classes import AccountingTestCase
import time
import unittest
class TestReconciliation(AccountingTestCase):
"""Tests for reconciliation (account.tax)
Test used to check that when doing a sale or purchase invoice in a different currency,
the result will be ba... | agpl-3.0 |
Zlash65/erpnext | erpnext/erpnext_integrations/doctype/gocardless_settings/gocardless_settings.py | 17 | 6908 | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
import gocardless_pro
from frappe import _
from six.moves.urllib.parse import urlencode
f... | gpl-3.0 |
vmthunder/nova | tools/xenserver/vdi_chain_cleanup.py | 139 | 3678 | #!/usr/bin/env python
# Copyright 2012 OpenStack Foundation
#
# 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... | apache-2.0 |
wstczlt/fresco | run_comparison.py | 8 | 10351 | #!/usr/bin/env python
# This file provided by Facebook is for non-commercial testing and evaluation
# purposes only. Facebook reserves all rights not expressly granted.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL... | bsd-3-clause |
ysywh/ryu | ryu/ofproto/ofproto_parser.py | 8 | 7216 | # Copyright (C) 2011, 2012 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2011 Isaku Yamahata <yamahata at valinux co jp>
#
# 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
#
# h... | apache-2.0 |
menren/openshift-ansible | inventory/gce/hosts/gce.py | 10 | 10594 | #!/usr/bin/env python2
# Copyright 2013 Google Inc.
#
# This file is part of Ansible
#
# Ansible 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... | apache-2.0 |
farhaanbukhsh/sympy | sympy/physics/mechanics/tests/test_functions.py | 24 | 5650 | from sympy import sin, cos, tan, pi, symbols, Matrix
from sympy.physics.mechanics import (Particle, Point, ReferenceFrame,
RigidBody, Vector)
from sympy.physics.mechanics import (angular_momentum, dynamicsymbols,
inertia, inertia_of_point_mass,
... | bsd-3-clause |
koyuawsmbrtn/eclock | windows/Python27/Lib/site-packages/pip/_vendor/requests/packages/charade/mbcsgroupprober.py | 2769 | 1967 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | gpl-2.0 |
vmax-feihu/hue | desktop/core/ext-py/tablib-0.10.0/tablib/packages/odf/thumbnail.py | 135 | 31736 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This contains a 128x128 px thumbnail in PNG format
# Taken from http://www.zwahlendesign.ch/en/node/20
# openoffice_icons/openoffice_icons_linux/openoffice11.png
# License: Freeware
import base64
iconstr = """\
iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAAG0OVFdAAAABGdBTUEAANbY1E9Y... | apache-2.0 |
JuBra/GEMEditor | GEMEditor/database/ui/MetaboliteEntryDisplayWidget.py | 1 | 8059 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '.\MetaboliteEntryDisplayWidget.ui'
#
# Created by: PyQt5 UI code generator 5.8.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MetaboliteEntryDisplayWidget(object):
def set... | gpl-3.0 |
GeekTrainer/Flask | Work/Trivia/routes.py | 7 | 1572 | from flask import Flask, url_for, request, render_template
from app import app
import redis
r=redis.StrictRedis('localhost',6379,0, decode_responses=True,charset='utf-8');
@app.route('/')
def hello():
url = url_for('about');
link = '<a href="' + url + '">About us!</a>';
return link;
@app.route('/about')
... | apache-2.0 |
dongjoon-hyun/tensorflow | tensorflow/python/feature_column/feature_column_lib.py | 23 | 1038 | # 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 |
Onager/plaso | tests/data/presets.py | 4 | 1164 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests for parser and parser plugin presets."""
import unittest
from plaso.parsers import presets
from plaso.parsers import manager as parsers_manager
from plaso.filters import parser_filter
from tests import test_lib as shared_test_lib
class PresetsDataTest(shared_... | apache-2.0 |
blueboxgroup/neutron | neutron/tests/unit/test_db_plugin_level.py | 19 | 3370 | # Copyright (c) 2014 Red Hat, 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 require... | apache-2.0 |
jonmash/ardupilot | Tools/autotest/jsb_sim/runsim.py | 167 | 12772 | #!/usr/bin/env python
# run a jsbsim model as a child process
import sys, os, pexpect, socket
import math, time, select, struct, signal, errno
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'pysim'))
import util, atexit, fdpexpect
from pymavlink import fgFDM
class control_state(o... | gpl-3.0 |
kickstandproject/wildcard | wildcard/dashboards/settings/password/tests.py | 1 | 3365 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 Centrin Data Systems 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/LIC... | apache-2.0 |
maurizi/nyc-trees | src/nyc_trees/apps/users/migrations/0001_initial.py | 4 | 2129 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('core', '0001_initial'),
]
operat... | agpl-3.0 |
MostafaGazar/tensorflow | tensorflow/contrib/slim/python/slim/nets/vgg.py | 25 | 10637 | # 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 applicable ... | apache-2.0 |
highlander12rus/whatsupmoscow.ru | demon/main.py | 1 | 3580 | # -*- coding: utf-8 -*-
__author__ = 'meanwhile'
import ssl
import time
import socket
import sys
import logging
import vkontakte
import ProvaderStorage
import Constants
import FileWriter
import ProccessingResponce
import daemon
class VkParserDemon(daemon.Daemon):
def run(self):
#read code for method vk... | apache-2.0 |
nsol-nmsu/ns3-smartgrid | examples/wireless/examples-to-run.py | 23 | 2054 | #! /usr/bin/env python
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
# A list of C++ examples to run in order to ensure that they remain
# buildable and runnable over time. Each tuple in the list contains
#
# (example_name, do_run, do_valgrind_run).
#
# See test.py for more i... | gpl-2.0 |
CEG-FYP-OpenStack/scheduler | nova/image/download/__init__.py | 18 | 1592 | # Copyright 2013 Red Hat, 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... | apache-2.0 |
Distrotech/mozjs | js/src/testing/mozbase/mozhttpd/tests/api.py | 5 | 9724 | #!/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 http://mozilla.org/MPL/2.0/.
import mozhttpd
import urllib2
import os
import unittest
import re
try:
import json
except Im... | mpl-2.0 |
caot/intellij-community | python/lib/Lib/sched.py | 83 | 4538 | """A generally useful event scheduler class.
Each instance of this class manages its own queue.
No multi-threading is implied; you are supposed to hack that
yourself, or use a single instance per application.
Each instance is parametrized with two functions, one that is
supposed to return the current time, one that i... | apache-2.0 |
CenterForOpenScience/osf.io | osf/management/commands/archive_registrations_on_IA.py | 2 | 2243 | import logging
import django
django.setup()
import time
from framework.celery_tasks import app as celery_app
from osf.models import Registration
from website import settings
from osf.utils.requests import requests_retry_session
logger = logging.getLogger(__name__)
django.setup()
from django.core.management.base impo... | apache-2.0 |
golismero/golismero | thirdparty_libs/chardet/gb2312freq.py | 323 | 36001 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | gpl-2.0 |
jxs/servo | tests/wpt/css-tests/tools/pywebsocket/src/example/origin_check_wsh.py | 516 | 1992 | # Copyright 2011, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | mpl-2.0 |
sonata-nfv/son-cli | bootstrap.py | 120 | 7458 | ##############################################################################
#
# Copyright (c) 2006 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | apache-2.0 |
Hubert51/AutoGrading | learning/web_Haotian/venv/Lib/encodings/iso8859_6.py | 272 | 10833 | """ Python Character Mapping Codec iso8859_6 generated from 'MAPPINGS/ISO8859/8859-6.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,input,errors='... | mit |
rmac75/mboxparser | mbox.py | 1 | 3399 | #!/usr/bin/python2
#--------------------------------
#Takes in mbox, spits out csv with email info and basic geolocation, plus other header fields.
#--------------------------------
#This product includes GeoLite2 data created by MaxMind, available from
#<a href="http://www.maxmind.com">http://www.maxmind.com</a>.
i... | gpl-2.0 |
enriquecoronadozu/HMPy | src/borrar/modificar/hmpy.py | 1 | 6228 | #!/usr/bin/env python
"""@See preprocessed data
"""
from numpy import*
import matplotlib.pyplot as plt
from GestureModel import*
from Creator import*
from Classifier import*
def plotResults(gr_points,gr_sig, b_points,b_sig,name_model):
from scipy import linalg
import matplotlib.pyplot as plt
gr_points ... | gpl-3.0 |
dr87/SimpleKernel | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py | 11088 | 3246 | # Core.py - Python extension for perf script, core functions
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
from collections import defaultdict
def aut... | gpl-2.0 |
malkavi/Flexget | flexget/plugins/services/myepisodes.py | 3 | 10145 | import re
from datetime import datetime
from loguru import logger
from sqlalchemy import Column, DateTime, Integer, String
from flexget import plugin
from flexget.db_schema import versioned_base
from flexget.event import event
from flexget.utils import requests
logger = logger.bind(name='myepisodes')
Base = versione... | mit |
jendrikseipp/rednotebook-elementary | rednotebook/util/markup.py | 1 | 16346 | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------
# Copyright (c) 2009 Jendrik Seipp
#
# RedNotebook 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 vers... | gpl-2.0 |
jcasner/nupic | src/nupic/support/exceptions.py | 39 | 2907 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | agpl-3.0 |
TansyArron/pants | tests/python/pants_test/backend/jvm/tasks/test_scala_repl_integration.py | 15 | 2086 | # coding=utf-8
# Copyright 2014 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)
from textwrap import... | apache-2.0 |
SportySpice/Collections | src/file/File.py | 1 | 3600 | import xbmc
import xbmcvfs
import Folder
import urllib
import urlparse
NAME_QUERY = 'fileName'
FOLDER_NAME_QUERY = 'folderName'
FOLDER_PATH_QUERY = 'folderPath'
class File(object):
def __init__(self, name, folder):
self.name = name
self.folder = folder
self.path = folder.fullpath
... | gpl-2.0 |
qspin/qtaste | doc/src/docbkx/scripts/lib/PyGithub/github/tests/Equality.py | 39 | 2613 | # -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
# #
# Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #
# ... | lgpl-3.0 |
ZhangJun-GitHub/Cycle | dialogs.py | 1 | 20748 | #====================================================
# Cycle - calendar for women
# Distributed under GNU Public License
# Original author: Oleg S. Gints
# Maintainer: Matt Molyneaux (moggers87+git@moggers87.co.uk)
# Home page: http://moggers.co.uk/cgit/cycle.git/about
#==================================... | gpl-2.0 |
jounex/hue | apps/help/src/help/views.py | 33 | 2822 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | apache-2.0 |
dsfsdgsbngfggb/odoo | addons/resource/faces/utils.py | 433 | 3231 | ############################################################################
# Copyright (C) 2005 by Reithinger GmbH
# mreithinger@web.de
#
# This file is part of faces.
#
# faces is free software; you can redistribute it and/or modify
# ... | agpl-3.0 |
moonboots/tensorflow | tensorflow/python/kernel_tests/string_to_number_op_test.py | 15 | 2865 | # Copyright 2015 Google 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 applicable law or a... | apache-2.0 |
marnnie/Cable-buenaventura | plugin.video.kodipopcorntime/resources/site-packages/pyga/entities.py | 16 | 19442 | # -*- coding: utf-8 -*-
from datetime import datetime
from operator import itemgetter
from urlparse import urlparse
from urllib import unquote_plus
from pyga import utils
from pyga import exceptions
__author__ = "Arun KR (kra3) <the1.arun@gmail.com>"
__license__ = "Simplified BSD"
class Campaign(object):
'''
... | gpl-2.0 |
rolobio/sshm | sshm/main.py | 1 | 5215 | #! /usr/bin/env python3
"""
This module allows the console to use SSHM's functionality.
This module should only be run by the console!
"""
from __future__ import print_function
import sys
try: # pragma: no cover version specific
from lib import sshm
except ImportError: # pragma: no cover version specific
from... | gpl-2.0 |
mkuai/underwater | src/flow-monitor/examples/wifi-olsr-flowmon.py | 108 | 7439 | # -*- Mode: Python; -*-
# Copyright (c) 2009 INESC Porto
#
# 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 distributed in the hope that it will be useful,
#... | gpl-2.0 |
MIPS/kernel-linux-mti | tools/perf/scripts/python/sched-migration.py | 11215 | 11670 | #!/usr/bin/python
#
# Cpu task migration overview toy
#
# Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com>
#
# perf script event handlers have been generated by perf script -g python
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Fre... | gpl-2.0 |
lgiommi/root | interpreter/llvm/src/tools/clang/tools/scan-build-py/libscanbuild/analyze.py | 22 | 20649 | # -*- coding: utf-8 -*-
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
""" This module implements the 'scan-build' command API.
To run the static analyzer against a build is done in multiple steps:... | lgpl-2.1 |
sw-irou/flasktest | lib/mongoengine/django/mongo_auth/models.py | 3 | 3378 | from django.conf import settings
from django.contrib.auth.models import UserManager
from django.core.exceptions import ImproperlyConfigured
from django.db import models
from django.utils.importlib import import_module
from django.utils.translation import ugettext_lazy as _
__all__ = (
'get_user_document',
)
MON... | bsd-3-clause |
simonsdave/clair-database | clair_cicd/assessor.py | 2 | 2160 | import logging
_logger = logging.getLogger(__name__)
class VulnerabilitiesRiskAssessor(object):
def __init__(self, whitelist, vulnerabilities):
object.__init__(self)
self.whitelist = whitelist
self.vulnerabilities = vulnerabilities
def assess(self):
"""Returns ```True``` i... | mit |
jmathai/elodie | elodie/tests/config_test.py | 1 | 3912 | from __future__ import absolute_import
# Project imports
import os
import sys
import unittest
from mock import patch
from tempfile import gettempdir
sys.path.insert(0, os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))))
from elodie import constants
from elodie.config im... | apache-2.0 |
marctc/django | django/core/management/commands/squashmigrations.py | 132 | 7265 | from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.db import DEFAULT_DB_ALIAS, connections, migrations
from django.db.migrations.loader import AmbiguityError, MigrationLoader
from django.db.migrations.migration import SwappableTuple
from django.db.migrations.o... | bsd-3-clause |
jillesme/phantomjs | src/breakpad/src/tools/gyp/test/generator-output/gyptest-relocate.py | 151 | 1604 | #!/usr/bin/env python
# Copyright (c) 2009 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that a project hierarchy created with the --generator-output=
option can be built even when it's relocated to a different path.... | bsd-3-clause |
todaychi/hue | desktop/core/ext-py/boto-2.46.1/boto/services/submit.py | 153 | 3555 | # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/
#
# 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, modi... | apache-2.0 |
pthatcher/psync | src/history/__init__.py | 1 | 1996 | # Copyright (c) 2011, Peter Thatcher
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditi... | bsd-3-clause |
natefoo/tools-iuc | tools/spyboat/output_report.py | 12 | 8730 | """ Produces plots and a summary html 'headless' """
import logging
import os
import matplotlib
import matplotlib.pyplot as ppl
import spyboat.plotting as spyplot
ppl.switch_backend('Agg')
matplotlib.rcParams["text.usetex"] = False
logger = logging.getLogger(__name__)
# figure resolution
DPI = 250
def produce_snap... | mit |
dparaujo/projeto | app_inscricoes/questionarios/migrations/0002_auto_20170220_2126.py | 1 | 1224 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2017-02-21 00:26
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('questionarios', '0001_initial'),
]
operations = [
migrations.RemoveField(
... | gpl-3.0 |
babywolfh/iris-panel | iris/core/migrations/0010_STRIP_IMAGE_NAME.py | 7 | 14447 | # -*- coding: utf-8 -*-
# This file is part of IRIS: Infrastructure and Release Information System
#
# Copyright (C) 2013-2015 Intel Corporation
#
# IRIS is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 2.0 as published by the Free Software Foundat... | gpl-2.0 |
aron-bordin/Tyrant-Sql | SQL_Map/tamper/randomcase.py | 8 | 1274 | #!/usr/bin/env python
"""
Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
import re
from lib.core.common import randomRange
from lib.core.data import kb
from lib.core.enums import PRIORITY
__priority__ = PRIORITY.NORMAL
def dependencies():
pa... | gpl-3.0 |
WillisXChen/django-oscar | oscar/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langthaimodel.py | 2930 | 11275 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | bsd-3-clause |
steelee/Adafruit_Python_GPIO | tests/test_I2C.py | 12 | 7418 | # Copyright (c) 2014 Adafruit Industries
# Author: Tony DiCola
#
# 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, m... | mit |
cg31/tensorflow | tensorflow/python/kernel_tests/check_ops_test.py | 20 | 28413 | # 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 |
dvitme/odoomrp-wip | stock_move_purchase_price/__openerp__.py | 27 | 1368 |
# -*- encoding: utf-8 -*-
##############################################################################
#
# 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 Software Foundation, either version 3 of th... | agpl-3.0 |
BassantMorsi/finderApp | lib/python2.7/site-packages/wheel/test/test_basic.py | 472 | 6405 | """
Basic wheel tests.
"""
import os
import pkg_resources
import json
import sys
from pkg_resources import resource_filename
import wheel.util
import wheel.tool
from wheel import egg2wheel
from wheel.install import WheelFile
from zipfile import ZipFile
from shutil import rmtree
test_distributions = ("complex-dist"... | mit |
foobarbazblarg/stayclean | stayclean-2017-october/display.py | 26 | 24079 | #!/usr/bin/python
# TODO: issues with new oauth2 stuff. Keep using older version of Python for now.
# #!/usr/bin/env python
from participantCollection import ParticipantCollection
import re
import datetime
import pyperclip
# Edit Me!
currentMonthTotalDays = 31
currentMonthIndex = datetime.date.today().month
currentM... | mit |
Weihonghao/ECM | Vpy34/lib/python3.5/site-packages/tensorflow/contrib/ffmpeg/ops/gen_encode_audio_op_py.py | 2 | 2869 | """Python wrappers around Brain.
This file is MACHINE GENERATED! Do not edit.
"""
import collections
from google.protobuf import text_format
from tensorflow.core.framework import op_def_pb2
# Needed to trigger the call to _set_call_cpp_shape_fn.
from tensorflow.python.framework import common_shapes
from tensorflo... | agpl-3.0 |
hellsgod/hells-Core-N6P | tools/perf/util/setup.py | 2079 | 1438 | #!/usr/bin/python2
from distutils.core import setup, Extension
from os import getenv
from distutils.command.build_ext import build_ext as _build_ext
from distutils.command.install_lib import install_lib as _install_lib
class build_ext(_build_ext):
def finalize_options(self):
_build_ext.finalize_optio... | gpl-2.0 |
crespyl/pcre2 | maint/MultiStage2.py | 1 | 23077 | #! /usr/bin/python
# Multistage table builder
# (c) Peter Kankowski, 2008
##############################################################################
# This script was submitted to the PCRE project by Peter Kankowski as part of
# the upgrading of Unicode property support. The new code speeds up property
# matching... | gpl-3.0 |
svn2github/libtorrent-1_0_x | test/http.py | 6 | 8075 | # -*- coding: cp1252 -*-
# <PythonProxy.py>
#
#Copyright (c) <2009> <Fábio Domingues - fnds3000 in gmail.com>
#
#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 wi... | bsd-3-clause |
ghickman/django | django/contrib/admin/options.py | 3 | 82383 | from __future__ import unicode_literals
import copy
import json
import operator
from collections import OrderedDict
from functools import partial, reduce, update_wrapper
from django import forms
from django.conf import settings
from django.contrib import messages
from django.contrib.admin import helpers, widgets
from... | bsd-3-clause |
leebird/legonlp | annotation/align.py | 1 | 2062 | # -*- coding: utf-8 -*-
import os
import sys
import re
import codecs
from alignment import Alignment,Hirschberg
from readers import AnnParser
from writers import AnnWriter
writer = AnnWriter()
def get_phrase(text):
p = re.compile(ur'[a-zA-Z]+|[0-9]+|\s+|[.,;!\(\)]+')
lista = []
pre = 0
for m in p.fin... | gpl-2.0 |
kervinck/gigatron-rom | Contrib/at67/hw/BabelFish_nor/tinyfont.py | 4 | 4452 |
#-----------------------------------------------------------------------
#
# tinyfont.py -- a very small font
#
#-----------------------------------------------------------------------
#
# Description:
#
# The tiny font is an 3x5 pixel monospaced font where each character
# is placed in a box of 4x6... | bsd-2-clause |
skycucumber/xuemc | python/venv/lib/python2.7/site-packages/coverage/__init__.py | 208 | 4505 | """Code coverage measurement for Python.
Ned Batchelder
http://nedbatchelder.com/code/coverage
"""
from coverage.version import __version__, __url__
from coverage.control import coverage, process_startup
from coverage.data import CoverageData
from coverage.cmdline import main, CoverageScript
from coverage.misc impo... | gpl-2.0 |
sangh/LaserShow | pyglet-hg/tests/window/WINDOW_INITIAL_FULLSCREEN.py | 33 | 1474 | #!/usr/bin/env python
'''Test that a window can be opened fullscreen.
Expected behaviour:
A fullscreen window will be created, with a flat purple colour.
- Press 'g' to leave fullscreen mode and create a window.
- Press 'f' to re-enter fullscreen mode.
- All events will be printed to the console. ... | bsd-3-clause |
ga7g08/sympy | sympy/series/formal.py | 24 | 34616 | """Formal Power Series"""
from __future__ import print_function, division
from collections import defaultdict
from sympy import oo, zoo, nan
from sympy.core.expr import Expr
from sympy.core.add import Add
from sympy.core.mul import Mul
from sympy.core.function import Derivative, Function
from sympy.core.singleton im... | bsd-3-clause |
khalim19/gimp-plugin-export-layers | export_layers/tests/test_placeholders.py | 1 | 2548 | # -*- coding: utf-8 -*-
#
# This file is part of Export Layers.
#
# Copyright (C) 2013-2019 khalim19 <khalim19@gmail.com>
#
# Export Layers 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... | gpl-3.0 |
ramondelafuente/ansible | lib/ansible/utils/module_docs_fragments/junos.py | 18 | 2684 | #
# (c) 2015, Peter Sprygada <psprygada@ansible.com>
#
# This file is part of Ansible
#
# Ansible 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 late... | gpl-3.0 |
DebrahR/project2 | server/lib/flask/wrappers.py | 773 | 6709 | # -*- coding: utf-8 -*-
"""
flask.wrappers
~~~~~~~~~~~~~~
Implements the WSGI wrappers (request and response).
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from werkzeug.wrappers import Request as RequestBase, Response as ResponseBase
from werkzeug.exce... | apache-2.0 |
GdZ/scriptfile | software/googleAppEngine/lib/django_0_96/django/db/models/related.py | 49 | 6008 | class BoundRelatedObject(object):
def __init__(self, related_object, field_mapping, original):
self.relation = related_object
self.field_mappings = field_mapping[related_object.name]
def template_name(self):
raise NotImplementedError
def __repr__(self):
return repr(self.__d... | mit |
friedrich420/S4-AEL-GPE-LOLLIPOP | tools/perf/util/setup.py | 4998 | 1330 | #!/usr/bin/python2
from distutils.core import setup, Extension
from os import getenv
from distutils.command.build_ext import build_ext as _build_ext
from distutils.command.install_lib import install_lib as _install_lib
class build_ext(_build_ext):
def finalize_options(self):
_build_ext.finalize_optio... | gpl-2.0 |
hrishioa/Aviato | flask/Lib/site-packages/nltk/classify/__init__.py | 2 | 4496 | # Natural Language Toolkit: Classifiers
#
# Copyright (C) 2001-2015 NLTK Project
# Author: Edward Loper <edloper@gmail.com>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
"""
Classes and interfaces for labeling tokens with category labels (or
"class labels"). Typically, labels are represented wi... | gpl-2.0 |
akshatharaj/django | tests/fixtures_regress/models.py | 281 | 8611 | from __future__ import unicode_literals
from django.contrib.auth.models import User
from django.db import models
from django.utils import six
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Animal(models.Model):
name = models.CharField(max_length=150)
latin_na... | bsd-3-clause |
nwchandler/ansible | lib/ansible/plugins/cliconf/aireos.py | 42 | 2670 | #
# (c) 2017 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible 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.
#
# Ansible is d... | gpl-3.0 |
benjamindeleener/odoo | addons/hr_gamification/wizard/grant_badge.py | 46 | 1666 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from openerp.osv import fields, osv
from openerp.tools.translate import _
from openerp.exceptions import UserError
class hr_grant_badge_wizard(osv.TransientModel):
_name = 'gamification.badge.user.wizard'
_inher... | gpl-3.0 |
dmych/cn | utils.py | 1 | 3805 | # This file is part of Coffee Notes project
#
# Coffee Notes is a crossplatform note-taking application
# inspired by Notational Velocity.
# <https://github.com/dmych/cn>
#
# Copyright (c) Dmitri Brechalov, 2011
#
# Coffee Notes is free software: you can redistribute it and/or modify
# it under the terms of the GNU ... | gpl-3.0 |
GladeRom/android_external_chromium_org | build/win/install-build-deps.py | 153 | 1463 | #!/usr/bin/env python
# Copyright (c) 2012 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 shutil
import sys
import os
def patch_msbuild():
"""VS2010 MSBuild has a ULDI bug that we patch here. See http://goo.gl/P... | bsd-3-clause |
jazztpt/edx-platform | lms/djangoapps/psychometrics/psychoanalyze.py | 68 | 11511 | #
# File: psychometrics/psychoanalyze.py
#
# generate pyschometrics plots from PsychometricData
from __future__ import division
import datetime
import logging
import json
import math
import numpy as np
from opaque_keys.edx.locator import BlockUsageLocator
from scipy.optimize import curve_fit
from django.conf impor... | agpl-3.0 |
prutseltje/ansible | lib/ansible/modules/cloud/amazon/aws_region_facts.py | 52 | 3496 | #!/usr/bin/python
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {
'metadata_version': '1.1',
'supported_by': 'community',
'status': ['preview']
}
DOCUMENTATION = '''
module: aws_region_facts
short_descri... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.