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
""" Functions for the analysis of integral field spectroscopy. Author: Daniel Ruschel Dutra Website: https://github.com/danielrd6/ifscube """ from numpy import * import pyfits as pf import spectools as st import matplotlib as mpl import matplotlib.pyplot as plt from scipy.integrate import trapz from copy import deepc...
danielrd6/ifscube
cubetools.py
Python
gpl-3.0
39,584
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
tomsilver/nupic
examples/network/network_api_demo.py
Python
gpl-3.0
7,557
""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY 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. CVXPY is distributed i...
cvxgrp/ncvx
ncvx/orthog.py
Python
gpl-3.0
1,674
import sure import tempfile from contents import contents def test_file_with_long_levels(): content = '''/** * Project X * Author: Jean Pimentel * Date: August, 2013 */ /* > Intro */ Toc toc! Penny! Toc toc! Penny! Toc toc! Penny! /* >> The Big Bang Theory << */ The Big Bang Theory is an American sitcom cr...
jeanpimentel/contents
tests/functional/test_file_with_long_levels.py
Python
gpl-3.0
3,294
""" Functions and decorators for making sure the parameters they work on are of iterable types. Copyright 2014-2015, Outernet Inc. Some rights reserved. This software is free software licensed under the terms of GPLv3. See COPYING file that comes with the source code, or http://www.gnu.org/licenses/gpl.txt. """ impor...
Outernet-Project/librarian
librarian/core/utils/iterables.py
Python
gpl-3.0
2,296
# -*- coding: utf-8 -*- # Copyright (C) 2014 Daniele Simonetti # # 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 your option) any later version. # # Thi...
Kaniabi/l5r-character-manager-3
l5r/dialogs/newrankdlg.py
Python
gpl-3.0
3,023
# coding=utf-8 """ InaSAFE Disaster risk assessment tool by AusAid - **Generic Impact Function on Population for Continuous Hazard.** 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 publi...
MariaSolovyeva/inasafe
safe/impact_functions/generic/continuous_hazard_population/impact_function.py
Python
gpl-3.0
10,346
""" The LDBDClient module provides an API for connecting to and making requests of a LDBDServer. This module requires U{pyGlobus<http://www-itg.lbl.gov/gtg/projects/pyGlobus/>}. This file is part of the Grid LSC User Environment (GLUE) GLUE is free software: you can redistribute it and/or modify it under the terms ...
ligo-cbc/pycbc-glue
pycbc_glue/LDBDClient.py
Python
gpl-3.0
11,113
import html import inflect import titlecase from flask import url_for from shared.pd_exception import DoesNotExistException from .. import APP, importing from ..data import match from ..view import View @APP.route('/match/<int:match_id>/') def show_match(match_id: int) -> str: view = Match(match.get_match(matc...
PennyDreadfulMTG/Penny-Dreadful-Discord-Bot
logsite/views/match_view.py
Python
gpl-3.0
2,353
from pattern import Pattern import itertools import random import colorsys import time class EqPattern(Pattern): def __init__(self, meter_color=(255,100,50), background_color=(0,50,255)): self.meter_r = meter_color[0] self.meter_g = meter_color[1] self.meter_b = meter_color[2] self...
TheGentlemanOctopus/thegentlemanoctopus
octopus_code/core/octopus/patterns/eqPattern.py
Python
gpl-3.0
2,854
$NetBSD: patch-buildtools_wafsamba_samba__conftests.py,v 1.2 2019/11/10 17:01:58 adam Exp $ Ensure defines are strings to avoid assertion failure, some returned values are unicode. --- buildtools/wafsamba/samba_conftests.py.orig 2019-07-09 10:08:41.000000000 +0000 +++ buildtools/wafsamba/samba_conftests.py @@ -97,9 +...
oposs/pkg.oetiker.ch-build
build/samba4/patches/patch-buildtools_wafsamba_samba__conftests.py
Python
gpl-3.0
890
# YouTube Video: https://www.youtube.com/watch?v=RRK0gd77Ln0 # Given a string, calculate the length of the string. input_str = "LucidProgramming" # Standard Pythonic way: # print(len(input_str)) # Iterative length calculation: O(n) def iterative_str_len(input_str): input_str_len = 0 for i in range(len(input...
vprusso/youtube_tutorials
algorithms/recursion/str_len.py
Python
gpl-3.0
615
import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' import gc import argparse from util import learn def get_arguments(): parser = argparse.ArgumentParser(description='Train a model') parser.add_argument('data', type=str, help='Training data set') parser.add_argument('model', type=str, help='Model') pa...
patrick-winter-knime/deep-learning-on-molecules
smiles-vhts-embedding/train.py
Python
gpl-3.0
726
from builtins import str from builtins import range from django.http import HttpResponse,HttpResponseNotFound from django.template import loader from django.shortcuts import get_list_or_404 from django.shortcuts import render from .forms import TestMessageForm from .models import Device from django.conf import settings...
zibawa/zibawa
devices/views.py
Python
gpl-3.0
7,956
import urllib import logging import random from datetime import datetime from google.appengine.api import users from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app from google.appengine.ext import db from google.appengine.ext.db import Key class Move(db.Model): move = d...
blynn/spelltapper
app/spelltapper.py
Python
gpl-3.0
15,729
# coding: utf-8 # In[2]: # Import and read the datset import numpy as np from sklearn import linear_model import matplotlib.pyplot as plt import pandas as pd dataset = pd.read_csv("C://Users//Koyel//Desktop/MieRobotAdvert.csv") dataset.head() # In[3]: dataset.describe() # In[4]: dataset.columns # In[5]: i...
MieRobot/Blogs
Blog_LinearRegression.py
Python
gpl-3.0
1,518
#!/usr/bin/python from src.sqllist import get_sql _UPDATER_EXTRAS = { 'runningcatalog': ['runcatid'], 'runningcatalog_fluxes': ['runcat_id', 'band', 'stokes'], } def _refactor_update(sql): """ Special refactoring for MonetDB update..from imitation. """ def _get_extra_conditions(tabname): ...
jjdmol/LOFAR
CEP/GSM/bremen/src/updater.py
Python
gpl-3.0
1,838
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, erpnext import datetime, math from frappe.utils import add_days, cint, cstr, flt, getdate, rounded, date_diff, money_in_words from frapp...
shubhamgupta123/erpnext
erpnext/hr/doctype/salary_slip/salary_slip.py
Python
gpl-3.0
34,301
# # This file is part of CAVIAR. # # CAVIAR 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. # # CAVIAR is distributed in the hope that ...
miquelo/caviar
packages/caviar/engine/lb.py
Python
gpl-3.0
2,131
# This file is part of Buildbot. Buildbot 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. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
zozo123/buildbot
master/buildbot/schedulers/base.py
Python
gpl-3.0
10,933
from flask import Flask, jsonify, request, render_template, make_response from datetime import datetime from elasticsearch import Elasticsearch es = Elasticsearch() app = Flask(__name__) @app.route('/') def hello_world(): return render_template( 'index.html' ) @app.route('/buscar', methods = ["POST"...
cristhro/Machine-Learning
ejercicio 5/flaskApp/flaskApp.py
Python
gpl-3.0
6,023
import itertools import os class TreeHasher(): """uses BlockHasher recursively on a directory tree Input and output generators are in the format: ( relative-filepath, chunk_nr, hexdigest) """ def __init__(self, block_hasher): """ :type block_hasher: BlockHasher """ ...
psy0rz/zfs_autobackup
zfs_autobackup/TreeHasher.py
Python
gpl-3.0
2,011
import io import math import random from contextlib import redirect_stdout from unittest import TestCase from hamcrest import * from array_util import get_random_unique_array from chapter16.problem16_1 import greedy_make_change, make_change, print_change from datastructures.array import Array from util import between...
wojtask/CormenPy
test/test_chapter16/test_problem16_1.py
Python
gpl-3.0
1,843
# -*- coding: utf-8 -*- # Copyright (c) 2004 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing the TR Previewer main window. """ from __future__ import unicode_literals import os from PyQt5.QtCore import QDir, QTimer, QFileInfo, pyqtSignal, QEvent, QSize, \ QTranslator, QObject, Qt, ...
davy39/eric
Tools/TRPreviewer.py
Python
gpl-3.0
29,971
# -*- coding: utf-8 -*- """ This module implements users. """ import os from persistent import Persistent import src.core.db as db import src.core.exc as exc import src.core.utils as utils import src.core.security as security import random import time class User(object): def __init__(self): self.__set_to_none()...
dpdani/csu
src/core/user.py
Python
gpl-3.0
7,518
# -*- coding: utf-8 -*- """ /*************************************************************************** QAD Quantum Aided Design plugin ok classe per gestire il map tool in ambito del comando array ------------------- begin : 2016-05-31 copyrig...
gam17/QAD
cmd/qad_array_maptool.py
Python
gpl-3.0
9,990
""" Some useful utility functions missing from numpy/scipy. Copyright 2016 Deepak Subburam 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 la...
Fenugreek/tamarind
functions.py
Python
gpl-3.0
4,617
# -*- coding: utf-8 -*- ############################################################################## # # Desarrollado por rNet Soluciones # Jefe de Proyecto: Ing. Ulises Tlatoani Vidal Rieder # Desarrollador: Ing. Salvador Daniel Pelayo Gómez. # Analista: Lic. David Padilla Bobadilla # ###################...
daniel2101/fleosa
fleosa/report/__init__.py
Python
gpl-3.0
1,219
import os import tempfile import unittest import numpy as np import pandas as pd from sqlalchemy import create_engine from tests.settings import POSTGRESQL_ENGINE, SQLITE_ENGINE from tests.utils import get_repository_path, DBTest from ukbrest.common.pheno2sql import Pheno2SQL class Pheno2SQLTest(DBTest): @unitt...
miltondp/ukbrest
tests/test_pheno2sql.py
Python
gpl-3.0
95,438
# (c) 2014, Brian Coca, Josh Drake, et al # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' cache: jsonfi...
mheap/ansible
lib/ansible/plugins/cache/jsonfile.py
Python
gpl-3.0
2,046
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2018-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
t-wissmann/qutebrowser
qutebrowser/extensions/loader.py
Python
gpl-3.0
5,652
# Copyright (C) British Crown (Met Office) & Contributors. # This file is part of Rose, a framework for meteorological suites. # # Rose 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 L...
metomi/rose
metomi/rose/task_run.py
Python
gpl-3.0
6,607
# Generated by Django 2.0.5 on 2018-05-28 15:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('scoping', '0196_auto_20180528_0902'), ] operations = [ migrations.AddField( model_name='docpar', name='endColor', ...
mcallaghan/tmv
BasicBrowser/scoping/migrations/0197_auto_20180528_1537.py
Python
gpl-3.0
3,055
import copy from decimal import Decimal import datetime from celery_formtask.tasks import processform, PROGRESS_STATE class FormTaskMixin: def __init__(self, *args, task=None, ignored_kwargs=[], **kwargs): self._task = task self._args_bak = args self._kwargs_bak = copy.copy(kwargs) ...
HumanExposure/factotum
celery_formtask/forms.py
Python
gpl-3.0
1,765
#coding:utf8 from baseclass.DeepRecommender import DeepRecommender import numpy as np from random import choice,random,randint,shuffle from tool import config import tensorflow as tf #According to the paper, we only class DMF(DeepRecommender): def __init__(self,conf,trainingSet=None,testSet=None,fold='[1]'): ...
Coder-Yu/RecQ
algorithm/ranking/DMF.py
Python
gpl-3.0
6,418
from list_node import ListNode from instruction import Instruction, Subneg4Instruction def sr_mult(WM, LM): namespace_bak = WM.getNamespace(string=False) WM.setNamespace(["sr","mult"]) c_0 = WM.const(0) c_1 = WM.const(1) c_m1 = WM.const(-1) c_32 = WM.const(32) a = WM.addDataWord(0, "arg1") b = W...
AZQ1994/s4compiler
sr_mult.py
Python
gpl-3.0
5,281
from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.core.validators import URLValidator from django.core.exceptions import ValidationError class ADBaseCommand(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--overwrite', ...
xuqingkuang/tsCloud
tsCloud/ad/management/commands/_private.py
Python
gpl-3.0
841
# This tool convert KangXiZiDian djvu files to tiff files. # Download djvu files: http://bbs.dartmouth.edu/~fangq/KangXi/KangXi.tar # Character page info: http://wenq.org/unihan/Unihan.txt as kIRGKangXi field. # Character seek position in Unihan.txt http://wenq.org/unihan/unihandata.txt # DjVuLibre package provides the...
huzheng001/stardict-3
tools/src/KangXiZiDian-djvu2tiff.py
Python
gpl-3.0
677
# Copyright (C) 2018-2022 Yannick Jadoul # # This file is part of Parselmouth. # # Parselmouth 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 ...
YannickJadoul/Parselmouth
tests/resource_fixtures.py
Python
gpl-3.0
1,735
#!/usr/bin/python3 # Copyright 2017-2021 Joel Allen Luellwitz and Emily Frost # # 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 v...
park-bench/gpgmailer
test/__init__.py
Python
gpl-3.0
1,050
# vim: set fileencoding=utf-8 : # GNU Solfege - free ear training software # Copyright (C) 2009, 2011 Tom Cato Amundsen # # 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...
RannyeriDev/Solfege
solfege/fpeditor.py
Python
gpl-3.0
34,999
""" prime_test(n) returns a True if n is a prime number else it returns False """ import unittest def prime_test(n): if n <= 1: return False if n == 2 or n == 3: return True if n % 2 == 0 or n % 3 == 0: return False j = 5 while j * j <= n: if n % j == 0 or n % (j + ...
marcosfede/algorithms
maths/prime_test.py
Python
gpl-3.0
1,595
print "You enter a dark room with two doors. Do you go through door #1 or door #2?" door = raw_input("> ") if door == "1": print "There`s a giant bear here eating a chees cake. What do you do?" print "1. Take the cake." print "2. Scream at the bear." bear = raw_input("> ") if bear == "1": print "The bear e...
aleksl05/IS-206
ex31.py
Python
gpl-3.0
982
import os print os.path.dirname(os.path.abspath(__file__))
Art3mk4/python
process/pid.py
Python
gpl-3.0
58
# -*- coding: utf-8 -*- from __future__ import with_statement import os import time from module.plugins.internal.Plugin import Plugin from module.plugins.internal.utils import encode class Captcha(Plugin): __name__ = "Captcha" __type__ = "captcha" __version__ = "0.47" __status__ = "stable" ...
fzimmermann89/pyload
module/plugins/internal/Captcha.py
Python
gpl-3.0
4,078
#!/usr/bin/env python3 #-*- coding: utf-8 -*- from PyQt4 import QtCore from PyQt4 import QtGui from widget import Button, Label class ToolsWidget(QtGui.QWidget): """ widget cantaining tools buttons """ def __init__(self, project): QtGui.QWidget.__init__(self) self.project = project #...
z-uo/pixeditor
dock_tools.py
Python
gpl-3.0
2,923
import xml.etree.ElementTree as ElementTree import os.path import sys # # is there a xmp sidecar file? # def get_xmp_filename(filename): xmpfilename = False # some xmp sidecar filenames are based on the original filename without extensions like .jpg or .jpeg filenamewithoutextension = '.' . join(filena...
opensemanticsearch/open-semantic-etl
src/opensemanticetl/enhance_xmp.py
Python
gpl-3.0
4,568
""" The mean of three integers A, B and C is (A + B + C)/3. The median of three integers is the one that would be in the middle if they are sorted in non-decreasing order. Given two integers A and B, return the minimum possible integer C such that the mean and the median of A, B and C are equal. Input Each test case ...
deyvedvm/cederj
urionlinejudge/python/1379.py
Python
gpl-3.0
781
""" py.test test of ExecutorDispatcher """ from __future__ import absolute_import from __future__ import division from __future__ import print_function # pylint: disable=protected-access __RCSID__ = "$Id$" from DIRAC.Core.Utilities.ExecutorDispatcher import ( ExecutorState, ExecutorQueues, ) execState = E...
ic-hep/DIRAC
src/DIRAC/Core/Utilities/test/Test_ExecutorDispatcher.py
Python
gpl-3.0
3,478
# This file is part of PARPG. # # PARPG 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. # # PARPG is distributed in the hop...
parpg/parpg
parpg/dialogueprocessor.py
Python
gpl-3.0
15,770
class SnakeGame: def __init__(self, width, height, food): """ Initialize your data structure here. @param width - screen width @param height - screen height @param food - A list of food positions E.g food = [[1,1], [1,0]] means the first food is positioned at [1,1],...
YiqunPeng/Leetcode-pyq
solutions/353DesignSnakeGame.py
Python
gpl-3.0
2,009
from Start_up import* from Player import Player, HealthBar from Bullet import Bullet from Enemy import Enemy from Stopper import Stopper from Particle import Particle from Stars import Star, create_stars from Package import EnemyDrop, HealthPack from Notes import NoteController class Game: def __init__(self, play...
YJoe/SpaceShips
Desktop/Python/space_scroll/Game.py
Python
gpl-3.0
11,279
from trifle.server.views.frontend import frontend from trifle.server.views.api import api from trifle.server.views.monitor import monitor from trifle.server.views.configure import configure
gloaec/trifle
src/trifle/server/views/__init__.py
Python
gpl-3.0
200
class Rule: ''' 规则父类 ''' def action(self,block,handler): ''' 加标记 ''' handler.start(self.type) handler.feed(block) handler.end(self.type) return True class HeadingRule(Rule): ''' 一号标题规则 ''' type='heading' def condition(self,block): ''' 判断文本块是否符合规则 ''' return not '\n' in block and len(bloc...
JNero/shiyanlou
wenbenjiexiqi/rules.py
Python
gpl-3.0
1,355
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-06-01 12:02 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('website', '0030_github_user'), ] operations = [ migrations.AddField( ...
hiezust/teask
website/migrations/0031_auto_20170601_1502.py
Python
gpl-3.0
1,475
import json import os import re import shutil import xmltodict import zipfile from django.conf import settings from django.conf.urls import url from django.core.exceptions import MultipleObjectsReturned from django.db.models import Q from django.http import HttpResponse, Http404 from django.utils.translation import ug...
DigitalCampus/django-oppia
api/resources/course.py
Python
gpl-3.0
9,945
"""Session class factory methods.""" from __future__ import unicode_literals import logging from cachecontrol import CacheControlAdapter from cachecontrol.cache import DictCache log = logging.getLogger(__name__) log.addHandler(logging.NullHandler()) def add_cache_control(session, cache_control_config): """Add ...
pymedusa/Medusa
medusa/session/factory.py
Python
gpl-3.0
748
#!/usr/bin/env python from __future__ import print_function import argparse from subprocess import check_call, CalledProcessError import shlex import sys import logging log = logging.getLogger( __name__ ) def novo_sort( bam_filename, output_filename ): cmdline_str = "novosort -c 8 -m 8G -s -f {} -o {}".format( ba...
SANBI-SA/tools-sanbi-uwc
tools/novo_sort/novo_sort.py
Python
gpl-3.0
986
import sched, time s = sched.scheduler(time.time, time.sleep) def print_time(): print ("From print_time", time.time()) def print_some_times(): print (time.time()) s.enter(5, 1, print_time, ()) s.enter(10, 1, print_time, ()) s.run() print (time.time()) print_some_times()
selfbus/software-arm-incubation
sensors/misc/raincenter-bim112/Phyton Raincenter Tests/test.py
Python
gpl-3.0
309
import bpy camera = bpy.context.edit_movieclip.tracking.camera camera.sensor_width = 27.9 camera.units = 'MILLIMETERS' camera.focal_length = 24.0 camera.pixel_aspect = 1 camera.k1 = 0.0 camera.k2 = 0.0 camera.k3 = 0.0
cschenck/blender_sim
fluid_sim_deps/blender-2.69/2.69/scripts/presets/tracking_camera/Canon_1D.py
Python
gpl-3.0
219
import os from os import path from datetime import datetime import getpass import re import time from fabric.context_managers import cd, hide, settings from fabric.operations import require, prompt, get, run, sudo, local from fabric.state import env from fabric.contrib import files from fabric import utils def _setu...
qris/mailer-dye
dye/fablib.py
Python
gpl-3.0
29,664
from collections import deque class Node(tuple): ##### ^ -- backwad ##### v -- forward ##### <-- left ##### --> right LEFT,RIGHT,TOP,BOTTOM,FORWARD,BACKWARD = range(6) def __new__(cls, r, c, five): return tuple.__new__(cls, (r,c,five)) def __init__(self, r, c, five): ...
JonSteinn/Kattis-Solutions
src/Dacey the Dice/Python 3/main.py
Python
gpl-3.0
3,045
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Jayant Jain <jayantjain1992@gmail.com> # Copyright (C) 2017 Radim Rehurek <me@radimrehurek.com> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """Python implementation of Poincaré Embeddings. These embeddings are better at capturing...
napsternxg/gensim
gensim/models/poincare.py
Python
gpl-3.0
75,098
# -*- coding: utf-8 -*- # # Copyright 2017 David García Goñi # # This file is part of Phatty. # # Phatty 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) a...
dagargo/phatty
tests/test_connector.py
Python
gpl-3.0
11,804
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2021-2022 Daniel Estevez <daniel@destevez.net> # # This file is part of gr-satellites # # SPDX-License-Identifier: GPL-3.0-or-later # from gnuradio import gr, digital import pmt from ...hier.sync_to_pdu_packed import sync_to_pdu_packed from ...hdlc_deframer ...
daniestevez/gr-satellites
python/components/deframers/yusat_deframer.py
Python
gpl-3.0
2,570
from piston.handler import BaseHandler from piston.utils import rc from telemaco.models import User from django.db.utils import IntegrityError class RegistrationHandler(BaseHandler): class _UserProxy(User): pass allowed_methods = ('POST') model = _UserProxy def create(self, request): ...
diegomartin/Telemaco
TelemacoServer/src/api/RegistrationHandler.py
Python
gpl-3.0
789
from django.shortcuts import render from django.http import HttpResponseRedirect from django.template import loader from django.views import generic from .scripts.vagrant_boxes import _box_list, _global_status, _deps_versions class IndexView(generic.ListView): template_name = 'manager/index.html' def get(sel...
speedlight/roombox
manager/views.py
Python
gpl-3.0
554
from __future__ import print_function from bose_einstein import bose_einstein from constant import htr_to_K, htr_to_meV, htr_to_eV import argparser import norm_k import numpy as np import scf import system args = argparser.read_argument('Evaluate step-like feature in electron-phonon coupling') thres = args.thres / htr...
mmdg-oxford/papers
Schlipf-PRL-2018/model/step.py
Python
gpl-3.0
830
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^books/$', views.BookListView.as_view(), name='books'), url(r'^books/(?P<pk>\d+)$', views.BookDetailView.as_view(), name='book-detail'), url(r'^books/(?P<pk>[-\w]+)/renew/$', views.renew_b...
tridc/django_local_library
catalog/urls.py
Python
gpl-3.0
1,232
#coding: latin1 label = 'Prototyp einer Homepage für den V.O.R.' def populate(db): import vor1 vor1.populate(db)
MaxTyutyunnikov/lino
obsolete/demo/vor/__init__.py
Python
gpl-3.0
118
from MakeGraph import MakeGraph from Moving_pacman import PacMan import pygame class Ghost(MakeGraph): index = 0 def __init__(self,class_graph,x,y): Ghost.index = Ghost.index + 1 self.all_nodes = class_graph.get_nodes() self.paths_to_all_nodes = class_graph.get_shortest_path() self.path = [] self.hunt...
Yordan92/Pac-man-multiplayer
Ghosts.py
Python
gpl-3.0
5,718
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2015-12-23 15:08 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('django_ca', '0001_initial'), ] operations = [ migrations.AlterField( ...
fsinf/certificate-authority
ca/django_ca/migrations/0002_auto_20151223_1508.py
Python
gpl-3.0
1,224
""" Copyright 2012, July 31 Written by Pattarapol (Cheer) Iamngamsup E-mail: IAM.PATTARAPOL@GMAIL.COM Sum square difference Problem 6 The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ten natural numbers is, (1 + 2 + ... + ...
pattarapol-iamngamsup/projecteuler_python
problem_006.py
Python
gpl-3.0
1,747
from django.utils.translation import gettext_lazy as _ from rest_framework import serializers from ..models import MyUser, Profile from ..utils import perform_reputation_check class CreateUserSerializer(serializers.ModelSerializer): password = serializers.CharField( style={'input_type': 'password'} ...
TheRedLady/codebook
codebook/profiles/restapi/serializers.py
Python
gpl-3.0
4,811
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2021 Luca Falavigna # # Author: Luca Falavigna <dktrkranz@debian.org> # # 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. #...
debomatic/debomatic
docs/conf.py
Python
gpl-3.0
1,509
from __future__ import print_function from __future__ import division import os import sys import numpy as np import pandas as pd from ast import literal_eval try: # run as a package if installed from pcntoolkit.model.bayesreg import BLR from pcntoolkit.normative_model.norm_base import NormBase from pcnt...
amarquand/nispat
pcntoolkit/normative_model/norm_blr.py
Python
gpl-3.0
8,464
# coding=utf-8 # Author: CristianBB # Greetings to Mr. Pine-apple # URL: https://sick-rage.github.io # # This file is part of SickRage. # # SickRage 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 versi...
Arcanemagus/SickRage
sickbeard/providers/newpct.py
Python
gpl-3.0
10,924
#!/usr/bin/python3 # -*- coding: utf-8 -*- ################################################################################ # DChars Copyright (C) 2012 Suizokukan # Contact: suizokukan _A.T._ orange dot fr # # This file is part of DChars. # DChars is free software: you can redistribute it and/or modify # ...
suizokukan/anceps
dchars/languages/lat/symbols.py
Python
gpl-3.0
4,869
from datetime import date from django.views.generic.list import ListView from django.views.generic.detail import DetailView from django.conf import settings from django.utils.translation import ugettext as _ from django.utils.dateformat import format as format_date from django.shortcuts import get_object_or_404 from dj...
romanvm/romans_blog
blog/views.py
Python
gpl-3.0
4,713
# Copyright 2013 Daniel Richman # # This file is part of The Snowball Ticketing System. # # The Snowball Ticketing System 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 (...
danielrichman/snowball-ticketing
snowball_ticketing/info.py
Python
gpl-3.0
3,845
from django.contrib import admin from models import Article, RelatedLink, Category # Register your models here. class RelatedLinkInline(admin.TabularInline): model = RelatedLink extra = 1 class ArticleAdmin(admin.ModelAdmin): prepopulated_fields = {"slug": ("title",)} search_fields = ['title'] list_display = ['t...
unitycoders/uc-django-site
lectern/admin.py
Python
gpl-3.0
495
# -*- coding: UTF-8 -*- #!/usr/bin/env python # ############################################################################ # ########## Libraries ############# # ################################## # Standard library import logging from os import path # 3rd party modules import arrow from isogeo_pysdk import Isogeo ...
Guts/isogeo-notifier
web/isogeo_notify/management/commands/api2db.py
Python
gpl-3.0
2,944
#!/usr/bin/env python import sys import json import os import datetime import time from pprint import pprint default_os = '8-stream' ##next_os = 'RHEL8.4' #next_branch_base = 'rhel-8' jenkins_url = 'https://jenkins-networkmanager.apps.ocp.ci.centos.org/' class GitlabTrigger(object): def __init__(self, data): ...
NetworkManager/NetworkManager-ci
run/centos-ci/cico_gitlab_trigger.py
Python
gpl-3.0
12,762
import cPickle as pickle import numpy as np import os from scipy.misc import imread def load_CIFAR_batch(filename): """ load single batch of cifar """ with open(filename, 'rb') as f: datadict = pickle.load(f) X = datadict['data'] Y = datadict['labels'] X = X.reshape(10000, 3, 32, 32).transpose(0,2,...
HaoMood/cs231n
assignment2/assignment2/cs231n/data_utils.py
Python
gpl-3.0
6,912
from rest_framework import viewsets, permissions import models import serializers class PageViewSet(viewsets.ModelViewSet): """ This viewset automatically provides `list`, `create`, `retrieve`, `update` and `destroy` actions. """ queryset = models.Page.objects.all() serializer_class = seriali...
esitamon/django-skeleton
app/website/api.py
Python
gpl-3.0
840
import pytest np = pytest.importorskip("numpy") npt = pytest.importorskip("numpy.testing") import networkx as nx from .base_test import BaseTestAttributeMixing, BaseTestDegreeMixing class TestDegreeMixingDict(BaseTestDegreeMixing): def test_degree_mixing_dict_undirected(self): d = nx.degree_mixing_dict...
SpaceGroupUCL/qgisSpaceSyntaxToolkit
esstoolkit/external/networkx/algorithms/assortativity/tests/test_mixing.py
Python
gpl-3.0
5,415
#!/bin/env python2.7 # -*- coding: utf-8 -*- # This file is part of AT-Platform. # # AT-Platform 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 late...
BrainTech/pre-pisak
modules/others/symbols.py
Python
gpl-3.0
23,745
class Amiibro: def __init__(self): self._amiibos={#'hex': {'name': 'Noname', 'method': methodObject, 'params': params} } def handleTag(self, hex=None): if hex in self._amiibos: print(self._amiibos[hex]['name']) if self._amiibos[hex]['params']: ...
pgum/haus
hauser/amiibro.py
Python
gpl-3.0
501
# -*- coding=utf-8 -*- import os from setuptools import setup, find_packages from version import get_version version = get_version() setup(name='edem.content.logo', version=version, description="Logos for forums.e-democracy.org", long_description=open("README.txt").read() + "\n" + op...
e-democracy/edem.content.logo
setup.py
Python
gpl-3.0
1,382
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Chris Long <alcamie@gmail.com> <chlong@redhat.com> # # This file is a module for Ansible that interacts with Network Manager # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by #...
wehkamp/ansible-modules-extras
network/nmcli.py
Python
gpl-3.0
40,826
#!/usr/bin/env python """Read the Google Weather API and emit data in the usual format. Write a sample every 5 minutes on stdout, log on stderr. """ import sys import time from urllib import quote_plus from urllib2 import urlopen from datetime import datetime, timedelta from xml.etree import cElementTree as ET impor...
dvarrazzo/arduino
thermo/client/google_api.py
Python
gpl-3.0
1,030
#!/usr/bin/python # -*- coding: UTF-8 -*- from __future__ import absolute_import from __future__ import with_statement from __future__ import division from __future__ import print_function ''' Collected utilities for pygame It is difficult to write pixels directly in python. There's some way to get a framebuffer bac...
michaelerule/neurotools
graphics/pygame.py
Python
gpl-3.0
3,004
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2013) # # This file is part of GWpy. # # GWpy 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 ...
andrew-lundgren/gwpy
gwpy/plotter/axes.py
Python
gpl-3.0
7,620
''' Library for doing fun things with computers. ''' __author__ = 'Andrew M Bates' __version__ = '0.001' import io, os, sys # the core imports go here # this should go in in the mods dir try: '''IF RASPBERRY PI & HAS A GPIO BOARD''' import RPi.GPIO as RPi except ImportError: pass
andrewbates09/FERGUS
fergus/__init__.py
Python
gpl-3.0
291
#!/usr/bin/env python3 """Retrieve results from the DuckDuckGo zero-click API in simple HTML format.""" import json as jsonlib import logging import re import urllib.request, urllib.error, urllib.parse __version__ = (1, 0, 0) def results2html(results, results_priority=None, max_number_of_results=None, ...
nsubiron/SublimeSuricate
lib/thirdparty/duckduckgo2html.py
Python
gpl-3.0
8,822
""" It is used to test client->db-> service. It requires the Monitoring service to be running and installed (so discoverable in the .cfg), and this monitoring service should be connecting to an ElasticSeach instance """ # pylint: disable=invalid-name,wrong-import-position import unittest import tempfile import t...
arrabito/DIRAC
tests/Integration/Monitoring/Test_MonitoringSystem.py
Python
gpl-3.0
27,975
# coding=utf-8 """**Tests for safe raster layer class** contains tests for QGIS specific methods. See test_io.py also """ __author__ = 'Dmitry Kolesov <kolesov.dm@gmail.com>' __revision__ = '$Format:%H$' __date__ = '28/12/2013' __license__ = "GPL" __copyright__ = 'Copyright 2012, Australia Indonesia Facility f...
dynaryu/inasafe
safe/storage/test/test_raster.py
Python
gpl-3.0
2,520
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2011, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import re, th...
jelly/calibre
src/calibre/ebooks/metadata/sources/base.py
Python
gpl-3.0
22,537
#!/usr/bin/python from pysharegps import sharedGpsClient import logging if __name__ == "__main__": logging.basicConfig(format='%(asctime)s %(message)s',level=logging.DEBUG) client = sharedGpsClient() if client.isInit(): position = client.getSharedObject().getPosition() print "latitude...
djo938/GPSPythonSharingWithPyro
clientTest.py
Python
gpl-3.0
876
# -*- coding: utf-8 -*- # Copyright (C) 2014 Canonical # # Authors: # Didier Roche # # 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. # # This program is distributed in the hope that ...
LyzardKing/ubuntu-make
umake/frameworks/dart.py
Python
gpl-3.0
5,057