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 |
|---|---|---|---|---|---|
__version__ = "1.0.3" | flashingpumpkin/filerotate | filerotate/__version__.py | Python | mit | 21 |
"""@file dblstm_capsnet.py
contains the DBLSTMCapsNet class"""
import tensorflow as tf
import model
from nabu.neuralnetworks.components import layer, ops
import pdb
class DBLSTMCapsNet(model.Model):
"""A capsule network with bidirectional recurrent LSTM"""
def _get_outputs(self, inputs, input_seq_length, is_trai... | JeroenZegers/Nabu-MSSS | nabu/neuralnetworks/models/dblstm_capsnet.py | Python | mit | 3,928 |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | Azure/azure-sdk-for-python | sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/filters_py3.py | Python | mit | 1,058 |
from ajax_select import get_lookup
from django import forms
from django.core.urlresolvers import reverse
from django.forms.util import flatatt
from django.template.defaultfilters import escapejs
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
from django.utils.translat... | caseywstark/colab | colab/apps/ajax_select/fields.py | Python | mit | 9,217 |
import os
import numpy as np
import creators
from utils import schema_split_helper
BASE_DIR = os.path.dirname( os.path.realpath(__file__) )
''' Load datasets from disk. '''
def load_gd(name, schema=False, split=False):
GDIR = os.path.join(BASE_DIR, 'gens.domingos/')
trn = np.loadtxt(GDIR+name+'.ts.data',... | awd4/spnss | datasets/loaders.py | Python | mit | 1,541 |
#!/usr/bin/env python
import csv
import difflib
try:
from settings import FIELD_SEP
except ImportError:
FIELD_SEP = '\t'
class TaxonIndex():
"""
TaxonIndex is a class for reading a taxon dictionary file (which must be
in the form of a tab-separated CSV text file), and matching genera and taxa
... | rudivs/TaxonLinker | taxonutils.py | Python | mit | 4,328 |
"""Screen database."""
import redis_client
import control
import re
from twisted.internet import defer
class ScreenDB(object):
"""A screen database."""
def __init__(self):
"""Default constructor."""
pass
def set_mode(self, screen, mode):
redis_client.connection.set('screen:{0}:mod... | prophile/compd | src/screen_db.py | Python | mit | 2,580 |
"""
Build and install the project.
"""
from setuptools import find_packages, setup
NAME = "HinetPy"
AUTHOR = "Dongdong Tian"
AUTHOR_EMAIL = "seisman.info@gmail.com"
LICENSE = "MIT License"
URL = "https://github.com/seisman/HinetPy"
DESCRIPTION = (
"A Python package to request and process seismic waveform data from... | seisman/HinetPy | setup.py | Python | mit | 1,864 |
import logging
from kitnirc.client import Channel
from kitnirc.modular import Module
from kitnirc.user import User
_log = logging.getLogger(__name__)
def is_admin(controller, client, actor):
"""Used to determine whether someone issuing a command is an admin.
By default, checks to see if there's a line of ... | ayust/kitnirc | kitnirc/contrib/admintools.py | Python | mit | 3,850 |
# -*- coding: utf-8 -*-
# gthnk (c) Ian Dennis Miller
import os
import flask
import logging
from flaskext.markdown import Markdown
from mdx_linkify.mdx_linkify import LinkifyExtension
from mdx_journal import JournalExtension
from . import db, login_manager, bcrypt
from .models.day import Day
from .models.entry impo... | iandennismiller/gthnk | src/gthnk/server.py | Python | mit | 1,615 |
import logging
import os
from settings import CONVERSIONS, LOGGING_KWARGS, XSL_PATH
logger = logging.getLogger(__name__)
def print_xsl_files():
for index, parts in enumerate(CONVERSIONS):
file_path = os.path.join(XSL_PATH, parts[0])
print('{}: {}'.format(index + 1, file_path))
if '__main__' == __name__:
lo... | AustralianAntarcticDataCentre/metadata_xml_convert | print_xsl.py | Python | mit | 376 |
"""Tests for issue previously raised and fixed, so we can be alerted if they start failing again."""
import pytest
from geomeppy.geom.polygons import Polygon3D
from geomeppy.geom.surfaces import set_coords
@pytest.fixture
def shadow_matching():
shadow_blocks = [
{
"name": "PN1001_Bld1000",
... | jamiebull1/geomeppy | tests/test_regressions.py | Python | mit | 7,185 |
from rllab.envs.base import Env
from rllab.envs.base import Step
from rllab.spaces import Box
import numpy as np
class MultiMod2DEnv(Env):
"""
This is a single time-step MDP where the action taken corresponds to the next state (in a 2D plane).
The reward has a multi-modal gaussian shape, with the mode mea... | florensacc/snn4hrl | envs/point/multiMod2D_env.py | Python | mit | 2,207 |
import getopt
import os
import sys
from updatewrapper.host import Host
from updatewrapper.utils.display import ask_yes_no, print_banner, print_info, print_notice, print_success, print_warning
from updatewrapper.utils.file import get_config_file, get_hosts, get_logfile, save_output
from updatewrapper.flavor import dete... | EpicScriptTime/update-wrapper | updatewrapper/__init__.py | Python | mit | 2,934 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase
from django.conf import settings
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from powerpages.models import Page
from powerpages.sync import PageFileDumper
from powerpages.admi... | Open-E-WEB/django-powerpages | powerpages/tests/test_admin.py | Python | mit | 7,705 |
import os
import signal
import time
import unittest
import stomp
from stomp import exception
from stomp.backward import monotonic
from stomp.listener import TestListener
from stomp.test.testutils import *
class TestBasicSend(unittest.TestCase):
def setUp(self):
conn = stomp.Connection(get... | GeneralizedLearningUtilities/SuperGLU | python_module/stomp/test/basic_test.py | Python | mit | 7,571 |
"""
WSGI config for ccbc_library 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.7/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ccbc_library.deploy_settings")
f... | comsaint/ccbc-library | ccbc_library/wsgi.py | Python | mit | 441 |
from main import GuessManager
def test_init_uppercase():
g = GuessManager('SOMEWORD')
assert g.word == 'SOMEWORD'
assert g.mask == [False]*8
def test_init_mask():
mask = [True, False, True, False, True, False, True, False]
g = GuessManager('SOMEWORD', mask=mask)
assert g.word == 'SOMEWORD'
... | lgiordani/slack_hangman | tests/test_guess_manager.py | Python | mit | 5,541 |
import pathlib
import numpy as np
import pytest
import meshio
from . import helpers
@pytest.mark.parametrize(
"mesh",
[
# helpers.empty_mesh,
helpers.tri_mesh,
helpers.quad_mesh,
helpers.tri_quad_mesh,
helpers.add_point_data(helpers.tri_mesh, 1, dtype=int),
h... | nschloe/meshio | tests/test_ply.py | Python | mit | 1,964 |
import os
import imp
import sys
import six
class DotImportHook:
def find_module(self, fullname, path=None):
bits = fullname.split('.')
if len(bits) <= 1:
return
for folder in sys.path:
if os.path.exists(os.path.join(folder, fullname)):
return self
for i in range(1, len(bits) - 1):
package, mod... | sciyoshi/dotmod | dotmod.py | Python | mit | 1,987 |
# Use default debug configuration or local configuration
try:
from .config_local import *
except ImportError:
from .config_default import *
| steelart/ask-navalny | django-backend/config/config.py | Python | mit | 148 |
# coding=utf-8
"""
The SNMPRawCollector is designed for collecting data from SNMP-enables devices,
using a set of specified OIDs
#### Configuration
Below is an example configuration for the SNMPRawCollector. The collector
can collect data any number of devices by adding configuration sections
under the *devices* hea... | datafiniti/Diamond | src/collectors/snmpraw/snmpraw.py | Python | mit | 6,082 |
from distutils.core import setup
setup(
name='ave',
version='0.8.0',
author='Sasha Matijasic',
author_email='sasha@selectnull.com',
scripts=['ave.sh', ],
url='https://github.com/selectnull/ave',
license='LICENSE',
description='ave Activates Virtual Environment',
long_description=ope... | selectnull/ave | setup.py | Python | mit | 345 |
from setuptools import setup
'''
The packages subprocess and tkinter is also required from the standard library
'''
setup(
name='PLOD',
version='1.0',
description='Matplotlib plot designer',
author='David Kleiven',
licence='MIT',
author_email='davidkleiven446@gmail.com',
install_requires=['... | davidkleiven/PLOD | setup.py | Python | mit | 534 |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import tensorflow as tf
class BaseConverter(object):
@staticmethod
def to_int64_feature(values):
"""Returns a TF-Feature of int64s.
Args:
values: A scalar or list of values.
Returns:... | polyaxon/polyaxon-api | polyaxon_lib/datasets/converters/base.py | Python | mit | 2,397 |
from selvbetjening.settings_base import *
ROOT_URLCONF = 'sdemo.urls'
# installed applications
INSTALLED_APPS.extend([
'selvbetjening.frontend.base',
'selvbetjening.frontend.auth',
'selvbetjening.frontend.userportal',
'selvbetjening.frontend.eventportal',
'selvbetjening.frontend.eventsingle',
... | animekita/selvbetjening | sdemo/settings.py | Python | mit | 738 |
import os
from setuptools import setup
from twtxtcli import __version__, __project_name__, __project_link__
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name=__project_name__,
version=__version__,
author='Myles Braithwaite',
author_email='me@mylesbr... | myles/twtxt-cli | setup.py | Python | mit | 850 |
from AboutWindow import AboutWindow as AboutWindow
from ActionListWidget import ActionListWidget as ActionListWidget
from ActionPushButton import ActionPushButton as ActionPushButton
from CameraWidget import CameraWidget as CameraWidget
from ConnectDialog import ConnectDialog as ConnectDialog
from MainWindow import Mai... | mattBrzezinski/Hydrogen | robot-controller/UI/__init__.py | Python | mit | 632 |
import os
def NormalizedJoin( *args ):
"Normalizes and joins directory names"
return os.path.normpath(os.path.join(*args))
| DavidYen/YEngine | ypy/path_help.py | Python | mit | 129 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-28 22:05
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Create... | mchughmk/react-django | backend/api/migrations/0001_initial.py | Python | mit | 1,092 |
# -*- coding: utf-8 -*-
"""
@author: Tobias Krauss
"""
from lib.Instruction import Instruction
import lib.PseudoInstruction as PI
import lib.StartVal as SV
from lib.PseudoInstruction import (PseudoInstruction,
PseudoOperand)
from lib.Register import (get_reg_class,
... | anatolikalysch/VMAttack | lib/VmInstruction.py | Python | mit | 33,455 |
## -*- coding: utf-8 -*-
# Copyright © 2011-2012 Mike Fled <nonvenia@gmail.com>
import codecs, os, re, sys
# encoding used for the text files
_file_encoding = "utf-8"
# get current working directory
_cur_dir = os.path.dirname(os.path.realpath(__file__))
# get version string from the yarest package
_ver_file = os.pa... | tectronics/yarest | setup.py | Python | mit | 3,188 |
from django.apps import AppConfig
class CreatorConfig(AppConfig):
name = 'creator'
| HenryCorse/Project_Southstar | CharacterApp/creator/apps.py | Python | mit | 89 |
#!/usr/bin/env python3
# transpiled with BefunCompile v1.3.0 (c) 2017
import gzip, base64
_g = ("AR+LCAAAAAAABACdUDGOAyEM/AoHW7FBYna5XIKQdQ9B3BUr0VJZKXj8mZAUKXMuzGA8nsHsse3h8/x1uaq3g/RxHNpa8PtcxQ3btQEu/YP8NMA0pWdODzAm0sSU4TLf"
+ "qw1hRUVItKFGrJ36QD5ThIum/DDZPM4ldiHuaApBkqAaUC1Qfz/6Q3l59bFAFZFs54tluRSpdadvWlUfc8pIojt... | Mikescher/Project-Euler_Befunge | compiled/Python3/Euler_Problem-024.py | Python | mit | 2,977 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Tomato.tests
"""
import unittest
import msgpack
import time
try:
from PIL import Image
except ImportError:
import Image
from tomato.swf_processor import Swf
from tomato.exceptions_tomato import MovieClipDoesNotExist
from tomato.utils import bits_list2string, B... | buhii/tomato | tests.py | Python | mit | 3,294 |
# Copyright (c) 2014 Pier Carlo Chiodi - http://www.pierky.com
# Licensed under The MIT License (MIT) - http://opensource.org/licenses/MIT
#
# The MIT License (MIT)
# =====================
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation f... | mathias4github/ripe-atlas-traceroute2kml | ipdetailscache.py | Python | mit | 9,640 |
#!C:\Users\ponto frio\PycharmProjects\MarceloSandovalScript\backend\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'Unidecode==0.4.18','console_scripts','unidecode'
__requires__ = 'Unidecode==0.4.18'
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.exit(
load_entry... | marcelosandoval/tekton | backend/venv/Scripts/unidecode-script.py | Python | mit | 388 |
# postgresql/__init__.py
# Copyright (C) 2005-2020 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from . import base
from . import pg8000 # noqa
from . import psycopg2 # noq... | graingert/sqlalchemy | lib/sqlalchemy/dialects/postgresql/__init__.py | Python | mit | 2,432 |
"""
@name: Modules/CXore/Drivers/USB/usb_open.py
@author: D. Brian Kimmel
@contact: D.BrianKimmel@gmail.com
@copyright: (c) 2011-2020 by D. Brian Kimmel
@license: MIT License
@note: Created on Mar 27, 2011
@summary: This module is for communicating with USB devices.
This will interface various PyHo... | DBrianKimmel/PyHouse | Project/src/Modules/Core/Drivers/Usb/Usb_open.py | Python | mit | 6,996 |
from django.db import models
from . import managers
class VTM(models.Model):
class Meta:
verbose_name = "Virtual Therapeutic Moiety"
verbose_name_plural = "Virtual Therapeutic Moieties"
ordering = ["nm"]
objects = managers.VTMManager()
obj_type = "vtm"
name_field = "nm"
... | annapowellsmith/openpresc | openprescribing/dmd2/models.py | Python | mit | 28,012 |
import Differentiation as Diff
import numpy as np
import sys
# Geometry: periodic in x and y
# Arakawa C-grid
#
# | | | |
# h -- u -- h -- u -- h -- u -- h --
# | | | |
# | | | |
# v q v q... | PyRsw/PyRsw | src/Fluxes/SADOURNY_SW.py | Python | mit | 4,319 |
# -*- coding: utf-8 -*-
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation r... | vmlaker/mpipe | doc/source/conf.py | Python | mit | 7,581 |
##
# Copyright (c) 2008-2010 Sprymix Inc.
# All rights reserved.
#
# See LICENSE for details.
##
import collections
from importkit.yaml import validator
from importkit.yaml.validator.tests.base import SchemaTest, raises, result
class TestTypes(SchemaTest):
def setUp(self):
super().setUp()
self.... | sprymix/importkit | importkit/yaml/validator/tests/test_types.py | Python | mit | 5,672 |
# /usr/bin/env python
import pygal
import requests
import json
#Use a view in CouchDB to get the data
#use the first key for attribute type
#order descending so when limit the results will get the latest at the top
r = requests.get('http://127.0.0.1:5984/mvp_sensor_data/_design/doc/_view/attribute_value?startkey=["te... | webbhm/OpenAg_MVP_UI | MVP_UI/python/temp_chart.py | Python | mit | 966 |
import requests
from pact_test.either import *
from pact_test.repositories.pact_broker import upload_pact
from pact_test.repositories.pact_broker import next_version
from pact_test.repositories.pact_broker import format_headers
from pact_test.repositories.pact_broker import get_latest_version
def test_current_version... | Kalimaha/pact-test | tests/repositories/pact_broker.py | Python | mit | 3,852 |
from django.apps import apps
from contextlib import contextmanager
def session():
return apps.get_app_config('basex').basex
@contextmanager
def recipe_db():
s = session()
s.execute('open recipe')
yield s
s.close()
| jajadinimueter/recipe | apps/basex/basex.py | Python | mit | 239 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
@file __init__.py.py
@author Allen Woods
@date 2016-08-02
@version 16-8-2 上午8:50 ???
Some other Description
"""
def func():
pass
class Main(object):
def __init__(self):
pass
if __name__ == '__main__':
pass
| allenwoods/parasys | debug/__init__.py | Python | mit | 306 |
#!usr/bin/env python
#-*- coding:utf-8 -*-
"""
@author: James Zhang
@date:
"""
import numpy as np
import theano
import theano.tensor as T
from theano.ifelse import ifelse
from theano.tensor.shared_randomstreams import RandomStreams
from collections import OrderedDict
import copy
import sys
sys.setrecursionlimit(10000... | jfzhang95/lightML | SupervisedLearning/Neural Layers/methods.py | Python | mit | 3,801 |
# coding: utf-8
from boto.s3.bucket import Bucket
from thumbor.utils import logger
from tornado.concurrent import return_future
import urllib2
import thumbor.loaders.http_loader as http_loader
from tc_aws.aws.connection import get_connection
def _get_bucket(url, root_path=None):
"""
Returns a tuple contain... | guilhermef/aws | tc_aws/loaders/s3_loader.py | Python | mit | 2,000 |
from __future__ import unicode_literals
from django.apps import AppConfig
class ContentConfig(AppConfig):
"""
Module to manage i18n contents
"""
name = 'content'
| vollov/lotad | content/apps.py | Python | mit | 182 |
def sir(n,I,tt):
import matplotlib.pyplot as pt
#n=int(input('enter no of population='))
#I=int(input('enter initial infected people='))
#t=int(input('enter time period='))
#dt=int(input('enter step size'))
size=tt
s=[0 for j in range(size)]
i=[0 for j in range(size)]
r=[0 for j in range(size)]
s[0]=n-I
i[0]... | suraj-deshmukh/myCodes | sir.py | Python | mit | 1,321 |
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', include('launch.urls', namespace="launch", app_name="launch")),
url(r'^admin/', include(admin.site.urls)),
)
| eltonsantos/dom | dom/urls.py | Python | mit | 263 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-03-08 14:31
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
depe... | pauljherrera/avantiweb | blog/migrations/0001_initial.py | Python | mit | 1,431 |
import os
from celery import Celery
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'persephone.settings')
app = Celery('persephone')
app.config_from_object('django.conf:settings', namespace='CELERY')
app.autodiscover_tasks()
| karamanolev/persephone | persephone/persephone/celery.py | Python | mit | 231 |
#!/usr/bin/env python
# This pre-processor parses provided objects' c files for
# MP_REGISTER_MODULE(module_name, obj_module, enabled_define)
# These are used to generate a header with the required entries for
# "mp_rom_map_elem_t mp_builtin_module_table[]" in py/objmodule.c
from __future__ import print_function
imp... | adafruit/micropython | py/makemoduledefs.py | Python | mit | 3,304 |
# -*- encoding: utf-8 -*-
import re
import decimal
from xml.etree.cElementTree import fromstring, tostring
from xml.etree.cElementTree import Element, iselement
from authorize import responses
API_SCHEMA = 'https://api.authorize.net/xml/v1/schema/AnetApiSchema.xsd'
API_SCHEMA_NS = "AnetApi/xml/v1/schema/AnetApiSchem... | simplegeo/authorize | authorize/gen_xml.py | Python | mit | 17,930 |
import inspect
import logging
import os
import re
import shlex
import subprocess
import sys
import textwrap
import time
from datetime import datetime
from email.utils import formatdate as format_rfc2822
from io import StringIO
from urllib.parse import quote
import aiohttp
import discord
import psutil
import pytz
from ... | s0hvaperuna/Not-a-bot | cogs/utils.py | Python | mit | 28,689 |
'''
en este archivo se almacenaran todas las caracteristicas de la pantalla, como los colores ancho y alto
'''
ANCHO=600
ALTO=600
BLANCO=(255,255,255)
NEGRO=(0,0,0)
ROJO=(255,0,0)
AZUL=(0,0,255)
VERDE=(0,255,0)
| Jofemago/Computacion-Grafica | Disparos/TareaDisparos/configuraciones.py | Python | mit | 212 |
from setuptools import setup, find_packages
setup(name='BIOMD0000000199',
version=20140916,
description='BIOMD0000000199 from BioModels',
url='http://www.ebi.ac.uk/biomodels-main/BIOMD0000000199',
maintainer='Stanley Gu',
maintainer_url='stanleygu@gmail.com',
packages=find_packages(... | biomodels/BIOMD0000000199 | setup.py | Python | cc0-1.0 | 377 |
#!/usr/bin/env python
"""
NPR 2016-03-06
http://www.npr.org/2016/03/06/469327504/five-letters-with-which-to-play-heres-a-puzzle-to-blow-you-away
Bail, Nail, and Mail are three four-letter words that differ only by their first letters.
And those first letters (B, N, and M) happen to be adjacent on a computer keyboard... | boisvert42/npr-puzzle-python | 2016/0306_keyboard_adjacent.py | Python | cc0-1.0 | 1,281 |
# -*- coding: utf-8 -*-
"""
################################################
Plataforma ActivUFRJ
################################################
:Author: *Núcleo de Computação Eletrônica (NCE/UFRJ)*
:Contact: carlo@nce.ufrj.br
:Date: $Date: 2009-2010 $
:Status: This is a "work in progress"
:Revision: $Revision: 0.0... | labase/activnce | main/utils/0_14_0207convertlogformat.py | Python | gpl-2.0 | 2,392 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# || ____ _ __
# +------+ / __ )(_) /_______________ _____ ___
# | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \
# +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/
# || || /_____/_/\__/\___/_/ \__,_/ /___/\___/
#
# Copyright (C) 20... | Franky333/crazyflie-clients-python | src/cfclient/ui/main.py | Python | gpl-2.0 | 33,136 |
# coding: utf8
import requests
import arrow
from config import defaultConfig
class NavitiaImplementation:
def __init__(self, auth_key):
self.auth_key = auth_key
self.endpoint = 'https://api.navitia.io/v1/{url}'
def call(self, url, params=None):
headers = {'Authorization': self.auth_... | RaitoBezarius/wannago | src/transport.py | Python | gpl-2.0 | 2,706 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 20 13:49:57 2016
@author: agiovann
"""
from builtins import range
from past.utils import old_div
import logging
import numpy as np
import scipy
try:
import numba
except:
pass
from scipy.linalg.lapack import dpotrf, dpotrs
from scipy impor... | simonsfoundation/CaImAn | caiman/utils/stats.py | Python | gpl-2.0 | 9,843 |
''' Setup for core modules
'''
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('parallel', parent_package, top_path)
config.set_options(quiet=True)
config.add_subpackage('core')
return config
if __name__ == '__main__':
... | ezralanglois/arachnid | arachnid/core/parallel/setup.py | Python | gpl-2.0 | 412 |
import classutils
from random import shuffle
class _Seat(object):
def __init__(self,table,seat,student):
self.table = table
self.seat = seat
self.student=student
def __str__(self):
return str(self.student)
def seat_randomizer(section,tables,seats, filename=None, msg=None):
... | astroScott/TeachingUtilities | seat_randomizer.py | Python | gpl-2.0 | 1,374 |
from __future__ import unicode_literals
import glob
import datetime
import socket
import os, sys
import win32process
import re
import win32security, ntsecuritycon, win32api, win32con, win32file
import win32service
import pywintypes # doesn't play well with molebox pro - why did we need this anyway?
import win... | silentsignal/wpc | windows-privesc-check.py | Python | gpl-2.0 | 119,299 |
"""distutils.util
Miscellaneous utility functions -- anything that doesn't fit into
one of the other *util.py modules.
"""
__revision__ = "$Id$"
import sys, os, string, re
from distutils.errors import DistutilsPlatformError
from distutils.dep_util import newer
from distutils.spawn import spawn
from distutils import ... | 2ndy/RaspIM | usr/lib/python2.6/distutils/util.py | Python | gpl-2.0 | 21,928 |
#!/usr/bin/python
import socket
HOST = raw_input("enter scanner ip : ")
PORT = 14882
if __name__ == "__main__":
socks = socket.socket()
socks.connect((HOST, PORT))
socks.settimeout(1)
try:
while True:
command = raw_input("# ")
if command != "":
socks.se... | mbouchar/xc2424scan | src/xc2424scan/utils/test.py | Python | gpl-2.0 | 620 |
# -*- coding: utf-8 -*-
from modulefinder import ModuleFinder
from ..path import normpath
def dependencies(fname, root=None):
"""Find all dependencies (i.e. imported modules) from fname without
running it.
If `root` is specified, only modules having __file__ attributes
under this root is i... | thebjorn/dkcoverage | dkcoverage/utils/dependencies.py | Python | gpl-2.0 | 873 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2011 Nick Hall
# Copyright (C) 2011 Gary Burton
#
# 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
#... | gramps-project/gramps | gramps/gui/widgets/grampletbar.py | Python | gpl-2.0 | 28,336 |
#!/usr/bin/env python
#Run the modularized application
from ufb import app, db
if __name__ == "__main__":
app.debug = True
db.create_all(app=app)
app.run(debug=True)
| mstrisoline/ufb | run.py | Python | gpl-2.0 | 181 |
# buttons code by Ryan Kulla, rkulla@gmail.com
import gl
import pygame.font
from pygame.display import update
def imgv_button(screen, msg, x, y, where):
font = pygame.font.Font(gl.FONT_NAME, 10)
if gl.BEING_HOVERED:
ren = font.render(msg, 1, gl.BUTTON_TEXTHOVERCOLOR, gl.BUTTON_HOVERCOLOR)
ren_... | rkulla/imgv | imgv/buttons.py | Python | gpl-2.0 | 1,950 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
from types import *
def typer(x,y):
if type(x) is StringType or type(y) is StringType :
print u'получена строка'
else:
if x > y:
print u'больше'
elif x < y:
print u'меньше'
else:
print u'равно'
typer("12", 4)
typer("12","4")
typer(12, 4)
typer(4, 45)
typer(4,... | pybursa/homeworks | a_karnauh/hw1/6.py | Python | gpl-2.0 | 354 |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Person.vcard_enabled'
db.add_column(u'aldryn_people_person', 'vcard_enabled',
... | Venturi/cms | env/lib/python2.7/site-packages/aldryn_people/south_migrations/0013_auto__add_field_person_vcard_enabled.py | Python | gpl-2.0 | 14,400 |
###############################################################################
# This file is part of openWNS (open Wireless Network Simulator)
# _____________________________________________________________________________
#
# Copyright (C) 2004-2009
# Chair of Communication Networks (ComNets)
# Kopernikusstr. 5, D-5... | creasyw/IMTAphy | modules/dll/glue/PyConfig/glue/support/CSMACA.py | Python | gpl-2.0 | 4,953 |
import unittest
import Milter
import sample
import template
import mime
import zipfile
from Milter.test import TestBase
from Milter.testctx import TestCtx
class TestMilter(TestBase,sample.sampleMilter):
def __init__(self):
TestBase.__init__(self)
sample.sampleMilter.__init__(self)
class BMSMilterTestCase(un... | sdgathman/pymilter | testsample.py | Python | gpl-2.0 | 5,060 |
#!/usr/bin/env python
import subprocess
import sys
from gi.repository import GLib, Gio
def main():
bus = Gio.bus_get_sync(Gio.BusType.SESSION, None)
proxy = Gio.DBusProxy.new_sync(bus, Gio.DBusProxyFlags.NONE, None,
'org.freedesktop.ScreenSaver', '/ScreenSaver',
'org.freedesktop.ScreenSaver',... | CMaiku/inhibit-screensaver | inhibit-screensaver.py | Python | gpl-2.0 | 851 |
# -*- encoding: utf-8 -*- #
############################################################################
# Module Writen to OpenERP, Open Source Management Solution #
# Copyright (C) Vauxoo (<http://vauxoo.com>). #
# All Rights Reserved ... | 3dfxsoftware/cbss-addons | invoice_report_per_journal/wizard/invoice_report_per_journal.py | Python | gpl-2.0 | 5,756 |
__version__ = '19.10.0.cwop'
_release = '1665'
_commit = 'd22c19c'
| 3v1n0/pywws | src/pywws/__init__.py | Python | gpl-2.0 | 67 |
##
# Copyright 2012-2016 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (F... | hpcleuven/easybuild-framework | easybuild/toolchains/iompi.py | Python | gpl-2.0 | 1,514 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Car',
fields=[
('id', models.AutoField(verbose_... | TheDavidGithub/mysite | car/migrations/0001_initial.py | Python | gpl-2.0 | 1,116 |
from tests.support import RpgTestCase
from rpg import Base
class GuessTest(RpgTestCase):
def setUp(self):
self.base = Base()
def test_guess_name(self):
self.base._input_name = self.test_project_dir
self.assertEqual(str(self.base.guess_name()), str(self.test_project_dir))
self... | regeciovad/rpg | tests/unit/test_guess.py | Python | gpl-2.0 | 794 |
# encoding: utf-8
# module PyKDE4.kio
# from /usr/lib/python3/dist-packages/PyKDE4/kio.cpython-34m-x86_64-linux-gnu.so
# by generator 1.135
# no doc
# imports
import PyKDE4.kdeui as __PyKDE4_kdeui
import PyQt4.QtCore as __PyQt4_QtCore
import PyQt4.QtGui as __PyQt4_QtGui
class KUrlComboBox(__PyKDE4_kdeui.KComboBox):
... | ProfessorX/Config | .PyCharm30/system/python_stubs/-1247971765/PyKDE4/kio/KUrlComboBox.py | Python | gpl-2.0 | 1,586 |
#! /usr/bin/python
## pysieved - Python managesieve server
## Copyright (C) 2007 Neale Pickett
## 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
## you... | miracle2k/pysieved | plugins/accept.py | Python | gpl-2.0 | 2,161 |
# coding: utf-8
# In[12]:
import os
from shutil import copyfile
import subprocess
from save_embedded_graph27 import main_binary as embed_main
from spearmint_ghsom import main as ghsom_main
import numpy as np
import pickle
from time import time
def save_obj(obj, name):
with open(name + '.pkl', 'wb... | DavidMcDonald1993/ghsom | parameter_tests.py | Python | gpl-2.0 | 6,711 |
import os, sys
from Products.Archetypes.interfaces.layer import ILayerContainer
from Products.Archetypes.atapi import *
from Products.ATContentTypes.tests.utils import dcEdit
from Products.ATContentTypes.tests.utils import EmptyValidator
from Products.ATContentTypes.tests.utils import EmailValidator
if __name__ == '__... | uwosh/uwosh.grants | tests/testUwoshgrantsProposalWorkflow.py | Python | gpl-2.0 | 3,768 |
import urllib2
from bs4 import BeautifulSoup
def isSemanticTag(tag):
name = tag.name
if name == 'header':
return True
elif name == 'nav':
return True
elif name == 'section':
return True
elif name == 'article':
return True
elif name == 'aside':
return Tru... | AdamHansrod/SemanticTagFinder | HTML5TagFinder.py | Python | gpl-2.0 | 884 |
# Copyright 2008-2010 by Peter Cock. All rights reserved.
#
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Bio.AlignIO support for the "nexus" file format.
You are expected to use this module... | Ambuj-UF/ConCat-1.0 | src/Utils/Bio/AlignIO/NexusIO.py | Python | gpl-2.0 | 7,881 |
#! /usr/bin/env python
#-*- coding: utf-8 -*-
#################################################################
# Copyright (C) 2015 Sean Guo. All rights reserved.
#
# > File Name: < set_English.py >
# > Author: < Sean Guo >
# > Mail: < iseanxp+code@gmail.com >
# > Cre... | SeanXP/Nao-Robot | python/language/set_English.py | Python | gpl-2.0 | 753 |
#!/usr/bin/env python
#Copyright 2004,2008 Sebastian Hagen
# This file is part of gonium.
#
# gonium 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 l... | sh01/gonium | src/pid_filing.py | Python | gpl-2.0 | 2,162 |
#!/usr/bin/env python
import os
from Game3View import Game3View
from HomeView import HomeView
import HomeController
import sys
from gi.repository import Gtk
from gi.repository import Gdk
from random import randint
from random import shuffle
class Game3Controller:
def __init__(self, view, parent):
self.vie... | nguyenla/Spelling | Game3Controller.py | Python | gpl-2.0 | 7,003 |
# Generated by Django 2.2.13 on 2021-09-28 11:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('bands', '0048_band_profile_thumb'),
]
operations = [
migrations.AddField(
model_name='band',
name='hidden_in_catalo... | InsulaCoworking/MusicCity | bands/migrations/0049_band_hidden_in_catalog.py | Python | gpl-2.0 | 567 |
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='netapp_metrics',
version='0.1.1',
description='NetApp OnTAP API wrapper',
long_description='API wrapper for NetApp OnTAP API that understands '
'between cluster mode (C-mode) and non-cluster (7-m... | allyunion/netapp_metrics | setup.py | Python | gpl-2.0 | 1,200 |
#
# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
#
# 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; version 2 of the License.
#
# This program is distributed in th... | dannykopping/mysql-utilities | mysql-test/t/clone_server_parameters.py | Python | gpl-2.0 | 5,484 |
from django.conf.urls import patterns, url
import views as views
urlpatterns = patterns('',
#url(r'^$', views.index, name='index'),
#url(r'index.html', views.index, name='index')
)
| jxp360/golfapp | golfapp/apps/piffycup/urls.py | Python | gpl-2.0 | 191 |
""" 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.
This program is distributed in the hope that it will... | VioletRed/script.module.urlresolver | lib/urlresolver/plugins/vidto.py | Python | gpl-2.0 | 3,698 |
from django.conf.urls import patterns, include, url
from django.contrib import admin
from fotos import views as fotos
from index import views as inicio
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'qpasacix.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', incl... | christianmtr/qpasacix | qpasacix/urls.py | Python | gpl-2.0 | 584 |
# -*- coding: utf-8 -*-
#
# (DC)² - DataCenter Deployment Control
# Copyright (C) 2010, 2011, 2012, 2013, 2014 Stephan Adig <sh@sourcecode.de>
# 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; eit... | sadig/DC2 | components/dc2-lib/dc2/lib/exceptions/authentication.py | Python | gpl-2.0 | 948 |
#coding:utf-8
import urllib
import sys
file2014 = open('2014Kresult.txt','r').readlines()
file2015 = open('2015Kresult.txt','r').readlines()
result = open('2015result.txt','w')
dic2014 = {}
dic2015 = {}
dic = {}
uvCount = 0
pvCount = 0
ec = 0
c = 0
pv2014 = 0
pv2015 = 0
#2014关键字去重汇总
for line i... | hfutsuchao/Python2.6 | SEOKeywordsAnalysis/KWComp.py | Python | gpl-2.0 | 3,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.