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
"""Development settings and globals.""" from __future__ import absolute_import from os.path import join, normpath from .base import * # DEBUG CONFIGURATION # See: https://docs.djangoproject.com/en/dev/ref/settings/#debug DEBUG = True # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug TEMPLA...
hernanramirez/django-example
examples_prj/examples_prj/settings/local.py
Python
gpl-2.0
1,544
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Carga de paรฑos.py # # Copyright 2013 Akoharowen <alejandrofabrega@ingenieriapesquera.com.ar> # # 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 Foundat...
Alitux/LibreShen
Mรณdulos Python/CargadePanos.py
Python
gpl-2.0
3,307
#Based on the XSLT spec: http://docs.local/REC-xslt-19991116.html#sorting and #http://docs.local/REC-xslt-19991116.html#number from Xml.Xslt import test_harness source_1="""<?xml version="1.0" encoding="utf-8"?> <employees> <employee> <name> <id>1024</id> <given>James</given> <family>Clark</fa...
Pikecillo/genna
external/4Suite-XML-1.0.2/test/Xml/Xslt/Core/test_number_sort.py
Python
gpl-2.0
16,145
# -*- coding:utf-8 -*- # Author: Kei Choi(hanul93@gmail.com) import os import re import glob import shutil import tempfile # import psutil # --------------------------------------------------------------------- # K2Tempfile ํด๋ž˜์Šค # --------------------------------------------------------------------- class K2Tempfile...
hanul93/kicomav
Engine/kavcore/k2file.py
Python
gpl-2.0
10,886
## begin license ## # # "Meresco Components" are components to build searchengines, repositories # and archives, based on "Meresco Core". # # Copyright (C) 2007-2009 SURF Foundation. http://www.surf.nl # Copyright (C) 2007 SURFnet. http://www.surfnet.nl # Copyright (C) 2007-2010 Seek You Too (CQ2) http://www.cq2.nl # C...
seecr/meresco-components
test/_http/pathfiltertest.py
Python
gpl-2.0
3,628
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def forwards(apps, schema_editor): Release = apps.get_model('releng', 'Release') Release.objects.update(last_modified=models.F('created')) def backwards(apps, schema_editor): pass class Migration(mig...
brain0/archweb
releng/migrations/0003_release_populate_last_modified.py
Python
gpl-2.0
494
# Map the oRSC fiber indices to CTP fiber indices FIBER_MAP = { 24: 0x5, 25: 0x4, 26: 0x8, 27: 0xb, 28: 0x6, 29: 0x7 } from integration_patterns import pattern as orsc_pattern def pattern(link): if link in FIBER_MAP: return orsc_pattern(FIBER_MAP[link]-1) return orsc_pattern(l...
efarres/GoIPbus
cactuscore/softipbus/scripts/ctp6_integration_patterns.py
Python
gpl-2.0
325
from Embedded_OpenOrange import Embedded_Field #from core.database.Database import Database from decimal import Decimal class Field(Embedded_Field): def __init__(self, record, fieldname_or_fielddef): Embedded_Field.__init__(self, record, fieldname_or_fielddef) def setValue(self, v): if isinst...
ancho85/pylint-playero-plugin
corepy/embedded/Field.py
Python
gpl-2.0
1,010
# # intersect.py # PolyBoRi # # Created by Michael Brickenstein on 2008-09-24. # Copyright 2008 The PolyBoRi Team # from .gbcore import groebner_basis from .statistics import used_vars_set from itertools import chain def intersect(i, j, **gb_opts): """ This functions intersects two ideals. The first ring...
BRiAl/BRiAl
sage-brial/brial/intersect.py
Python
gpl-2.0
1,354
import jobs import config from utils.various import bound from utils.colors import mix_colors from notifiers import notifier from db.models import StatusColor class ColorNotifier(notifier.Notifier): def _check(self): current = self.job.status if current.error: self.set_color(config.ERR...
vincent-psarga/job-sensors
src/jobsensors/notifiers/colors.py
Python
gpl-2.0
1,823
# -*- coding: utf-8 -*- # This file is part of Fail2Ban. # # Fail2Ban 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. # # Fail2Ban is d...
yarikoptic/Fail2Ban-Old-SVNGIT
server/datetemplate.py
Python
gpl-2.0
5,047
from enum import IntEnum __all__ = ['HTTPStatus'] class HTTPStatus(IntEnum): """HTTP status codes and reason phrases Status codes from the following RFCs are all observed: * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 * RFC 6585: Additional HTTP Status Codes * R...
bruderstein/PythonScript
PythonLib/full/http/__init__.py
Python
gpl-2.0
6,733
"""SeparateLeadStereo, with Time-Frequency choice Provides a class (``SeparateLeadProcess``) within which several processings can be run on an audio file, in order to extract the lead instrument/main voice from a (stereophonic) audio mixture. copyright (C) 2011 - 2013 Jean-Louis Durrieu """ # Importing necessary pac...
wslihgt/pyfasst
pyfasst/SeparateLeadStereo/SeparateLeadStereoTF.py
Python
gpl-2.0
84,353
#!/usr/bin/env python # Author: Richard Bradshaw, R.T.Bradshaw@soton.ac.uk # Module to fit various curves to provided x/y data # Current available curves: Linear, Gaussian, Lorentzian, Voigt # Requirements: lmfit, numpy, matplotlib (as dependencies of lmfit) from lmfit.models import LinearModel,GaussianModel,Lorent...
rtb1c13/scripts
IR_lineshapes/lmcurvefit.py
Python
gpl-2.0
5,749
# # Copyright (C) 2015 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 the hope that it will be...
mineo/dnf-plugins-core
plugins/config_manager.py
Python
gpl-2.0
9,979
from google.appengine.ext import ndb class Post(ndb.Model): content = ndb.StringProperty(indexed=False) created_at = ndb.DateTimeProperty(auto_now_add=True) updated_at = ndb.DateTimeProperty(auto_now_add=True) deleted_at = ndb.DateTimeProperty(auto_now_add=True)
GDG-Xian/gdg-xian
website/models.py
Python
gpl-2.0
280
#!/usr/bin/env python import rospy from std_msgs.msg import UInt16 def write_freq(hz=0): bfile = "/dev/rtbuzzer0" try: with open(bfile, "w") as f: f.write(str(hz) + "\n") except IOError: rospy.logerr("can't write to " + bfile) def recv_buzzer(data): write_freq(data.data) i...
alinko32a/pimouse_ros
scripts/buzzer3.py
Python
gpl-3.0
445
# bottle_preferences.py # # Copyright 2020 brombinmirko <send@mirko.pm> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version...
mirkobrombin/Bottles
src/views/bottle_preferences.py
Python
gpl-3.0
30,960
# -*- coding: utf-8 -*- """The scwapi package"""
eteamin/spell_checker_web_api
scwapi/__init__.py
Python
gpl-3.0
49
from vsg import parser from vsg import violation from vsg.rules import utils as rules_utils from vsg.rule_group import structure from vsg.vhdlFile import utils class move_token_next_to_another_token_if_it_exists_between_tokens(structure.Rule): ''' Moves one token next to another and places a single space be...
jeremiah-c-leary/vhdl-style-guide
vsg/rules/move_token_next_to_another_token_if_it_exists_between_tokens.py
Python
gpl-3.0
2,515
from sklearn.cluster import MiniBatchKMeans import numpy as np import json import os from texta.settings import MODELS_DIR class WordCluster(object): """ WordCluster object to cluster Word2Vec vectors using MiniBatchKMeans. : param embedding : Word2Vec object : param n_clusters, int, number of cluster...
texta-tk/texta
utils/word_cluster.py
Python
gpl-3.0
2,505
# Generated by Django 2.2 on 2019-06-18 09:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tmv_app', '0115_topic_original_title'), ] operations = [ migrations.AddField( model_name='runstats', name='lda_learnin...
mcallaghan/tmv
BasicBrowser/tmv_app/migrations/0116_runstats_lda_learning_method.py
Python
gpl-3.0
443
#!/usr/bin/env python # encoding: utf-8 from random import choice def random_string(length, random_range): result = "" for i in range(length): result += choice(random_range) return result
WangYihang/Webshell-Sniper
core/utils/string_utils/random_string.py
Python
gpl-3.0
211
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, divi...
mganeva/mantid
Framework/PythonInterface/test/python/plugins/algorithms/CreateWorkspaceTest.py
Python
gpl-3.0
4,168
# -*- coding: utf-8 -*- # # Copyright ยฉ 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Online Help Plugin""" from spyderlib.qt.QtCore import Signal import os.path as osp # Local imports from spyderlib.baseconfig import get_conf_path, ...
jromang/retina-old
distinclude/spyderlib/plugins/onlinehelp.py
Python
gpl-3.0
3,199
#!/usr/bin/python -tt import sys import math import time from myPrint import * from bzrc import BZRC, Command ###########################Potential Field Fun############################################ #################################################################### # Distance between two points. ##############...
chris-clm09/bzflag
bzagents/pfAgent.py
Python
gpl-3.0
14,123
# Copyright (C) 2017 Kacy Thorne # # This file is part of Clontris. # # Clontris 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. # # Cl...
kcthrn/clontris
clontris/meta.py
Python
gpl-3.0
1,028
import platform from setuptools import setup, find_packages import versioneer versioneer.VCS = 'git' versioneer.versionfile_source = 'soapy/_version.py' versioneer.versionfile_build = 'soapy/_version.py' versioneer.tag_prefix = '' # tags are like 1.2.0 versioneer.parentdir_prefix = 'soapy-' # dirname like 'myproject...
AOtools/soapy
setup.py
Python
gpl-3.0
1,308
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
dataxu/ansible
lib/ansible/modules/cloud/vmware/vmware_guest_find.py
Python
gpl-3.0
4,032
# -*- coding: utf-8 -*- # Mathmaker creates automatically maths exercises sheets # with their answers # Copyright 2006-2017 Nicolas Hainaux <nh.techn@gmail.com> # This file is part of Mathmaker. # Mathmaker is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License...
nicolashainaux/mathmaker
tests/00_libs/test_database.py
Python
gpl-3.0
21,413
from flask import Flask from flaskext.cache import Cache from flaskext.mongokit import BSONObjectIdConverter from werkzeug.routing import BaseConverter import settings app = Flask(__name__) app.config.from_object('woerterbuch.settings') app.secret_key = settings.SECRET_KEY ## Hook up custom URL converters. class Re...
fwenzel/strassendeutsch
woerterbuch/__init__.py
Python
gpl-3.0
739
#!/usr/bin/python # pl2dir - Generates a directory structure based on your Traktor playlists. # Copyright (C) 2015 Erik Stambaugh # 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 versio...
poorsquinky/traktor-tools
pl2dir.py
Python
gpl-3.0
4,990
from setuptools import setup version = '0.63.2.dev0' long_description = '\n\n'.join([ open('README.rst').read(), open('TODO.rst').read(), open('CREDITS.rst').read(), open('CHANGES.rst').read(), ]) install_requires = [ 'dbfpy', 'Django', 'django-extensions', 'django-nose', 'liz...
lizardsystem/lizard-portal
setup.py
Python
gpl-3.0
1,238
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2018 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
Eldinnie/python-telegram-bot
tests/test_video.py
Python
gpl-3.0
7,707
from __future__ import unicode_literals from django.apps import AppConfig class UserProfilesConfig(AppConfig): name = 'user_profiles'
tarak/chef_django_app
user_profiles/apps.py
Python
gpl-3.0
141
inboth = 'value of inboth from mymod2' onlyinmymod2 = 'value of onlyinmymod2 from mymod2'
veltzer/demos-python
src/examples/long/loading_twice_into_the_same_namespace/folder2/module.py
Python
gpl-3.0
90
# # NEPI, a framework to manage network experiments # Copyright (C) 2013 INRIA # # 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 ...
phiros/nepi
src/nepi/execution/runner.py
Python
gpl-3.0
6,329
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
belokop/indico_bare
indico_zodbimport/modules/event_timetable.py
Python
gpl-3.0
57,156
""" Volatility pairlist filter """ import logging import sys from copy import deepcopy from typing import Any, Dict, List, Optional import arrow import numpy as np from cachetools.ttl import TTLCache from pandas import DataFrame from freqtrade.exceptions import OperationalException from freqtrade.misc import plural f...
flightcom/freqtrade
freqtrade/plugins/pairlist/VolatilityFilter.py
Python
gpl-3.0
4,749
#################################################################################################### # # Patro - A Python library to make patterns for fashion design # Copyright (C) 2017 Fabrice Salvaire # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gene...
FabriceSalvaire/PyValentina
Patro/Common/Math/Functions.py
Python
gpl-3.0
2,460
from getpass import getpass from selenium import webdriver from selenium.common import exceptions from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.chrome.options import Options from selenium.webdriver.support.ui import WebDriverWait from selenium.webdri...
mvinoba/MinervaBot
MinervaBot.py
Python
gpl-3.0
4,031
import subprocess as Subprocess import pymel.all as pm class CapsDisabler(object): def __init__(self, parentRef, go=False): self.parentRef = parentRef self.ini = self.parentRef.ini self.conf = self.ini.conf self.enabled = False self.autohotkeyProcess = Non...
joetainment/mmmmtools
MmmmToolsMod/Dynamic/CapsDisabler.py
Python
gpl-3.0
2,060
from rope.refactor import restructure from ropetest import testutils import unittest class RestructureTest(unittest.TestCase): def setUp(self): super(RestructureTest, self).setUp() self.project = testutils.sample_project() self.pycore = self.project.pycore self.mod = testutils.cr...
timwee/emacs-starter-kit-mr-flip-forked
vendor/rope/ropetest/refactor/restructuretest.py
Python
gpl-3.0
7,926
""" Functional Data Analysis Routines """ from __future__ import division import numpy as np def _curve_area(A, B): r1 = np.mean(A-B) r2 = np.mean(B-A) if r1 > r2: return r1 else: return r2 def curve_test(Y, cnd_1, cnd_2, n_perm=1000): """ Assess whether two curves are stati...
akhambhati/Echobase
Echobase/Statistics/FDA/fda.py
Python
gpl-3.0
1,634
class Mesh: r""" Internally used class for describing a simple triangular mesh """ def __init__(): r"""__init__(*args, **kwargs) Overloaded function. 1. __init__(off_filename: str) -> None Create a mesh by reading the OFF file Args: off_filename: path of ...
dimaleks/uDeviceX
docs/source/_mirheo/ParticleVectors/__init__.py
Python
gpl-3.0
24,860
import datetime import threading import sickchill.oldbeard.search_queue from sickchill import logger, settings from sickchill.helper.exceptions import MultipleShowObjectsException from sickchill.show.Show import Show from . import common, db, network_timezones class DailySearcher(object): # pylint:disable=too-few-...
Vagab0nd/SiCKRAGE
sickchill/oldbeard/dailysearcher.py
Python
gpl-3.0
3,608
# -*- coding: utf-8 -*- # # Copyright (C) 2007, 2008, 2011 Uninett AS # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License version 3 as published by the Free # Software Foundation. # # Thi...
hmpf/nav
python/nav/web/alertprofiles/views.py
Python
gpl-3.0
87,463
#!/usr/bin/env python3 """ DNSSEC Single-Type Signing Scheme, RFC 6781 """ from dnstest.utils import * from dnstest.test import Test t = Test() knot = t.server("knot") zones = t.zone_rnd(5, dnssec=False, records=10) t.link(zones, knot) t.start() # one KSK knot.gen_key(zones[0], ksk=True, zsk=True, alg="ECDSAP256SHA2...
CZ-NIC/knot
tests-extra/tests/dnssec/single_type_signing/test.py
Python
gpl-3.0
1,348
from .thetvdb import TheTVDB from .tmdb import TheMDB
aminotti/converter
lib/scrapper/__init__.py
Python
gpl-3.0
54
__author__ = 'j' import ConfigParser class ParseConfig: config = ConfigParser.ConfigParser() def __init__(self): pass def sumSection(self, filePath): ''' Counts the row amounts in the config file. :param file: path to the file. :return: Int with the amount of rows ...
Frenesius/CrawlerProject56
crawler/ConfigManager.py
Python
gpl-3.0
4,164
import matplotlib.pyplot as plt import numpy as np """ Contains functions to facilitate simple ploting tasks """ def std_setup(): """ Adjusts matplotlib default settings""" from cycler import cycler plt.rc('image', cmap='viridis') plt.rc('xtick', labelsize=14) plt.rc('ytick', labelsize=14) plt...
luizfelippesr/galmag
galmag/analysis/visualization.py
Python
gpl-3.0
8,599
# -*- coding: utf-8 -*- import wx from wx.lib.newevent import NewCommandEvent from ...common.i18n import N_ from ...common.path import default_root_folder from ..base_view import BaseView from ..form import BaseForm from ..validator import BaseValidator from ..validator import ConfirmPasswordValidator, MinLengthValid...
Bajoo/client-pc
bajoo/gui/screen/setup_config_screen.py
Python
gpl-3.0
8,305
"""WSGI config for site_analytics project.""" import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "site_analytics.settings") application = get_wsgi_application()
gnuworldman/site-analytics
src/site_analytics/wsgi.py
Python
gpl-3.0
223
# Copyright 2013 Allen Institute # This file is part of dipde # dipde 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. # # dipde is dis...
nicain/dipde_dev
setup.py
Python
gpl-3.0
2,931
from runtests.mpi import MPITest from nbodykit import set_options, GlobalCache, use_distributed, use_mpi from numpy.testing import assert_array_equal from nbodykit.lab import UniformCatalog def setup(): from distributed import LocalCluster, Client cluster = LocalCluster(n_workers=1, threads_per_worker=1, proce...
nickhand/nbodykit
nbodykit/tests/test_distributed.py
Python
gpl-3.0
883
""" @file @brief This file loads and saves settings (as JSON) @author Ted Lazaros <tedlaz@gmail.com> @section LICENSE """ try: import json except ImportError: import simplejson as json import copy from classes.logger import log class JsonDataStore: """ This class which allow...
tedlaz/pyted
tests/pysqlqt/src/classes/json_data.py
Python
gpl-3.0
4,956
import scipy as sp import hdda from multiprocessing import Pool import pickle import muesli_functions as mf # Convenient function def ClusterGrasslands(id_,DB,bands,C): # Read samples X = mf.readSamplesId(DB,id_,bands) # L1 Normalization X /= X.sum(axis=1)[:,sp.newaxis] print("Process Grasslands ...
mfauvel/GrasslandsSympa
Codes/cluster_grasslands.py
Python
gpl-3.0
1,580
import RPi.GPIO as GPIO import time import subprocess import datetime import time # Added to support voice command import threading import speech_recognition as sr STATE_UNOCCUPIED = 0 STATE_OCCUPIED = 1 OCCUPIED_DISTANCE = 50 UNOCCUPIED_DURATION = 1200 def process_command(self, command): if command.lower() == ...
mayaculpa/wisp
wisp.py
Python
gpl-3.0
6,215
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Multiple documentation build configuration file, created by # sphinx-quickstart on Thu Apr 14 09:34:49 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 # a...
Wevolver/HAVE
docs/source/conf.py
Python
gpl-3.0
9,459
# ============================================================================= # Copyright (C) 2010 Diego Duclos # # This file is part of pyfa. # # pyfa 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 ...
Ebag333/Pyfa
service/damagePattern.py
Python
gpl-3.0
2,873
import json import re import random from urllib import urlretrieve from urllib2 import urlopen, URLError from pprint import pprint from bs4 import BeautifulSoup from retrying import retry # https://flightaware.com/live/flight/{flightcode} FLIGHTAWARE_URL = "https://flightaware.com/live/flight/{}" """ gets origin and ...
destination-hack/seatguru
FlaskApp/flightaware.py
Python
gpl-3.0
1,494
#!/usr/bin/python # Usage: list_to_make_var.py <input file (mod list)> <output file 1(build script)> <output file 2(clean script)> <OS> # argv: argv[0] argv[1] argv[2] argv[3] argv[4] # # Include library # import os import sys def OpenF...
flake123p/ProjectH
Make/PY02_dump_dependent_tree/mod6/list_to_build_script.py
Python
gpl-3.0
1,336
import json import logging from os import listdir, path from typing import Dict, List from tqdm import tqdm TELEM_DIR_PATH = "../envs/monkey_zoo/blackbox/tests/performance/telemetry_sample" MAX_SAME_TYPE_TELEM_FILES = 10000 LOGGER = logging.getLogger(__name__) class SampleFileParser: @staticmethod def save_...
guardicore/monkey
envs/monkey_zoo/blackbox/tests/performance/telem_sample_parsing/sample_file_parser.py
Python
gpl-3.0
1,855
from math import log10, floor # N = 12 N = 101 # N = 1000001 def n_squares(n): return [i**2 for i in range(2, n)] # print(n_squares(11)) # print(n_squares(100)) ##### This block from stackoverflow: # https://stackoverflow.com/questions/37023774/all-ways-to-partition-a-string import itertools memo = {} def mu...
kylebegovich/ProjectEuler
Python/Progress/Problem719.py
Python
gpl-3.0
1,757
import sys, os, inspect from PyQt5.QtWidgets import QWidget, QTreeWidgetItem from PyQt5 import uic directory = os.path.realpath(os.path.abspath(os.path.split(inspect.getfile(inspect.currentframe()))[0])) sys.path.append(directory + "/lib") from libstats import LibStats from func_aux import paint_row, key_from_value fro...
soker90/betcon
src/stats_tipster.py
Python
gpl-3.0
2,869
#!/usr/bin/env python import re import requests import validators import sys import httplib2 import datetime import socket from urllib.parse import urlsplit, urljoin from ipwhois import IPWhois from pprint import pprint from bs4 import BeautifulSoup, SoupStrainer import pkg_resources http_interface = httplib2.Http() ...
rascal999/qad
qad/__init__.py
Python
gpl-3.0
8,092
#!/usr/bin/env python # -*- coding: utf-8 -*- from abc import abstractmethod, ABCMeta class RosettaStone(object): __metaclass__ = ABCMeta def __init__(self, name=None, **kwargs): self.name = name def configure(self, config): if not isinstance(config, dict): raise Exception('c...
ValyrianTech/BitcoinSpellbook-v0.3
darwin/rosettastone/rosettastone.py
Python
gpl-3.0
678
๏ปฟimport re from typing import Callable, Dict, List # noqa: F401 FormatText = Callable[[str], str] ascii: str = (''' !"#$%&'()*+,-./''' '0123456789' ':;<=>?@' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' r'[\]^_`' 'abcdefghijklmnopqrstuvwxyz' '{|}~')...
MeGotsThis/BotGotsThis
lib/helper/textformat.py
Python
gpl-3.0
11,881
#This code packages manually calibrated and imaged datasets # -------------------------------------------------------------------------------------------------- def ReadDataFromWeb(mousid): # -------------------------------------------------------------------------------------------------- """ This function...
bmarshallk/NAASC
packaging_scripts/PackageManualDataset.py
Python
gpl-3.0
14,173
# -*- mode: python; coding: utf-8 -*- # # Copyright 2011 Andrej A Antonov <polymorphm@qmail.com> # # 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 of the License, or # (a...
polymorphm/scgi-wsgi-daemon
lib_scgi_wsgi_daemon__2011_08_06/daemonize.py
Python
gpl-3.0
1,222
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # Copyright (c) 2009 Ars Aperta, Itaapy, Pierlis, Talend. # # Authors: David Versmisse <david.versmisse@itaapy.com> # # This file is part of Lpod (see: http://lpod-project.org). # Lpod is free software; you can redistribute it and/or modify it under # the terms of either:...
uliss/quneiform
tests/py/lpod/rst2odt.py
Python
gpl-3.0
22,265
#!/usr/bin/env python '''calibration command handling''' import time, os from pymavlink import mavutil from MAVProxy.modules.lib import mp_module class CalibrationModule(mp_module.MPModule): def __init__(self, mpstate): super(CalibrationModule, self).__init__(mpstate, "calibration") self.add_comm...
dshyshov/MAVProxy
MAVProxy/modules/mavproxy_calibration.py
Python
gpl-3.0
3,874
# -*- coding: utf-8 -*- # Author: Leo Vidarte <http://nerdlabs.com.ar> # # This file is part of lai-server. # # lai-server is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 # as published by the Free Software Foundation. # # lai-server is distribut...
lvidarte/lai-server
laiserver/client.py
Python
gpl-3.0
2,247
# -*- coding: utf-8 -*- # Generated by Django 1.11.28 on 2020-02-29 16:58 from __future__ import unicode_literals import django.contrib.auth.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('sa_api_v2', '0004_dj...
openplans/shareabouts-api
src/sa_api_v2/migrations/0005_add_dimensions_to_attachments.py
Python
gpl-3.0
702
from setuptools import setup, find_packages import os import allensdk # http://bugs.python.org/issue8876#msg208792 if hasattr(os, 'link'): del os.link def prepend_find_packages(*roots): ''' Recursively traverse nested packages under the root directories ''' packages = [] for root in roots: ...
wvangeit/AllenSDK
setup.py
Python
gpl-3.0
1,828
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + """Set of general purpose functions which are...
mganeva/mantid
scripts/SANS/sans/state/state_functions.py
Python
gpl-3.0
4,927
from timer import Timer from back.application_mgmt import Application,Data_saver,View_control view_control = View_control() data_saver = Data_saver() with Timer() as t: view_control.top_6_background_today() print "=> elasped top 6 today: %s s" % t.secs with Timer() as t: view_control.new_top_6_background_...
adamRogerson/Hours
speed_test.py
Python
gpl-3.0
1,066
import sys import os import salome import numpy from salome.geom import geomtools def write_boundaries( geompy, bd ): directory = "lattice" if not os.path.exists(directory): os.makedirs(directory) file = open(directory + "/boundary", 'w') # Number of points file.write...
efogliatto/multiphaseLB
src/tools/mesh/salomesh/io/write_boundaries.py
Python
gpl-3.0
649
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # Copyright (C) Zing contributors. # # This file is a part of the Zing project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship inf...
iafan/zing
pootle/runner.py
Python
gpl-3.0
11,729
# -*- coding: utf-8 -*- # Mathmaker creates automatically maths exercises sheets # with their answers # Copyright 2006-2018 Nicolas Hainaux <nh.techn@gmail.com> # This file is part of Mathmaker. # Mathmaker is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License...
nicolashainaux/mathmaker
tests/integration/mental_calculation/02_white2/test_02_white2_W03c.py
Python
gpl-3.0
1,240
ksleg = "http://www.kslegislature.org/li" url = "%s/api/v11/rev-1/" % ksleg # These actions are from the KLISS API documentation, # and are in the same order as that table # The PDF is linked from this webpage, and changes name # based on the most recent API version: # http://www.kslegislature.org/klois/Pages/RESTianA...
openstates/openstates
openstates/ks/ksapi.py
Python
gpl-3.0
8,104
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Created on Tue 31 May 2016 @author: Fabrizio Coccetti (fabrizio.coccetti@centrofermi.it) [www.fc8.net] Query Run Db and extract several infos """ import os import MySQLdb from datetime import datetime, timedelta import ConfigParser import logging import logging.config...
centrofermi/e3monitor
stats/e3sTrackDayStation.py
Python
gpl-3.0
3,202
# -*- coding: utf-8 -*- """ Define the global constants for the problem. """ import math import os q = 0.5 b0 = 0.9 omegad = 2.0 / 3.0 l = 9.8 m = 1.0 g = 9.8 tmax = 1000 theta0_degree = 25.0 theta0 = math.radians(theta0_degree) dt = 0.05 bstep = 0.05 path = "plots/" os.system("pause")
NicovincX2/Python-3.5
Statistiques/ร‰conomรฉtrie/Sรฉrie temporelle/Damped-driven pendulum/tsa_constants.py
Python
gpl-3.0
299
# Created By: Virgil Dupras # Created On: 2006/05/02 # Copyright 2015 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/g...
stuckj/dupeguru
core/tests/ignore_test.py
Python
gpl-3.0
4,306
from django.http import HttpResponse, HttpResponseRedirect from django.views.generic import TemplateView from django.shortcuts import render from django.http import JsonResponse ################################## ################################## class ExpertsView(TemplateView): template_name = "redirect/Expert...
anthropo-lab/XP
EPHEMER/_primo_fmr_project/redirect/views.py
Python
gpl-3.0
1,518
from typing import AsyncIterator import aioodbc.cursor # noqa: F401 import pyodbc from ._base import Database class PermittedUsersMixin(Database): async def getPermittedUsers(self, broadcaster: str) -> AsyncIterator[str]: query: str = ''' SELECT twitchUser FROM permitted_users WHERE broadcaster=? ''' ...
MeGotsThis/BotGotsThis
lib/database/_permitted_users.py
Python
gpl-3.0
2,659
""" The SyncDaemon reactor -- a less power-hungry version of twisted's gtk2reactor """ # # This is the quickest way to make twisted's Gtk2Reactor use # timeout_add_seconds instead of timeout_add; the former uses high-resolution # timers, which are more power-intensive. # It's pretty much verbatim from their source. fr...
Alberto-Beralix/Beralix
i386-squashfs-root/usr/share/pyshared/ubuntuone-client/ubuntuone/syncdaemon/sdreactor.py
Python
gpl-3.0
2,727
''' Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water. Note: You may...
wufangjie/leetcode
011. Container With Most Water.py
Python
gpl-3.0
2,524
patch_size = 1
KGPML/Hyperspectral
patch_size.py
Python
gpl-3.0
14
from ctypes import * from ctypes.wintypes import * from comtypes import * #******************************************************************** # # Typedefs and constants # #******************************************************************** REFGUID = POINTER(GUID) UINT = c_uint INT = c_int ...
DarkStarSword/StereoCropper
directx/types.py
Python
gpl-3.0
35,586
# Import the old tracking id from the RCM file for period 19660101-19701231, # as it is the first used file to create historical indices: # (e.g. tasmin_EUR-44_IPSL-IPSL-CM5A-MR_historical_r1i1p1_SMHI-RCA4_v1_day_19660101-19701231.nc) #track_GCM_indice=$( import netCDF4 from netCDF4 import Dataset import ctypes imp...
igryski/Indices_icclim_ClipC
src/PRECIP/get_put_invar_tracking_id_python_PRECIP.py
Python
gpl-3.0
11,422
import pathlib import argparse import os IMGFORMAT = 'JPG' if __name__ == '__main__': parser = argparse.ArgumentParser(description='Symlink a local album directory to the "galleries" subdirectory in a local Piwigo instance.') parser.add_argument('src_album', type=str, help='Location of album to symlink, relat...
nickmcummins/misc-tools
piwigo/piwigo_symlink_local_album.py
Python
gpl-3.0
1,897
#!/usr/bin/python # coding:utf8 ''' Created on Feb 4, 2011 Update on 2017-12-20 Tree-Based Regression Methods Source Code for Machine Learning in Action Ch. 9 Author: Peter Harrington/็‰‡ๅˆป/ๅฐ็‘ถ/zh0ng GitHub: https://github.com/apachecn/AiLearning ''' from __future__ import print_function print(__doc__) from numpy import * ...
jiangzhonglian/MachineLearning
src/py2.x/ml/9.RegTrees/regTrees.py
Python
gpl-3.0
18,561
# Author: Scott Philip (sp@scottphilip.com) # Version: 1.2 (25 July 2017) # Source: https://github.com/scottphilip/caller-lookup/ # Licence: GNU GENERAL PUBLIC LICENSE (Version 3, 29 June 2007) from CallerLookup.Strings import CallerLookupLabel, CallerLookupKeys from CallerLookup.Utils.Logs impor...
scottphilip/caller-lookup
CallerLookup/Responses.py
Python
gpl-3.0
1,950
'''Dirty talk like you're in Dundalk''' import random import re import string __author__ = ('iandioch') COMMAND = 'flirt' PHRASES = [ "rawr~, {s}{sep}", "{s}, big boy{sep}", "{s} xo", "{s} bb{sep}", "babe, {s}{sep}", "hey xxx {s}{sep}", "{s} xxx", "{s} xx", "{s} xo", "{s} xoxo...
sentriz/steely
steely/plugins/flirty.py
Python
gpl-3.0
1,575
#!/usr/bin/env python # -*- coding: utf-8 -*- """ **ui_constants.py** **Platform:** Windows, Linux, Mac Os X. **Description:** Defines **sIBL_GUI** package ui constants through the :class:`UiConstants` class. **Others:** """ from __future__ import unicode_literals __author__ = "Thomas Mansencal" __copyri...
KelSolaar/sIBL_GUI
sibl_gui/globals/ui_constants.py
Python
gpl-3.0
9,825
"""Subpackage for the Archiver server.""" from ..envars import SRVURL_ARCHIVER as SERVER_URL from .client import ClientArchiver from .pvarch import PVDetails, PVData, PVDataSet from .devices import Orbit, Correctors, TrimQuads from .time import Time from . import exceptions del client, pvarch, devices
lnls-sirius/dev-packages
siriuspy/siriuspy/clientarch/__init__.py
Python
gpl-3.0
306
""" Implements a task for unwarping the camera images """ import multiprocessing import cv2 from image_processing.remapping.OCameraModel import OCameraModel class Unwarper(multiprocessing.Process): """ This class implements a task for unwarping the images obtained from a camera with a fisheye lens """ ...
hgmeyer/BIVAC
sw/image_processing/remapping/Unwarper.py
Python
gpl-3.0
3,590
# -*- coding: utf-8 -*- from __future__ import with_statement import os import time import subprocess import sys try: import caffeine except ImportError: pass from module.plugins.internal.Addon import Addon, Expose from module.utils import fs_encode, save_join as fs_join class Kernel32(object): ES_AWA...
joberreiter/pyload
module/plugins/hooks/AntiStandby.py
Python
gpl-3.0
4,700
""" Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitioning of s. For example, given s = "aab", Return 1 since the palindrome partitioning ["aa","b"] could be produced using 1 cut. DFSearch solution """ class Solution(obj...
urashima9616/Leetcode_Python
Leet132_PalindromePartition3.py
Python
gpl-3.0
1,337