repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
bcl/pykickstart
pykickstart/handlers/rhel3.py
3
3887
# # Chris Lumens <clumens@redhat.com> # # Copyright 2007 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it # will be usef...
gpl-2.0
thomashaw/SecGen
modules/utilities/unix/ctf/metactf/files/repository/src_angr/solutions/17_angr_arbitrary_jump/scaffold17.py
3
5173
import angr import claripy import sys def main(argv): path_to_binary = argv[1] project = angr.Project(path_to_binary) initial_state = ??? # An under-constrained (unconstrained) state occurs when there are too many # possible branches from a single instruction. This occurs, among other ways, # when the i...
gpl-3.0
Phosphenius/battle-snakes
src/skinpacker.py
1
2068
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ Script for packing and unpacking skin textures """ import argparse from pygame import image, Surface, Rect, transform from pygame.locals import SRCALPHA from utils import add_vecs HEAD = Rect(0, 0, 10, 10) STRAIGHT1 = Rect(20, 20, 10, 10) STRAIGHT2 = Rect(30, 20, 10...
mit
NMGRL/pychron
pychron/pipeline/plot/overlays/mean_indicator_overlay.py
2
8405
# =============================================================================== # Copyright 2013 Jake Ross # # 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/licens...
apache-2.0
mzdaniel/oh-mainline
vendor/packages/django-model-utils/model_utils/models.py
2
4347
import warnings from datetime import datetime from django.db import models from django.contrib.contenttypes.models import ContentType from django.utils.translation import ugettext_lazy as _ from django.db.models.fields import FieldDoesNotExist from django.core.exceptions import ImproperlyConfigured from model_utils....
agpl-3.0
rr326/servi
servi/config.py
1
6717
import os import os.path import logging from logging import warning as warn import collections import yaml from jinja2 import Environment, DictLoader from servi.exceptions import MasterNotFound, ServiError ''' Global configuration for servi files Use as import config as c Note - this will also read in additional va...
mit
StryKaizer/Brew
djangoproject/brew/migrations/0007_auto__chg_field_mashingtemplog_degrees.py
1
2586
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'MashingTempLog.degrees' db.alter_column('brew_mashingtemplog', 'degrees', self.gf('django...
isc
Foxfanmedium/python_training
OnlineCoursera/mail_ru/Python_1/Week_3/playground/env/Lib/site-packages/dateutil/tz/_factories.py
19
1434
from datetime import timedelta class _TzSingleton(type): def __init__(cls, *args, **kwargs): cls.__instance = None super(_TzSingleton, cls).__init__(*args, **kwargs) def __call__(cls): if cls.__instance is None: cls.__instance = super(_TzSingleton, cls).__call__() ...
apache-2.0
evilhero/mylar
lib/requests/packages/chardet/langbulgarianmodel.py
2965
12784
######################## 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-3.0
mattcongy/itshop
docker-images/taigav2/taiga-back/taiga/front/sitemaps/epics.py
2
1994
# -*- coding: utf-8 -*- # Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can r...
mit
hsaputra/tensorflow
tensorflow/python/keras/_impl/keras/datasets/cifar100.py
13
2130
# 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
endlessm/chromium-browser
third_party/catapult/telemetry/telemetry/internal/backends/chrome/fuchsia_browser_finder.py
1
3039
# Copyright 2019 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. """Finds Fuchsia browsers that can be started and controlled by telemetry.""" from telemetry.core import fuchsia_interface from telemetry.core import platfor...
bsd-3-clause
jni/networkx
examples/graph/knuth_miles.py
36
2994
#!/usr/bin/env python """ An example using networkx.Graph(). miles_graph() returns an undirected graph over the 128 US cities from the datafile miles_dat.txt. The cities each have location and population data. The edges are labeled with the distance betwen the two cities. This example is described in Section 1.1 in ...
bsd-3-clause
2014cdbg3/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/imp.py
637
9839
"""This module provides the components needed to build your own __import__ function. Undocumented functions are obsolete. In most cases it is preferred you consider using the importlib module's functionality over this module. """ # (Probably) need to stay in _imp from _imp import (lock_held, acquire_lock, release_lo...
gpl-2.0
mlperf/training_results_v0.5
v0.5.0/google/cloud_v3.8/gnmt-tpuv3-8/code/gnmt/model/staging/models/rough/mask_rcnn/object_detection/shape_utils.py
22
2359
# 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
Salat-Cx65/python-for-android
python3-alpha/python3-src/Lib/asynchat.py
53
12133
# -*- Mode: Python; tab-width: 4 -*- # Id: asynchat.py,v 2.26 2000/09/07 22:29:26 rushing Exp # Author: Sam Rushing <rushing@nightmare.com> # ====================================================================== # Copyright 1996 by Sam Rushing # # All Rights Reserved # # Permission...
apache-2.0
jomolinare/crate-web
src/web/utils.py
1
1865
# vim: set fileencodings=utf-8 # -*- coding: utf-8 -*- __docformat__ = "reStructuredText" import re import hashlib import logging from StringIO import StringIO from datetime import datetime from markdown2 import markdown from django.utils.html import strip_tags from django.utils.text import Truncator from django.ut...
apache-2.0
eneldoserrata/marcos_openerp
addons/hr_expense/__openerp__.py
47
2927
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
jankoslavic/numpy
numpy/distutils/extension.py
162
3043
"""distutils.extension Provides the Extension class, used to describe C/C++ extension modules in setup scripts. Overridden to support f2py. """ from __future__ import division, absolute_import, print_function import sys import re from distutils.extension import Extension as old_Extension if sys.version_info[0] >= ...
bsd-3-clause
veger/ansible
lib/ansible/plugins/action/async_status.py
26
2115
# Copyright: (c) 2018, 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 from ansible.errors import AnsibleError from ansible.plugins.action import ActionBase from ansible...
gpl-3.0
domenkozar/nixops
nixops/backends/virtualbox.py
1
13850
# -*- coding: utf-8 -*- import os import sys import time import shutil import stat from nixops.backends import MachineDefinition, MachineState import nixops.known_hosts sata_ports = 8 class VirtualBoxDefinition(MachineDefinition): """Definition of a VirtualBox machine.""" @classmethod def get_type(cls...
lgpl-3.0
dursk/django
django/contrib/gis/geos/prototypes/threadsafe.py
529
2859
import threading from django.contrib.gis.geos.libgeos import ( CONTEXT_PTR, error_h, lgeos, notice_h, ) class GEOSContextHandle(object): """ Python object representing a GEOS context handle. """ def __init__(self): # Initializing the context handler for this thread with # the noti...
bsd-3-clause
barachka/odoo
addons/purchase/report/purchase_report.py
49
6707
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
fuziontech/sentry
src/sentry/utils/samples.py
2
2278
""" sentry.utils.samples ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import os.path from sentry.constants import DATA_ROOT, PLATFORM_ROOTS, PLATFORM_TITLES from sentry.event_manager...
bsd-3-clause
Willyham/tchannel-python
tchannel/messages/ping_request.py
1
1385
# Copyright (c) 2015 Uber Technologies, Inc. # # 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, publ...
mit
tammoippen/nest-simulator
pynest/nest/__init__.py
8
7112
# -*- coding: utf-8 -*- # # __init__.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 # ...
gpl-2.0
sivaramakrishnansr/ryu
ryu/lib/packet/linux.py
38
2264
# Copyright (C) 2014 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
Naeka/vosae-app
www/timeline/api/resources/base.py
1
1627
# -*- coding:Utf-8 -*- from tastypie import fields as base_fields from tastypie_mongoengine import fields from core.api.utils import TenantResource from timeline.models import TimelineEntry from timeline.api.doc import HELP_TEXT __all__ = ( 'TimelineEntryBaseResource', ) class TimelineEntryBaseResource(TenantR...
agpl-3.0
acfogarty/espressopp
contrib/mpi4py/mpi4py-2.0.0/test/test_datatype.py
8
16240
from mpi4py import MPI import mpiunittest as unittest datatypes_c = [ MPI.CHAR, MPI.WCHAR, MPI.SIGNED_CHAR, MPI.SHORT, MPI.INT, MPI.LONG, MPI.UNSIGNED_CHAR, MPI.UNSIGNED_SHORT, MPI.UNSIGNED, MPI.UNSIGNED_LONG, MPI.LONG_LONG, MPI.UNSIGNED_LONG_LONG, MPI.FLOAT, MPI.DOUBLE, MPI.LONG_DOUBLE, ] datatypes_c99 = [ MPI.C_BOOL...
gpl-3.0
lfckop/graphite-web
webapp/tests/test_finders.py
39
1517
import random import time from django.test import TestCase from graphite.intervals import Interval, IntervalSet from graphite.node import LeafNode, BranchNode from graphite.storage import Store, get_finder class FinderTest(TestCase): def test_custom_finder(self): store = Store(finders=[get_finder('tests...
apache-2.0
skidzo/sympy
sympy/stats/error_prop.py
19
3119
"""Tools for arithmetic error propogation.""" from __future__ import print_function, division from itertools import repeat, combinations from sympy import S, Symbol, Add, Mul, simplify, Pow, exp from sympy.stats.symbolic_probability import RandomSymbol, Variance, Covariance _arg0_or_var = lambda var: var.args[0] if l...
bsd-3-clause
KevinNJ/Projects
Sallen Key Solver/SallenKey_Design.py
1
5404
# -*- coding: utf-8 -*- from __future__ import division import math import random import matplotlib.pyplot as plt import scipy.signal as sig from itertools import product from misc import common_part_values, metric_prefix from anneal import Annealer # Setup optimization targets target_q = 0.707 #...
mit
popazerty/blackhole-vuplus
tools/svg2skin.py
57
2482
#!/usr/bin/python # don't expect too much. # this is a really simple&stupid svg parser, which will use rectangles # and text fields to produce <widget> snippets for a skin. # use object "id" fields for source names if you want. # extracting font information is buggy. # if you want text fields, please use flow text regi...
gpl-2.0
glogiotatidis/mozillians-new
vendor-local/lib/python/celery/tests/test_task/__init__.py
14
31806
from __future__ import absolute_import from __future__ import with_statement from datetime import datetime, timedelta from functools import wraps from celery import task from celery.app import app_or_default from celery.task import task as task_dec from celery.exceptions import RetryTaskError from celery.execute impo...
bsd-3-clause
OpenNeuroLab/brainspell-neo
brainspell/article_helpers.py
2
15579
# functions related to adding and editing article data import re import urllib.request import Bio from Bio import Entrez, Medline from Bio.Entrez import efetch, esearch, parse, read from models import * from search_helpers import get_article_object Entrez.email = "neel@berkeley.edu" # BEGIN: article helper functio...
mit
titasakgm/brc-stock
openerp/addons/report_geraldo/lib/geraldo/geraldo/utils.py
7
4767
import sys try: import reportlab except ImportError: cm = 28.346456692913385 A4 = (595.275590551181, 841.8897637795275) black = None TA_LEFT, TA_CENTER, TA_RIGHT = 0, 1, 2 landscape = lambda t:(t[1],t[0]) else: from reportlab.lib.units import * # Check this - is the source of units from...
agpl-3.0
strk/QGIS
tests/src/python/test_qgsrasterrerderer_createsld.py
15
29445
# -*- coding: utf-8 -*- """ *************************************************************************** test_qgsrasterrenderer_createsld.py --------------------- Date : December 2018 Copyright : (C) 2018 by Luigi Pirelli Email : luipir at gmail dot com *****...
gpl-2.0
Yukarumya/Yukarum-Redfoxes
third_party/rust/unicode-bidi/tools/generate.py
1
7122
#!/usr/bin/env python # # Based on src/etc/unicode.py from Rust 1.2.0. # # Copyright 2011-2013 The Rust Project Developers. # Copyright 2015 The Servo Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. # # Licensed under the Apache Licen...
mpl-2.0
ip-tools/ip-navigator
patzilla/util/text/format.py
1
1253
# -*- coding: utf-8 -*- # (c) 2014-2016 Andreas Motl, Elmyra UG import re _slugify_strip_re = re.compile(r'[^\w\s-]') _slugify_strip_wo_equals_re = re.compile(r'[^\w\s=-]') _slugify_hyphenate_re = re.compile(r'[-\s]+') def slugify(value, strip_equals=True, lowercase=True): """ Normalizes string, converts to lo...
agpl-3.0
Letractively/userinfuser
serverside/entities/badges.py
12
4345
# Copyright (C) 2011, CloudCaptive # # 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 is distributed i...
gpl-3.0
LukeMurphey/splunk-network-tools
src/bin/network_tools_app/ipwhois/nir.py
1
23132
# Copyright (c) 2013-2019 Philip Hane # 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 conditions and...
apache-2.0
fxfitz/ansible
lib/ansible/modules/network/f5/bigip_gtm_datacenter.py
14
13189
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # 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
abhiatgithub/shogun-toolbox
examples/undocumented/python_modular/classifier_featureblock_logistic_regression.py
17
1312
#!/usr/bin/env python from numpy import array,hstack from numpy.random import seed, rand from tools.load import LoadMatrix lm=LoadMatrix() traindat = lm.load_numbers('../data/fm_train_real.dat') testdat = lm.load_numbers('../data/fm_test_real.dat') label_traindat = lm.load_labels('../data/label_train_twoclass.dat') p...
gpl-3.0
dstrockis/outlook-autocategories
lib/cryptography/hazmat/primitives/asymmetric/dh.py
13
4852
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import abc import six from cryptography import utils def generate_par...
apache-2.0
romain-dartigues/ansible
lib/ansible/modules/network/f5/bigip_device_syslog.py
9
18823
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # 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
michalliu/OpenWrt-Firefly-Libraries
staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python3.4/idlelib/idle_test/test_textview.py
79
2871
'''Test the functions and main class method of textView.py. Since all methods and functions create (or destroy) a TextViewer, which is a widget containing multiple widgets, all tests must be gui tests. Using mock Text would not change this. Other mocks are used to retrieve information about calls. The coverage is es...
gpl-2.0
sublee/almost
almosttests.py
1
4697
# -*- coding: utf-8 -*- import math import sys from pytest import deprecated_call from almost import almost def test_repeating_decimal(): assert almost(1 / 3.) == 0.333 assert almost(1 / 6.) == 0.167 assert almost(3227 / 555., prec=6) == 5.814414 def test_irrational_number(): assert almost(math.pi...
bsd-3-clause
kingvuplus/ME-TEST2
lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py
10
4102
# -*- coding: iso-8859-1 -*- # (c) 2006 Stephan Reichholf # This Software is Free, use it where you want, when you want for whatever you want and modify it if you want but don't remove my copyright! from Screens.Screen import Screen from Screens.Standby import TryQuitMainloop from Screens.MessageBox import MessageBox f...
gpl-2.0
BoGoEngine/ibus-bogo
ibus_engine/base_config.py
1
3649
# # This file is part of ibus-bogo project. # # Copyright (C) 2012 Long T. Dam <longdt90@gmail.com> # Copyright (C) 2012-2013 Trung Ngo <ndtrung4419@gmail.com> # Copyright (C) 2013 Duong H. Nguyen <cmpitg@gmail.com> # # ibus-bogo is free software: you can redistribute it and/or modify # it under the terms of the GNU Ge...
gpl-3.0
PyBossa/pybossa
test/test_sched_2.py
1
3260
# -*- coding: utf8 -*- # This file is part of PYBOSSA. # # Copyright (C) 2015 Scifabric LTD. # # PYBOSSA 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 the License, or # (at your op...
agpl-3.0
genenetwork/genenetwork2_diet
wqflask/wqflask/heatmap/heatmap.py
1
12293
from __future__ import absolute_import, print_function, division import sys sys.path.append(".") import gc import string import cPickle import os import datetime import time import pp import math import collections import resource import scipy import numpy as np from scipy import linalg from pprint import pformat a...
agpl-3.0
vadimtk/chrome4sdp
third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/jsonchecker_unittest.py
51
4991
# Copyright (C) 2010 Apple 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: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause
tjakway/digital-ant-farm
lib/gtest-1.7.0/test/gtest_env_var_test.py
2408
3487
#!/usr/bin/env python # # Copyright 2008, 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...
mit
dmchoull/cdeploy
cdeploy/migrator.py
1
3928
import os import sys import yaml from cassandra.cluster import Cluster from cqlexecutor import CQLExecutor class Migrator: def __init__(self, migrations_path, session): print('Reading migrations from {0}'.format(migrations_path)) self.migrations_path = migrations_path self.session = sessio...
apache-2.0
walke469/spartahack-17
ballotbuilder/lib/python3.5/site-packages/werkzeug/debug/console.py
256
5599
# -*- coding: utf-8 -*- """ werkzeug.debug.console ~~~~~~~~~~~~~~~~~~~~~~ Interactive console support. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD. """ import sys import code from types import CodeType from werkzeug.utils import escape from werkzeug.loca...
bsd-2-clause
cloudera/hue
desktop/core/ext-py/zope.interface-4.5.0/src/zope/interface/tests/test_document.py
5
16637
############################################################################## # # Copyright (c) 2001, 2002 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. # TH...
apache-2.0
h4ck3rm1k3/FEC-Field-Documentation
fec/version/v7_0/F3.py
3
6647
import fechbase class Records(fechbase.RecordsBase): def __init__(self): fechbase.RecordsBase.__init__(self) self.fields = [ {'name': 'FORM TYPE', 'number': '1'}, {'name': 'FILER COMMITTEE ID NUMBER', 'number': '2'}, {'name': 'COMMITTEE NAME', 'number': '3'}, ...
unlicense
buguelos/odoo
addons/account_check_writing/account.py
379
2032
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
theetcher/fxpt
fxpt/fx_prefsaver/ctrl_maya.py
1
3651
import pymel.core.uitypes as pmui from ctrl_pymel import getController as pmGetController from pstypes import UIType from com import message IDX_PM_TYPE = 0 IDX_PM_CLASS = 1 constructors = { UIType.MCheckBox: [UIType.PMCheckBox, pmui.CheckBox], UIType.MCheckBoxGrp1: [UIType.PMCheckBoxGrp1, pmui.CheckBoxGrp],...
mit
lahcoin/lahcoin
contrib/bitrpc/bitrpc.py
22
7838
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:8638") else: access = Ser...
mit
Averroes/raft
core/data/DomFuzzerResultsDataModel.py
11
1487
# # This module supports the data model for the responses data for TreeViews # # Author: Gregory Fleischer (gfleischer@gmail.com) # # Copyright (c) 2011 RAFT Team # # This file is part of RAFT. # # RAFT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
gpl-3.0
thonkify/thonkify
src/lib/unidecode/x08a.py
253
4647
data = ( 'Yan ', # 0x00 'Yan ', # 0x01 'Ding ', # 0x02 'Fu ', # 0x03 'Qiu ', # 0x04 'Qiu ', # 0x05 'Jiao ', # 0x06 'Hong ', # 0x07 'Ji ', # 0x08 'Fan ', # 0x09 'Xun ', # 0x0a 'Diao ', # 0x0b 'Hong ', # 0x0c 'Cha ', # 0x0d 'Tao ', # 0x0e 'Xu ', # 0x0f 'Jie ', # 0x10 'Yi...
mit
polarise/BioClasses
count_paths_in_sequence.py
1
1624
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import division import sys import time from Node import * from LeafCounter import * from Sequence import * from Bio import SeqIO from TransitionMatrix import * import cPickle from GeneticCode import * def main( fn ): TM = TransitionMatrix() TM.read( "tr...
gpl-2.0
gratefulfrog/SPI
RPI/Python/OLD/oscSerialApp_tooSlow/master.py
1
13258
#!/usr/bin/python3 # example call # ./master.py /dev/ttyUSB0 /dev/ttyUSB1 ## python system imports import csv import threading import queue import time import sys import os.path import AEMmailer from casyncosc import SerialServer ## diskSpaceLimit : in MB, when limit reached, processing halts diskSpaceLimit = 100 # ...
gpl-3.0
tzuhsienli/resume-site
resume/urls.py
1
1524
from django.conf.urls import patterns, include, url from django.contrib.auth.models import User, Group from rest_framework import viewsets, routers # from resume.views import hello # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() # We should create our API now ...
mit
IptvBrasilGroup/Cleitonleonelcreton.repository
plugin.video.iptvbrondemand.mobile/requestsX/packages/urllib3/packages/six.py
2375
11628
"""Utilities for writing code that runs on Python 2 and 3""" #Copyright (c) 2010-2011 Benjamin Peterson #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 l...
gpl-2.0
doganaltunbay/odoo
addons/hr_timesheet_sheet/hr_timesheet_sheet.py
35
34024
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
wwj718/ANALYSE
lms/djangoapps/licenses/models.py
150
2538
import logging from django.db import models, transaction from student.models import User from xmodule_django.models import CourseKeyField log = logging.getLogger("edx.licenses") class CourseSoftware(models.Model): name = models.CharField(max_length=255) full_name = models.CharField(max_length=255) url...
agpl-3.0
scalable-networks/gnuradio-3.7.0.1
grc/gui/Element.py
5
7564
""" Copyright 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion 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...
gpl-3.0
alkemics/luigi
examples/wordcount_hadoop.py
66
2728
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
apache-2.0
MingyuanXie/CopyNet
experiments/synthetic.py
1
2907
__author__ = 'jiataogu' from emolga.dataset.build_dataset import deserialize_from_file, serialize_to_file import numpy.random as n_rng n_rng.seed(19920206) # the vocabulary tmp = [chr(x) for x in range(48, 58)] # '1', ... , '9', '0' voc = [tmp[a] + tmp[b] + tmp[c] for c in xrange(10) ...
mit
yencarnacion/jaikuengine
.google_appengine/lib/django-1.4/django/utils/simplejson/encoder.py
430
15620
"""Implementation of JSONEncoder """ import re c_encode_basestring_ascii = None c_make_encoder = None ESCAPE = re.compile(r'[\x00-\x1f\\"\b\f\n\r\t]') ESCAPE_ASCII = re.compile(r'([\\"]|[^\ -~])') HAS_UTF8 = re.compile(r'[\x80-\xff]') ESCAPE_DCT = { '\\': '\\\\', '"': '\\"', '\b': '\\b', '\f': '\\f', ...
apache-2.0
kastriothaliti/techstitution
venv/lib/python3.5/site-packages/pip/_vendor/requests/utils.py
319
24163
# -*- coding: utf-8 -*- """ requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. """ import cgi import codecs import collections import io import os import re import socket import struct import warnings from . import __vers...
gpl-3.0
ekalosak/boto
tests/unit/cloudformation/test_connection.py
70
30604
#!/usr/bin/env python import unittest from datetime import datetime from mock import Mock from tests.unit import AWSMockServiceTestCase from boto.cloudformation.connection import CloudFormationConnection from boto.exception import BotoServerError from boto.compat import json SAMPLE_TEMPLATE = r""" { "AWSTemplateFor...
mit
QianBIG/odoo
addons/l10n_be_hr_payroll/__openerp__.py
312
1872
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
agpl-3.0
davehorton/drachtio-server
deps/boost_1_69_0/tools/build/test/project_dependencies.py
7
1160
#!/usr/bin/python # Copyright 2003 Dave Abrahams # Copyright 2002, 2003, 2004 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # Test that we can specify a dependency property in project requirements, and # tha...
mit
strint/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/bijectors/identity_test.py
22
1831
# 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
cdr-stats/cdr-stats
install/conf/settings_local.py
2
5199
# # CDR-Stats License # http://www.cdr-stats.org # # 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/. # # Copyright (C) 2011-2015 Star2Billing S.L. # # The Initial Develope...
mpl-2.0
rversteegen/commandergenius
project/jni/python/src/Lib/test/test_errno.py
58
1178
#! /usr/bin/env python """Test the errno module Roger E. Masse """ import errno from test import test_support import unittest std_c_errors = frozenset(['EDOM', 'ERANGE']) class ErrnoAttributeTests(unittest.TestCase): def test_for_improper_attributes(self): # No unexpected attributes should be on the ...
lgpl-2.1
jordy33/yowsup
yowsup/layers/protocol_presence/layer.py
61
1175
from yowsup.layers import YowLayer, YowLayerEvent, YowProtocolLayer from .protocolentities import * from yowsup.layers.protocol_iq.protocolentities import ErrorIqProtocolEntity class YowPresenceProtocolLayer(YowProtocolLayer): def __init__(self): handleMap = { "presence": (self.recvPresence, sel...
gpl-3.0
tinkerinestudio/Tinkerine-Suite
TinkerineSuite/pypy/lib-python/2.7/user.py
313
1627
"""Hook to allow user-specified customization code to run. As a policy, Python doesn't run user-specified code on startup of Python programs (interactive sessions execute the script specified in the PYTHONSTARTUP environment variable if it exists). However, some programs or sites may find it convenient to allow users...
agpl-3.0
wong2/sentry
src/sentry/migrations/0017_auto__add_field_projectmember_api_key.py
36
10324
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'ProjectMember.api_key' db.add_column('sentry_projectmember', 'api_key', self.gf('django.db.models....
bsd-3-clause
catapult-project/catapult-csm
systrace/systrace/tracing_agents/agents_unittest.py
8
1650
# 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 unittest from systrace import util from devil.android import device_utils from devil.android.sdk import intent from devil.android.sdk import keyeven...
bsd-3-clause
alextruberg/custom_django
django/contrib/sites/models.py
114
3549
from __future__ import unicode_literals import string from django.db import models from django.db.models.signals import pre_save, pre_delete from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible from django.core.exceptions import ValidationError SITE_C...
bsd-3-clause
Distrotech/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/tests/geo3d/models.py
404
1835
from django.contrib.gis.db import models class City3D(models.Model): name = models.CharField(max_length=30) point = models.PointField(dim=3) objects = models.GeoManager() def __unicode__(self): return self.name class Interstate2D(models.Model): name = models.CharField(max_length=30) l...
apache-2.0
ramramps/mkdocs
mkdocs/legacy.py
29
4548
from __future__ import unicode_literals import logging from mkdocs import utils from mkdocs.exceptions import ConfigurationError log = logging.getLogger(__name__) def pages_compat_shim(original_pages): """ Support legacy pages configuration Re-write the pages config fron MkDocs <=0.12 to match the ...
bsd-2-clause
wnt-zhp/hufce
django/contrib/admin/templatetags/admin_list.py
79
15696
import datetime from django.contrib.admin.util import lookup_field, display_for_field, label_for_field from django.contrib.admin.views.main import (ALL_VAR, EMPTY_CHANGELIST_VALUE, ORDER_VAR, PAGE_VAR, SEARCH_VAR) from django.contrib.admin.templatetags.admin_static import static from django.core.exceptions import ...
gpl-3.0
dcramer/django-db-routes
src/dbroutes/backend/base.py
1
1560
import re from django.db.backends.postgresql_psycopg2.base import * # from the postgresql doc SQL_IDENTIFIER_RE = re.compile(r'^[_a-zA-Z][_a-zA-Z0-9]{,62}$') PUBLIC_SCHEMA_NAME = 'public' def _check_identifier(identifier): if not SQL_IDENTIFIER_RE.match(identifier): raise RuntimeError("Invalid string u...
apache-2.0
edgarli/proj8
env/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/latin1prober.py
1778
5232
######################## 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...
artistic-2.0
Affix/fas
fas/group.py
1
33669
# -*- coding: utf-8 -*- # # Copyright © 2008 Ricky Zhou # Copyright © 2008-2010 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hop...
gpl-2.0
quchunguang/test
testpy3/pyqt5_widget_splitter.py
1
2031
#!/usr/bin/python3 # -*- coding: utf-8 -*- import sys from PyQt5.QtWidgets import (QWidget, QHBoxLayout, QVBoxLayout, QLabel, QComboBox, QFrame, QSplitter, QApplication) from PyQt5.QtCore import Qt class Example(QWidget): def __init__(self): super().__init__() self.in...
mit
vipul-sharma20/oh-mainline
vendor/packages/Django/django/conf/locale/lv/formats.py
107
1578
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'Y. \g\a\d\a j. F' TIME_FORMAT = ...
agpl-3.0
lbjay/cds-invenio
modules/bibindex/lib/bibindex_engine_stemmer_tests.py
4
2712
# -*- coding: utf-8 -*- ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS Invenio 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 versio...
gpl-2.0
cobalys/django
django/contrib/localflavor/si/forms.py
8
4672
""" Slovenian specific form helpers. """ from __future__ import absolute_import, unicode_literals import datetime import re from django.contrib.localflavor.si.si_postalcodes import SI_POSTALCODES_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields...
bsd-3-clause
hergin/DelTa
mt/ptcal/pytcore/rules/srule.py
1
5367
'''***************************************************************************** AToMPM - A Tool for Multi-Paradigm Modelling Copyright (c) 2011 Eugene Syriani This file is part of AToMPM. AToMPM is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as pu...
gpl-3.0
sandeepgupta2k4/tensorflow
tensorflow/python/training/device_setter.py
32
8296
# 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
zengenti/ansible
lib/ansible/modules/cloud/univention/udm_dns_zone.py
21
7623
#!/usr/bin/python # -*- coding: UTF-8 -*- # Copyright (c) 2016, Adfinis SyGroup AG # Tobias Rueetschi <tobias.ruetschi@adfinis-sygroup.ch> # # 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 Fr...
gpl-3.0
ping/youtube-dl
youtube_dl/extractor/canvas.py
9
12184
from __future__ import unicode_literals import re import json from .common import InfoExtractor from .gigya import GigyaBaseIE from ..compat import compat_HTTPError from ..utils import ( ExtractorError, strip_or_none, float_or_none, int_or_none, merge_dicts, parse_iso8601, ) class CanvasIE(I...
unlicense
Mathijsz/razdroid-kernel
tools/perf/scripts/python/check-perf-trace.py
11214
2503
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
gpl-2.0
staciecampbell/allsun
node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py
1843
1786
#!/usr/bin/env python # Copyright (c) 2012 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. """ Unit tests for the ninja.py file. """ import gyp.generator.ninja as ninja import unittest import StringIO import sys import TestCommon ...
gpl-2.0