code stringlengths 2 1.05M | repo_name stringlengths 5 104 | path stringlengths 4 251 | language stringclasses 1
value | license stringclasses 15
values | size int32 2 1.05M |
|---|---|---|---|---|---|
'''
Created on 2013-03-22
@author: Graham Reid
'''
import scipy as sp
import sys
import pickle
from sklearn.linear_model import Lasso
from sklearn.linear_model import LinearRegression
from sklearn.cross_validation import train_test_split
import numpy as np
from scipy.sparse import *
import matplotlib.py... | gdreid/job-salary-prediction | code/models/lasoo.py | Python | gpl-3.0 | 3,087 |
#!/usr/bin/python
#coding: utf-8 -*-
# (c) 2013, Benno Joy <benno@ansible.com>
#
# This module 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 ... | gimoh/ansible-modules-core | cloud/openstack/quantum_floating_ip.py | Python | gpl-3.0 | 10,210 |
# -*- coding: utf-8 -*-
#
# PyDealer documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 22 21:57:58 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | Trebek/pydealer | docs/conf.py | Python | gpl-3.0 | 8,642 |
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.lines as lines
import gmshtranslator.gmshtranslator as gmsh
import arrayfire as af
af.set_backend('cpu')
af.set_device(0)
from dg_maxwell import msh_parser
from dg_maxwell import isoparam
from dg_maxwell import utils
def read_order... | amanabt/DG_Maxwell | dg_maxwell/msh_parser.py | Python | gpl-3.0 | 8,277 |
#!/usr/bin/env python
"""Play the immortal game using push_san() from chess.Board()."""
import chess
import timeit
def play_immortal_game():
board = chess.Board()
# 1. e4 e5
board.push_san("e4")
board.push_san("e5")
# 2. f4 exf4
board.push_san("f4")
board.push_san("exf4")
# 3. Bc4... | ddugovic/python-chess | examples/push_san.py | Python | gpl-3.0 | 1,987 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright © 2009 The Caffeine Developers
#
# 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... | ashh87/caffeine | caffeine/core.py | Python | gpl-3.0 | 20,950 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#######################################################################
#
# VidCutter - media cutter & joiner
#
# copyright © 2018 Pete Alexandrou
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Licen... | ozmartian/vidcutter | vidcutter/videocutter.py | Python | gpl-3.0 | 83,617 |
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), '../modules'))
from DHT11_Python import dht11
import logging
from average import average
log = logging.getLogger(__name__)
# Set DHT11 to read data from pin 4
dht = dht11.DHT11(pin=4)
def read():
"""
For reading DHT11 sensor which is ve... | petrstehlik/weather-station | sensors/dht.py | Python | gpl-3.0 | 396 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pcd8544.lcd as lcd
import time, os, sys
if not os.geteuid() == 0:
sys.exit('Script must be run as root')
ON, OFF = [1, 0]
try:
lcd.init()
lcd.cls()
if ( lcd.LED != 1 ):
sys.exit('LED pin should be GPIO1 (12)')
# Backlight PWM testing -- off -> 25... | XavierBerger/pcd8544 | examples/dimmer.py | Python | gpl-3.0 | 568 |
# Copyright (c) 2009 - Paulo Cabido <paulo.cabido@gmail.com>
#
# 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... | getting-things-gnome/gtg | GTG/plugins/unmaintained/geolocalized_tasks/geolocalized_tasks.py | Python | gpl-3.0 | 30,792 |
#! /usr/bin/env python
from __future__ import print_function
from openturns import *
TESTPREAMBLE()
RandomGenerator.SetSeed(0)
try:
# Instanciate one distribution object
dimension = 3
meanPoint = NumericalPoint(dimension, 1.0)
meanPoint[0] = 0.5
meanPoint[1] = -0.5
sigma = NumericalPoint(dime... | dubourg/openturns | python/test/t_KernelMixture_std.py | Python | gpl-3.0 | 4,057 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# webcam.py
#
# This file is part of Cameras
#
# Copyright (C) 2016
# Lorenzo Carbonell Cerezo <lorenzo.carbonell.cerezo@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publishe... | atareao/cameras | src/webcam.py | Python | gpl-3.0 | 3,852 |
#!/usr/bin/env python
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup(
packages=['rqt_pose_view'],
package_dir={'': 'src'}
)
setup(**d)
| aslab/rct | higgs/branches/ros-groovy/higgs_gazebo_simulation/rqt_robot_plugins/rqt_pose_view/setup.py | Python | gpl-3.0 | 222 |
# 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 t... | ctrlaltdel/neutrinator | vendor/openstack/baremetal/v1/allocation.py | Python | gpl-3.0 | 3,775 |
###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013, John McNamara, jmcnamara@cpan.org
#
import unittest
import os
from ...workbook import Workbook
from ..helperfunctions import _compare_xlsx_files
class TestCompareXLSXFiles(unittest.TestC... | ivmech/iviny-scope | lib/xlsxwriter/test/comparison/test_chart_format16.py | Python | gpl-3.0 | 2,334 |
# (c) 2013-2014, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2015 Toshio Kuratomi <tkuratomi@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either... | 2ndQuadrant/ansible | lib/ansible/executor/module_common.py | Python | gpl-3.0 | 61,921 |
"""
This file is part of Giswater 3
The 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.
"""
# -*- coding: utf-8 -*-
from functools im... | Giswater/giswater_qgis_plugin | core/toolbars/edit/feature_delete_button.py | Python | gpl-3.0 | 9,944 |
'''
Created on 2013-05-16
@author: brian
'''
import pygame
from entity import Entity
from src.ai import task
from src.abilities import *
class Snake(Entity):
living = "snake"
dead = "gore"
def __init__(self, world):
Entity.__init__(self, world)
self.world = world
self.hostile = True
self.health = s... | Greymerk/python-rpg | src/entity/mobs/snake.py | Python | gpl-3.0 | 592 |
from distutils.core import setup
setup(
name='PyMiningCalc',
version='1.0-Alpha',
packages=['PyMiningCalc'],
url='https://sites.google.com/site/working4coins/calculator, https://github.com/deddokatana/PyMiningCalc',
license='GPL3',
author='Twitter : @deddokatana - @WorkingForCoins',
author... | deddokatana/PyMiningCalc | PyMiningCalc/setup.py | Python | gpl-3.0 | 436 |
import maya.cmds as mc
import pymel.core as pm
from pytd.util.logutils import logMsg
from pytaya.util.sysutils import argsToPyNode
def matchTransform(obj, target, **kwargs):
logMsg(log='all')
bPreserveChild = kwargs.pop('preserveChild', kwargs.pop('pc', False))
sAttr = kwargs.pop('attributeToMatch', kw... | sebcourtois/pypeline-tool-devkit | pytaya/core/transform.py | Python | gpl-3.0 | 6,643 |
import csv
import os
import shutil
import tarfile
import tempfile
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.db.models import Q
from django.utils.encoding import force_text
from oioioi.filetracker.client import get_client
from oioioi.filetracker.utils import dja... | sio2project/oioioi | oioioi/exportszu/utils.py | Python | gpl-3.0 | 6,333 |
#!/usr/bin/env python
"""
@file mpl_dump_onNet.py
@author Daniel Krajzewicz
@author Michael Behrisch
@date 2007-10-25
@version $Id: mpl_dump_onNet.py 13811 2013-05-01 20:31:43Z behrisch $
This script reads a network and a dump file and
draws the network, coloring it by the values
found within the dump-file.... | rudhir-upretee/Sumo17_With_Netsim | tools/visualization/mpl_dump_onNet.py | Python | gpl-3.0 | 17,970 |
import utils
class text_file:
lines = []
def gather_lines_from_file( filename ):
with open(filename) as f:
lines = f.readlines()
self.lines = lines
def discard_lines_from_file():
correct_lines = []
comment = False
asterisk = False
data_in_that_... | BielBdeLuna/idTechX_Python_API | text_file.py | Python | gpl-3.0 | 1,232 |
class yConnector:
"""
Connector is node on grid 0 and link on grid 1
hosts primary / secondary variable, froude number, flux
source term / boundary condition
ghost connectors on 1D domain boundaries
"""
__primary_variable_slope = float()
__velocity_centered = float()
__froude_number... | drjod/yWaves | yConnector.py | Python | gpl-3.0 | 3,005 |
g = map(lambda x: x**2, range(5))
print(g)
g = list(map(lambda x: x**2, range(5)))
print(g)
lista = [1, 3, 5, 20, 50, 100]
g = list(filter(lambda x: x < 21 and x > 1, lista))
print(g) | pacocampo/Backend | semana2/lambda.py | Python | gpl-3.0 | 185 |
# coding: utf-8
"""Client program.
How to collect data:
1. Positions received as a list of points
2. Interpolate function (probably unstructured grid, see scipy.interpolate.griddata)
3. Evaluate function on points coming from the FEniCS mesh
4. Restore the values onto the array of a FEniCS function in the proper orde... | Juanlu001/pfc | demo/aquaclient.py | Python | gpl-3.0 | 883 |
# Copyright 2016 Casey Jaymes
# This file is part of PySCAP.
#
# PySCAP 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.
#
# PySCAP is ... | cjaymes/pyscap | src/scap/model/xnl_2_0/TitleElement.py | Python | gpl-3.0 | 946 |
import asyncio
import engineio
import six
from . import asyncio_manager
from . import exceptions
from . import packet
from . import server
class AsyncServer(server.Server):
"""A Socket.IO server for asyncio.
This class implements a fully compliant Socket.IO web server with support
for websocket and lon... | max00xam/service.maxxam.teamwatch | lib/socketio/asyncio_server.py | Python | gpl-3.0 | 24,559 |
# -*- coding: utf-8 -*-
#
# test documentation build configuration file, created by
# sphinx-quickstart on Wed Sep 2 11:29:03 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All ... | PnCevennes/projet_suivi | docs/conf.py | Python | gpl-3.0 | 8,065 |
# Copyright Daniel Dunn 2013,2017
# This file is part of Kaithem Automation.
# Kaithem Automation 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.
# Kaithem Automation is distributed in the hope th... | EternityForest/KaithemAutomation | kaithem/src/ManageUsers.py | Python | gpl-3.0 | 8,039 |
#!/usr/bin/env python
"""
Created on 28.10.2014
@author: evg-zhabotinsky
"""
from test_mir_common import *
mir = tirpan_get_mir('test_mir09.py')
n = find_mir_nodes(mir,
x_call = func_checker('x'),
y_call = func_checker('y'),
z_call = func_checker('z'),
... | bronikkk/tirpan | tests/accept_mir09.py | Python | gpl-3.0 | 1,313 |
#! /usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 ~ 2013 Deepin, Inc.
# 2011 ~ 2013 Wang Yong
#
# Author: Wang Yong <lazycat.manatee@gmail.com>
# Maintainer: Wang Yong <lazycat.manatee@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the t... | linuxdeepin/deepin-translator | src/translate_window.py | Python | gpl-3.0 | 4,229 |
#!/usr/bin/env python
# @author: Yannick Dayer <yannick.dayer@idiap.ch>
# @date: Wed 16 Jun 2021 17:21:47 UTC+02
import csv
import logging
from pathlib import Path
import click
from tqdm import tqdm
import bob.io.audio
import bob.io.base
from bob.bio.base.database import CSVDataset
from bob.bio.base.database impo... | bioidiap/bob.bio.spear | bob/bio/spear/database/voxforge.py | Python | gpl-3.0 | 6,256 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re, os
import unicodedata
import codecs
import HTMLParser
import nltk
import csv
from nltk.corpus import stopwords
from nltk.tokenize.punkt import PunktSentenceTokenizer
from nltk.stem.snowball import SnowballStemmer
from nltk.stem import WordNetLemmatizer
from nlt... | fmpr/texttk | texttk/texttk.py | Python | gpl-3.0 | 10,887 |
# coding=utf-8
# ##################################################### #
# #
# This is BashStyle-NG #
# #
# Licensed under GNU GENERAL PUBLIC LICENSE v3 #
# ... | Nanolx/bashstyle-ng | ui/args.py | Python | gpl-3.0 | 3,457 |
# Case Conductor is a Test Case Management system.
# Copyright (C) 2011 uTest Inc.
#
# This file is part of Case Conductor.
#
# Case Conductor 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... | mozilla/caseconductor-ui | ccui/environments/views.py | Python | gpl-3.0 | 1,892 |
import socket, subprocess, re, tools, custom
#This file explains how sockets work for networking.
MAX_MESSAGE_SIZE = 60000
def kill_processes_using_ports(ports):
popen = subprocess.Popen(['netstat', '-lpn'],
shell=False,
stdout=subprocess.PIPE)
(data, er... | zack-bitcoin/forumcoin | networking.py | Python | gpl-3.0 | 1,788 |
from DIRAC import gLogger
from DIRAC.Core.Security.X509Chain import X509Chain
from DIRAC.Core.DISET.ThreadConfig import ThreadConfig
from DIRAC.ConfigurationSystem.Client.Helpers import Registry
from DIRAC.Core.DISET.AuthManager import AuthManager
from WebAppDIRAC.Lib.SessionData import SessionData
from WebAppDIRAC.Li... | zmathe/WebAppDIRAC | Lib/WebHandler.py | Python | gpl-3.0 | 10,812 |
import paraBEM
from paraBEM import pan3d
from paraBEM.mesh import mesh_object
mesh = mesh_object.from_OBJ("../mesh/box_minimal.obj")
case = pan3d.DirichletDoublet0Case3(mesh.panels)
case.v_inf = paraBEM.Vector3(1, 0, 0)
a = case.panels[0]
b = case.panels[1]
print(a.center, " ", a.n)
print(b.center, " ", b.n)
print(... | looooo/paraBEM | examples/tests/test_parallel.py | Python | gpl-3.0 | 359 |
#
# Copyright (c) 2015 SUSE Linux GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 3 of the GNU General Public License as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRAN... | openSUSE/docmanager | src/docmanager/cli/cmd_analyze.py | Python | gpl-3.0 | 1,621 |
#!/bin/env python2.7
# -*- coding: utf-8 -*-
# This file is part of AP - Assistive Prototypes.
#
# AP 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... | jgrynczewski/Assistive-Prototypes | modules/pilots/audiobookPilot.py | Python | gpl-3.0 | 29,144 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Moodle Development Kit
Copyright (c) 2013 Frédéric Massart - FMCorz.net
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 Lic... | xow/mdk | mdk/commands/plugin.py | Python | gpl-3.0 | 7,095 |
# -*- coding: utf8 -*-
import sys, os
sys.path.append(os.path.abspath('.'))
import re
from operator import attrgetter
import difflib
# Pylons model init sequence
import pylons.test
import logging
from quanthistling.config.environment import load_environment
from quanthistling.model.meta import Sessi... | FrankNagel/qlc | src/webapp/quanthistling/scripts/annotations/annotations_for_boudin1950.py | Python | gpl-3.0 | 3,903 |
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
from professor.models import Professor, DiaSemana, DisponibilidadeAula
from professor.models import Pro... | dextervip/rpv | GerenDisponibilidade/professor/tests.py | Python | gpl-3.0 | 810 |
from behave import *
import operator
from django.db.models import Q
use_step_matcher("parse")
@given('Exists album at group "{group_name}" by "{username}"')
def step_impl(context, group_name, username):
from django.contrib.auth.models import User
user = User.objects.get(username=username)
from musicseaapp... | julio77nz/MusicSea | musicsea/features/steps/register_album.py | Python | gpl-3.0 | 2,839 |
"""
Copyright (C) 2020 Quinn D Granfor <spootdev@gmail.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
... | MediaKraken/MediaKraken_Deployment | source/common/common_logging_elasticsearch_httpx.py | Python | gpl-3.0 | 2,920 |
#!/usr/bin/env python
# encoding: utf-8
"""Module contains common utilities used in automated code tests for Gensim modules.
Attributes:
-----------
module_path : str
Full path to this module directory.
common_texts : list of list of str
Toy dataset.
common_dictionary : :class:`~gensim.corpora.dictionary.Di... | napsternxg/gensim | gensim/test/utils.py | Python | gpl-3.0 | 5,981 |
# -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2017 OSGeo
#
# 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 ... | tomkralidis/geonode | geonode/layers/tasks.py | Python | gpl-3.0 | 1,791 |
"""
hierin heb ik een poging gedaan om een klasse voor knoppen te maken (het is overigens niet echt gelukt)
"""
from tkinter import *
class Knoppen:
def bericht(self):
print("werkt dit?")
def tweede(self):
print("test")
def __init__(self, master):
beeld = Frame(master)
... | ricardovandervlag/Project-2.1---Python | window.py | Python | gpl-3.0 | 947 |
import django
from django.http import Http404
from django.views.generic import DetailView
from repanier.const import DECIMAL_ZERO
from repanier.models.bankaccount import BankAccount
from repanier.models.invoice import ProducerInvoice
from repanier.models.offeritem import OfferItemReadOnly
from repanier.models.producer... | pcolmant/repanier | repanier/views/producer_invoice_class.py | Python | gpl-3.0 | 4,583 |
## {{{ http://code.activestate.com/recipes/426406/ (r1)
from ConfigParser import SafeConfigParser
import logging, os
clog = logging.getLogger("Configuration")
#def getVersion():
# return 1
class Configuration:
def __init__ (self, fileName):
self.__checkForFile__(fileName)
cp = SafeConfigParser()... | leeclarke/homePi | src/python/Configuration.py | Python | gpl-3.0 | 2,038 |
import os
import cv2
from crop_pictures import CropFace
file_dir = os.path.dirname(os.path.realpath(__file__))
cropped_photos_dir = os.path.join(file_dir,
'cropped_photos',
'')
eye_cascade_filepath = os.path.join(file_dir, 'haarcascade_eye.xml')
e... | benhoff/facebook_api_script | eye_aligner.py | Python | gpl-3.0 | 1,214 |
"""映射 集合 ... 高级数据结构类型"""
from string import Template
val_dict = {1: 'a', 2: 'b', 3: 'c'}
print(val_dict)
print(val_dict.keys())
print(val_dict.items())
print(val_dict.values())
factory_dict = dict((['x', 1], ['y', 2]))
print(factory_dict)
ddcit = {}.fromkeys(('x', 'y', 'z'), -24)
ddcit.update(val_dict) # 新值覆盖旧值
prin... | yanjinbin/learnPython | chapter_7/chapter7.py | Python | gpl-3.0 | 3,243 |
# from: http://cairographics.org/freetypepython/
import ctypes
import cairo
class FreeTypeLibInitializationFailed(Exception):
pass
class PycairoContext(ctypes.Structure):
_fields_ = [("PyObject_HEAD", ctypes.c_byte * object.__basicsize__),
("ctx", ctypes.c_void_p), ("base", ctypes.c_void_p)... | cajone/pychess | lib/pychess/System/cairoextras.py | Python | gpl-3.0 | 2,930 |
#
# Race Capture App
#
# Copyright (C) 2014-2017 Autosport Labs
#
# This file is part of the Race Capture App
#
# This 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 ... | autosportlabs/RaceCapture_App | autosportlabs/racecapture/views/status/statusview.py | Python | gpl-3.0 | 14,474 |
# coding=utf-8
"""InaSAFE Disaster risk tool by Australian Aid - Classified Polygon on
Land Cover Metadata Definitions.
Contact : ole.moller.nielsen@gmail.com
.. note:: 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
t... | Samweli/inasafe | safe/impact_functions/generic/classified_polygon_people/metadata_definitions.py | Python | gpl-3.0 | 4,644 |
# SET THE FOLLOWING EITHER BEFORE RUNNING THIS FILE OR BELOW, BEFORE INITIALIZING
# PRAW!
# set variables for interacting with reddit.
# my_user_agent = ""
# my_username = ""
# my_password = ""
# reddit_post_id = -1
# import praw - install: pip install praw
# Praw doc: https://praw.readthedocs.org/en/latest/index... | jonathanmorgan/reddit_collect | examples/praw_testing.py | Python | gpl-3.0 | 5,265 |
# 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 be useful,
# bu... | fracpete/python-weka-wrapper3 | python/weka/flow/container.py | Python | gpl-3.0 | 7,930 |
# -*- coding: utf-8 -*-
# Copyright (C) 2015 ZetaOps Inc.
#
# This file is licensed under the GNU General Public License v3
# (GPLv3). See LICENSE.txt for details.
"""HITAP Nufus Ekle
Hitap'a personelin Nufus bilgilerinin eklenmesini yapar.
"""
from ulakbus.services.personel.hitap.hitap_service import ZatoHitapS... | zetaops/ulakbus | ulakbus/services/personel/hitap/hizmet_nufus_ekle.py | Python | gpl-3.0 | 1,674 |
__version__ = '1.3'
from kivy.app import App
from kivy.lang import Builder
from kivy.properties import NumericProperty
from gmaps import GMap, run_on_ui_thread
gmap_kv = '''
<Toolbar@BoxLayout>:
size_hint_y: None
height: '48dp'
padding: '4dp'
spacing: '4dp'
canvas:
Color:
rgb... | SwordGO/SwordGO_app | example/kivy-gmaps/main.py | Python | gpl-3.0 | 2,807 |
while(True):
n=int(input())
if n==-1:
break
elif n==0:
print("0")
else:
print(n-1)
| h31nr1ch/Mirrors | c/OtherProblems/patinhos-2334.py | Python | gpl-3.0 | 123 |
#!/usr/bin/env python3.5
import argparse
import sys
from artiqDrivers.devices.rohdeSynth.driver import RohdeSynth
from sipyco.pc_rpc import simple_server_loop
from sipyco.common_args import simple_network_args, init_logger_from_args
from oxart.tools import add_common_args
def get_argparser():
parser = argparse.... | cjbe/artiqDrivers | artiqDrivers/frontend/rohdeSynth_controller.py | Python | gpl-3.0 | 1,342 |
# This demo does the same as the dyndispatch demo, except that a
# custom dispatcher loop is used. This is how asynchronous parallel
# optimization algorithms like DE and PSADE are implemented.
# mpirun -n 4 python 05-asyncloop.py
from pyopus.parallel.cooperative import cOS
from pyopus.parallel.mpi import MPI
from ... | blorgon9000/pyopus | demo/parallel/cooperative/05-asyncloop.py | Python | gpl-3.0 | 2,431 |
#-*- coding: utf-8 -*-
###########################################################################
## ##
## Copyrights Frederic Rodrigo 2011 ##
## ... | tkasp/osmose-backend | analysers/Analyser_Osmosis.py | Python | gpl-3.0 | 28,447 |
# -*- coding: utf-8 -*-
# MLC (Machine Learning Control): A genetic algorithm library to solve chaotic problems
# Copyright (C) 2015-2017, Thomas Duriez (thomas.duriez@gmail.com)
# Copyright (C) 2015, Adrian Durán (adrianmdu@gmail.com)
# Copyright (C) 2015-2017, Ezequiel Torres Feyuk (ezequiel.torresfeyuk@gmail.com)
# ... | MachineLearningControl/OpenMLC-Python | MLC/mlc_parameters/mlc_parameters.py | Python | gpl-3.0 | 3,102 |
# -*- coding: utf-8 -*-
import re
class KirjaSivu():
"""Luokka yksittäisen kirjan tiedot sisältävän sivun käsittelyyn."""
# tekstipohja luetteloon kirjoitettaville kirjan tiedoille: nimi, tekijä, id, tyyppikohtaiset tiedot, url ja kuvaus
# pohjaa käytetään pythonin merkkijonon format metodin kans... | ohylli/celia-uutuudet | kirja.py | Python | gpl-3.0 | 4,304 |
#!/usr/bin/env python3
'''
kicad-footprint-generator 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.
kicad-footprint-generator is distribut... | pointhi/kicad-footprint-generator | scripts/Connector/Connector_JST/conn_jst_VH_tht_side-stabilizer.py | Python | gpl-3.0 | 12,839 |
# This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... | h4ck3rm1k3/ansible | lib/ansible/module_utils/basic.py | Python | gpl-3.0 | 60,500 |
from __future__ import unicode_literals
from django.apps import AppConfig
class MergeserverConfig(AppConfig):
name = 'MergeServer'
| zeqing-guo/SPAKeyManager | MergeServer/apps.py | Python | gpl-3.0 | 138 |
#
# Copyright 2015 Universidad Complutense de Madrid
#
# This file is part of Megara DRP
#
# Megara DRP 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) an... | Pica4x6/megaradrp | megaradrp/tests/test_products.py | Python | gpl-3.0 | 2,054 |
from flask import request
from flask_restful import Resource
import json
from core.bo.clienteBo import ClienteBo
class Cliente(Resource):
def __init__(self):
self.cliente = ClienteBo()
def get(self, parameter=""):
if parameter == "":
return self.cliente.get_all(), 201
else:... | guigovedovato/python | api/clienteApi.py | Python | gpl-3.0 | 1,042 |
# -*- coding: utf-8 -*-
# Mathmaker creates automatically maths exercises sheets
# with their answers
# Copyright 2006-2017 Nicolas Hainaux <nh.techn@gmail.com>
# This file is part of Mathmaker.
# Mathmaker is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License... | nicolashainaux/mathmaker | mathmaker/lib/document/content/calculation/order_of_operations.py | Python | gpl-3.0 | 68,910 |
#!/usr/bin/env python2
"""Convert gdata from gene mark into bedGraph.
USAGE:
genemark2bedGraph.py *.gdata [> bedGraph]
AUTHOR:
l.p.pryszcz+git@gmail.com
Barcelona, 17/07/2012
"""
import os,sys
def fn2bed( fn ):
"""Generate bed
http://genome.ucsc.edu/goldenPath/help/bedgraph.html
"""
#chromosome name is chr... | lpryszcz/bin | genemark2bed.py | Python | gpl-3.0 | 1,738 |
"""Utilities for extracting macros and preprocessor definitions from C files. Depends on Clang's python bindings.
Note that cursors have children, which are also cursors. They are not iterators, they are nodes in a tree.
Everything here uses iterators. The general strategy is to have multiple passes over the same cu... | camlorn/clang_helper | clang_helper/extract_macros.py | Python | gpl-3.0 | 2,943 |
# Lexical Ordering
# Copyright (C) 2016 Alper Nebi Yasak
#
# 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 prog... | alpernebbi/albumin | albumin/lexical_ordering.py | Python | gpl-3.0 | 1,985 |
# -*- encoding: utf-8 -*-
import re
from django.contrib.auth.models import User
class LoginBackend(object):
def authenticate(self, username=None, password=None):
if username:
#email
if re.match("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$", username) != None:... | Wang-Sen/nqzx-backend | bootcamp/app/models.py | Python | gpl-3.0 | 1,418 |
#!/usr/bin/env python
''' Checkout gitwash repo into directory and do search replace on name '''
from __future__ import (absolute_import, division, print_function)
import os
from os.path import join as pjoin
import shutil
import sys
import re
import glob
import fnmatch
import tempfile
from subprocess import call
from... | bgris/ODL_bgris | doc/gitwash_dumper.py | Python | gpl-3.0 | 8,036 |
# -*- coding: utf-8 -*-
from os import path
import yaml
import arrow
from chunkify import chunkify
from jinja2 import Environment, FileSystemLoader, StrictUndefined
from taskcluster.utils import stableSlugId
DEFAULT_TEMPLATE_DIR = path.join(path.dirname(__file__), "templates")
def make_task_graph(root_template="... | mrrrgn/releasetasks | releasetasks/__init__.py | Python | mpl-2.0 | 1,546 |
# Interface MathDoku
from fonctions import *
from bruteforce import *
from numpy import array
donnees = {}
taille=int(input('Taille de la grille ? '))
n = int(input('Nombre de blocs dans la grille \n'))
grille=array([[0 for i in range(taille)] for j in range(taille)])
try:
for i in range(1,n+1):
print('Vo... | g-goessel/mathdoku_solve | InterfaceMathDoku.py | Python | mpl-2.0 | 1,799 |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
from hashlib import sha256
from abc import abstractmethod
from pathlib import Path
from numbers import Real
import warni... | zerothi/sisl | toolbox/siesta/minimizer/_minimize.py | Python | mpl-2.0 | 13,374 |
from django.conf.urls import include, url
from django.views.generic import TemplateView
from kuma.attachments.feeds import AttachmentsFeed
from kuma.attachments.views import edit_attachment
from . import feeds, views
from .constants import DOCUMENT_PATH_RE
# These patterns inherit (?P<document_path>[^\$]+).
documen... | jgmize/kuma | kuma/wiki/urls.py | Python | mpl-2.0 | 5,894 |
from django.shortcuts import render, redirect, get_object_or_404
from django.core.urlresolvers import reverse
from openiv.settings import *
# Create your views here.
def index(request):
return redirect(reverse('public:event'))
# Comment the above to have an independent home page.
context = {
'imagesource': ... | amoschou/openiv | public/views.py | Python | mpl-2.0 | 3,942 |
from jx_bigquery import bigquery
from jx_mysql.mysql import (MySQL,
sql_query)
from jx_mysql.mysql_snowflake_extractor import MySqlSnowflakeExtractor
from jx_python import jx
from mo_files import File
from mo_json import (json2value,
value2json)
from mo_logs import (Log,... | KWierso/treeherder | treeherder/extract/extract_jobs.py | Python | mpl-2.0 | 5,395 |
#coding: utf-8
import os
DEBUG = False
TEMPLATE_DEBUG = DEBUG
DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'open511', # Or path to database file if using sqlite3.
'US... | Open511/roadcast | travis-ci/travis511/settings.py | Python | agpl-3.0 | 5,239 |
import exceptions
# throws by anything which doesn't like what was passed to it
class DataError(exceptions.StandardError):
pass
# thrown by MojoMessage
class MojoMessageError(DataError):
pass
# thrown by DataTypes
class BadFormatError(DataError):
pass
# throws by things which do block reassembly
class R... | zooko/egtp | common/MojoErrors.py | Python | agpl-3.0 | 355 |
# (c) Crown Copyright 2014 Defence Science and Technology Laboratory UK
# Author: Rich Brantingham
import datetime
from mongoengine import Document, BooleanField, IntField, EmbeddedDocument, DateTimeField, ListField, StringField, EmbeddedDocumentField, FloatField
class InheritableDocument(Document):
m... | dstl/ideaworks | backend/ideaworks/ideasapp/documents.py | Python | agpl-3.0 | 6,632 |
# -*- coding: utf-8 -*-
# Copyright 2020 OpenSynergy Indonesia
# Copyright 2020 PT. Simetri Sinergi Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Payment Order - BCA Multi Auto Transaksi",
"version": "8.0.1.1.0",
"category": "Accounting & Finance",
"website": "http... | open-synergy/opnsynid-account-payment | account_payment_bca_multi_auto_transaksi/__openerp__.py | Python | agpl-3.0 | 582 |
#!/usr/bin/env python
# This file is copied from GCoder.
#
# GCoder 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.
#
# GCoder is distr... | beeverycreative/BEEweb | src/octoprint/util/bvc_gcoder.py | Python | agpl-3.0 | 22,091 |
from flask_script import Command, Option
import sys
from skylines.database import db
from skylines.model import User, Club, IGCFile, Flight, TrackingFix
class Merge(Command):
""" Merge two user accounts """
option_list = (
Option('new_id', type=int, help='ID of the new user account'),
Optio... | shadowoneau/skylines | skylines/commands/users/merge.py | Python | agpl-3.0 | 1,896 |
from __future__ import absolute_import, print_function, division
from copy import copy
from itertools import product as itertools_product
from unittest import TestCase
import numpy
from numpy import (arange, array, common_type, complex64, complex128, float32,
float64, newaxis, shape, transpose, zeros... | Weihonghao/ECM | Vpy34/lib/python3.5/site-packages/theano/tensor/tests/test_blas.py | Python | agpl-3.0 | 87,605 |
# -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
from typing ... | superdesk/superdesk-ntb | server/ntb/io/feed_parsers/ntb_events_api_xml.py | Python | agpl-3.0 | 12,239 |
########################################################################
# Rancho - Open Source Group/Project Management Tool
# Copyright (C) 2008 The Rancho Team
#
# 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 t... | joaquimrocha/Rancho | rancho/message/management.py | Python | agpl-3.0 | 1,442 |
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar)
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Pu... | smartforceplus/SmartForceplus | openerp/addons/project_stage/__openerp__.py | Python | agpl-3.0 | 1,603 |
# -*- coding: utf-8 -*-
# Copyright 2018 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import models
class HrTimesheetSheet(models.Model):
_name = "hr_timesheet_sheet.sheet"
_inherit = ["hr_timesheet_sheet.sheet", "tier.validation"]
_state_from = ["con... | open-synergy/opnsynid-hr | hr_timesheet_tier_validation/models/hr_timesheet_sheet.py | Python | agpl-3.0 | 352 |
# -*- coding: utf-8 -*-
import ast
import base64
import csv
import functools
import glob
import itertools
import jinja2
import logging
import operator
import datetime
import hashlib
import os
import re
import simplejson
import sys
import time
import urllib2
import zlib
from xml.etree import ElementTree
from cStringIO ... | doganaltunbay/odoo | addons/web/controllers/main.py | Python | agpl-3.0 | 65,240 |
# -*- coding: utf-8 -*-
##############################################################################
#
# Odoo, Open Source Management Solution
# Copyright (C) 2010 - 2014 Savoir-faire Linux
# (<http://www.savoirfairelinux.com>).
#
# This program is free software: you can redistribute it and/or modify
# ... | jjscarafia/l10n-canada | res_partner_attributes_add_SIN/__openerp__.py | Python | agpl-3.0 | 1,378 |
# -*- coding: utf-8 -*-
# Copyright (C) 2016-Today GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'Products - Send to Scales',
'summary': 'Synchronize Odoo database with Scales',
'versio... | houssine78/addons | product_to_scale_bizerba/__openerp__.py | Python | agpl-3.0 | 1,686 |
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2012 OpenERP - Team de Localización Argentina.
# https://launchpad.net/~openerp-l10n-ar-localization
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of t... | pronexo-odoo/odoo-argentina | l10n_ar_account_check_debit_note/invoice.py | Python | agpl-3.0 | 31,158 |
# -*- coding: utf-8 -*-
"""
Select2 Widgets based on https://github.com/applegrew/django-select2.
These components are responsible for rendering
the necessary HTML data markups. Since this whole
package is to render choices using Select2 JavaScript
library, hence these components are meant to be used
with choice field... | monouno/site | judge/widgets/select2.py | Python | agpl-3.0 | 7,832 |
#!/usr/bin/python
"""
Turns on an LED on for one second, then off for one second, repeatedly.
Most Arduinos have an on-board LED you can control. On the Uno and
Leonardo, it is attached to digital pin 13. If you're unsure what
pin the on-board LED is connected to on your Arduino model, check
the documentatio... | MrYsLab/pymata-aio | examples/blink.py | Python | agpl-3.0 | 1,345 |