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 __future__ import (absolute_import, division, print_function, unicode_literals) from datetime import datetime from os import environ from requests import get from bs4 import BeautifulSoup, NavigableString from icalendar import Calendar, Even...
albatros69/Divers
scrap_ffme.py
Python
gpl-3.0
3,373
#! /usr/bin/env python ''' Generates Inkscape SVG file containing box components needed to create several different types of laser cut tabbed boxes. Derived from original version authored by elliot white - elliot@twot.eu This program is free software: you can redistribute it and/or modify it under the terms of the GN...
zackurtz/box-maker
boxmaker.py
Python
gpl-3.0
10,763
""" Tests for the meshconvert module.""" # Copyright (C) 2012 # # This file is part of DOLFIN. # # DOLFIN is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your ...
maciekswat/dolfin_1.3.0
test/unit/meshconvert/python/test.py
Python
gpl-3.0
17,076
"""hicks URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based...
sgarrad/hicks
config/urls.py
Python
gpl-3.0
1,959
"""This module is used to click on the screen""" import logging from time import sleep import pyautogui import Globals import UI log = logging.getLogger(__name__) def click(x, y): """ Clicks left click one time Args: x (int): x to click y (int): y to click """ log.debug("Clicki...
DavidBarishev/DDtankFarmingBot
Ddtank_farm_bot/Framework/Clicking.py
Python
gpl-3.0
1,087
#!/usr/bin/env python # -*- coding: utf-8 -*- # TAMkin is a post-processing toolkit for normal mode analysis, thermochemistry # and reaction kinetics. # Copyright (C) 2008-2012 Toon Verstraelen <Toon.Verstraelen@UGent.be>, An Ghysels # <An.Ghysels@UGent.be> and Matthias Vandichel <Matthias.Vandichel@UGent.be> # Center ...
molmod/tamkin
tamkin/examples/004_alkanes/bin/analyse_static.py
Python
gpl-3.0
2,998
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def pathSum(self, root, sum): """ :type root: TreeNode :type sum: int :rtype: int ...
zqfan/leetcode
algorithms/437. Path Sum III/solution.py
Python
gpl-3.0
748
from docutils import nodes from docutils.parsers import rst from uuid import uuid4 class feed(nodes.General, nodes.Element): pass def visit(self, node): id = str(uuid4()) tag =u''' <h4>Latest blogs</h4> <div id="{0}"></div> <script> feednami.load("{1}") .then(function (resul...
pri22296/yaydoc
modules/scripts/extensions/blog.py
Python
gpl-3.0
1,407
# -*- coding: utf-8 -*- # # This file is part of PyGaze - the open-source toolbox for eye tracking # # PyGaze is a Python module for easily creating gaze contingent experiments # or other software (as well as non-gaze contingent experiments/software) # Copyright (C) 2012-2013 Edwin S. Dalmaijer # # ...
esdalmaijer/PyGaze
pygaze/libsound.py
Python
gpl-3.0
1,025
import networkx as nx import numpy as np import pandas as pd def normalise(x): x = x[:]#deepcopy error x -= min(x) x /= max(x) return x def jgraph(posjac): ''' networkx graph object from posjac at timestep ''' posjac = 1 - normalise(np.log10(posjac).replace([np.inf,-np.inf],np.nan...
wolfiex/DSMACC-testing
zgraph.py
Python
gpl-3.0
2,805
# -*- coding: utf-8 -*- # TAMkin is a post-processing toolkit for normal mode analysis, thermochemistry # and reaction kinetics. # Copyright (C) 2008-2012 Toon Verstraelen <Toon.Verstraelen@UGent.be>, An Ghysels # <An.Ghysels@UGent.be> and Matthias Vandichel <Matthias.Vandichel@UGent.be> # Center for Molecular Modeling...
molmod/tamkin
tamkin/pftools.py
Python
gpl-3.0
21,612
import relayManager import dronekit class ShotManager(): def __init__(self): # see the shotlist in app/shots/shots.p print "init" def Start(self, vehicle): self.vehicle = vehicle # Initialize relayManager self.relayManager = relayManager.RelayManager(self) target = '...
mapossum/SeymourSolo
tester.py
Python
gpl-3.0
495
from LazyMail import LazyMail, encode_string import email import datetime import os import cgi import re import logging from email.header import decode_header __author__ = 'doms' class SavableLazyMail(LazyMail): def __init__(self, config, mail_connection, uid, stats): self.STATS = stats self.CONF...
dserv01/BackupMailToHTML
SavableLazyMail.py
Python
gpl-3.0
10,434
# -*- coding: utf-8 -*- """ :copyright: (c) 2016 by the mediaTUM authors :license: GPL3, see COPYING for details """ from __future__ import absolute_import from utils.date import parse_date from core.test.factories import DocumentFactory # adding more test functions may fail, see the comments for the following...
mediatum/mediatum
core/test/test_legacy_update_create.py
Python
gpl-3.0
1,051
# Copyright (C) 2016 Jordan Tardif http://github.com/jordant # Jordan Tardif <jordan@dreamhost.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 3 of the Lic...
ChameleonCloud/openstack-nagios-plugins
openstacknagios/nova/Images.py
Python
gpl-3.0
2,216
from challenge47 import bleichenbacher def crack(): bleichenbacher(768)
troismph/matasano-challenges
src/challenge48.py
Python
gpl-3.0
78
def addStrings(s1, s2): """ type s1, s2: String rtype string """ digit2num = {"0":0, "1":1, "2":2, "3":3, "4":4, "5":5, "6":6, "7":7, "8":8, "9":9} pt1, pt2 = len(s1)-1, len(s2)-1 carry = 0 res = [] while pt1 >= 0 and pt2 >= 0: digit_sum = digit2num[s1[pt1]] + digit2num[s2[pt...
urashima9616/Leetcode_Python
Leet415_AddStrings.py
Python
gpl-3.0
975
# -*- coding: utf-8 -*- """Installer for the plone.formbuilder package.""" from setuptools import find_packages from setuptools import setup long_description = '\n\n'.join([ open('README.rst').read(), open('CONTRIBUTORS.rst').read(), open('CHANGES.rst').read(), ]) setup( name='plone.formbuilder', ...
tareqalam/plone.formbuilder
setup.py
Python
gpl-3.0
1,905
# -*- coding: utf-8 -*- """ Created on Sun Jan 15 23:32:44 2017 @author: Shabaka """ """ Import the package requests. Assign the URL of interest to the variable url. Package the request to the URL, send the request and catch the response with a single function requests.get(), assigning ...
qalhata/Python-Scripts-Repo-on-Data-Science
HTTP_Request_using_Requests.py
Python
gpl-3.0
821
import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np def separate_windows(arr): ret = dict() for k, v in zip(*arr): if k in ret: ret[k].append(v) else: ret[k] = [v] return ret def load_file(filename, *args, **kwargs): data = np.genfromtxt(...
dwysocki/trivial
doc/stats/plot.py
Python
gpl-3.0
2,722
__version__= '1.1.1' INFO_URL = 'https://github.com/ikreymer/webarchiveplayer'
machawk1/webarchiveplayer
archiveplayer/version.py
Python
gpl-3.0
79
#!/usr/bin/env python3 ####################################################################### #Copyright (C) 2015 Timothy Xu # # # #This program is free software: you can redistribute it and/or modify # #it under...
TimothyXu/nurdCase
nurdCase.py
Python
gpl-3.0
2,385
# -*- encoding: utf-8 -*- """Test class for Roles UI""" from ddt import ddt from fauxfactory import gen_string from nailgun import entities from robottelo.decorators import data from robottelo.helpers import generate_strings_list, invalid_names_list from robottelo.test import UITestCase from robottelo.ui.factory impor...
abalakh/robottelo
tests/foreman/ui/test_role.py
Python
gpl-3.0
3,848
import os from setuptools import setup, find_packages from jw2html import VERSION setup( name='JW2HTML', version=VERSION, description='JW2HTML converts an issue of the Jungle World from the website to a single HTML file to be used for epub conversion by e.g. calibre.', long_description='Alas, there is...
marmorkuchen/jw2html
setup.py
Python
gpl-3.0
1,182
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # bormeparser documentation build configuration file, created by # sphinx-quickstart on Sat Jun 27 16:25:25 2015. # # 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 ...
PabloCastellano/bormeparser
docs/conf.py
Python
gpl-3.0
11,422
# ================================================================================================== # # Copyright (c) 2016, Chen Kian Wee (chenkianwee@gmail.com) # # This file is part of py4design # # py4design is free software: you can redistribute it and/or modify # it under the terms of the GNU General ...
chenkianwee/envuo
py4design/pycitygml/write_gml.py
Python
gpl-3.0
37,271
class Instance: """ Instances class models. """ def __init__(self, instance_id, controller, parameters, description, status): self.id = instance_id self.controller = controller self.parameters = parameters self.description = description self.status = status
Crystal-SDS/dashboard
crystal_dashboard/dashboards/crystal/controllers/instances/models.py
Python
gpl-3.0
319
#! /usr/bin/python import base64 import sys f = open(sys.argv[1], "r") items = [] for line in f.readlines(): if len(line.strip()) == 0: continue if line[0] == "{": items.append(base64.b64encode(line.strip())) else: items.append(line.strip()) print ".".join(items)
mozilla-services/FindMyDevice
test/buildAssert.py
Python
mpl-2.0
303
# 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) 2017 Mozilla Corporation from positive_alert_test_case import PositiveAlertTestCase from negative_alert_...
Phrozyn/MozDef
tests/alerts/test_bruteforce_ssh.py
Python
mpl-2.0
7,170
from TeddyMapBase import TeddyMapBase from TfGun import TfGun class TeddyMapB(TeddyMapBase): #Raw string (r""") because backslashes # Lab "Other room" coded_grid=r""" /------------T-T----------------\ |............>-<................| |............|%|................| |............|.|................| ...
thomas-hori/Repuge-NG
TeddyMapB.py
Python
mpl-2.0
864
# encoding: utf-8 # # # 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/. # # Contact: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import, divis...
klahnakoski/jx-sqlite
vendor/jx_base/expressions/is_text_op.py
Python
mpl-2.0
1,090
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Import sile objects from .sile import * from sisl._internal import set_module from sisl import Geometry __all__ = [...
zerothi/sisl
sisl/io/molden.py
Python
mpl-2.0
1,873
L: List[int] = list(range(10)) # FINAL: L -> 0@[0, 0], 1@[1, 1], 2@[2, 2], _@[3, 9]; len(L) -> [10, 10]
caterinaurban/Lyra
src/lyra/unittests/numerical/interval/forward/indexing3/list_of_range1.py
Python
mpl-2.0
104
from xml.etree import ElementTree from memorize import memorize from memcached import memcached class BaseQueryEngine(object): """ TODO: Query engines are... """ def __init__(self, query): self.query = query self.results = self.search(query) def fetch(self, query): """ ...
chuckharmston/ghosttown
app/search/query/base.py
Python
mpl-2.0
2,733
# 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/. from urlparse import urlparse from marionette_driver import expected, Wait from firefox_ui_harness.decorators import s...
myrdd/firefox-ui-tests
firefox_ui_tests/functional/security/test_no_certificate.py
Python
mpl-2.0
3,597
from django.views.decorators.cache import never_cache from django.views.generic.base import RedirectView from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse_lazy from C4CApplication.views.utils import create_user class RemoveFavoriteRedirectView(RedirectView): ...
dsarkozi/care4care-sdp-grp4
Care4Care/C4CApplication/views/RemoveFavoriteRedirectView.py
Python
agpl-3.0
926
# Copyright (C) 2011 REES Marche <http://www.reesmarche.org> # # This file is part of ``django-flexi-auth``. # ``django-flexi-auth`` 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, version 3 of the Lic...
seldon/django-flexi-auth
flexi_auth/tests/models.py
Python
agpl-3.0
4,238
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2006 ACYSOS S.L. (http://acysos.com) # Pedro Tarrafeta <pedro@acysos.com> # Copyright (c) 2008 Pablo Rocandio. All Rights Res...
jaumemarti/l10n-spain-txerpa
l10n_es_payment_order/wizard/csb32.py
Python
agpl-3.0
10,991
import logging from django.http import HttpResponseBadRequest, HttpResponseForbidden from functools import wraps import groupbank_crypto.ec_secp256k1 as crypto logger = logging.getLogger(__name__) # decorator for verifying the payload is signed by the author of the request def verify_author(view): @wraps(view...
GroupBank/global-server
rest_app/decorators.py
Python
agpl-3.0
1,619
# -*- 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...
grap/OCB
addons/purchase/purchase.py
Python
agpl-3.0
71,343
# This file is part of VoltDB. # Copyright (C) 2008-2017 VoltDB Inc. # # 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 the # License, or (at your option) any later ver...
migue/voltdb
lib/python/vdm/server/Configuration.py
Python
agpl-3.0
59,480
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2009-2012: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you can redis...
wbsavage/shinken
shinken/misc/datamanagerhostd.py
Python
agpl-3.0
5,441
""" Tests for the logic in input type mako templates. """ from __future__ import absolute_import import json import unittest from collections import OrderedDict from lxml import etree from mako import exceptions from six.moves import range from capa.inputtypes import Status from capa.tests.helpers import capa_rende...
ESOedX/edx-platform
common/lib/capa/capa/tests/test_input_templates.py
Python
agpl-3.0
46,422
#!/usr/bin/python # -*- coding: latin-1 -*- # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation; either version 3, or (at your option) any later # version. # # This program is distributed in t...
pronexo-odoo/odoo-argentina
l10n_ar_pyafipws/pysimplesoap/pysimplesoap/server.py
Python
agpl-3.0
22,882
#-*- coding:utf-8 -*- # # # Copyright (C) 2011,2013 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # 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,...
bwrsandman/openerp-hr
hr_employee_legacy_id/__openerp__.py
Python
agpl-3.0
1,524
cast = ['Cleese', 'Palin', 'Jones', 'Idle'] movies = ['The Holy Grail', 1975, 'Terry Jones & Terry Gilliam', 91, ['Graham Chapman', ['Michael Palin', 'John Cleese', 'Terry Gilliam', 'Eric Idle', 'Terry Jones']]] fav_movies = ['The Holy Grail', 'The Life of Brian'] def print_lol(the_list): for each_item in the_list: ...
devtronics/Gitme
monty.py
Python
agpl-3.0
405
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you can r...
h4wkmoon/shinken
shinken/commandcall.py
Python
agpl-3.0
6,277
from uwcs_website.tournaments.models import * from django.contrib import admin admin.site.register(Tournament) admin.site.register(Allocation) admin.site.register(Match) admin.site.register(Game)
UWCS/uwcs-website
uwcs_website/tournaments/admin.py
Python
agpl-3.0
197
# -*- coding: utf-8 -*- ############################################################################## # # Trading As Brands # Copyright (C) 2015 OpusVL (<http://opusvl.com/>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
OpusVL/odoo-trading-as
trading_as/__openerp__.py
Python
agpl-3.0
1,741
# -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects # Copyright (C) 2015 OpenCraft <xavier@opencraft.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Soft...
brousch/opencraft
instance/models/server.py
Python
agpl-3.0
9,912
# Copyright (C) 2014 Linaro Ltd. # # 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 the # License, or (at your option) any later version. # # This program is distribute...
joyxu/kernelci-backend
app/utils/__init__.py
Python
agpl-3.0
5,533
#!/usr/bin/env python # Copyright (C) 2006-2021 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia 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 (FSF), e...
MTG/essentia
test/src/unittests/rhythm/test_superfluxextractor.py
Python
agpl-3.0
4,892
import datetime import feedparser import json import logging import random import re import string # pylint: disable=W0402 import urllib import uuid import time from django.conf import settings from django.contrib.auth import logout, authenticate, login from django.contrib.auth.models import User from django.con...
wwj718/edx-video
common/djangoapps/student/views.py
Python
agpl-3.0
50,206
""" Tests of modulestore semantics: How do the interfaces methods of ModuleStore relate to each other? """ from __future__ import absolute_import import itertools from collections import namedtuple import ddt from mock import patch from xblock.core import XBlock, XBlockAside from xblock.fields import Scope, String f...
jolyonb/edx-platform
common/lib/xmodule/xmodule/modulestore/tests/test_semantics.py
Python
agpl-3.0
19,838
import datetime import itertools import re import urllib2 import mimetypes import operator import logging import sys import traceback import warnings import tagging import tagging.models import vidscraper from bs4 import BeautifulSoup from django.conf import settings from django.contrib.auth.models import User from dj...
pculture/mirocommunity
localtv/models.py
Python
agpl-3.0
55,425
""" Tests of AssetLocators """ from unittest import TestCase import ddt from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import AssetKey, CourseKey from opaque_keys.edx.locator import AssetLocator, CourseLocator @ddt.ddt class TestAssetLocators(TestCase): """ Tests of :class:`AssetLocator` ...
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/opaque_keys/edx/tests/test_asset_locators.py
Python
agpl-3.0
4,313
# Copyright 2021 Creu Blanca # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class HrPersonalEquipmentRequest(models.Model): _inherit = "hr.personal.equipment.request" contains_ppe = fields.Boolean(compute="_compute_contains_ppe") def _compute_contains_p...
OCA/hr
hr_employee_ppe/models/hr_personal_equipment_request.py
Python
agpl-3.0
786
from __future__ import unicode_literals import csv import six from django.core.files.temp import NamedTemporaryFile from openpyxl import Workbook from openpyxl.writer.write_only import WriteOnlyCell class TableExporter(object): """ Class that abstracts out writing a table of data to a CSV or Excel file. Thi...
tsotetsi/textily-web
temba/utils/exporter.py
Python
agpl-3.0
2,852
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = 'Axe Cop' language = 'en' url = 'http://www.axecop.com/' start_date = '2010-01-02' rights = 'Ethan Nicolle' class Crawler(CrawlerBase): hist...
datagutten/comics
comics/comics/axecop.py
Python
agpl-3.0
766
# -*- coding: utf-8 -*- from __future__ import absolute_import from south.db import db from south.v2 import SchemaMigration class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Duracloud' db.create_table( u"locations_duracloud", ( (u"i...
artefactual/archivematica-storage-service
storage_service/locations/south_migrations/0006_duracloud.py
Python
agpl-3.0
25,555
# -*- coding: utf-8 -*- """ Learner data exporter for Enterprise Integrated Channel SAP SuccessFactors. """ from logging import getLogger from requests import RequestException from django.apps import apps from enterprise.models import EnterpriseCustomerUser, PendingEnterpriseCustomerUser from enterprise.tpa_pipelin...
edx/edx-enterprise
integrated_channels/sap_success_factors/exporters/learner_data.py
Python
agpl-3.0
9,167
import re import unicodedata from django.core.urlresolvers import reverse from django.core.exceptions import ObjectDoesNotExist # List of words you're not allowed to use as a slug RESERVED_KEYWORDS = [ "account", "add_to_network", "cache", "configuration", "content", "comment", "create", ...
numericube/twistranet
twistranet/twistapp/lib/slugify.py
Python
agpl-3.0
1,520
"""Kavumu box in Burundi""" from .idb_bdi import * # pragma: no flakes IDEASCUBE_NAME = "Kavumu"
ideascube/ideascube
ideascube/conf/idb_bdi_kavumu.py
Python
agpl-3.0
98
# profile.py # User profile pages for CedarRapidsOnline web service # Copyright (C) 2009 Clear Perception Solutions, LLC. # Written by Trevis J. Rothwell <tjr@gnu.org> # # This file is part of the CedarRapidsOnline web service. # # This program is free software: you can redistribute it and/or modify # it under the ter...
tjr/CedarRapidsOnline
profile.py
Python
agpl-3.0
12,392
""" Tests for waffle utils features. """ import ddt from django.test import TestCase from mock import patch from opaque_keys.edx.keys import CourseKey from waffle.testutils import override_flag from request_cache.middleware import RequestCache from .. import CourseWaffleFlag, WaffleFlagNamespace from ..models import ...
fintech-circle/edx-platform
openedx/core/djangoapps/waffle_utils/tests/test_init.py
Python
agpl-3.0
2,228
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2021 GEM Foundation # # OpenQuake 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, o...
gem/oq-engine
openquake/hazardlib/gsim/morikawa_fujiwara_2013.py
Python
agpl-3.0
14,534
from contextlib import contextmanager import binascii import os from pathlib import Path import tempfile from fabric import task from pkg_resources import parse_version DEFAULT_DIST_DIR = "dist" # run with # fab -H root@some_host --prompt-for-login-password deploy|build @contextmanager def temp(c): randomstr ...
renalreg/radar
fabfile.py
Python
agpl-3.0
4,141
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
SKIRT/PTS
evolve/genomes/nucleobases.py
Python
agpl-3.0
1,754
# 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 model 'Card' db.create_table('matches_card', ( ('id', self.gf('django.db.models.field...
OddBloke/moore
matches/migrations/0001_initial.py
Python
agpl-3.0
12,520
# -*- coding: UTF8 -*- import types from TestSuite import TestSuite, desc, catch from mqttcli import MqttClient from nyamuk.event import * from lib.env import gen_msg, debug class PubSub(TestSuite): tests = ( ('a/b/c', 'a/b/c'), ('a/b/c', 'a/b/d' , False), ('a/+/c', 'a/b/c'), ('a...
gbour/wave
tests/testsuite/002_pubsub.py
Python
agpl-3.0
2,550
# -*- coding: utf-8 -*- from openerp import models, fields, api class phaply(models.Model): """ This class will create a new table in DB with the same and replace the '.' with '_' """ _name = 'phaply.phaply' name = fields.Char(string='Ten KH') ngaysinh = fields.Date(string='Ngay sinh') ...
nathanaevitas/odoo
custom_addons/phaply/models.py
Python
agpl-3.0
1,552
#!/usr/bin/env python3 from erros import NaoConverge from numpy import matrix from numpy.linalg import inv from numpy.linalg import norm def SolucaoEqNLinearBroyden(xin, bi, tol, niter, F): xold = xin bold = matrix(bi) tolerancia = 1 while (tolerancia > tol and niter != -1): f = matrix(F...
paulocsanz/algebra-linear
scripts/eq_n_linear_broyden.py
Python
agpl-3.0
1,262
# -*- coding: utf-8 -*- # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, fields, models class Report(models.Model): _description = 'Report' _name = 'clv.report' _inherit = 'clv.abstract.report' _order =...
CLVsol/clvsol_odoo_addons
clv_report/models/report.py
Python
agpl-3.0
1,353
# -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # ...
CLVsol/odoo_addons
clv_employee/__openerp__.py
Python
agpl-3.0
1,966
# # rpclib - Copyright (C) rpclib contributors. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This lib...
martijnvermaat/rpclib
src/rpclib/test/wsdl/defult_services.py
Python
lgpl-2.1
1,359
import os import re import copy import collections import logging import MooseDocs import collections import subprocess import yaml log = logging.getLogger(__name__) class PagesHelper(object): """ A helper class for checking if a markdown file is include in the 'pages.yml' file. """ def __init__(self,...
katyhuff/moose
python/MooseDocs/MooseApplicationSyntax.py
Python
lgpl-2.1
13,523
"""This module contains a model element Diagram. Diagrams can be visualized and edited. """ from __future__ import annotations import logging import uuid from dataclasses import dataclass from functools import lru_cache from typing import Callable, Iterable, Iterator, Sequence, TypeVar, overload import gaphas from t...
amolenaar/gaphor
gaphor/core/modeling/diagram.py
Python
lgpl-2.1
12,125
############################################################################## # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
skosukhin/spack
lib/spack/spack/cmd/clone.py
Python
lgpl-2.1
3,972
# # ovirt-host-deploy -- ovirt host deployer # Copyright (C) 2015 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) ...
alonbl/ovirt-host-deploy
src/plugins/ovirt-host-common/hosted-engine/configureha.py
Python
lgpl-2.1
3,975
import __builtin__ import maps from tendrl.commons.utils.event_utils import emit_event def test_emit_event(): setattr(__builtin__, "NS", maps.NamedDict()) NS.publisher_id = 0 NS.node_context = maps.NamedDict(fqdn="test", node_id="0") NS.tendrl_context = maps.NamedD...
Tendrl/commons
tendrl/commons/tests/utils/test_event_utils.py
Python
lgpl-2.1
676
import re, os import util from InputParameters import InputParameters from MooseObject import MooseObject class Tester(MooseObject): @staticmethod def validParams(): params = MooseObject.validParams() # Common Options params.addRequiredParam('type', "The type of test of Tester to crea...
backmari/moose
python/TestHarness/testers/Tester.py
Python
lgpl-2.1
18,823
# # Copyright (C) 2000 Stefan Seefeld # Copyright (C) 2000 Stephen Davies # All rights reserved. # Licensed to the public under the terms of the GNU LGPL (>= 2), # see the file COPYING for details. # """Abstract Syntax Tree classes. This file contains classes which encapsulate nodes in the ASG. The base class is the ...
stefanseefeld/synopsis
Synopsis/ASG.py
Python
lgpl-2.1
19,516
# -*- coding: utf-8 -*- __all__ = ( "decorator_with_args", "well_behaved", "log_traceback", ) def decorator_with_args(old_decorator): """Enable arguments for decorators. Example: >>> @decorator_with_args def new_decorator(func, arg1, arg2): ... # it's the same a...
pombredanne/https-git.fedorahosted.org-git-kobo
kobo/decorators.py
Python
lgpl-2.1
2,067
from __future__ import division import sys if sys.version_info.major > 2: from importlib import reload from PySide import QtGui, QtCore import traceback import numpy as np import FreeCAD as App import FreeCADGui as Gui from ._tools import BaseTool, input_field, text_field from ._glider import draw_glider, draw_l...
booya-at/freecad_glider
freecad/freecad_glider/tools/line_tool.py
Python
lgpl-2.1
36,337
#-*- coding: UTF-8 -*- #-------------------------------------------------------------------------- # package : GenroPy web - see LICENSE for details # module gnrsqlclass : Genro Web structures implementation # Copyright (c) : 2004 - 2007 Softwell sas - Milano # Written by : Giovanni Porcari, Michele Bertoldi...
poppogbr/genropy
gnrpy/gnr/web/gnrwebstruct.py
Python
lgpl-2.1
85,061
from __future__ import print_function from argparse import ArgumentParser import logging from nptdms import tdms def main(): parser = ArgumentParser( description="List the contents of a LabView TDMS file.") parser.add_argument( '-p', '--properties', action="store_true", help="Include...
nmgeek/npTDMS
nptdms/tdmsinfo.py
Python
lgpl-3.0
1,875
# Copyright (c) 2017 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import configparser # For reading the legacy profile INI files. import io import json # For reading the Dictionary of Doom. import math # For mathematical operations included in the Dictionary of Doom. import os.path # ...
alephobjects/Cura2
plugins/LegacyProfileReader/LegacyProfileReader.py
Python
lgpl-3.0
10,008
#!/usr/bin/env python from urlparse import urlparse from socket import gethostbyname from spam import DomainInexistentException class SpamHausChecker(object): """spam checker using spamhaus""" IS_SPAM = 1 IS_NOT_SPAM = 2 def _query_spamhaus(self, spamhaus_zone): try: return getho...
fmarani/spam
spam/spamhaus.py
Python
lgpl-3.0
1,760
""" ADREST signals. """ from django.dispatch import Signal api_request_started = Signal() api_request_finished = Signal()
klen/adrest
adrest/signals.py
Python
lgpl-3.0
125
import re import urllib2 from BeautifulSoup import BeautifulSoup from encomenda import Encomenda, Status class CorreiosWebsiteScraper(object): def __init__(self, http_client=urllib2): self.url = 'http://websro.correios.com.br/sro_bin/txect01$.QueryList?P_ITEMCODE=&P_LINGUA=001&P_TESTE=&P_TIPO=001&P_...
efforia/eos-dashboard
pandora-ckz/pandora/correios/scraping.py
Python
lgpl-3.0
1,673
"""Base rope package This package contains rope core modules that are used by other modules and packages. """ __all__ = ["project", "libutils", "exceptions"]
python-rope/rope
rope/base/__init__.py
Python
lgpl-3.0
161
#! /usr/bin/env python # -*- coding: utf-8 -*- """Provides functions for creating a python classes from the cp2k_input.xml file. """ import xml.etree.cElementTree as cElementTree import utilities import textwrap #=============================================================================== def validify_section(st...
SINGROUP/pycp2k
inputparser.py
Python
lgpl-3.0
14,369
from coinpy.lib.serialization.structures.s11n_tx import TxSerializer from coinpy.model.constants.bitcoin import MAX_BLOCK_SIZE, is_money_range from coinpy.lib.serialization.scripts.serialize import ScriptSerializer class TxVerifier(): def __init__(self, runmode): self.runmode = runmode self.tx_ser...
sirk390/coinpy
coinpy-lib/src/coinpy/lib/transactions/tx_checks.py
Python
lgpl-3.0
2,364
# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import Any, cast, List, Optional from PyQt5.QtCore import pyqtProperty, pyqtSignal, QObject from UM.Application import Application from UM.Decorators import override from UM.FlameProfiler import pyqtSlot from U...
Patola/Cura
cura/Settings/CuraContainerStack.py
Python
lgpl-3.0
18,426
# -*- coding: utf-8 -*- import os import errno import stat import unicodedata import hashlib import shutil import logging import config class Fsdb(object): """File system database expose a simple api (add,get,remove) to menage the saving of files on disk. files are placed under specified fs...
boyska/pyFsdb
fsdb/Fsdb.py
Python
lgpl-3.0
9,607
#!/bin/python #hfjimenez@utp.edu.co import sys n = int(raw_input().strip()) arr = map(int,raw_input().strip().split(' ')) #Map the input suma=0 for i in arr: suma=suma+i print(suma)
heticor915/ProgrammingContest
HackerRank/Challenges/VerybigSum.py
Python
lgpl-3.0
193
#adapted from ColorWall by jesstesstest _font = ( ( ("########"), ("##....##"), ("#.#..#.#"), ("#..##..#"), ("#..##..#"), ("#.#..#.#"), ("##....##"), ("########") ), ( ("########"), ("##....##"), ("#.#..#.#"), ("#..##..#"), ("#..##..#"), ("#.#..#.#"), ("...
602p/orth
os/kernel/font/font.py
Python
lgpl-3.0
19,506
#*******************************************************************************************# #********* Object names and its number of occurrences **************************************# #********* by Djordje Spasic ***************************************************************# #********* issworld2000@yahoo.com 08-F...
stgeorges/pythonscripts
object_names_No_occurrences.py
Python
unlicense
2,663
def pitagoras_quad(coordenada): return coordenada[0] ** 2 + coordenada[1] ** 2 def pitagoras(coordenada): return pitagoras_quad(coordenada)**0.5 def coords_delta(coord_a, coord_b): delta = [] delta.append(coord_a[0] - coord_b[0]) delta.append(coord_a[1] - coord_b[1]) return delta def coord...
jeffque/circle-quest-squareland
elements/geometry.py
Python
unlicense
969
import numpy as np import copy import datetime as dt import QSTK.qstkutil.qsdateutil as du import QSTK.qstkutil.DataAccess as da import QSTK.qstkstudy.EventProfiler as ep from bollinger import Bollinger """ Accepts a list of symbols along with start and end date Returns the Event Matrix which is a pandas Datamatrix E...
RoyNexus/python
homework6.py
Python
unlicense
3,193