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
# encoding: utf8 from __future__ import unicode_literals from django.db import models, migrations import datetime class Migration(migrations.Migration): dependencies = [ ('device', '0002_device_last_connection'), ] operations = [ migrations.AddField( model_name='value', ...
edilio/cimpl
device/migrations/0003_value_parameter.py
Python
mit
485
#!/usr/bin/python # # \file 1_export.py # \brief Export map # \date 2009-03-10 13:13GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Export map # # NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> # Copyright (C) 2010 Winch Gate Property Limited # # This program is free softwa...
osgcc/ryzom
nel/tools/build_gamedata/processes/map/1_export.py
Python
agpl-3.0
2,423
""" Django settings for test_project project. Generated by 'django-admin startproject' using Django 1.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build p...
CircleUp/django-qtools
test_project/test_project/settings.py
Python
mit
2,999
# Copyright 2009-2014 Eucalyptus Systems, Inc. # # 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 3 of the License. # # This program is distributed in the hope that it will be useful, # b...
eucalyptus/euca-python-lib
eucalib/ssl.py
Python
bsd-2-clause
1,433
#!/usr/bin/python from espeak import espeak import MySQLdb import serial import time import os.path import math from espeak import core as espeak_core timerSeconds = 2 #Time between command repeats itself in seconds timerProximity = 1 wallElapsed = 0 #starting value for elapsed objectElapsed = 0 openingBothElapsed = ...
TheBatUNT/thebat
tts1.py
Python
apache-2.0
9,411
""" Extracts XML into Python Datasets based upon a simple text profile markup language """ # -*- coding: utf-8 -*- # pylint: disable=line-too-long __author__ = "James Spurin" __email__ = "james@spurin.com" __version__ = "1.0.1" import re import logging # Attempt to use cElementTree, otherwise fall back on ElementTr...
spurin/xmldataset
xmldataset/__init__.py
Python
bsd-3-clause
26,771
# he smell of paint, a flask of wine # And turn those faces all to me # The blunderbuss and halberd-shaft # And Dutch respectability from flask import Flask, Blueprint, render_template, abort from jinja2 import TemplateNotFound APP_NAME = "Virtates" def build_app(blueprints): app = Flask(APP_NAME) blueprin...
mtnmts/Virtates
src/virtates/web/app.py
Python
mit
850
import time try: # python 2.x import Tkinter as tk except ImportError: # python 3.x import tkinter as tk class Example(tk.Frame): def __init__(self, *args, **kwargs): tk.Frame.__init__(self, *args, **kwargs) self.text = tk.Text(self, height=6, width=40) self.vsb = tk.Scroll...
laixintao/RaspberryPI.python
mirror_display/test.py
Python
mit
858
# Copyright (C) 2012-2014 Benjamin Kehlet # # This file is part of mshr. # # mshr 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. # # ...
FEniCS/mshr
demo/python/simple-csg-3D.py
Python
gpl-3.0
1,521
from __future__ import division import numpy as np import statsmodels.api as sm from .accel import try_jit from .regression import robust_fit as rlm ndays = 365.25 @try_jit() # np.array prevents nopython def multitemp_mask(x, Y, n_year, crit=400, green=1, swir1=4, maxiter=10)...
c11/yatsm
yatsm/masking.py
Python
mit
3,757
from crier.script import Script import json import yaml import subprocess import time __all__ = ['Webserver'] class Webserver: def __init__(self, scripts, port=None, timeout=25): self.port = port self.scripts = scripts self.timeout = timeout self._webserver = None self._...
vectis/crier
crier/webserver.py
Python
gpl-3.0
2,660
#!/usr/bin/env python ''' Project Euler Problem 030 - Digit fifth powers ---------------- Description: Find the sum of all the numbers that can be written as the sum of fifth powers of their digits. Solution: 443839 ---------------- Haoliang Wang 02/04/2015 ''' print sum(k for k in xrange(1...
haoliangx/Project-Euler
src/P-030.py
Python
gpl-2.0
376
# Source code from: https://github.com/ooooola/sortquery/blob/master/querysort.py # for learning purpose # import os import os.path import operator import heapq """ sort users' queries by frequency 1. hashing queries and dividing into 10 files. (hash(query)%10) 2. counting the number queries and sorting in each file ...
nakayamaqs/PythonModule
Algorithm/querysort.py
Python
mit
2,139
import qi import argparse import sys import time import threading import action_base from action_base import * actionName = "assign" def actionThread_exec (params): t = threading.currentThread() memory_service = getattr(t, "mem_serv", None) print "Action "+actionName+" started with params "+params ...
LCAS/spqrel_tools
actions/assign.py
Python
mit
996
"""A simple webapp2 server.""" import os.path import urllib from google.appengine.api import users from google.appengine.ext import ndb from google.appengine.api import memcache from google.appengine.runtime import DeadlineExceededError import jinja2 import webapp2 import models import geojson import time import l...
arobrien/brisbanebikewaychecker
brisbanebikewaychecker.py
Python
mit
9,102
from django.core.management.base import BaseCommand, CommandError from canvas.thumbnailer import update from canvas.models import Content from canvas.upload import get_fs from configuration import Config from django.conf import settings class Command(BaseCommand): args = '' help = 'Recreates all the thumbnails...
canvasnetworks/canvas
website/canvas/management/commands/rethumbnail_one_image.py
Python
bsd-3-clause
452
from __future__ import unicode_literals from django.db import models from calaccess_raw import managers class CalAccessBaseModel(models.Model): """ An abstract model with some tricks we'll reuse below. """ DATE_FIELDS = () objects = managers.CalAccessManager() def get_csv_name(self): ...
kavyasukumar/django-calaccess-raw-data
calaccess_raw/models/base.py
Python
mit
488
""" JSON-LD contexts. """ from .namespaces import ns_mgr, D base = { "@base": str(D), "a": "@type", "uri": "@id", "label": "rdfs:label", } #set namespaces from the ns_mgr for prefix, iri in ns_mgr.namespaces(): base[prefix] = iri.toPython() #BCITE publications publication = { "title": "rdfs:l...
Brown-University-Library/vivo-data-management
vdm/context.py
Python
mit
1,141
import os import os.path import sh from datetime import datetime from sh import cp from spacehub.models import DBSession, Repo, TrackedLink from sqlalchemy import create_engine import logging logger = logging.getLogger("spacehub.cron") db_name = "space" db_url = "sqlite:////tmp/test.db" if os.environ.get("OPENSHIF...
ryansb/spacehub
wsgi/spacehub/spacehub/bin/cron.py
Python
agpl-3.0
1,560
from pi_mqtt_gpio.modules import GenericSensor REQUIREMENTS = ("w1thermsensor",) ALLOWED_TYPES = ["DS18S20", "DS1822", "DS18B20", "DS1825", "DS28EA00", "MAX31850K"] CONFIG_SCHEMA = { "address": dict(type="string", required=True, empty=False), "type": dict( type="string", required=True, ...
flyte/pi-mqtt-gpio
pi_mqtt_gpio/modules/ds18b.py
Python
mit
1,465
import random from util import hook, http @hook.command def stock(inp): '''.stock <symbol> -- gets information about a stock symbol''' url = 'http://www.google.com/ig/api?stock=%s' parsed = http.get_xml(url, stock=inp) if len(parsed) != 1: return "error getting stock info" # Stuff the...
Stratos42/EveBot
plugins.disabled/stock.py
Python
gpl-3.0
1,034
# -*- coding: utf-8 -*- """ Global configuration file for TG2-specific settings in Hub-Reporter. This file complements development/deployment.ini. Please note that **all the argument values are strings**. If you want to convert them into boolean, for example, you should use the :func:`paste.deploy.converters.asbool` ...
thehub/hubreporter
hubreporter/config/app_cfg.py
Python
gpl-2.0
1,173
import logging, operator, functools, itertools, array, ptypes from ptypes import * from .headers import * from . import portable class Signature(pint.enum, uint16): # We'll just store all signature types here _values_ = [ ('IMAGE_DOS_SIGNATURE', 0x5a4d), ('IMAGE_OS2_SIGNATURE', 0x454e), ...
arizvisa/syringe
lib/pecoff/Executable.py
Python
bsd-2-clause
36,364
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Module: account_tax_payment # Author: Goran Kliska # mail: gkliskaATgmail.com # Copyright (C) 2011- Slobodni programi d.o.o., Zagreb # htt...
BorgERP/borg-erp-6of3
l10n_hr/account_tax_payment/__openerp__.py
Python
agpl-3.0
2,207
import logging import socket from rcontrol.ssh import SshSession, ssh_client # logging.basicConfig(level=logging.INFO) # logging.basicConfig(level=logging.WARN) logger = logging.getLogger(__name__) def CreateSshSession(task): try: conn = ssh_client(task.host, task.user, task.passwd, port=task.port) ...
louisdcoulombe/ssh-monitor
task/SShUtil.py
Python
gpl-3.0
895
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # 2016_python.py # # Student Dmitry Makarov <vensder@gmail.com> # Даны следующие файлы: '''' import struct rgbstr='aabbcc' print(struct.unpack('BBB',rgbstr.decode('hex'))) ''' print('Test:') h = '#00ff00'.lstrip('#') print('RGB =', tuple(int(h[i:i+2], 16) for i...
vensder/itmo_python
fin_work/color_work.py
Python
gpl-3.0
2,202
from redisgraph import node from tests.utils import base class TestNode(base.TestCase): def setUp(self): super().setUp() self.no_args = node.Node() self.no_props = node.Node(node_id=1, alias="alias", label="l") self.props_only = node.Node(properties={"a": "a", "b": 10}) se...
swilly22/redisgraph-py
tests/unit/test_node.py
Python
bsd-2-clause
2,321
# Copyright (c) 2017 SUSE LLC import logging import re import subprocess # Run a command, and return the result in string format, stripped. Return None if command fails. def _run_cmd(cmd_array): try: return subprocess.check_output(cmd_array).decode("utf-8").strip() except subprocess.CalledProcessErro...
ceph/ceph-docker
maint-lib/stagelib/git.py
Python
apache-2.0
1,889
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import time import random from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.action_chains import ActionChains from selenium.common.exceptions import NoSuchEle...
sjsafranek/facebook-automation
tasks/chatbot.py
Python
mit
2,537
#!/usr/bin/env python # Copyright (C) Nicolas J. Bouliane - 2012 # dsctl - Directory Service Control import signal import socket import ssl import pprint import sys from dnds import * class Connection: sock = None ssl_sock = None connected = False loggedin = False ClientId = 0 def signal_handle...
aboudreault/dnds-debian
dsc/dsctl.py
Python
gpl-2.0
12,699
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os import tempfile from wsgiref.util import FileWrapper from django import forms from django.conf.urls import url from django.contrib import admin from django.contrib.admin import BooleanFieldListFilter from django.contrib.admin.views.main import ...
joequery/django
tests/admin_views/admin.py
Python
bsd-3-clause
30,700
""" Copyright (c) 2003-2010 Gustavo Niemeyer <gustavo@niemeyer.net> This module offers extensions to the standard python 2.3+ datetime module. """ __author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>" __license__ = "PSF License" # STOLEN from xbmclibraryautoupdate import datetime import calendar __all__ = ["relati...
cxii-dev/script.tvshowtime-crazy
resources/lib/relativedelta.py
Python
gpl-2.0
17,134
#!/usr/bin/env python # # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; with...
tumf/xen-3.3.1
tools/python/xen/xend/osdep.py
Python
gpl-2.0
3,892
#!/usr/bin/env python # coding=utf-8 import pathlib from itertools import chain from setuptools import setup, find_packages import versioneer HERE = pathlib.Path(__file__).parent.resolve() README = (HERE / "README.md").read_text() tests_require = [ "deepdiff", "gdal==3.3.0", "mock", "pep8-naming"...
GeoscienceAustralia/eo-datasets
setup.py
Python
apache-2.0
2,796
#!/usr/bin/env python ''' Run this script to update all the copyright headers of files that were changed this year. For example: // Copyright (c) 2009-2012 The Aureus Core developers it will change it to // Copyright (c) 2009-2015 The Aureus Core developers ''' import os import time import re year = time.gmtime()[...
hideoussquid/aureus-12-bitcore
contrib/devtools/fix-copyright-headers.py
Python
mit
1,343
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone import django_countries.fields import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('icekit_plugins_image', '0008_auto_20160920_2114'...
ic-labs/glamkit-collections
glamkit_collections/contrib/work_creator/migrations/0001_initial.py
Python
mit
9,616
# -*- 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 'EventTalk.title' db.add_column('events_eventtalk', 'title', self.gf('d...
pugpe/pugpe
apps/events/migrations/0015_auto__add_field_eventtalk_title__chg_field_eventtalk_talk.py
Python
mit
7,031
"""Sanity test using shellcheck.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os from xml.etree.ElementTree import ( fromstring, Element, ) from ... import types as t from . import ( SanityVersionNeutral, SanityMessage, SanityFailure, Sani...
pmarques/ansible
test/lib/ansible_test/_internal/commands/sanity/shellcheck.py
Python
gpl-3.0
3,204
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Class for source inversion :copyright: Wenjie Lei (lei@princeton.edu), 2016 :license: GNU Lesser General Public License, version 3 (LGPLv3) (http://www.gnu.org/licenses/lgpl-3.0.en.html) """ from __future__ import (print_function, division, absolute_import)...
wjlei1990/pycmt3d
src/pycmt3d/cmt3d.py
Python
lgpl-3.0
20,634
from django.urls import path, reverse_lazy import django.contrib.auth.views as auth_views urlpatterns = [ path('login/', auth_views.LoginView.as_view(), name='login'), path('logout/', auth_views.LogoutView.as_view(next_page=reverse_lazy('login')), name='logout'), ]
mjtamlyn/archery-scoring
accounts/urls.py
Python
bsd-3-clause
276
#!/usr/bin/env python2 import argparse import datetime import re import sys from collections import defaultdict from threading import Lock, Thread from utils.log import logger from utils.providers import list_all_providers, get_mgmt lock = Lock() def parse_cmd_line(): parser = argparse.ArgumentParser(argument_...
thom-at-redhat/cfme_tests
scripts/cleanup_old_vms.py
Python
gpl-2.0
4,075
from concurrent import futures import operator import os from urllib import parse import yaml from . import project, repo def read(file_path): with open(file_path) as file: return yaml.safe_load(file.read()) def repo_type(domain_mapping, url): domain = parse.urlparse(url).netloc for type, doma...
brettcannon/free-labour
freelabour/conf.py
Python
apache-2.0
2,657
""" Cisco_IOS_XR_asr9k_lc_fca_oper This module contains a collection of YANG definitions for Cisco IOS\-XR asr9k\-lc\-fca package operational data. This module contains definitions for the following management objects\: mpa\-internal\: Management LAN Operational data space mpa\: mpa Copyright (c) 2013\-2016 by ...
111pontes/ydk-py
cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_asr9k_lc_fca_oper.py
Python
apache-2.0
34,724
# -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2012, 2013 CERN. ## ## Invenio 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...
lnielsen/invenio
invenio/ext/babel/selectors.py
Python
gpl-2.0
2,593
import pprint from conn import download_content from excel import write_data from excel import select_excel from constants import cells from calculations import Stat from calculations import get_owe from calculations import get_data from calculations import parse_item from calculations import is_shield if __name__...
kreativitea/monkgearbox
monkgearbox.py
Python
gpl-2.0
1,174
# 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 use ...
Kami/libcloud
libcloud/utils/decorators.py
Python
apache-2.0
1,816
import types from DIRAC import S_OK, S_ERROR from DIRAC.Core.DISET.RequestHandler import RequestHandler from RESTDIRAC.RESTSystem.DB.OATokenDB import OATokenDB from RESTDIRAC.RESTSystem.Client import OAToken __RCSID__ = "$Id$" class OATokenStoreHandler( RequestHandler ): @classmethod def initializeHandler( cls, ...
DIRACGrid/RESTDIRAC
RESTSystem/Service/OATokenStoreHandler.py
Python
gpl-3.0
2,562
from django.conf.urls import url from books import views urlpatterns = [ url(r'^transactions/$', views.transaction_list, name='transaction_list'), url(r'^create/$', views.transaction_create, name='transaction_create'), url(r'^delete/(?P<pk>\d+)/$', views.transaction_delete, name='transaction_dele...
trimailov/finance
books/urls.py
Python
mit
892
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Httpd(AutotoolsPackage): """The Apache HTTP Server is a powerful and flexible HTTP/1.1 com...
rspavel/spack
var/spack/repos/builtin/packages/httpd/package.py
Python
lgpl-2.1
1,330
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2011 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
nabsboss/CouchPotatoServer
libs/guessit/language.py
Python
gpl-3.0
13,102
from django.db import models class AbstractBaseModel(models.Model): created_at = models.DateTimeField(verbose_name='Created at', auto_now_add=True, editable=False) updated_at = models.DateTimeField(verbose_name='Updated at', auto_now=True, editable=False) class Meta: abstract = True class Clea...
bpatyi/simpleCRM
base/abstracts.py
Python
mit
491
import unittest from assembler.misc.testStructure import TestStructure from assembler.operands import Register class TestRegister(unittest.TestCase, TestStructure): def setUp(self): self.type = Register self.validMappings = {"$0": "0000", "$15": "1111"} self.notEncodable = ["$17", "2", "#...
svenstaro/uni-projekt
assembler/operands/test/testRegister.py
Python
gpl-3.0
438
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "LinearTrend", cycle_length = 5, transform = "Quantization", sigma = 0.0, exog_count = 100, ar_order = 0);
antoinecarme/pyaf
tests/artificial/transf_Quantization/trend_LinearTrend/cycle_5/ar_/test_artificial_128_Quantization_LinearTrend_5__100.py
Python
bsd-3-clause
270
# coding: utf-8 # ... import symbolic tools glt_function = load('pyccel.symbolic.gelato', 'glt_function', True, 3) weak_formulation = load('pyccel.symbolic.gelato', 'weak_formulation', True, 2) dx = load('pyccel.symbolic.gelato', 'dx', False, 1) dy = load('pyccel.symbolic.gelato', 'dy',...
ratnania/pyccel
src_old/tests/scripts/lambda/pdes/2d/ex6.py
Python
mit
841
from boxbranding import getMachineBrand from enigma import ePicLoad, eTimer, getDesktop, gMainDC, eSize from Screens.Screen import Screen from Tools.Directories import resolveFilename, pathExists, SCOPE_MEDIA, SCOPE_ACTIVE_SKIN from Components.Pixmap import Pixmap, MovingPixmap from Components.ActionMap import Actio...
kingvuplus/EGAMI-D
lib/python/Plugins/Extensions/PicturePlayer/ui.py
Python
gpl-2.0
21,962
# # Copyright (C) 2016 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. # # This program is distributed in the hope...
UNINETT/nav
python/nav/web/navlets/alert.py
Python
gpl-2.0
2,431
import _plotly_utils.basevalidators class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="scatterpolar", **kwargs): super(LegendrankValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_na...
plotly/plotly.py
packages/python/plotly/plotly/validators/scatterpolar/_legendrank.py
Python
mit
411
from django.shortcuts import render from reportlab.pdfgen import canvas from django.http import HttpResponse # Create your views here. from facturacion.models import Cliente, Factura, Item def printFactura(request, idFactura): fact = Factura.objects.get(id=idFactura) # Create the HttpResponse object...
kaajavi/facture
facturacion/views.py
Python
apache-2.0
1,419
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
pixelrebel/st2
st2common/st2common/bootstrap/rulesregistrar.py
Python
apache-2.0
7,910
# -*- coding: utf-8 -*- import os from os import path as op import shutil import glob import warnings from nose.tools import assert_true, assert_raises from numpy.testing import assert_equal, assert_allclose from mne import concatenate_raws, read_bem_surfaces from mne.commands import (mne_browse_raw, mne_bti2fiff, mne...
nicproulx/mne-python
mne/commands/tests/test_commands.py
Python
bsd-3-clause
9,165
# -*- coding: utf-8 -*- """ /*************************************************************************** RasterPropertiesDialog A QGIS plugin Displays raster extent, resolution, and basic statistics ------------------- begin : 2016-0...
khafen74/RasterProperties
raster_properties_dialog.py
Python
gpl-3.0
1,899
from ..provider.constants import Provider, string_to_provider from ..services.base import Service from .context import DisconnectOnException from .errors import ( AlreadyConnectedException, ClusterError, MultipleClustersConnectionError, NotConnectedError, PleaseDisconnectError, ) class ClusterService(Servic...
sigopt/sigopt-python
sigopt/orchestrate/cluster/service.py
Python
mit
5,588
# # Copyright 2019 XEBIALABS # # 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 restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, subli...
xebialabs-community/xlr-servicenow-plugin
src/main/resources/servicenow/ServiceNowClientUtil.py
Python
mit
1,344
# -*- coding: UTF-8 -*- # common intents def common(): return { "yes": [{"stem": "y", "max_words": 1}, {"stem": "yes"}, {"stem": "igen", "exc": [{"stem": "de"}]}, {"stem": "aha"}, {"stem": "ja", "affix": ["ja", "h"], "exc": [{"stem": "de"}]}, {"stem": "ok", "affix": ["é", "s", "és", "sa", "ay"], "exc": [{"s...
sedthh/lara-hungarian-nlp
lara/entities.py
Python
mit
48,432
''' Created on 03.06.2016 @author: mkennert ''' from kivy.properties import NumericProperty, ObjectProperty from kivy.uix.gridlayout import GridLayout from crossSectionView.tView import TView from shapes.ashape import AShape class ShapeT(AShape, GridLayout): ''' represents a cross sectio...
simbtrix/mxnix
project/shapes/shapeT.py
Python
gpl-3.0
1,833
import hashlib def brute_search(prefix, target): i = 0 prefix = prefix.encode() while True: m = hashlib.md5() m.update(prefix) m.update(str(i).encode()) if m.hexdigest().startswith(target): return i i += 1 print(brute_search("bgvyzdsv", "00000")) print(b...
tompko/adventofcode
python/day4.py
Python
mit
355
# # DataBridge-X Queue Implementation # Copyright (C) 2014-2015 Ioannis Charalampidis, PH-SFT, CERN # 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 yo...
wavesoft/databridge-interface
queue/dbridgex/queue.py
Python
gpl-2.0
6,807
# -*- coding: utf-8 -*- """Sensorlab experiment module. `author` : Quentin Lampin <quentin.lampin@orange.com> `license` : MPL `date` : 2015/10/12 Copyright 2015 Orange """ from .experiment import * api_major_version = 1 # bumped on incompatible changes api_minor_version = 0 # bumped on compatible changes
glarue-ol/sensorlab-observer
observer/m_experiment/__init__.py
Python
mpl-2.0
314
#!/usr/bin/env python import docker import json import consul import logging import requests logging.basicConfig(filename='/var/log/docker-events/docker-events-consul.log', level=logging.INFO, format=' [%(levelname)s] %(asctime)s (%(threadName)-10s) %(message)s') # Configuration consul_host...
jorgeacf/dockerfiles
infrastructure/docker-discovery/scripts/docker-events-consul.py
Python
gpl-3.0
5,109
from PyQt4.QtGui import QToolButton, QTextEdit, QTabWidget, QWidget, QVBoxLayout, QHBoxLayout, QLabel, QPushButton, QSpinBox from PyQt4.QtCore import Qt from ert_gui import ERT from ert_gui.ertwidgets import addHelpToWidget, showWaitCursorWhileWaiting from ert_gui.ertwidgets.caselist import CaseList from ert_gui.ertwi...
arielalmendral/ert
python/python/ert_gui/tools/manage_cases/case_init_configuration.py
Python
gpl-3.0
7,043
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
ashemedai/ansible
lib/ansible/modules/network/nxos/nxos_evpn_vni.py
Python
gpl-3.0
12,621
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-06-30 03:21 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Subredd...
agile-course/news_feed
news_feed/subreddit/migrations/0001_initial.py
Python
unlicense
740
from weighted_quantiles import median from scipy.stats import ks_2samp import numpy as np import os import matplotlib.pyplot as plt from frbpoppy import unpickle, TNS, poisson_interval, pprint from tests.rates.alpha_real import EXPECTED from tests.convenience import plot_aa_style, rel_path from simulations import Simu...
davidgardenier/frbpoppy
tests/monte_carlo/goodness_of_fit.py
Python
mit
11,050
#!/usr/bin/env python # -*- mode: python; sh-basic-offset: 4; indent-tabs-mode: nil; coding: utf-8 -*- # vim: tabstop=4 softtabstop=4 expandtab shiftwidth=4 fileencoding=utf-8 # # Shell command # Copyright 2010, Jeremy Grosser <synack@digg.com> import os import sys import clusto from clusto import script_helper cla...
motivator/clusto
src/clusto/commands/console.py
Python
bsd-3-clause
2,031
############################################################################## # # Copyright (c) 2001, 2002, 2003 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distributio...
Donkyhotay/MoonPy
zope/tal/dummyengine.py
Python
gpl-3.0
10,728
import pkg_resources pkg_resources.declare_namespace(__name__) from d51.django.apps.tagging.tests.models import *
domain51/d51.django.apps.tagging
d51/django/apps/tagging/tests/__init__.py
Python
gpl-3.0
115
# -*- coding: utf-8 -*- #sources: https://nexus-coding.blogspot.fr/2015/10/tutoriel-glade3-et-pygi.html # https://lazka.github.io/pgi-docs/ # http://python-gtk-3-tutorial.readthedocs.io/en/latest/builder.html # http://prognotes.net/2016/03/gtk-3-c-code-hello-world-tutorial-using-glade-3...
krl91/raspi-cam-py
src/python2.7/main.py
Python
gpl-3.0
2,319
# -*- coding: utf-8 -*- from __future__ import absolute_import import os import time import gzip import tempfile import ConfigParser from cStringIO import StringIO from datetime import datetime from ellen.repo import Jagare from ellen.utils import JagareError from vilya.libs.permdir import get_tmpdir from vilya.mode...
douban/code
vilya/models/ngit/repo.py
Python
bsd-3-clause
21,073
#!/usr/bin/env python import argparse try: # Python 3 from http.server import SimpleHTTPRequestHandler, HTTPServer except ImportError: # Python 2 from BaseHTTPServer import HTTPServer from SimpleHTTPServer import SimpleHTTPRequestHandler parser = argparse.ArgumentParser() parser.add_argument("por...
ninchat/ninchat-js
example/client-test.py
Python
bsd-2-clause
504
import pytest from mock import Mock from doit import get_var from doit.exceptions import InvalidCommand from doit.doit_cmd import DoitMain from doit.cmd_run import Run from doit.cmd_list import List def cmd_main(args): return DoitMain().run(args) class TestRun(object): def test_version(self, capsys): ...
okin/doit
tests/test_doit_cmd.py
Python
mit
2,331
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2015-12-21 14:40 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('proposals', '0009_auto_20151221_0544'), ] operations = [ migrations.AlterField...
pycontw/pycontw2016
src/proposals/migrations/0010_auto_20151221_1440.py
Python
mit
1,615
from setuptools import setup setup( name='transporter', version='0.4.2', packages=['transporter'], entry_points={ 'console_scripts': ['transporter = transporter.__main__:main'] }, author='minamorl', author_email='minamorl@users.noreply.github.com', install_requires=[ ...
minamorl/transporter
setup.py
Python
mit
357
# -*- coding: utf-8 -*- # # Copyright 2017 Ricequant, 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 ...
zhengwsh/InplusTrader_Linux
rqalpha/core/strategy_context.py
Python
mit
9,006
#!/usr/bin/env python # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2010,2012,2013,2014,2016 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You ...
guillaume-philippon/aquilon
tests/aqdb/loader.py
Python
apache-2.0
6,337
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_nekrobox ------------ Tests for `nekrobox` module. """ import os import shutil import unittest from nekrobox import nekrobox class TestNekrobox(unittest.TestCase): def setUp(self): pass def test_something(self): pass def tearDow...
Nekroze/nekrobox
test/test_nekrobox.py
Python
mit
389
#! /usr/bin/env python # -*- python -*- from Tkinter import * import ttk from tkFileDialog import askopenfilename, askdirectory from tkMessageBox import * from openpyxl import Workbook from openpyxl import load_workbook from openpyxl.compat import range from openpyxl.cell import coordinate_from_string, \ column_...
syilmazturk/xy2kml
xy2kml.py
Python
mit
17,214
""" This module handles logs received via websockets. """ import json import time from .models import ContentChannelRun from channels.sessions import channel_session from django.http import Http404 @channel_session def connect(message): # Expected path format: /logs/<run_id>/ _, run_id = message['path'].stri...
ivanistheone/waiter
runs/ws_logs.py
Python
mit
1,410
from __future__ import absolute_import, division, print_function from functools import partial, wraps from itertools import product, repeat from math import factorial, log, ceil import operator import numpy as np from toolz import compose, partition_all, merge, get, accumulate, pluck from . import chunk from .core i...
mikegraham/dask
dask/array/reductions.py
Python
bsd-3-clause
22,706
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2014 Omega Cube # This file is part of OmegaNoc's Prediction Module """This module tests the features available to all prediction systems""" import os import sys import unittest import rpy2.rinterface as ri from rpy2.robjects.packages import importr from o...
Omega-Cube/omeganoc
nanto/test/test_base_worker.py
Python
agpl-3.0
3,160
#!/usr/bin/python # -*- coding: utf-8 -*- import ConfigParser import time import redis import logging import calendar import datetime import json import re import sys import config import data import db from daemon import Daemon import mq class Trends(Daemon): """ Trends main class """ def __init__(s...
laurentluce/pytolab-trends
trends/trends.py
Python
mit
6,060
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # CherryMusic - a standalone music server # Copyright (c) 2012-2014 Tom Wallroth & Tilman Boerner # # Project page: # http://fomori.org/cherrymusic/ # Sources on github: # http://github.com/devsnd/cherrymusic/ # # CherryMusic is based on # jPlayer (GPL/MIT license)...
andpp/cherrymusic
cherrymusicserver/test/test_init.py
Python
gpl-3.0
1,930
from rsm import test1,test2,test3 import numpy as np from time import time as perf_counter N = 40 M = 20 V = 20 mem = np.zeros((N,M), dtype=np.int32) neg = np.zeros((N,V), dtype=np.int32) out = np.zeros(N, dtype=np.int32) input = np.zeros(M, dtype=np.int32) input[0]=1 for i in range(1,M): input[i] = i*10 test1(m...
mobarski/sandbox
rsm/cython/test.py
Python
mit
671
import sys import re def expect_hour_advance(line, hour, new_hour): if (new_hour - hour != 1): print('Unexpected hour in {0} old hour: {1}'.format(line, hour)) def expect_day_advance(line, hour, day, new_hour, new_day): if (new_hour != 0): print('Unexpected hour in {0} old hour: ...
multicastTor/multicastTor
torps/util/examine_process_output.py
Python
bsd-3-clause
7,581
# # 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, software # distributed under ...
shahankhatch/aurora
src/test/python/apache/aurora/admin/test_maintenance.py
Python
apache-2.0
15,157
# ------------------------------------------------------------------ IMPORTS import numpy as np import random from scipy.sparse import csr_matrix from sklearn.decomposition import PCA # ----------------------------------------------------------- LAND SELECTION def random_landmarks(x,n): m = x.shape[0] landmar...
vzantedeschi/L3SVMs
src/landmark.py
Python
mit
459
# # Copyright (c) SAS Institute, 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 law or agreed to in ...
sassoftware/mirrorball
updatebot/lib/watchdog.py
Python
apache-2.0
2,029
__author__ = 'Hui'
hchim/stockanalyzer
gui/__init__.py
Python
mit
19
""" GCode M109 Set extruder temperature and wait for it to be reached Author: Mathieu Monney email: zittix(at)xwaves(dot)net Website: http://www.xwaves.net License: CC BY-SA: http://creativecommons.org/licenses/by-sa/2.0/ """ from GCodeCommand import GCodeCommand from Gcode import Gcode class M109(GCodeCommand): ...
tomstokes/redeem
software/gcodes/M109.py
Python
gpl-3.0
705
#!/usr/bin/python import csv import re import urllib from operator import methodcaller from urllib.request import urlopen import pywikibot from pywikibot.bot import RedirectPageBot, WikidataBot from pywikibot.exceptions import NoPageError from .merger import Merger class WikidataRedirectsBot(WikidataBot, Redirect...
matejsuchanek/pywikibot-scripts
cleanup_redirects.py
Python
gpl-2.0
4,092
import sys import os import progressbar as pb from numpy import (isnan, arcsin, arctan2, cos, floor, inf, sin, sqrt, tan, where, deg2rad, pi) from numpy.random import uniform from sapphire import storage class DirectionReconstruction(object): def __init__(self, datafile, results_table=None, m...
tomkooij/sapphire
deprecated/old_reconstruction/direction_reconstruction.py
Python
gpl-3.0
13,465