code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
#!/usr/bin/env python # coding=utf-8 from distutils.core import setup from micronopt import __version__ setup( name='MicronOpt', version=__version__, author='Pete Bachant', author_email='petebachant@gmail.com', py_modules=['micronopt'], scripts=[], url='https://github.com/petebachant/Micro...
petebachant/MicronOpt-Python
setup.py
Python
mit
1,078
from .sender import SignalSender, connect_with from .base import ValueModel, AttachAbility from .base import ValueInterface, ChangedInterface from .base import AbstractItem, Item, AbstractProperty from .multi_types import StringValueModel, StringProperty, StringItemInterface, StringItem from .multi_types import IntVa...
SF-Zhou/prett
prett/__init__.py
Python
mit
1,611
# Copyright (c) 2013 Nicolas Dandrimont <nicolas.dandrimont@crans.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,...
mtmiller/hy
hy/lex/parser.py
Python
mit
8,249
# # https://github.com/watson-developer-cloud/personality-insights-twitter-python/blob/master/twitteranalyzer.py # import sys import os import requests import json import twitter import config def convert_status_to_pi_content_item(s): # My code here return { 'userid': str(s.user.id), 'id': st...
DLance96/nativx-survey
survey/personality_analyzer.py
Python
mit
3,410
# Process the attendance data by adding fields for day of week and school year and reoder the fields # so that they match the enrollment file: date, lasid, status (ABS), day, school year # also, clean the bad data. Many absence records are on days not in the calendar. Check the date # of the absence against the cale...
ebraunkeller/kerouac-bobblehead
ProcessAttendance.py
Python
mit
1,977
""" Siphon config.py Siphon app config Author: Kenta Yamada See configration options Flask https://flask.palletsprojects.com/en/1.1.x/config/#builtin-configuration-values Flask-JWT-extended https://flask-jwt-extended.readthedocs.io/en/latest/ """ from os import environ cla...
KentaYamada/Siphon
app/config.py
Python
mit
1,835
# Copyright 2017 The Abseil Authors. # # 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 ...
ryfeus/lambda-packs
Keras_tensorflow_nightly/source2.7/absl/logging/__init__.py
Python
mit
35,420
class User(object): def __init__(self, **kwargs): self.id = kwargs.get('id', 1) self.name = kwargs['name'] self.admin = kwargs['admin'] pass @property def is_admin(self): return self.admin class Article(object): def __init__(self, **kwargs): self.auth...
bouncer-app/bouncer
bouncer/test_bouncer/models.py
Python
mit
547
from bz2 import BZ2Decompressor from enum import Enum from functools import partial from lzma import LZMADecompressor import zlib class Compression(Enum): bzip2 = ('.bz2', BZ2Decompressor) # See <http://stackoverflow.com/q/2423866/744178>: gzip = ('.gz', partial(zlib.decompressobj,...
jwodder/aptrepo
src/aptrepo/compression.py
Python
mit
1,237
from . import ( Application, Category, Course, Designation, Major, Project, Requirement, User, Year, ) Application = Application.Application Category = Category.Category Course = Course.Course Designation = Designation.Designation Major = Major.Major Project = Project.Project Requir...
BunsenMcDubbs/cs4400-project
app/models/__init__.py
Python
mit
386
def list_users_in_account(request_ctx, account_id, search_term=None, include=None, per_page=None, **request_kwargs): """ Retrieve the list of users associated with this account. @example_request curl https://<canvas>/api/v1/accounts/self/users?search_term=<search value> \ ...
penzance/canvas_python_sdk
static_methods/users.py
Python
mit
2,009
#!/usr/bin/env python # -*- coding: utf-8 -*- import bottle from situation_change import * timeline = EventTimeLine() registry = PersonRegistry(timeline) read_registry = PersonRegistryReader() timeline.add_subscriber(read_registry) timeline.add_subscriber(BasicLogger()) app = bottle.Bottle() @app.route('/') def ind...
rtouze/event_sourcing_example
app.py
Python
mit
1,568
import unittest from clandestined import RendezvousHash class RendezvousHashTestCase(unittest.TestCase): def test_init_no_options(self): rendezvous = RendezvousHash() self.assertEqual(0, len(rendezvous.nodes)) self.assertEqual(1361238019, rendezvous.hash_function('6666')) def test_...
ewdurbin/clandestined-python
clandestined/test/test_rendezvous_hash.py
Python
mit
5,256
import numpy as np import tensorflow as tf import h5py import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import sys # Functions for initializing neural nets parameters def init_weight_variable(shape, nameIn): initial = tf.truncated_normal(shape, stddev=0.1, dtype=tf.float32) retu...
Haunter17/MIR_SU17
exp3/exp3e/exp3e.py
Python
mit
24,990
from ..base import AST CLASS = "statements.skip" class SkipStatement(AST): def __init__(self): super().__init__(CLASS, "skip_statement")
PetukhovVictor/compiler
src/Parser/AST/statements/skip.py
Python
mit
152
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
yugangw-msft/azure-cli
src/azure-cli-core/azure/cli/core/auth/persistence.py
Python
mit
2,517
import aifc import sndhdr import utils class Aiff: def __init__(self, filename): assert sndhdr.what(filename).filetype == 'aiff' x = aifc.open(filename) data = x.readframes(x.getnframes()) self.nchannels = x.getnchannels() self.sampwidth = x.getsampwidth() self.f...
viniciusd/DCO1008---Digital-Signal-Processing
projeto3/aiff.py
Python
mit
913
import os from subprocess import call from videogrep import videogrep filename = 'TEST_OUTPUT.mp4' def test_videogrep(): videogrep.videogrep('test_videos/test.mp4', filename, 'video', 'pos') files = os.listdir('.') assert filename in files def test_cli(): command = 'videogrep_cli.py -i test_videos/...
antiboredom/videogrep
videogrep/tests/test_videogrep.py
Python
mit
517
import numpy as np from .distribution import Distribution from scipy.stats import multivariate_normal from scipy.optimize import minimize class GaussianDistribution(Distribution): """ Gaussian distribution with fixed covariance matrix. The parameters vector represents only the mean. """ def __init...
carloderamo/mushroom
mushroom_rl/distributions/gaussian.py
Python
mit
14,862
from aredis.exceptions import RedisError from aredis.utils import b, nativestr def parse_georadius_generic(response, **options): if options['store'] or options['store_dist']: # `store` and `store_diff` cant be combined # with other command arguments. return response if type(response) ...
NoneGG/aredis
aredis/commands/geo.py
Python
mit
7,328
from setuptools import setup, find_packages import os with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) CLASSIFIERS = [ #'Development Status :: 1 - ', 'Environment :: Web Enviro...
OKFNat/offenewahlen-nrw17
setup.py
Python
mit
1,452
import logging from datetime import timedelta from pajbot.managers.handler import HandlerManager from pajbot.modules import BaseModule from pajbot.modules import ModuleSetting log = logging.getLogger(__name__) class MaxMsgLengthModule(BaseModule): ID = __name__.split(".")[-1] NAME = "Maximum Message Lengt...
pajlada/pajbot
pajbot/modules/maxmsglength.py
Python
mit
4,608
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import cms.models.fields import taggit.managers class Migration(migrations.Migration): dependencies = [ ('taggit', '0001_initial'), ('cms', '0003_auto_2014092...
Maplecroft/django-cms-saq
cms_saq/migrations/0001_initial.py
Python
mit
9,981
import json import argparse import os from listener.config import MIN_TIME, MAX_TIME, PRESSURE_AVERAGE_AMOUNT from listener.replayer import Replayer from listener.utilities import convert_time, average from listener.calculate import (calculate_temp_NTC, calculate_press, calculate_height,...
dkkline/CanSat14-15
unused_code/generate_static_json_data.py
Python
mit
1,797
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals import logging import unittest import epitran logger = logging.getLogger('epitran') def map_slice(xs, start, end): return [x[start:end] for x in xs] def assemble_ipa(xs): return ''.join([x[3] for x in xs...
dmort27/epitran
epitran/test/test_french.py
Python
mit
2,463
#/u/GoldenSights import traceback import praw # simple interface to the reddit API, also handles rate limiting of requests import time import sqlite3 '''USER CONFIGURATION''' APP_ID = "" APP_SECRET = "" APP_URI = "" APP_REFRESH = "" # https://www.reddit.com/comments/3cm1p8/how_to_make_your_bot_use_oauth2/ USERAGENT =...
TacticalGoat/reddit
SubDumpPost/subdumppost.py
Python
mit
5,238
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of level. # https://github.com/heynemann/level # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT-license # Copyright (c) 2016, Bernardo Heynemann <heynemann@gmail.com> from importer import Importer from preggy import expect fr...
heynemann/level
tests/unit/test_app.py
Python
mit
6,332
# coding: utf-8 """ A simple module to fetch Cavelink values by parsing the HTML page of sensors. """ from setuptools import find_packages, setup with open('README.rst', 'r') as f: long_description = f.read() setup( name='cavelink', version='1.1.1', author='Sébastien Pittet', author_email='sebast...
SebastienPittet/cavelink
setup.py
Python
mit
1,270
from PyOMAPIc import PyOMAPIc
stanvit/pyomapic
__init__.py
Python
mit
31
import os import re import traceback import logging import platform from distutils.version import StrictVersion from PySide import QtCore from PySide import QtGui from P4 import P4, P4Exception, Progress, OutputHandler import Utils import AppUtils import GlobalVars import Callbacks reload(Utils) reload(AppUtils) re...
TomMinor/MayaPerforce
Perforce/GUI.py
Python
mit
75,889
#!/usr/bin/python3 """ FileStats object, abstraction to take in HTML and spit out all the stats and stuff that we want. ALso has a handy function for returning a tuple for instertion into SQL databases. @author mgmcgove """ import os import get_tags as gt import stats_lib import url_validator as url...
mcgov/fishpaste
FileStats.py
Python
mit
3,515
import io import os from setuptools import setup, find_packages VERSION = "1.0.0" here = os.path.abspath(os.path.dirname(__file__)) README = io.open(os.path.join(here, "README.rst"), encoding="utf8").read() setup( name="jsx-lexer", description="A JSX lexer for Pygments", long_description=README, ver...
fcurella/jsx-lexer
setup.py
Python
mit
893
# -*- coding: utf-8 -*- #抓取网易公开课链接并下载对应的相视频名称和视频格式 #By : obnjis@163.com #Python 2.7 + BeautifulSoup 4 #2014-12-18 #断点续传功能等待下一版本 #eg: python 163—video.py http://v.163.com/special/opencourse/ios7.html from bs4 import BeautifulSoup import re import sys,os import urllib import codecs #显示百分比 def rpb(blocknum, blocksize, to...
frankeen/163_Opencourse_download
163_download.py
Python
mit
2,432
# -*- coding: utf-8 -*- # Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # Copyright 2008 Frank Scholz <coherence@beebits.net> import os.path from twisted.python import util from twisted.web import resource, static from twisted.internet import reactor import coherence.extern.louie ...
unintended/Cohen
coherence/upnp/devices/basics.py
Python
mit
13,455
from flask import Blueprint main = Blueprint('main', __name__) from . import views, errors
piratecb/up1and
app/main/__init__.py
Python
mit
98
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import ownblock.apps.storage.models class Migration(migrations.Migration): dependencies = [ ('storage', '0003_item_photo'), ] operations = [ migrations.AlterField( model_...
danjac/ownblock
ownblock/ownblock/apps/storage/migrations/0004_auto_20140911_0341.py
Python
mit
493
from core.himesis import Himesis, HimesisPreConditionPatternLHS import uuid class HSS1_then_IsolatedLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the AToM3 model HSS1_then_IsolatedLHS """ # Flag this instance as compiled now self.is_compiled = True sup...
levilucio/SyVOLT
UMLRT2Kiltera_MM/Properties/from_MPS/HSS1_then_IsolatedLHS.py
Python
mit
851
def yield_function(n): for i in range(n): print "pre", i yield i print "post", i for x in yield_function(10): print x print
MichaelReiter/ProgrammingPractice
yield.py
Python
mit
142
# -*- coding: utf-8 -*- # import sqlite3 as sqlite import sys import uuid from pysqlcipher3 import dbapi2 as sqlite def main(): print("***************** Welcome to OSS DataMaster-Rigster System *******************") print("* *") pri...
summychou/CSForOSS
CA/OSSQt_DataMasterRigster.py
Python
mit
2,535
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** # ...
Stargrazer82301/CAAPR
CAAPR/CAAPR_AstroMagic/PTS/pts/modeling/config/initialize_fit.py
Python
mit
1,745
###-----------Import modules---------------#### import argparse import nucleoatac.Magic from nucleoatac import __version__ def nucleoatac_main(args): """The Main function for calling nucleoatac """ #Parse options... call = args.call parser = nucleoatac_parser() if call == "occ": from ...
GreenleafLab/NucleoATAC
nucleoatac/cli.py
Python
mit
15,857
# -*- coding: utf-8 -*- # # standard_names documentation build configuration file, created by # sphinx-quickstart on Fri Jul 22 11:31:51 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file...
csdms/standard_names
docs/source/conf.py
Python
mit
9,546
from multihash import SHA1, SHA2_256, SHA2_512, SHA3, BLAKE2B, BLAKE2S, \ decode, encode, is_valid_code, is_app_code
mediachain/mediachain-client
multihash/__init__.py
Python
mit
121
import requests import json cart_url = 'http://127.0.0.1:8000/api/cart/' def create_cart(): # create cart cart_r = requests.get(cart_url) # get cart token cart_token = cart_r.json()["token"] return cart_token def do_api_test(email=None, user_auth=None): cart_token = create_cart() # add items to cart new_car...
codingforentrepreneurs/ecommerce-2-api
src/ecommerce2/api_tests.py
Python
mit
3,349
def printFileContents(myFile): print(open(myFile).read().splitlines()) def writeFileContents(myFile, somethingToWrite): f = open(myFile,'a') f.write(somethingToWrite +'\n') # python will convert \n to os.linesep f.close() # you can omit in most cases as the destructor will call if printFileContents("alive.txt"...
Kakarot/PythonIO
FileManipulator.py
Python
mit
696
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys file=str(sys.argv[1]) file2=str(sys.argv[2]) outfile=open(file2,'w') with open (file) as f: for line in f: if line.startswith('PhraseDictionaryMemory'): line = line.replace('PhraseDictionaryMemory','PhraseDictionaryCompact') line = line.replace('tabl...
PorthTechnolegauIaith/moses-smt
scripts/mtdk/mt_update_compress_moses_ini.py
Python
mit
493
# coding: utf-8 import bisect import contextlib import csv from datetime import datetime import functools import json import logging import random import threading import time import unittest import uuid import redis QUIT = False SAMPLE_COUNT = 100 config_connection = None # 代码清单 5-1 # <start id="recent_log"/> # ...
huangz1990/riacn-code
ch05_listing_source.py
Python
mit
29,256
#!/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 string import re import datetime import pyperclip # Edit Me! # Remember, this is during signup, so current month is not April, it'...
foobarbazblarg/stayclean
stayclean-2020-june/display-during-signup.py
Python
mit
6,946
import markdown, datetime from django import template from django.template.base import (Node, NodeList, TemplateSyntaxError) register = template.Library() @register.filter(name='toHtml') def toHtml(markdownfile): return markdown.markdown(markdownfile) @register.filter(name='toNowTime') def toNowTime(bl...
alogfans/yaoj
main/blog/templatetags/to_html.py
Python
mit
363
# Copyright (C) 2015 Twitter, Inc. """Container for all targeting related logic used by the Ads API SDK.""" from twitter_ads.http import Request from twitter_ads.resource import resource_property, Resource, Persistence from twitter_ads import API_VERSION from twitter_ads.utils import FlattenParams import json class...
twitterdev/twitter-python-ads-sdk
twitter_ads/targeting.py
Python
mit
998
import csv, sys, getopt, argparse, os import dbSettings COLUMN_LOCAL_ID = 'LocalId' COLUMN_UHL_SYSTEM_NUMBER = 'Uhl System Number' COLUMN_NHS_NUMBER = 'NHS Number' COLUMN_TITLE = 'Title' COLUMN_LAST_NAME = 'Last Name' COLUMN_FIRST_NAME = 'First Name' COLUMN_DOB = 'Date of Birth' COLUMN_GENDER = 'Gender' COLUMN_ADDRES...
rabramley/microMedicalSpirometerXmlToCsv
correctIds.py
Python
mit
3,291
from antlr4 import * from autogen.CymbolParser import CymbolParser from autogen.CymbolVisitor import CymbolVisitor class Type: VOID = "void" INT = "int" class CymbolCheckerVisitor(CymbolVisitor): id_values = {} def visitIntExpr(self, ctx:CymbolParser.IntExprContext): print("visting "+Type.INT) return Type....
damorim/compilers-cin
antigo/ap3/CymbolCheckerVisitor.py
Python
mit
1,390
import os; link = "http://media.blizzard.com/heroes/images/battlegrounds/maps/dragon-shire/main/6/" column = 0; rc_column = 0; while (rc_column == 0): row = 0; rc_column = os.system('wget ' + link + str(column) + '/' + str(row) + '.jpg -O ' + str(1000 + column) + '-' + str(1000 + row) + '.jpg') rc_row = rc_column ...
karellodewijk/wottactics
extra/download_hots_map/dragon-shire/download_hots_map.py
Python
mit
1,370
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # scrapenhl2 documentation build configuration file, created by # sphinx-quickstart on Sun Oct 1 17:47:07 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this #...
muneebalam/scrapenhl2
docs/source/conf.py
Python
mit
4,961
from __future__ import with_statement import pytest from redis import exceptions from redis._compat import b multiply_script = """ local value = redis.call('GET', KEYS[1]) value = tonumber(value) return value * ARGV[1]""" class TestScripting(object): @pytest.fixture(autouse=True) def reset_scripts(self, r):...
katakumpo/niceredis
tests/test_scripting.py
Python
mit
2,723
#!/usr/bin/python # coding=utf-8 # # Python vsop optimized file generator. # # Copyright (c) 2013 Elie Roux <elie.roux@telecom-bretagne.eu> # # 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 w...
lscalendars/ccoal
src/vsop87/compute-vsop.py
Python
cc0-1.0
5,375
import OOMP newPart = OOMP.oompItem(8936) newPart.addTag("oompType", "HEAD") newPart.addTag("oompSize", "I01") newPart.addTag("oompColor", "L") newPart.addTag("oompDesc", "PI08") newPart.addTag("oompIndex", "01") OOMP.parts.append(newPart)
oomlout/oomlout-OOMP
old/OOMPpart_HEAD_I01_L_PI08_01.py
Python
cc0-1.0
242
#!/usr/bin/python # -*- coding: utf-8 -*- # @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0> ############################################################################## # Copyright (c) 2016 The Linux Foundation and others. # # All rights reserved. This program and the accompanying materials # are made available ...
opendaylight/spectrometer
server/spectrometer/api/gerrit.py
Python
epl-1.0
5,172
''' @copyright (c) 2010-2013 IBM Corporation All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html @author: Amitabha Biswas ''' imp...
opendaylight/opendove
odcs/data_handler/python/dcs_objects/DPSNodeStatistics.py
Python
epl-1.0
26,790
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
southpawtech/TACTIC-DEV
src/pyasm/biz/file.py
Python
epl-1.0
34,859
import sys import numpy as np import matplotlib.image as mpimg import numpy.random as npr import Image mode = 'L' for i in range(len(sys.argv)-1): i+=1 mi = mpimg.imread(sys.argv[i]) x = np.shape(mi)[0] mi = np.reshape(mi, (x*x)) mi = npr.permutation(mi) mi = np.reshape(mi, (x,x)) size = np.s...
dpaiton/OpenPV
pv-core/analysis/python/image_shuffle.py
Python
epl-1.0
491
#!/usr/bin/python # -*- coding:UTF-8 -*- # Copyright (c) Stephen Smally <stephen.smally@gmail.com> # # 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 t...
hyperdriveguy/mint-software-center
src/widgets/searchentry.py
Python
gpl-2.0
2,634
#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path try: import builtins as builtin except ImportError: import __builtin__ as builtin from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatib...
MOA-2011/enigma2-plugin-extensions-openwebif
plugin/controllers/views/ajax/satellites.py
Python
gpl-2.0
5,571
# encoding: utf-8 # module apt_pkg # from /usr/lib/python3/dist-packages/apt_pkg.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 """ Classes and functions wrapping the apt-pkg library. The apt_pkg module provides several classes and functions for accessing the functionality provided by the apt-pkg library. Typica...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247971765/apt_pkg/Description.py
Python
gpl-2.0
1,338
#!/usr/bin/env python # -*- coding: utf-8 -*- ###################### ## 2016-02-20 Created by David Portnoy ###################### import os import glob # Wildcard search import json import os import csv def support_old_schema(dataset_list): if isinstance(dataset_list, dict): return dataset_list["d...
HHSIDEAlab/DDOD-HealthData.gov
data_json_counts.py
Python
gpl-2.0
11,117
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2014 CERN. ## ## 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 version 2 of the ## License, or (at your option) a...
egabancho/invenio
invenio/modules/groups/bundles.py
Python
gpl-2.0
1,054
from tempfile import mkdtemp from zipfile import ZipFile, is_zipfile from shutil import rmtree, copyfileobj from xml.dom.minidom import parse import os class cleanopenoffi(): def __init__(self, sDocName, newDocName): self.sDocName = sDocName self.newDocName = newDocName self._ms_do() def _m...
overxfl0w/Grampus-Forensic-Utils
Metadata/Documents/OpenOffice/cleanopenoffi.py
Python
gpl-2.0
4,193
# -*- coding: utf-8 -*- # # Copyright 2003-2006 Zuza Software Foundation # # This file is part of translate. # # translate 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 # ...
unho/translate
translate/convert/csv2po.py
Python
gpl-2.0
9,967
# Copyright 2006-2007 Lukas Lalinsky # Copyright 2005-2006 Joe Wreschnig # # 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. # # $Id: asf.py 4224 2007-12-03 09:01:49Z luks $ """Read and...
berdario/mutagen
mutagen/asf.py
Python
gpl-2.0
21,198
############################################################################## # # Copyright (C) Zenoss, Inc. 2009, 2011, all rights reserved. # # This content is made available according to terms specified in # License.zenoss under the directory where your Zenoss product is installed. # ###############################...
zenoss/ZenPacks.zenoss.Puppet
ZenPacks/zenoss/Puppet/BatchDeviceLoader.py
Python
gpl-2.0
26,792
import os def enumFeeds(): for fn in os.listdir('/etc/opkg'): if fn.endswith('-feed.conf'): try: for feed in open(os.path.join('/etc/opkg', fn)): yield feed.split()[1] except IndexError: pass except IOError: pass def enumPlugins(filter_start=''): for feed in enumFeeds(): package = None...
postla/e2-gui
lib/python/Components/opkg.py
Python
gpl-2.0
1,535
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json from datetime import date, datetime from dateutil.relativedelta import relativedelta import os from os import path, mkdir from shutil import rmtree import tempfile from zipfile import ZipFile, ZIP_DEFLATED import codecs import geojson from osge...
nextgis/nextgisweb_compulink
nextgisweb_compulink/compulink_site/view.py
Python
gpl-2.0
32,980
# # Copyright (c) 2004 Conectiva, Inc. # # Written by Gustavo Niemeyer <niemeyer@conectiva.com> # # This file is part of Smart Package Manager. # # Smart Package Manager 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 Fou...
pierrejean-coudert/winlibre_pm
package_manager/smart/commands/install.py
Python
gpl-2.0
6,529
# # This file is part of GNU Enterprise. # # GNU Enterprise 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, or (at your option) any later version. # # GNU Enterprise is distributed in the h...
onoga/wm
src/gnue/forms/GFObjects/GFTree.py
Python
gpl-2.0
25,780
import os import time import cPickle from Plugins.Plugin import PluginDescriptor from Screens.Console import Console from Screens.ChoiceBox import ChoiceBox from Screens.MessageBox import MessageBox from Screens.Screen import Screen from Screens.Standby import TryQuitMainloop from Screens.Ipkg import Ipkg from Screens....
fairbird/OpenPLI-BlackHole
lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
Python
gpl-2.0
116,942
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
huiyiqun/check_mk
web/htdocs/availability.py
Python
gpl-2.0
81,172
#coding=utf-8 #!/usr/bin/env python # A small script to analyze all the funds data # Author :xin xin from "微信公众号:菜鸟学python" import pandas as pd import numpy as np file='fund3.1.csv' df=pd.read_csv(file) print("head-------------------------------------------------------------------------") print(len(df)) print(df.hea...
yangtsecxf/a-fund
process/process_csv.py
Python
gpl-2.0
5,973
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "roscpp;rospy;std_msgs".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "-lscarab_quad".split(';') if "-lscarab_quad" != "" else [] PROJEC...
mdkennedy3/Scarab_DCT_Control
catkin_ws/build/Scarabs/scarab/scarab_quad/catkin_generated/pkg.installspace.context.pc.py
Python
gpl-2.0
422
# -*- coding: utf-8 -*- from config import * print(Color( '{autored}[{/red}{autoyellow}+{/yellow}{autored}]{/red} {autocyan} log.py importado.{/cyan}')) @bot.message_handler(commands=['log']) def command_log(m): cid = m.chat.id uid = m.from_user.id try: send_udp('log') except Exception ...
DantestyleXD/MVM5B_BOT
plugins/log.py
Python
gpl-2.0
763
# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- # # 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 t...
Brainbuster/openpli-buildumgebung
openembedded-core/scripts/lib/wic/plugins/source/rawcopy.py
Python
gpl-2.0
2,926
# Copyright (C) 2010-2012 Red Hat, Inc. # This work is licensed under the GNU GPLv2 or later. #test DHCPLeases() API for libvirt import os import json from libvirt import libvirtError from libvirttestapi.utils import utils from libvirttestapi.src import sharedmod required_params = ('networkname',) optional_params = ...
libvirt/libvirt-test-API
libvirttestapi/repos/network/network_dhcp_leases.py
Python
gpl-2.0
6,408
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'NewMangaDialog.ui' # # Created: Wed Jul 24 19:06:21 2013 # by: PyQt4 UI code generator 4.10.2 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except...
ilbay/PyMangaDownloader
Ui_NewMangaDialog.py
Python
gpl-2.0
2,334
from django import forms from django.contrib import admin from myproject.brdesigner.models import * from django.utils.safestring import mark_safe class BadRacketAdminBase(admin.ModelAdmin): class Media: js = ( 'brdesigner/js/admin_list_reorder.js', 'brdesigner/js/tinymce/tinymce.min...
badracket/django-brdesigner
brdesigner/admin.py
Python
gpl-2.0
2,044
# -*- coding: utf-8 -*- """ Webhook signals """ # # Required for reading files # import sys; reload(sys); sys.setdefaultencoding("utf8") from django.core.files import File from django.core.cache import cache from django.dispatch import receiver from django.test import TestCase, Client from django.core.urlresolvers impo...
rosscdh/django-crocodoc
dj_crocodoc/tests/signals.py
Python
gpl-2.0
8,364
from results.controllers.ResultsController import ResultsController class PointsController(): results_controller = None def __init__(self): self.results_controller = ResultsController() def team_points_for_team(self, team, round): result = self.results_controller.result_for_team(team, r...
sarrionandia/taber
results/controllers/PointsController.py
Python
gpl-2.0
1,456
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './viewer.ui' # # Created: Sun Aug 23 04:04:27 2009 # by: PyQt4 UI code generator 4.4.2 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_MainWindow(object): def setupUi(self, MainWin...
krajj7/spectrogram
viewer/ui_viewer.py
Python
gpl-2.0
6,982
#!/usr/bin/env python # # vim:syntax=python:sw=4:ts=4:expandtab """ test hasAttributes() --------------------- >>> from guppy import hasAttributes >>> class Foo(object): ... def __init__(self): ... self.a = 23 ... self.b = 42 >>> hasAttributes('a')(Foo()) True...
xfire/guppy
test/doctest_assertions.py
Python
gpl-2.0
3,440
# @brief helper function to turn pkgconfig files into ASKAP package.info # # @copyright (c) 2006 CSIRO # Australia Telescope National Facility (ATNF) # Commonwealth Scientific and Industrial Research Organisation (CSIRO) # PO Box 76, Epping NSW 1710, Australia # atnf-enquiries@csiro.au # # This file is part of the ASKA...
ATNF/askapsdp
Tools/Dev/rbuild/askapdev/rbuild/utils/pkginfo.py
Python
gpl-2.0
3,666
# -*- coding: utf-8 -*- """ Dual Relay Plugin Copyright (C) 2011-2012 Olaf Lüke <olaf@tinkerforge.com> Copyright (C) 2014 Matthias Bolte <matthias@tinkerforge.com> dual_relay.py: Dual Relay Plugin Implementation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General...
Tinkerforge/brickv
src/brickv/plugin_system/plugins/dual_relay/dual_relay.py
Python
gpl-2.0
5,730
# -*- coding: utf-8 -*- # # Copyright © 2014 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, or (at your option) any later # version. This program is distributed in t...
pombredanne/anitya
anitya/tests/lib/backends/test_hackage.py
Python
gpl-2.0
3,310
import datetime from django.db import models from django.utils import timezone class Question(models.Model): question_text = models.CharField(max_length=200) pub_date = models.DateTimeField('date published') def __unicode__(self): # __unicode__ on Python 2 return self.question_text ...
JCraft40/finalproject
polls/models.py
Python
gpl-2.0
899
# ab_addons_tools.py Copyright (C) 2012, Jakub Zolcik # # Searches through files in file browser by name. # # ***** BEGIN GPL LICENSE BLOCK ***** # # # 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 Foundati...
sftd/AllBlue-Blender-Tools
ab_addons_tools.py
Python
gpl-2.0
4,848
# -*- coding: utf-8 -*- # # PartMgr GUI - Protected spin box # # Copyright 2014 Michael Buesch <m@bues.ch> # # 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 #...
mbuesch/partmgr
partmgr/gui/protected_spinbox.py
Python
gpl-2.0
1,870
#!/usr/bin/env python # # qtfmt.py v1.10 # v1.10 : Updated to use Python 2.0 Unicode type. # # Read a document in the quotation DTD, converting it to a list of Quotation # objects. The list can then be output in several formats. __doc__ = """Usage: qtfmt.py [options] file1.xml file2.xml ... If no filenames are provid...
Pikecillo/genna
external/PyXML-0.8.4/demo/quotes/qtfmt.py
Python
gpl-2.0
13,896
# # postags.py # # List of function POS tags and content POS tags # # $Id: postags.py 1657 2006-06-04 03:03:05Z turian $ # ####################################################################### # Copyright (c) 2004-2006, New York University. All rights reserved ###################################################...
arne-cl/turian-parser
scripts/treebank-processing/modules/postags.py
Python
gpl-2.0
873
from datetime import datetime import MaKaC.common.filters as filters from MaKaC.webinterface.common.countries import CountryHolder # -------------- FILTERING ------------------ class AccommFilterField( filters.FilterField ): """Contains the filtering criteria for the track of a contribution. Inher...
belokop-an/agenda-tools
code/MaKaC/webinterface/common/regFilters.py
Python
gpl-2.0
13,066
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014 artmin - IT Dienstleistungen. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
artmin/weippert-addons
dreh24_custom_fields/partner_ref.py
Python
gpl-2.0
2,894
"""Tests for missing-yield-doc and missing-yield-type-doc""" # pylint: disable=missing-function-docstring, unused-argument, function-redefined # Ignore no docstring def my_func(self): yield False # Ignore unrecognized style docstring def my_func(self): """This is a docstring.""" yield False
PyCQA/pylint
tests/functional/ext/docparams/yield/missing_yield_doc.py
Python
gpl-2.0
307
import os import sqlalchemy as sa from sqlalchemy.orm import sessionmaker, relation from sqlalchemy.ext.declarative import declarative_base import datetime # database setup Base = declarative_base() # define the tables class Song(Base): __tablename__ = 'song' id = sa.Column(sa.Integer, primary_key=True) ...
tobes/jukebox
schema.py
Python
gpl-2.0
4,534
# # Martin Kolman <mkolman@redhat.com> # # Copyright 2018 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 use...
atodorov/pykickstart
pykickstart/commands/module.py
Python
gpl-2.0
4,566