code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
from bcpp_subject_form_validators import MedicalDiagnosesFormValidator from ..constants import ANNUAL from ..models import MedicalDiagnoses from .form_mixins import SubjectModelFormMixin class MedicalDiagnosesForm (SubjectModelFormMixin): form_validator_cls = MedicalDiagnosesFormValidator optional_labels =...
botswana-harvard/bcpp-subject
bcpp_subject/forms/medical_diagnoses_form.py
Python
gpl-3.0
622
#!/usr/bin/python # (c) 2012, Mark Theunissen <mark.theunissen@gmail.com> # Sponsored by Four Kitchens http://fourkitchens.com. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software...
privateip/ansible-modules-core
database/mysql/mysql_user.py
Python
gpl-3.0
22,945
''' Created on 11/02/2010 @author: henry@henryjenkins.name ''' class webInterface(object): ''' classdocs ''' writeFile = None def __init__(self): pass def __openFile(self, fileName): self.writeFile = open(fileName, 'w') def closeFile(self): self.w...
steakunderscore/Bandwidth-Monitoring
src/webInterface.py
Python
gpl-3.0
3,059
# -*- coding:utf-8 -*- import vcr from django.conf import settings from django.test import TestCase from django.urls import reverse_lazy from estacaometeorologica.core.models import EstacaoMeteorologica from estacaometeorologica.core.api_morangos import get_data class IndexViewTestCase(TestCase): @vcr.use_cas...
RedeNeural/estacao-meteorologica
estacaometeorologica/core/tests/test_views.py
Python
gpl-3.0
1,274
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('obligarcy', '0006_auto_20151009_1947'), ] operations = [ migrations.AlterField( ...
polypmer/obligarcy
obligarcy/migrations/0007_auto_20151010_2304.py
Python
gpl-3.0
696
# foreman imports import hashlib from foreman.model import User, ForemanOptions, UserRoles, Case, UserCaseRoles, CaseType, CaseClassification, CaseStatus from foreman.model import TaskType, Task, TaskStatus, UserTaskRoles, EvidenceType, Evidence, TaskUpload, EvidenceStatus from foreman.model import EvidencePhotoUpload...
ubunteroz/foreman
foreman/utils/population.py
Python
gpl-3.0
30,432
# encoding: utf8 ''' 随机变量的积分变换 下面的基于U(0,1)实现了几个常用的连续随机变量概率分布的随机数模拟 U(0,1) 在0,1区间的连续均匀分布的随机数模拟 CDF: cumulate distribution function PMF: probility mass function PDF: probility density function 对任意随机变量X, 它有连续的的CDF F(x), 定义随机变量 Y=F(X), 则Y为 [0,1]上的均匀分布,即有 P(Y<=y) = y box-muller方法并没有了解原理 ''' import numpy as np import ...
dhwang99/statistics_introduction
probility/gen_dist_from_U.py
Python
gpl-3.0
6,855
''' Created on Apr 4, 2015 @author: mshepher ''' from django.utils.safestring import mark_safe from django_tables2.utils import A # alias for Accessor import django_tables2 as tables from models import Taste, Product, Order, Owner, Pet, PickList # from setuptools.dist import sequence class ProductTable(tables.Tabl...
micha-shepher/oervoer-wizard
oervoer-django/oervoer/src/wizard/tables.py
Python
gpl-3.0
5,346
# coding: utf-8 from .dvr_base import DVRBase import api import struct from io import BytesIO from tornado import gen @gen.engine def call_dvr_cmd(dvr_reader, func, *args, callback, **kwargs): stream = yield gen.Task(api.connect, dvr_reader.host, dvr_reader.port) if stream: def on_result(data): ...
BradburyLab/show_tv
show_tv/app/models/dvr_reader.py
Python
gpl-3.0
3,838
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime class Migration(migrations.Migration): dependencies = [ ('game', '0012_auto_20150301_2207'), ] operations = [ migrations.AddField( model_name='team', ...
gnunixon/sport-news-writer
writer/game/migrations/0013_auto_20150303_1108.py
Python
gpl-3.0
847
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui/preferencesDialog.ui' # # Created: Sat Jul 25 12:17:10 2015 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 e...
LegoStormtroopr/canard
SQBLWidgets/sqblUI/preferencesDialog.py
Python
gpl-3.0
10,899
from nose.tools import * import dummy.pipelines.dummy def setup(): print("SETUP") def teardown(): print("TEARDOWN") def test_basic(): print("Ejecutando test_basic")
nanounanue/pipeline-template
tests/pipeline_tests.py
Python
gpl-3.0
183
# -*- coding: utf-8 -*- import re import string import random import pbkdf2 HASHING_ITERATIONS = 400 ALLOWED_IN_SALT = string.ascii_letters + string.digits + './' ALLOWD_PASSWORD_PATTERN = r'[A-Za-z0-9@#$%^&+=]{8,}' def generate_random_string(len=12, allowed_chars=string.ascii_letters+string.digits): return ''....
takearest118/coconut
common/hashers.py
Python
gpl-3.0
1,030
from datetime import datetime, timedelta def formatFrameToTime(start, current, frameRate): total = current - start seconds = float(total) / float(frameRate) minutes = int(seconds / 60.0) seconds -= minutes * 60 return ":".join(["00", str(minutes).zfill(2), str(round(seconds, ...
dsparrow27/zoocore
zoo/libs/utils/timeutils.py
Python
gpl-3.0
1,936
''' A simple module for Sopel (http://sopel.chat) to get horoscope information from a JSON API and put it back into chat All orignal code written by: BluDragyn. (www.bludragyn.net) This module is released under the terms of the GPLv3 (https://www.gnu.org/licenses/gpl-3.0.en.html) If you use and like this module, pl...
KaoticEvil/Sopel-Modules
horoscope.py
Python
gpl-3.0
1,835
#!/usr/bin/env python # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Prints the results of an Address record lookup, Mail-Exchanger record lookup, and Nameserver record lookup for the given hostname for a given hostname. To run this script: $ python testdns.py <hostname> e.g.: $ python t...
kernel-sanders/arsenic-mobile
Dependencies/Twisted-13.0.0/doc/names/examples/testdns.py
Python
gpl-3.0
1,653
import pandas as pd from matplotlib import cm import matplotlib.pyplot as plt from pydlv import dl_model_3, data_reader, data_analyser, dl_generator, dl_plotter, trajectory_plotter ''' This script demonstrates how, using coefficients from the csv file generated previously, plot a 3d surface of decision landscapes fitt...
cherepaha/PyDLV
demos/plot_compare_dlv_three_blocks.py
Python
gpl-3.0
2,266
# -*- encoding: utf-8 -*- from abjad.tools.datastructuretools import TreeContainer class GraphvizTableRow(TreeContainer): r'''A Graphviz table row. ''' ### CLASS VARIABLES ### __documentation_section__ = 'Graphviz' __slots__ = () ### INITIALIZER ### def __init__( self, ...
mscuthbert/abjad
abjad/tools/documentationtools/GraphvizTableRow.py
Python
gpl-3.0
1,133
import numpy import bob.bio.spear # The authors of CQCC features recommend to use only first 20 features, plus deltas and delta-deltas # feature vector is 60 in this case cqcc20 = bob.bio.spear.extractor.CQCCFeatures( features_mask=numpy.r_[ numpy.arange(0, 20), numpy.arange(30, 50), numpy.arange(60, 80) ...
bioidiap/bob.bio.spear
bob/bio/spear/config/extractor/cqcc20.py
Python
gpl-3.0
328
# -*- coding: utf-8 -*- # Scrapy settings for spider project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # http://doc.scrapy.org/en/latest/topics/settings.html # http://scrapy.readthedocs.org/en/latest/...
LaveyD/spider
spider/settings.py
Python
gpl-3.0
3,490
''' MAP Client, a program to generate detailed musculoskeletal models for OpenSim. Copyright (C) 2012 University of Auckland This file is part of MAP Client. (http://launchpad.net/mapclient) MAP Client is free software: you can redistribute it and/or modify it under the terms of the GNU General Publi...
MusculoskeletalAtlasProject/mapclient-src
mapclient/widgets/workflowgraphicsview.py
Python
gpl-3.0
10,128
# !/usr/bin/env python3 # -*- coding: utf-8 -*- import sys try: from PyQt4.QtGui import QApplication, QKeySequence except ImportError: from PyQt5.QtWidgets import QApplication from PyQt5.QtGui import QKeySequence from pygs import QxtGlobalShortcut def hotkeyBinding(): SHORTCUT_SHOW = "Ctrl+Alt+S" # ...
LeunamBk/translatorPy
globalHotkeys.py
Python
gpl-3.0
950
""" This code is from MAD-X twiss.f90. It is used to allow comparisons between the MAD-X tensor and the generated code for MAD8 or Transport style tensor computation. """ import numpy as np from numpy import sqrt, cos, sin, cosh, sinh zero = 0 one = 1 two = 2 three = 3 four = 4 six = 6 nine = 9 twelve = 12 fifteen = 1...
chernals/georges
georges/manzoni/maps/madx_combined_dipole.py
Python
gpl-3.0
11,408
#my_circle_class.py class Circle: def __init__(self, x, y, r): self.x = x self.y = y self.r = r def area(self): return 3.14 * self.get_radius() * self.get_radius() @property def r(self): return self._r @r.setter def r(self, radius): if r < 0: raise ValueError('Radius should be positive') ...
vensder/itmo_python
my_circle_class.py
Python
gpl-3.0
458
# This file is part of the markuz_youtube_downlaoder project # # Copyright (c) 2011 Marco Antonio Islas Cruz # # markuz_youtube_downlaoder 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 th...
markuz/makuz_youtube_downloader
libmyd/variables.py
Python
gpl-3.0
1,053
def address(self, data): self.irc.send(self.privmsg("512 Shaw Court #105, Severn, MD 21144"))
Unallocated/UAS_IRC_Bot
modules/address.py
Python
gpl-3.0
195
# Global configuration information used across all the # translations of documentation. # # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' # Add any Sphinx extension module names here, as stri...
alchemy-fr/Phraseanet-Docs
config/all.py
Python
gpl-3.0
7,172
import numpy, math, json, os, ROOT, scipy.special, scipy.interpolate __GRAPHIX__ = 'ROOT' def GetNSigmas(chi2): sigmas = numpy.linspace(0,20,1000) prob = map(lambda x : scipy.special.erf(x/math.sqrt(2)), sigmas) f = scipy.interpolate.interp1d(prob,sigmas,kind='linear') return f(1-chi2) class CorrelationFuncti...
mgarciafernandez/magnipy
magnipy.py
Python
gpl-3.0
4,413
import sqlite3 # sqlite 3 database import file_check_ex # to check if there is a file import database # creating, editing, deleting the database import intCheck # check that it is an integar option = None # choose what manu option they want sqlite_file = "" # the name of the sqlite3 file option_list = (0, 1, 2, 3) # ...
RincewindLangner/Game_database
V12/gamefile_load.py
Python
gpl-3.0
1,469
import pytest import unittest from fs_radar.path_filter import makePathFilter, makeDirFilter class MakePathFilterTest(unittest.TestCase): def test_empty_rules(self): f = makePathFilter([]) assert f('') is False assert f('foo.txt') is False def test_file_at_any_depth(self): ...
riquito/fs-radar
tests/test_path_filter.py
Python
gpl-3.0
6,014
#coding: utf-8 from fabric.api import * def instalacion(): run('sudo git clone https://github.com/Sergiopopoulos/IV-perezmolinasergio') run('cd IV-perezmolinasergio && sudo pip install -r requirements.txt') def ejecucion(): run('cd IV-perezmolinasergio && nohup sudo -E gunicorn app.wsgi -b 0.0.0.0:80 &', pty=Fa...
Sergiopopoulos/IV-perezmolinasergio
iaas/fabfile.py
Python
gpl-3.0
330
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import pootle.models.duedate class Migration(migrations.Migration): dependencies = [ ("pootle", "0001_initial"), ] operations = [ migrations.AlterField( model_name="dueda...
evernote/zing
pootle/migrations/0002_duedate_path_unique.py
Python
gpl-3.0
590
""" Copyright 2014, March 21 Written by Pattarapol (Cheer) Iamngamsup E-mail: IAM.PATTARAPOL@GMAIL.COM Pandigital prime Problem 41 We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once. For example, 2143 is a 4-digit pandigital and is also prime...
pattarapol-iamngamsup/projecteuler_python
problem_041.py
Python
gpl-3.0
1,724
#!/usr/bin/env python # TODO.TXT-CLI-python # Copyright (C) 2011-2012 Sigmavirus24 # # 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 ...
mstave/Todo.txt-python
todo.py
Python
gpl-3.0
36,444
# start of a UI art class import subprocess class Art(object): def __init__(self): """Define some artistic constants""" ## Artistic structures self.title_len = 72 self.flare = "~" self.flare2 = ":" self.title_start = 10*self.flare self.underline = self.title_...
flipdazed/SoftwareDevelopment
game_art.py
Python
gpl-3.0
6,677
# Week 5 - 11) Based on the Python Code or the C++ Code Provided in class as a # starting point, implement the binary search tree node, delete # function. class Node(object): def __init__(self, value): self.value=value self.next=None self.prev=None class List(obje...
readw/210CT-Coursework
Basic-Py/11-TreeNodeDelete.py
Python
gpl-3.0
3,026
#__*__coding:utf-8__*__ import urllib import urllib2 URL_IP = 'http://127.0.0.1:8000/ip' URL_GET = 'http://127.0.0.1:8000/get' def use_simple_urllib2(): response = urllib2.urlopen(URL_IP) print '>>>>Response Headers:' print response.info() print '>>>>Response Body:' print ''.join([line for line i...
ctenix/pytheway
imooc_requests_urllib.py
Python
gpl-3.0
978
# # Copyright 2016 Red Hat | Ansible # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ...
2ndQuadrant/ansible
lib/ansible/module_utils/docker/common.py
Python
gpl-3.0
41,527
# Copyright (c) Mathias Kaerlev 2012. # This file is part of pyspades. # pyspades 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. # ...
piqueserver/piqueserver
piqueserver/scheduler.py
Python
gpl-3.0
1,666
#!/usr/bin/env python import os import os.path import sys import string ############################################################### ## # ## Edyta Malolepsza # ## David Wales' group, University of Cambridge ...
marktoakley/LamarckiAnt
SCRIPTS/AMBER/symmetrise_prmtop/perm-prmtop.ff03ua.py
Python
gpl-3.0
31,681
#!/usr/bin/python # -*- coding: utf-8 -*- from lib.meos import MEoS from lib import unidades class MD2M(MEoS): """Multiparameter equation of state for decamethyltetrasiloxane""" name = "decamethyltetrasiloxane" CASNumber = "141-62-8" formula = "C10H30Si4O3" synonym = "MD2M" rhoc = unidades.De...
edusegzy/pychemqt
lib/mEoS/MD2M.py
Python
gpl-3.0
2,498
import sys import time sys.stdout.write("stdout!") sys.stderr.write("stderr!")
leanrobot/contestsite
team/scripts/python/correct.py
Python
gpl-3.0
79
# -*- coding: utf-8 -*- out = open('wil_orig.words.out', 'w') for line in open('wil_orig_utf8_slp1.txt').xreadlines(): line = line.strip() if ".{#" in line: word = line.split('{#')[1].split('#}')[0].split(' ')[0].split('(')[0].split(',')[0].split('.')[0].split('/')[0].split('\\')[0].split('-')[0].split('{')[0]...
sanskritiitd/sanskrit
dictionary/sanskrit-english/wil.py
Python
gpl-3.0
442
#!/usr/bin/env python3 import os from typing import Optional import requests from bs4 import BeautifulSoup import pysonic.utils as utils base_url = "https://api.genius.com" def get_token() -> Optional[str]: user_home_path = utils.get_home() try: with open(os.path.join(user_home_path, "genius_api_...
jonwedell/pysonic
pysonic/lyrics.py
Python
gpl-3.0
2,420
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-03-21 13:53 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('erudit', '0086_auto_20180321_0717'), ] operations = [ migrations.RemoveField( ...
erudit/zenon
eruditorg/erudit/migrations/0087_auto_20180321_0853.py
Python
gpl-3.0
481
# Natural Language Toolkit: Glue Semantics # # Author: Dan Garrette <dhgarrette@gmail.com> # # Copyright (C) 2001-2010 NLTK Project # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT import os import nltk from nltk.internals import Counter from nltk.parse import * from nltk.parse import MaltPar...
markgw/jazzparser
lib/nltk/sem/glue.py
Python
gpl-3.0
27,061
# -*- coding: utf-8 -*- # # Copyright 2017-18 Nick Boultbee # This file is part of squeeze-alexa. # # squeeze-alexa 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...
declension/squeeze-alexa
squeezealexa/__init__.py
Python
gpl-3.0
1,050
#!/usr/bin/env python ''' Handles access to the WebDAV's server creditentials. ''' from collections import namedtuple import secretstorage APPLICATION_NAME = "davify" FileStorage = namedtuple('FileStorage', 'username password protocol server port path') def get_secret_storage(): bus =...
AlbertWeichselbraun/davify
src/davify/keyring.py
Python
gpl-3.0
1,784
from contrib.rfc3315.constants import * from contrib.rfc3633.dhcpv6_pd import DHCPv6PDHelper from scapy.all import * from veripy.assertions import * class RenewMessageTestCase(DHCPv6PDHelper): """ Requesting Router Initiated: Renew Message Verify that a device can properly interoperate while using DHCPv6...
mwrlabs/veripy
contrib/rfc3633/dr/renew_message.py
Python
gpl-3.0
1,596
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _, msgprint from frappe.utils import flt,cint, cstr, getdate from erpnext.accounts.party import get_party_details from...
ovresko/erpnext
erpnext/controllers/buying_controller.py
Python
gpl-3.0
29,596
# -*-coding: utf-8 -*- from zope.interface import implementer from ..interfaces import ( IResourceType, ) from ..resources import ( ResourceTypeBase, ) from ..lib.utils.common_utils import translate as _ @implementer(IResourceType) class ResourcesTypesResource(ResourceTypeBase): __name__ = 'resources_ty...
mazvv/travelcrm
travelcrm/resources/resources_types.py
Python
gpl-3.0
643
import os import zlib from collections import MutableSequence, Iterable, Sequence, Sized from itertools import chain from numbers import Real, Integral import operator from functools import reduce from warnings import warn from threading import Lock import tempfile import urllib.parse import urllib.request import bott...
hugobuddel/orange3
Orange/data/table.py
Python
gpl-3.0
56,380
#!/usr/bin/env python # -*- coding: utf-8 -*- import serial import time import serial.tools.list_ports #import json import matplotlib.pyplot as plt import matplotlib.animation as animation from matplotlib import style from matplotlib.gridspec import GridSpec #from mpl_toolkits.mplot3d import Axes3D #import threading i...
Debaq/Triada
CP_Marcha/TUG.py
Python
gpl-3.0
8,883
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'combotest.ui' # # Created: Wed Feb 29 11:35:04 2012 # by: PyQt4 UI code generator 4.7.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_Form(object): def setupUi(self, Form): ...
tbttfox/TwistyTools
ttUI/QtFiles/combo.py
Python
gpl-3.0
899
from functions import logger,search, messagestorage, search import pprint import datetime DESC="Tells you something about yourself or a user" USAGE="userinfo" async def init(bot): chat=bot.message.channel try: user = bot.message.author if len(bot.args) > 0: if len(bot.message.raw_m...
Tsumiki-Chan/Neko-Chan
commands/userinfo.py
Python
gpl-3.0
3,277
__author__ = 'mk' import matplotlib.pyplot as plt import sys import math import numpy as np dataDir = sys.argv[1] resDir = sys.argv[2] plt.figure(figsize=(8,4)) algLabel=['naive','cou','zigzag','pingpong','MK','LL'] for i in range(0,6,1): filePath = dataDir + str(i) + '_overhead.dat' file = open(filePath) ...
bombehub/SEconsistent
diagrams/overhead_savePDF.py
Python
gpl-3.0
699
# adapted from https://gist.github.com/cliffano/9868180 import json import os FIELDS = os.environ.get('ANSIBLE_HUMAN_LOG_FIELDS') if FIELDS: FIELDS = FIELDS.split(',') if not FIELDS: FIELDS = ['stdout', 'stderr'] def human_log(callback, host, res): if hasattr(res, 'startswith'): if callback == '...
soarpenguin/python-scripts
human_log.py
Python
gpl-3.0
2,511
# This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. import vobject from trytond.tools import reduce_ids, grouped_slice from trytond.transaction import Transaction from trytond.pool import Pool, PoolMeta __all__ = ['Event'] __...
tryton/calendar_classification
calendar_.py
Python
gpl-3.0
5,284
#!/usr/bin/python # -*- coding: utf-8 -*- import os import setuptools def main(): setuptools.setup( name = "media_editing", version = "2018.03.26.0007", description = "media editing", long_description = long_description(), url = "htt...
wdbm/media_editing
setup.py
Python
gpl-3.0
1,765
""" Create quiz TimeSpecialCase for all students in a particular lab/tutorial section. Usage will be like: ./manage.py special_case_tutorial 2020su-cmpt-120-d1 q1 D101 '2021-10-07T09:30' '2021-10-07T10:30' """ import datetime from django.core.management.base import BaseCommand from django.db import transaction from ...
sfu-fas/coursys
quizzes/management/commands/special_case_tutorial.py
Python
gpl-3.0
1,849
# python-modeled # # Copyright (C) 2014 Stefan Zimmermann <zimmermann.code@gmail.com> # # python-modeled 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 op...
userzimmermann/python-modeled
modeled/member/dict.py
Python
gpl-3.0
2,359
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful,...
turdusmerula/kicad-plugins
pcbnew/python/plugins/sfm10_wizard.py
Python
gpl-3.0
6,078
from ovito.io import import_file import numpy.linalg node = import_file("simulation.dump") cell = node.source.cell # Compute simulation cell volume by taking the determinant of the # left 3x3 submatrix: volume = abs(numpy.linalg.det(cell.matrix[0:3,0:3])) # Make cell twice as large along the Y direction by scaling t...
srinath-chakravarthy/ovito
doc/python/example_snippets/simulation_cell.py
Python
gpl-3.0
503
#!/usr/bin/env python """Simple STUN client for getting external IP address. Based on stun.py from https://github.com/myers/html5_udp_to_server, but heavily simplified (dropped Twisted dependency, only supports old RFC 3489) """ import os, socket, struct, math BINDING_REQUEST = 0x0001 BINDING_RESPONSE = 0x0101 MAPPED...
xmikos/qopenvpn
qopenvpn/stun.py
Python
gpl-3.0
4,389
from __future__ import division import encoder import socket_class as socket import threading import time import sys rightC,leftC = (0,0) s = None IP = "10.42.0.1" host = 50679 class sendData(threading.Thread): def __init__(self,waitTime): self.waitTime = waitTime threading.Thread.__init__(self) ...
surajshanbhag/Indoor_SLAM
src/control/piControl/encoderRun.py
Python
gpl-3.0
1,623
# -*- coding: utf-8 -*- """nodoctest Configure and Start a Notebook Server The :class:`NotebookObject` is used to configure and launch a Sage Notebook server. """ ############################################################################# # Copyright (C) 2007 William Stein <wstein@gmail.com> # ...
migeruhito/sagenb
sagenb/notebook/notebook_object.py
Python
gpl-3.0
14,029
# -*- coding: utf-8 -*- """ Copyright 2013 Ryan Olson This file is part of CloudApp. CloudApp 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 versio...
ryanolson/CloudApp
cloudapp/identity.py
Python
gpl-3.0
3,128
# This python module is part of the oocs scanner for Linux. # Copyright (C) 2015 Davide Madrisan <davide.madrisan.gmail.com> import glob from os import sep from os.path import join from pwd import getpwuid from oocs.filesystem import Filesystems, UnixCommand, UnixFile from oocs.io import Config, message_add, quote, u...
madrisan/pyoocs
oocs/services.py
Python
gpl-3.0
6,244
# -*- encoding: utf-8 -*- """Unit tests for the ``hosts`` paths. An API reference can be found here: http://theforeman.org/api/apidoc/v2/hosts.html :Requirement: Host :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: API :TestType: Functional :CaseImportance: High :Upstream: No """ from fauxfac...
kbidarkar/robottelo
tests/foreman/api/test_host.py
Python
gpl-3.0
53,992
# -*- coding: utf-8 -*- # # This file is part of the VecNet OpenMalaria Portal. # For copyright and licensing information about this package, see the # NOTICE.txt and LICENSE.txt files in its top-level directory; they are # available at https://github.com/vecnet/om # # This Source Code Form is subject to the terms of t...
vecnet/om
website/tests/test_middleware.py
Python
mpl-2.0
1,263
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from ..extensions import db class Backup(db.Model): __tablename__ = 'ibati_backup' id = db.Column(db.Integer, primary_key=True) date_str = db.Column(db.String(14), nullable=False) zip_file = db.Column(db.String(255)) ...
whypro/IBATI
ibati/models/backup.py
Python
mpl-2.0
350
FTP_SERVER = "stage.mozilla.org" FTP_USER = "ffxbld" FTP_SSH_KEY = "~/.ssh/ffxbld_dsa" FTP_UPLOAD_BASE_DIR = "/pub/mozilla.org/mobile/candidates/%(version)s-candidates/build%(buildnum)d" DOWNLOAD_BASE_URL = "http://%s%s" % (FTP_SERVER, FTP_UPLOAD_BASE_DIR) APK_BASE_NAME = "fennec-%(version)s.%(locale)s.android-arm.apk"...
ctalbert/mozharness
configs/partner_repacks/release_mozilla-release_android.py
Python
mpl-2.0
1,585
"""Application specific storage.""" import wx from sound_lib.output import Output from gmusicapi import Mobileclient name = 'GMP3' __version__ = '4.3.0' db_version = 1 url = 'https://github.com/chrisnorman7/gmp3' app = wx.App(False) app.SetAppName(name) paths = wx.StandardPaths.Get() output = Outpu...
chrisnorman7/gmp3
application.py
Python
mpl-2.0
686
""" This is helper module to profile the whole package in Python 3.7 profiling modules from command line will be supported and this module will no longer be needed """ import cProfile from .__main__ import main if __name__ == "__main__": cProfile.run("main()", filename=".nemchmarker.cprofile")
undertherain/benchmarker
benchmarker/__profile__.py
Python
mpl-2.0
301
# Shuts down the indexer instance. # Usage: terminate-indexer.py <indexer-instance-id> import sys import boto3 client = boto3.client('ec2') indexerInstanceId = sys.argv[1] terminate = [indexerInstanceId] client.terminate_instances(InstanceIds=terminate)
bill-mccloskey/mozsearch
infrastructure/aws/terminate-indexer.py
Python
mpl-2.0
257
from django.http import HttpResponse, HttpResponseRedirect, HttpResponsePermanentRedirect from mezgrman.utils.classes import ExtendedTemplateResponse from django.template import RequestContext, Template from .models import StaticPage, StaticPageGroup from django.conf import settings from django.db.models import Q impo...
Mezgrman/mezgrmanDE
staticpages/middleware.py
Python
agpl-3.0
4,812
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # LICENSE # # Copyright (c) 2010-2017, GEM Foundation, G. Weatherill, M. Pagani, # D. Monelli. # # The Hazard Modeller's Toolkit is free software: you can redistribute # it and/or modify it under the terms of the GNU Affero Gene...
gem/oq-hazardlib
openquake/hmtk/sources/source_conversion_utils.py
Python
agpl-3.0
5,833
import time import base64 import binascii import hashlib import logging import paramiko import random import string import yaml try: from io import StringIO except ImportError: from StringIO import StringIO from heatclient.exc import HTTPException, HTTPNotFound from keystoneauth1.exceptions.http import HttpEr...
hastexo/hastexo-xblock
hastexo/provider.py
Python
agpl-3.0
27,375
from . import attachment from . import account from . import partner from . import company
OCA/l10n-italy
l10n_it_fatturapa_in/models/__init__.py
Python
agpl-3.0
91
# -*- coding: utf-8 -*- # © 2016 Comunitea # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import api, fields, models class GeneralLedgerReportWizard(models.TransientModel): _inherit = "general.ledger.report.wizard" @api.onchange('company_id') def onchange_company_id(self): ...
Comunitea/CMNT_00098_2017_JIM_addons
jim_invoice/models/general_ledger_wizard.py
Python
agpl-3.0
545
import requests import ujson as json BASE_URL = 'http://localhost:8088/' # set the port and IP address correct USERNAME = '<Your username here>' PASSWD = '<Your password here>' TOKEN = '' # will be filled in by the login request VERBOSE = 1 # verbose 0 => No output, 1 => minimal output, 2 => full output def creat...
openmotics/gateway
tools/api-tester.py
Python
agpl-3.0
3,464
"""Base integration test for provider implementations.""" import unittest import json import mock from contextlib import contextmanager from django import test from django.contrib import auth from django.contrib.auth import models as auth_models from django.contrib.messages.storage import fallback from django.contri...
lduarte1991/edx-platform
common/djangoapps/third_party_auth/tests/specs/base.py
Python
agpl-3.0
49,331
''' Created on Sep 24, 2009 Parse the RSS feed from mediafax, gets the links from it and then fetches the pages with the news. The code: - gets the rss feed from mediafax. That contains about the past 10 days. - gets out the links and fetches the news content. - saves the meta information plus the real content ...
pistruiatul/hartapoliticii
python/src/ro/vivi/news_parser/rss_parse_mediafax.py
Python
agpl-3.0
4,249
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2004-2014 Pexego Sistemas Informáticos All Rights Reserved # $Marta Vázquez Rodríguez$ <marta@pexego.es> # # This program is free software: you can redistribute it and/or modify # it unde...
jgmanzanas/CMNT_004_15
project-addons/sale_display_stock/__openerp__.py
Python
agpl-3.0
1,737
import random from sunlight import openstates, response_cache from . import DataProvider from ...campaign.constants import (TARGET_CHAMBER_BOTH, TARGET_CHAMBER_UPPER, TARGET_CHAMBER_LOWER, ORDER_IN_ORDER, ORDER_SHUFFLE, ORDER_UPPER_FIRST, ORDER_LOWER_FIRST) class USStateData(DataProvider): KEY_OPENSTATE...
poppingtonic/call-power
call_server/political_data/countries/us_state.py
Python
agpl-3.0
3,011
""" A Python interface to the primer3_core executable. TODO: it is not possible to keep a persistent primer3 process using subprocess module - communicate() terminates the input stream and waits for the process to finish Author: Libor Morkovsky 2012 """ # This file is a part of Scrimer. # See LICENSE.t...
libor-m/scrimer
scrimer/primer3_connector.py
Python
agpl-3.0
7,094
from easyos import easyos import random import string def return_or_make_secret_key(secret_key_file): # If we don't have a secret access key for signing sessions, make one try: with open(secret_key_file, "r") as f: return f.read() except IOError: print("Creating secret_key file"...
tristanfisher/ffi4wd
config.py
Python
agpl-3.0
755
""" Logout Page for Studio """ from bok_choy.page_object import PageObject from regression.pages.studio import BASE_URL class StudioLogout(PageObject): """ Logged Out Page for Studio """ url = BASE_URL def is_browser_on_page(self): """ Checks if we are on the correct page ...
raeeschachar/edx-e2e-mirror
regression/pages/studio/logout_studio.py
Python
agpl-3.0
384
__author__ = 'radu' from django.conf import settings from django.core.mail import EmailMultiAlternatives from django.template.loader import render_to_string class SesLib(object): """ A wrapper around Django's EmailMultiAlternatives that renders txt and html templates. Example Usage: >>> email = ...
TudorRosca/enklave
server/backend/utils/ses_lib.py
Python
agpl-3.0
1,463
from django.contrib.auth.models import User from localtv.tests import BaseTestCase from localtv import models from localtv.playlists.models import Playlist from localtv import search class SearchTokenizeTestCase(BaseTestCase): """ Tests for the search query tokenizer. """ def assertTokenizes(self, qu...
natea/Miro-Community
localtv/search/tests.py
Python
agpl-3.0
10,029
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2011 OpenERP Italian Community (<http://www.openerp-italia.org>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gener...
luca-vercelli/l10n-italy
l10n_it_invoice_report/invoice.py
Python
agpl-3.0
1,213
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
xrg/openerp-server
bin/addons/base/res/res_config.py
Python
agpl-3.0
18,280
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
runt18/nupic
src/nupic/algorithms/CLAClassifier.py
Python
agpl-3.0
25,671
# -*- coding: utf-8 -*- # Copyright 2019 OpenSynergy Indonesia # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import ( stock_inventory, )
open-synergy/opnsynid-stock-logistics-warehouse
stock_inventory_by_moving_product/models/__init__.py
Python
agpl-3.0
167
# Copyright 2020 NextERP Romania SRL # Copyright 2021 Tecnativa - Víctor Martínez # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo.tests import common from .fake_models import ResUsers, setup_test_model, teardown_test_model class TestCommentTemplate(common.SavepointCase): @classmeth...
OCA/reporting-engine
base_comment_template/tests/test_base_comment_template.py
Python
agpl-3.0
3,459
# -*- coding: utf-8 -*- # # # Copyright 2014 Camptocamp SA # Author: Yannick Vaucher # # 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,...
jorsea/vertical-ngo
logistic_order_requisition_donation/__openerp__.py
Python
agpl-3.0
1,324
# -*- 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...
StefanRijnhart/odoo
addons/analytic/models/analytic.py
Python
agpl-3.0
19,270
# Copyright (c) 2014 by Ecreall under licence AGPL terms # available on http://www.gnu.org/licenses/agpl.html # licence: AGPL # author: Amen Souissi import deform from deform.widget import default_resource_registry class SearchFormWidget(deform.widget.FormWidget): template = 'novaideo:views/novaideo_view_manag...
ecreall/nova-ideo
novaideo/views/novaideo_view_manager/widget.py
Python
agpl-3.0
776
from django import forms from django.contrib.auth import get_user_model from django.utils.translation import ugettext_lazy as _ from apps.grid.fields import TitleField, UserModelChoiceField from apps.grid.widgets import CommentInput from .base_form import BaseForm class DealActionCommentForm(BaseForm): exclude_i...
sinnwerkstatt/landmatrix
apps/grid/forms/deal_action_comment_form.py
Python
agpl-3.0
3,733
"""Interface for adding certificate generation tasks to the XQueue. """ import json import logging import random from uuid import uuid4 import lxml.html from django.conf import settings from django.urls import reverse from django.test.client import RequestFactory from lxml.etree import ParserError, XMLSyntaxError from...
Stanford-Online/edx-platform
lms/djangoapps/certificates/queue.py
Python
agpl-3.0
22,442