code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- # # Function view_period # Copyright (C) 2017 NovaDragoN <xmmendezy@gmail.com> import os import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk import Data_process from Data_process import data_view_registrer...
XavierMendez/Sistema_P01_Administrativo
Core/view_period.py
Python
lgpl-3.0
4,099
SECRET_KEY = 'jhfhkghg' INSTALLED_APPS = ['django.contrib.contenttypes']
alexmojaki/snoop
tests/fake_django_settings.py
Python
mit
73
""" Support for Homematic switches. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/switch.homematic/ """ import logging from homeassistant.components.switch import SwitchDevice from homeassistant.components.homematic import HMDevice, ATTR_DISCOVER_DEVICE...
open-homeautomation/home-assistant
homeassistant/components/switch/homematic.py
Python
apache-2.0
1,986
#!/usr/bin/env python # -*- coding: utf-8 -*- __license__ = """ β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β• β–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β•šβ•β• β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β•šβ•β• β•šβ•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•β•β• MESC: Minimun Essential Security Checks Author...
johnjohnsp1/mesc
include/serverinfo/psmem.py
Python
bsd-3-clause
8,281
# -*- coding: utf-8 -*- import os # solve a 2-d Poisson equation by differentiating the discretized Poisson # equation and then substituting in the inverse Fourier transform and solving # for the amplitudes in Fourier space. # # This is the way that Garcia and NR do it. # # Note: we need a periodic problem for an FFT...
NicovincX2/Python-3.5
Analyse (mathΓ©matiques)/Analyse Γ  plusieurs variables/Γ‰quation aux dΓ©rivΓ©es partielles/Γ‰quation de Poisson/poissonFFT_discrete.py
Python
gpl-3.0
2,579
# coding: utf-8 """ flask_storage ~~~~~~~~~~~~~ Collection of storage backends. :copyright: (c) 2013 Hsiaoming Yang. """ # flake8: noqa from . import _info __version__ = _info.VERSION __author__ = _info.AUTHOR from ._base import * from .local import LocalStorage from .upyun import UpyunStorage cl...
TOCyna/tabelinha
flask/lib/python2.7/site-packages/flask_storage/__init__.py
Python
gpl-2.0
1,435
# encoding: utf8 from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Category', fields=[ ('id', models.AutoField(verbose_na...
NJU-HouseWang/Amazon_Index
amazon/migrations/0001_initial.py
Python
gpl-2.0
549
from django.test import TestCase from django.contrib.sites.models import Site from search_engine_tools.models import SearchEngineTools class SearchEngineToolsrModelsTests(TestCase): def setUp(self): self.site = Site.objects.get_current() self.bing_code = 'E234232G123413DF234324' self.bing...
francisl/django-search-engine-tools
search_engine_tools/tests/tests_models.py
Python
bsd-3-clause
996
import registerClass import onionGpio import time class sevenSegment: digitMap = { "0": "00111111", "1": "00000110", "2": "01011011", "3": "01001111", "4": "01100110", "5": "01101101", "6": "01111101", "7": "00000111", "8": "01111111", "9": "01101111", "a": "01110111", ...
OnionIoT/Onion-Docs
Omega2/Kit-Guides/Starter/sevenSeg code/python/sevenSegDisplay.py
Python
gpl-3.0
1,018
# coding: utf-8 # This file is part of Supysonic. # # Supysonic is a Python implementation of the Subsonic server API. # Copyright (C) 2013 Alban 'spl0k' FΓ©ron # # 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 F...
nwokeo/supysonic
supysonic/frontend/folder.py
Python
agpl-3.0
3,211
"""Data Equivalence Tests""" from __future__ import print_function # Author: Teon Brooks <teon@nyu.edu> # # License: BSD (3-clause) import os.path as op import inspect from nose.tools import assert_equal import numpy as np from numpy.testing import assert_array_almost_equal, assert_array_equal import mne from mne.u...
jaeilepp/eggie
mne/io/brainvision/tests/test_brainvision.py
Python
bsd-2-clause
5,669
# -*- coding: utf-8 -*- """ Created on Mon Apr 04 11:17:15 2016 @author: atto Piezostage remote control (ie writingdelay into file read by humongium) """ import sys # The CLR module provide functions for interacting with the underlying # .NET runtime import visa import time # Add reference to assembly and import n...
thomasbarillot/DAQ
eTOF/WetLab_NewportDelayStage.py
Python
mit
1,437
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
code-sauce/tensorflow
tensorflow/python/debug/cli/cli_shared_test.py
Python
apache-2.0
13,934
# -*- coding: utf-8 -*- from __future__ import unicode_literals import xmltodict xml = '''<CATALOG> <CD> <TITLE>Empire Burlesque</TITLE> <ARTIST>Bob Dylan</ARTIST> <COUNTRY>USA</COUNTRY> <COMPANY>Columbia</COMPANY> <PRICE>10.90</PRICE> <YEAR>1985</YEAR> </CD> ...
renzon/exemplovenv
processador.py
Python
mit
5,854
#!/usr/bin/env python # vim:set ts=4 sw=4 ai et: # Kohorte, a peer-to-peer protocol for sharing git repositories # Copyright (c) 2015, Michael Toren <kohorte@toren.net> # Released under the terms of the GNU GPL, version 2 import fcntl import traceback import os import signal from subprocess import Popen, PIPE, STDOU...
mct/kohorte
p2p/child.py
Python
gpl-2.0
2,883
from vidis import app app.run(host='0.0.0.0')
Squeegee/vidis
run.py
Python
gpl-2.0
48
########################################### Global Variables ################################# #sklearn pickled SGDClassifier where pre-trained clf.coef_ matrix is casted to a scipy.sparse.csr_matrix for efficiency and scalability clf = None #sklearn pickled TfidfVectorizer vectorizer = None #dictionary of labelid: (la...
juanc5ibanez/WhoLovesMe
params.py
Python
apache-2.0
766
#!/usr/bin/env python """ Example of the 'transparency' attribute of `Window' when used in a Float. """ from prompt_toolkit.application import Application from prompt_toolkit.formatted_text import HTML from prompt_toolkit.key_binding import KeyBindings from prompt_toolkit.layout.containers import Float, FloatContainer,...
jonathanslenders/python-prompt-toolkit
examples/full-screen/simple-demos/float-transparency.py
Python
bsd-3-clause
2,743
"""Python class representation of a Raster Foundry Scene""" import uuid from requests.exceptions import HTTPError import logging from rf.models.base import BaseModel from rf.models.thumbnail import Thumbnail from rf.models.image import Image from rf.models.footprint import Footprint logger = logging.getLogger(__name...
raster-foundry/raster-foundry
app-tasks/rf/src/rf/models/scene.py
Python
apache-2.0
7,727
# layout.py # --------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to http://ai.berkeley.edu. # # A...
jgome043/cs170-group-project
src/layout.py
Python
gpl-3.0
5,753
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
buzztroll/staccato
staccato/openstack/common/pastedeploy.py
Python
apache-2.0
5,019
# Copyright 2015 OpenStack Foundation. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
openstack/networking-plumgrid
networking_plumgrid/neutron/tests/unit/cli/l2gatewayclient/test_cli20_l2gw_ext.py
Python
apache-2.0
8,932
# Copyright 2017 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
tseaver/google-cloud-python
bigquery/google/cloud/bigquery/dbapi/types.py
Python
apache-2.0
2,327
__author__ = 'mark' # StarinetPython3Logger a data logger for the Beaglebone Black. # Copyright (C) 2015 Mark Horn # # This file is part of StarinetPython3Logger. # # StarinetPython3Logger is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by the...
mhorn71/StarinetPythonLogger
utilities/staribuscrc.py
Python
gpl-2.0
2,214
import helper from helper import Command import os def start(args, logfile, errfile): helper.set_database_host(args) commands = [ Command("sudo /usr/local/nginx/sbin/nginx -c $TROOT/config/nginx.conf", True), Command("rvm ruby-2.0.0-p0 do bundle exec unicorn -E production -c config/unicorn.rb", False) ] ...
torhve/FrameworkBenchmarks
frameworks/Ruby/rack/run_unicorn.py
Python
bsd-3-clause
600
""" Log functional tests """ import os import sys import logging # To display the logging values sys.path.insert(0, os.path.abspath('.')) import log def print_logs(logger, level): print("Testing log level: {}".format(level)) logger.debug('Testing debug ({})'.format(logging.DEBUG)) logger.info('Testing ...
andreburgaud/jd2chm
tests/test_log.py
Python
mit
924
#!/usr/bin/env python # -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ """ import logging import numpy as np from numpy import ma from cotede.qctests import QCCheckVar try: import pandas as pd PANDAS_AVAILABLE = True except ImportError: PANDAS_AVAILABLE = Fa...
castelao/CoTeDe
cotede/qctests/gradient.py
Python
bsd-3-clause
2,756
'''The :mod:`pulsar.apps.ws` contains WSGI_ middleware for handling the WebSocket_ protocol. Web sockets allow for bidirectional communication between the browser and server. Pulsar implementation uses the WSGI middleware :class:`.WebSocket` for the handshake_ and a class derived from :class:`.WS` handler for the commu...
inirudebwoy/pulsar
pulsar/apps/ws/__init__.py
Python
bsd-3-clause
3,893
#! /usr/bin/env python2 #-*- coding:utf-8 -*- from __future__ import print_function from future.utils import viewitems import unittest class TestSymbExec(unittest.TestCase): def test_ClassDef(self): from miasm.expression.expression import ExprInt, ExprId, ExprMem, \ ExprCompose, ExprAssign...
carolineLe/miasm
test/ir/symbexec.py
Python
gpl-2.0
13,352
# # Copyright (c) 2017 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
yasharmaster/scancode-toolkit
tests/commoncode/test_fileutils.py
Python
apache-2.0
32,168
# -*- encoding: utf-8 -*- import os from datetime import datetime from fabric.api import run, env, put, sudo, get ############################################################ # MYSQL TASKS # ############################################################ def mysql_db_create(d...
loogica/envkit
fabfile/mysql5.py
Python
unlicense
2,329
import re from bottery.exceptions import ValidationError class CaseSensitiveOptionMixin: def clean_case_senstive(self): if not self.kwargs.get('case_sensitive'): self.message.text = self.message.text.lower() class PlatformsOptionMixin: def clean_platforms(self): platforms = self...
rougeth/bottery
bottery/handlers.py
Python
mit
2,557
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from wagtailschemaorg._version import version_bits # -- General configuration ------------------------------------------------ extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.viewcode', ] source_suffix = '.rst' master_doc = 'index...
takeflight/wagtail-schema.org
docs/source/conf.py
Python
bsd-2-clause
2,107
from pprint import pformat import boto3 from clint.textui import indent, puts, prompt def _get_instance_details(instance): return { 'tags': instance.tags, 'launch_time': instance.launch_time.isoformat(), 'instance_type': instance.instance_type, 'state': instance.state, 'ke...
lchi/blimp
blimp/commands/terminate.py
Python
mit
1,260
from django.db import models from django.contrib.auth.models import User #TODO create namespaces for dockerfiles in the filesystem # eg. resources/dockerfile_name/Dockerfile #TODO check if there's a git file storage for django class Dockerfile(models.Model): user = models.ForeignKey(User) name = mo...
SotolitoLabs/dockie
dockie_index/dockerfiles/models.py
Python
gpl-2.0
879
""" Physical quantities. """ from __future__ import division from sympy import Abs, AtomicExpr, Symbol, sympify from sympy.core.compatibility import string_types from sympy.physics.units import Dimension, dimensions from sympy.physics.units.dimensions import _QuantityMapper from sympy.physics.units.prefixes import Pr...
kaushik94/sympy
sympy/physics/units/quantities.py
Python
bsd-3-clause
7,651
from django.contrib.gis.db import models as gis_models from django.utils.translation import ugettext_lazy as _ from buildings.models import Campus, LtAccessType class BaseLookupDomain(gis_models.Model): code = gis_models.CharField(verbose_name=_("code value"), max_length=150, null=True, blank=True) name = gis...
indrz/indrz
indrz/landscape/models.py
Python
gpl-3.0
7,157
""" RPC support. """ from django.http import QueryDict, HttpResponse from django.utils import simplejson, importlib from ..utils.emitter import JSONPEmitter, JSONEmitter from ..utils.parser import JSONParser, FormParser from ..utils.tools import as_tuple from ..utils.response import SerializedHttpResponse from ..views...
Lispython/adrest
adrest/resources/rpc.py
Python
lgpl-3.0
5,633
from portality import models # these are the ids of the journal and the issn of the erroneous continuation id = "d241030fda0b419f9aaaf542d57a61af" issn = "0049-3449" # details to create the new journal record name = "Maluch Vergara" email = "malucha.vergara@uc.cl" owner = "00493449" # get the journal and the other j...
DOAJ/doaj
portality/migrate/p2oe/uncontinue.py
Python
apache-2.0
1,049
#!/usr/bin/env python ########### # imports ########### import ConfigParser import os import threading import tcpserver ########### # init part ########### SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) CONFIG = None LOCK = threading.RLock() def read_config(signum = None, frame = None): global CONFIG gl...
olesz/pellet-stove-control
daemon/bin/config.py
Python
gpl-3.0
1,056
"""This file includes a collection of utility functions that are useful for implementing DQN.""" import gym import tensorflow as tf import numpy as np import random def huber_loss(x, delta=1.0): # https://en.wikipedia.org/wiki/Huber_loss return tf.select( tf.abs(x) < delta, tf.square(x) * 0.5, ...
DanielTakeshi/rl_algorithms
dqn/dqn_utils.py
Python
mit
13,985
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
turon/openthread
tests/scripts/thread-cert/Cert_5_6_08_ContextManagement.py
Python
bsd-3-clause
5,456
from Acquisition import aq_inner from Acquisition import aq_parent from bika.lims.permissions import * def upgrade(tool): """Added bika.lims.instrument.js bika.lims.referencesample.js bika.lims.graphics.css """ # Hack prevent out-of-date upgrading # Related: PR #1484 # http...
veroc/Bika-LIMS
bika/lims/upgrade/to3043.py
Python
agpl-3.0
724
# -*- coding: utf-8 -*- from __future__ import print_function from datetime import datetime import itertools import numpy as np import pytest from pandas.compat import u import pandas as pd from pandas import ( DataFrame, Index, MultiIndex, Period, Series, Timedelta, date_range) from pandas.tests.frame.common ...
MJuddBooth/pandas
pandas/tests/frame/test_reshape.py
Python
bsd-3-clause
39,420
"""CoIL Challenge 2000 dataset. The original dataset and further information can be found here: http://www.liacs.nl/~putten/library/cc2000/ Brief description ----------------- The data contains 9,822 observations on 86 variables describing information on customers of an insurance company. The data was collected...
I2Cvb/data_balancing
src/data_conversion/fetch/coil_2000.py
Python
mit
7,861
import os import sys os.environ["MATPLOTLIBDATA"] = os.path.join(sys._MEIPASS, "mpl-data")
supercheetah/diceroller
pyinstaller/support/rthooks/pyi_rth_mpldata.py
Python
artistic-2.0
92
# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest class TestEmployeeIncentive(unittest.TestCase): pass
saurabh6790/erpnext
erpnext/payroll/doctype/employee_incentive/test_employee_incentive.py
Python
gpl-3.0
237
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
jbedorf/tensorflow
tensorflow/python/ops/stateful_random_ops.py
Python
apache-2.0
10,441
"""Source provider for content which has been installed.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os from ... import types as t from . import ( SourceProvider, ) class InstalledSource(SourceProvider): """Source provider for content which has been ins...
aperigault/ansible
test/lib/ansible_test/_internal/provider/source/installed.py
Python
gpl-3.0
1,159
#!/usr/bin/python import sys, os, re import json import argparse import pprint arg_parser = argparse.ArgumentParser(description='Define tests') arg_parser.add_argument('-p', '--pretty-print', action="store_true", help="select human friendly output, default is CSV") arg_parser.add_argument('-i', '--info', action="stor...
bigfootproject/OSMEF
data_processing/aggregate_old.py
Python
apache-2.0
4,348
import unittest import time from subprocess import check_call as call from jbrowse_selenium import JBrowseTest class AbstractModEncodeFacetedTest ( JBrowseTest ): tracksel_type = 'Faceted' data_dir = 'sample_data/json/modencode' def test_faceted( self ): time.sleep(1.0) self.turn_on_tra...
GreggHelt2/apollo-test
tests/selenium_tests/modencode_faceted_tracksel_test.py
Python
lgpl-2.1
467
#!/usr/bin/env python # # GrovePi Example for using the Grove Thumb Joystick (http://www.seeedstudio.com/wiki/Grove_-_Thumb_Joystick) # # The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi # # Have a question about this example? Ask...
karan259/GrovePi
Software/Python/grove_thumb_joystick.py
Python
mit
3,278
#! /usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2014, Nicolas P. Rougier. All Rights Reserved. # Distributed under the (new) BSD License. # ----------------------------------------------------------------------------- import ...
duyuan11/glumpy
examples/gloo-rain.py
Python
bsd-3-clause
2,459
import ardustatlibrary as ard import time the_socket = 7777 connresult = ard.connecttosocket(the_socket) print connresult socketinstance = connresult["socket"] for a in range(0,5): ard.blink(the_socket) time.sleep(.2)
kjiang8/Ardustat
Deprecated_Unsupported/Python_Client/blinky.py
Python
bsd-2-clause
225
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-2013 OpenERP s.a. (<http://openerp.com>). # Copyright (C) 2014 initOS GmbH & Co. KG (<http://www.initos.com>). # Author Nikolina Todorova <nikolina.tod...
initOS/l10n-germany
l10n_de_country_states/__openerp__.py
Python
agpl-3.0
1,544
#!/usr/bin/python2.4 # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
frickler/WaveBots
waveapi/blip.py
Python
apache-2.0
31,833
# -*- coding: utf-8 -*- # # Cherokee-admin # # Authors: # Alvaro Lopez Ortega <alvaro@alobbs.com> # Taher Shihadeh <taher@octality.com> # # Copyright (C) 2010 Alvaro Lopez Ortega # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Publi...
chetan/cherokee
admin/PageSource.py
Python
gpl-2.0
20,099
""" @summary: @author: CJ Grady @version: @status: alpha @license: gpl2 @copyright: Copyright (C) 2014, University of Kansas Center for Research Lifemapper Project, lifemapper [at] ku [dot] edu, Biodiversity Institute, 1345 Jayhawk Boulevard, Lawrence, Kansas, 66045, USA ...
cjgrady/stinkbait
modules/unicodeCsv.py
Python
gpl-2.0
2,913
# -*-coding:utf-8-*- def p_adjust(p, method='BH'): from scipy.stats.rand import rankdata if method == 'BH': prank = rankdata(p, method='average') plen = len(p) else: pass padjlist = [x * plen / xr for x,xr in zip(p, prank)] pajd = [min(x, 1) for x in padjlist] return pad...
wolfsonliu/littletools
Statistics/statistics.py
Python
gpl-3.0
344
import configparser from PyQt5.QtCore import pyqtSlot, pyqtSignal, Qt, QSize, QVariant from PyQt5.QtWidgets import QWidget, QStackedWidget, QPushButton, QLineEdit, QLabel, \ QVBoxLayout, QHBoxLayout, QComboBox, QGroupBox, QListWidget, QListView, \ QAbstractItemView, QListWidgetItem from PyQt5.QtGui import QIco...
minlexx/xnovacmd
ui/settings_widget.py
Python
gpl-2.0
14,698
#!/usr/bin/env python # License: GPLv3 Copyright: 2019, Kovid Goyal <kovid at kovidgoyal.net> import re from typing import List, Generator, Any, Type from .cli_stub import HintsCLIOptions from .typing import MarkType def mark(text: str, args: HintsCLIOptions, Mark: Type[MarkType], extra_cli_args: List[str], *a: An...
kovidgoyal/kitty
kitty/choose_entry.py
Python
gpl-3.0
584
encoding = 'ibm866' commands = [ 'answer_clar', 'broadcast', 'broadcast_clar', 'broadcast_new_clar', 'chat', 'chat_console', 'child_console', 'clear_subm', 'contest_status', 'create_clar', 'detach_channel', 'detach_console', 'disable_console', 'dismiss_testings', 'disqualify_team', 'help', 'ioir...
burunduk3/testsys
dts/config.py
Python
gpl-3.0
831
from config import Configuration from corpus import VMWE, Sentence, Token from enum import Enum class TransitionType(Enum): SHIFT = 0 REDUCE = 1 WHITE_MERGE = 2 MERGE_AS_LVC = 3 MERGE_AS_VPC = 4 MERGE_AS_IReflV = 5 MERGE_AS_OTH = 6 MERGE_AS_ID = 7 MERGE_AS_MWT_VPC = 8 MERGE_AS_...
hazemalsaied/IdenSys
Src/transitions.py
Python
mit
21,966
""" WSGI config for yunshu project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTI...
stffer/yunshu
blog/wsgi.py
Python
mit
390
""" Various functions for experimental purposes """ import numpy as np from scipy.linalg import solve from .utils import center_gram from .distances_rkhs import distance_mahalanobis def hsic(K1, K2): """ Compute the Hilbert-Schmidt independence criterion Parameters ---------- K1: centered Gram ma...
daien/daco
misc.py
Python
mit
4,348
################################################################################################## # Copyright (c) 2012 Brett Dixon # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without r...
theiviaxx/Frog
frog/views/__init__.py
Python
mit
9,165
import sys, os, rpm def get_rpm_info(rpm_file): """Returns rpm information by querying a rpm""" ts = rpm.ts() fdno = os.open(rpm_file, os.O_RDONLY) try: hdr = ts.hdrFro...
ActiveState/code
recipes/Python/306705_Query_rpm_file_return_dict_various_rpm/recipe-306705.py
Python
mit
980
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): # reload schema for doctype in ("Work Order", "Work Order Item", "Work Order Operation", "BOM Item", "BOM Explosio...
gsnbng/erpnext
erpnext/patches/v8_0/update_production_orders.py
Python
agpl-3.0
1,606
# Copyright (c) 2015, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms.
chriskiehl/python-stix
stix/bindings/extensions/vulnerability/__init__.py
Python
bsd-3-clause
105
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest def test_suite(): suite = unittest.TestLoader().discover(start_dir=".") return suite
koodaamo/koodaamo.sshtunnel
tests/__init__.py
Python
gpl-2.0
156
from zope.interface import implementer from six import iteritems from twisted.internet.defer import DeferredQueue, inlineCallbacks, maybeDeferred, returnValue from .utils import get_spider_queues from .interfaces import IPoller @implementer(IPoller) class QueuePoller(object): def __init__(self, config): ...
wujuguang/scrapyd
scrapyd/poller.py
Python
bsd-3-clause
1,098
"""A switch driver for the Dell N3000 series. Currently the driver uses telnet to connect to the switch's console; in the long term we want to be using SNMP. """ import re import logging from schema import Schema, Optional, And, Use from hil.model import db, Switch from hil.migrations import paths from hil.ext.switc...
SahilTikale/haas
hil/ext/switches/n3000.py
Python
apache-2.0
6,983
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-11-06 04:53 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('hitrequest', '0008_auto_20161102_1457'), ] operations = [ migrations.AddFie...
artoonie/transcroobie
hitrequest/migrations/0009_document_completetranscript.py
Python
gpl-3.0
463
#!/usr/bin/python # -*- coding: utf-8 -*- """Setup and install the archive interface with hpss.""" import sys from os.path import isfile from os import path from setuptools.extension import Extension from setuptools import setup, find_packages HPSS = Extension( 'pacifica.archiveinterface.backends.hpss._hpssExtensi...
dmlb2000/pacifica-archiveinterface
setup.py
Python
lgpl-3.0
1,765
#coding: utf-8 from unittest import TestCase from mongoengine import connect from mongoengine.connection import get_db class MongoTestCase(TestCase): """ TestCase class that clear the collection between the tests """ @property def db_name(self): from django.conf import settings ...
elephanter/mongoengine
mongoengine/django/tests.py
Python
mit
813
# Copyright (c) 2014. Mount Sinai School of Medicine # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
dmnfarrell/epitopemap
modules/pepdata/iedb/alleles.py
Python
apache-2.0
3,293
""" Updates start offsets, stop offsets and indicators everywhere in score. .. note:: This is probably the most important part of Abjad to optimize. Use the profiler to figure out how many unnecessary updates are happening. Then reimplement. As a hint, the update manager implements a weird version of the "obs...
Abjad/abjad
abjad/_update.py
Python
gpl-3.0
15,897
#!/usr/bin/env python # -*- coding: utf-8 -*- """Results menu. """ # Import: std import sys # Import: PyCEGUI import PyCEGUI # Import: Configuration from configuration import TheConfig # Import: Menus from menu import Menu from menumanager import MenuManager # Results menu class MenuResu...
peterperron/speed-dreams-2
src/tools/ceguidemo/menuresults.py
Python
gpl-3.0
4,089
from django.conf import settings from django.contrib.auth import get_user_model from django.db import models from nucleus.models import ( AbstractBaseModel, EmailRecord, TeamMember, ) User = get_user_model() class Team(AbstractBaseModel): name = models.CharField(max_length=255) logo_url = models...
prattl/wepickheroes
api/teams/models.py
Python
mit
2,356
#!/usr/bin/python # -*- coding: utf-8 -*- # #Author: Adel Messaoudi # # # import getpass import smtplib, os, sys from email.mime.multipart import MIMEMultipart from email.mime.base import MIMEBase from email.mime.text import MIMEText from email.utils import COMMASPACE, formatdate from email import encoders # for hotma...
adelMsd/sendBulkEmails
sendMsg-v-2.0.py
Python
gpl-3.0
2,477
import RPi.GPIO as GPIO import time import sys resetPin = 3 # BCM pin 3, actually pin 5 hold = False for arg in sys.argv: if 'hold' in arg: hold = True def reset(): # set up the pin as output # will generate a warning about pull-up resistor but that's ok GPIO.setmode(GPIO.BCM) GPIO.setup(...
tarquasso/softroboticfish6
fish/pi/resetMbed.py
Python
mit
580
from __future__ import (absolute_import, division, print_function) from qtpy.QtWidgets import (QFileDialog) import os from addie.utilities.file_handler import FileHandler from addie.widgets.filedialog import get_save_file class ConfigFileNameHandler(object): filename = '' def __init__(self, parent=None): ...
neutrons/FastGR
addie/menu/file/configuration/config_file_name_handler.py
Python
mit
1,502
# Copyright (c) 2011, Peter Thatcher # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditi...
pthatcher/psync
src/exp/watch.py
Python
bsd-3-clause
2,850
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
airbnb/airflow
airflow/example_dags/example_external_task_marker_dag.py
Python
apache-2.0
3,111
from datetime import datetime, timezone class Packager(object): '''Factory class responsible for packaging outgoing json in an appropriate format''' def __init__(self, version, sender_details): self.version = version self.senderdetails = sender_details def utc_to_local(self, utc_dt): '''Changes the UTC time...
etkirsch/pyna-colada
pyna/core/Packager.py
Python
gpl-2.0
912
"""Test model properties.""" import pytest from gremlin_python.statics import long from goblin import element, exception, manager, properties def test_set_change_property(person, lives_in): # vertex assert not person.name person.name = 'leif' assert person.name == 'leif' person.name = 'leifur' ...
ZEROFAIL/goblin
tests/test_properties.py
Python
agpl-3.0
7,949
from __future__ import print_function, division from sympy import Rational from fractions import gcd def egyptian_fraction(r, algorithm="Greedy"): """ Return the list of denominators of an Egyptian fraction expansion [1]_ of the said rational `r`. Parameters ========== r : Rational ...
wdv4758h/ZipPy
edu.uci.python.benchmark/src/benchmarks/sympy/sympy/ntheory/egyptian_fraction.py
Python
bsd-3-clause
4,155
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
savi-dev/horizon
horizon/views/auth_forms.py
Python
apache-2.0
8,511
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'http://jonsson.ninja' RELATIVE_URLS = False ...
matachi/jonsson.ninja
publishconf.py
Python
mit
487
#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import asy...
Azure/azure-sdk-for-python
sdk/eventhub/azure-eventhub/tests/livetest/asynctests/test_reconnect_async.py
Python
mit
5,049
from .update_launch import update_launch __all__ = ['update_launch']
serein7/openag_brain
src/openag_brain/commands/__init__.py
Python
gpl-3.0
70
# Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def removeNthFromEnd(self, head, n): """ :type head: ListNode :type n: int :rtype: ListNode """ p = L...
tedye/leetcode
Python/leetcode.019.Remove-Nth-Node-From-End-of-List.py
Python
mit
765
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
wzhfy/spark
python/pyspark/sql/tests/test_udf.py
Python
apache-2.0
30,102
"""Selective implementation of tcl info command. This script is used while running python tests translated from Tcl.""" import re def command (caller_globals, caller_locals, pattern): return commands(caller_globals, caller_locals, pattern) def commands (caller_globals, caller_locals, pattern): print...
timkrentz/SunTracker
IMU/VTK-6.2.0/Utilities/vtkTclTest2Py/info.py
Python
mit
597
#!/usr/bin/python # Author: kumar # date: 24th Oct 2017 # usage: saying hello to the world # comment: # : 24-10-2017 - kumar - Adding one more esclamation to my code. print ("hello world!!!")
tuxfux-hlp-notes/python-batches
archieves/batch-66/03.1-first.py
Python
gpl-3.0
200
""" Various utilities used by topic-related modules. :copyright: Copyright since 2006 by Oliver Schoenborn, all rights reserved. :license: BSD, see LICENSE_BSD_Simple.txt for details. """ from textwrap import TextWrapper, dedent import sys from typing import Tuple, List, Sequence, Mapping, Dict, Callable, Any, Optio...
schollii/pypubsub
src/pubsub/core/topicutils.py
Python
bsd-2-clause
3,995
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
googleapis/python-compute
tests/unit/gapic/compute_v1/test_service_attachments.py
Python
apache-2.0
147,452
from py_stringmatching import utils from six.moves import xrange from py_stringmatching.similarity_measure.sequence_similarity_measure import \ SequenceSimilarityMeasure from py_stringmatching.similarity_measure.cython.cython_jaro import jaro class Jaro(SequenceSimi...
anhaidgroup/py_stringmatching
py_stringmatching/similarity_measure/jaro.py
Python
bsd-3-clause
2,435
#!/usr/bin/python # -*- coding: UTF-8 -*- from __future__ import absolute_import from __future__ import with_statement from __future__ import division from __future__ import nested_scopes from __future__ import generators from __future__ import unicode_literals from __future__ import print_function from neurotools.syst...
michaelerule/neurotools
stats/gmm.py
Python
gpl-3.0
4,284
#!/usr/bin/env python # -*- coding: utf-8 -*- # ****************************************************************************** # $Id$ # # Project: Google Summer of Code 2007, 2008 (http://code.google.com/soc/) # Support: BRGM (http://www.brgm.fr) # Purpose: Convert a raster into TMS (Tile Map Service) tiles in a di...
pierotofy/OpenDroneMap
opendm/tiles/gdal2tiles.py
Python
gpl-3.0
121,047