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
# -*- coding: utf-8 -*- from __future__ import print_function from django.shortcuts import render, HttpResponse from django.views.decorators.csrf import csrf_exempt import hashlib import xml.etree.ElementTree as ET import time from config import TOKEN # Create your views here. TOKEN = TOKEN @csrf_exempt def index(r...
bucketzxm/wechat_template
movie/views.py
Python
gpl-3.0
2,018
# -*- coding: utf-8 -* from tornado.web import HTTPError from common.decorators import parse_argument, app_auth_async from handlers.base import JsonHandler, WSHandler from models.invitation import InvitationModel from models.admin import AdminModel from models.notification import NotificationModel class SubmitHand...
takearest118/coconut
handlers/v1/invitation.py
Python
gpl-3.0
2,604
# -*- coding: utf-8 -*- from decimal import Decimal from distutils.version import LooseVersion from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.db import models from django.db.models.aggregates import Sum from django.utils.translation import ugettext_lazy as _ from po...
hzlf/openbroadcast
website/shop/shop/models/defaults/bases.py
Python
gpl-3.0
16,866
### A sample pygster parser file that can be used to count the number ### of responses and object size in the squid access.log ### ### For example: ### sudo ./pygster --dry-run --output=ganglia SquidPygster /var/log/squid/access.log ### ### ### Copyright 2011, Etsy, Inc. ### ### This file is part of Pygster. ### ...
OnBeep/pygster
pygster/parsers/SquidPygster.py
Python
gpl-3.0
4,428
# -*- coding: utf-8 -*- # # Copyright (C) 2011 Tiger Soldier # # This file is part of OSD Lyrics. # # OSD Lyrics 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...
ihacklog/osdlyrics
daemon/player.py
Python
gpl-3.0
19,960
# # QTop # # Copyright (c) 2016 Jacob Marks (jacob.marks@yale.edu) # # This file is part of QTop. # # QTop 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 y...
jacobmarks/QTop
src/tests/test_DSP.py
Python
gpl-3.0
976
#!/usr/bin/env python3 # Copyright (C) 2013-2018 Florian Festi # # 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....
florianfesti/boxes
boxes/generators/unevenheightbox.py
Python
gpl-3.0
4,609
from django.shortcuts import render from cms.models import Pages from django.http import HttpResponse, HttpResponseNotAllowed from django.template.loader import get_template from django.template import Context, RequestContext from django.core.exceptions import ObjectDoesNotExist # Create your views here. def getform (...
agvergara/Python
X-Serv-15.9-Django-CMS-Templates/cms_put/views.py
Python
gpl-3.0
1,689
import rhinoscriptsyntax as rs import random as rand def edgeAngle(myMesh, edgeIndex): #TODO: make myMesh function which findes angel between two faces of a given edge faceIdxs = myMesh.getFacesForEdge(edgeIndex) if (len(faceIdxs) == 2): faceNorm0 = myMesh.face_normal(faceIdxs[0]) faceNorm1...
jlopezbi/rhinoUnfolder
rhino_unwrapper/weight_functions.py
Python
gpl-3.0
536
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ Bot to download archiviolastampa.it and upload it to the Internet Archive """ # # (C) Federico Leva, 2020 # # Distributed under the terms of the MIT license. # __version__ = '0.3.0' import collections import concurrent.futures import csv import datetime from internetarch...
nemobis/bots
ia-archivio-lastampa.py
Python
gpl-3.0
15,953
# # NEPI, a framework to manage network experiments # Copyright (C) 2013 INRIA # # 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 ...
phiros/nepi
src/nepi/resources/linux/gretunnel.py
Python
gpl-3.0
3,088
"""Manipulation of teacher objects.""" import gi from gi.repository import Gtk from app.constants import class_list, modify_teacher_list from app.teacher import Teacher gi.require_version('Gtk', '3.0') class AddTeacherMenu(Gtk.Window): """Window that provides entry boxes to add a new teacher.""" def __init...
SShehriyar/Tuition-Manager
app/gui/teacher.py
Python
gpl-3.0
9,541
import hashlib as md5 class Palette: def __init__(self, palette={}, colors=[]): self.job_status_palette = { 'Received': '#D9E7F8', 'Checking': '#FAFAFA', 'Staging': '#6190CD', 'Waiting': '#004EFF', 'Matched': '#FEF7AA', 'Running': '#FDEE65', 'Stalled': '#BC5757'...
zmathe/WebAppDIRAC
WebApp/handler/Palette.py
Python
gpl-3.0
3,496
# Copyright 2013 anthony cantor # This file is part of pyc. # # pyc 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. # # pyc is distr...
cantora/pyc
pyc_gen_name.py
Python
gpl-3.0
919
# This file was automatically generated by SWIG (http://www.swig.org). # Version 1.3.38 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. # This file is compatible with both classic and new-style classes. from sys import version_info if version_info >= (...
lampjian/effectivelang
CPP/CRF++/CRF++-0.54/python/CRFPP.py
Python
gpl-3.0
4,579
#!/usr/bin/env python # -*- coding: utf-8 -*- # GNU GENERAL PUBLIC LICENSE # Version 3, 29 June 2007 # # Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> # Everyone is permitted to copy and distribute verbatim copies # of this license document, but chang...
quentinbodinier/custom_gnuradio_blocks
python/qa_test_interp.py
Python
gpl-3.0
36,971
# -*- coding: utf-8 -*- ######################################################################## # Copyright (C) 2011 The Unknown Horizons Team <team@unknown-horizons.org> ######################################################################## # This file is part of ZombiesWTF. # # ZombiesWTF is free software: you can...
skangas/zombieswtf
scripts/network/packets/client.py
Python
gpl-3.0
2,495
# -*- coding: utf_8 -*- # Module for Malware Analysis from urllib.parse import urlparse import logging import shutil import io import os import re import tempfile import requests from django.conf import settings from MobSF.utils import ( PrintException, isInternetAvailable, upstream_proxy, sha256 ) lo...
ajinabraham/Mobile-Security-Framework-MobSF
MalwareAnalyzer/views/domain_check.py
Python
gpl-3.0
4,055
# -*- coding: utf-8 -*- # Алгоритм решето Эратосфена. Нахождение последовательности простых чисел, не превышающе заданной длины. from math import sqrt, floor def sieve(len): # Генерируем массив начальных значений от 2 до len; init_array = [a for a in range(0, len+1)] # 1 - не простое число! init_arra...
madAsket/levitin_algorithms
src/sieve_eratosphene.py
Python
gpl-3.0
1,323
# Assignment 1 print("a: ", {1:[1,2], 3:[3,4]}) #print("b: ", {[1, 2]:1, [3, 4]:3}) # TypeError: unhashable type: 'list' print("c: ", {(1, 2):1, (3, 4):3}) print("d: ", {1:"john", 3:"peter"}) print("e: ", {"john":1, "peter":3})
peterschriever/python_assignments
week_2/assignment1_week2.py
Python
gpl-3.0
228
""" Manages downloading and updating applications throught he use of a zip file hosted on HomePi server. """ import datetime import os.path import zipfile import urllib2 #Test call to verify thins work. def print_info(archive_name): zf = zipfile.ZipFile(archive_name) for info in zf.infolist(): print...
leeclarke/homePi
src/python/zipInstall.py
Python
gpl-3.0
2,124
# Copyright 2014-2015 Facundo Batista, Nicolás Demarchi # # This program 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 that it will be useful, but # WIT...
arielrossanigo/fades
fades/helpers.py
Python
gpl-3.0
7,161
""" Module containing the SensorArray class which models an array of FMCW radars. @author: scj robertson @since: 03/04/16 """ import numpy as np C = 3e8 class SensorArray(object): ''' Class for representing an array of identical FMCW radars. For viable multilateration four or more sensors must always b...
scjrobertson/xRange
kalman/sensor_array.py
Python
gpl-3.0
2,075
import sys import os import threading import time import types import signal import zmq import pdb import utils # Default port for receiving/sending messages. DEFAULT_PORT = 5590 class AsyncServerCreateClass(threading.Thread): """ Create an asynchronous server class that receives requests and provides ...
TrailingDots/async_py_messaging
async_py_messaging/async_server_create_class.py
Python
gpl-3.0
6,718
# -*- coding: utf-8 -*- from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class WuploadCom(DeadHoster): __name__ = "WuploadCom" __type__ = "hoster" __version__ = "0.25" __status__ = "stable" __pattern__ = r'http://(?:www\.)?wupload\..+?/file/((\w+/)?\d+)(/.*)?' ...
fzimmermann89/pyload
module/plugins/hoster/WuploadCom.py
Python
gpl-3.0
586
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models, api, _ import odoo.addons.decimal_precision as dp from odoo.exceptions import UserError class AccountVoucher(models.Model): _name = 'account.voucher' _description = 'Accounting...
ayepezv/GAD_ERP
addons/account_voucher/models/account_voucher.py
Python
gpl-3.0
19,955
""" WSGI config for djangofine project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "djangofine.settings") from django....
ciaron/djangofine
djangofine/wsgi.py
Python
gpl-3.0
395
# rkivas file backupper # Copyright (C) 2016 Daniel Getz # # 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 pro...
talflon/rkivas-python
rkivas/config.py
Python
gpl-3.0
3,679
#================================== #Author Bjorn Burr Nyberg #University of Bergen #Contact bjorn.nyberg@uni.no #Copyright 2013 #================================== '''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 Sof...
BJEBN/Geometric-Analysis
Scripts/Old Scripts/Extract_Non_Duplicate_Nodes.py
Python
gpl-3.0
2,434
""" Tequila: a command-line Minecraft server manager written in python Copyright (C) 2014 Snaipe 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) ...
Snaipe/Tequila
tequila/server/group/exception.py
Python
gpl-3.0
1,272
"""Test the Postgress interface - data storage and retrieval.""" import datetime import flexmock import selinon from f8a_worker.defaults import configuration from f8a_worker.enums import EcosystemBackend from f8a_worker.models import (Ecosystem, Package, Version, Analysis, WorkerResult, ...
fabric8-analytics/fabric8-analytics-worker
tests/storages/test_postgres.py
Python
gpl-3.0
4,228
from collections import namedtuple, Counter from datetime import timedelta from analysis import sentiment from analysis import qa_analysis ChatData = namedtuple('ChatData', ['interval', 'avg_chats', 'sentiments', 'qa_ratio']) c...
indiofish/lov-o-meter
src/analysis/analyser.py
Python
gpl-3.0
2,602
from ..core import * class User: # Data header indexes USERNAME = 0 ENCRYPTED_NAME = 1 SALT = 2 PROFILE = 3 # data header in the user table COLUMN_HEADERS = [ 'username', 'encrypted_name', 'salt', 'profile', ] # variables to be stored in db __...
kurikaesu/pytrade
PyTrade/source/models/user.py
Python
gpl-3.0
2,792
class DjangoCryptoFieldsLoadingError(Exception): pass class DjangoCryptoFieldsKeysAlreadyLoaded(Exception): pass class EncryptionError(Exception): pass class CipherError(Exception): pass class AlgorithmError(Exception): pass class ModeError(Exception): pass class EncryptionKeyError(E...
erikvw/django-crypto-fields
django_crypto_fields/exceptions.py
Python
gpl-3.0
445
__author__ = 'Evtushenko Georgy' from setuptools import setup, find_packages setup( name="metanet", version="0.1", description="Free portable library for meta neural network research", license="GPL3", packages=['metanet', 'metanet.datasets', 'metanet.networks', 'metanet.networks.nodes', 'metanet.n...
senior-zero/metanet
setup.py
Python
gpl-3.0
482
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_osm_find_first ---------------------------------- Tests for `osm-find-first` module. """ import unittest import tempfile import re import httpretty import osm_find_first def v(string): return string.format(version=osm_find_first.__version__) class Test...
rory/osm-find-first
tests/test_osm_find_first.py
Python
gpl-3.0
3,556
from helper import unittest, PillowTestCase, hopper class TestImageToBytes(PillowTestCase): def test_sanity(self): data = hopper().tobytes() self.assertIsInstance(data, bytes) if __name__ == '__main__': unittest.main()
davidwilson-85/easymap
graphic_output/Pillow-4.2.1/Tests/test_image_tobytes.py
Python
gpl-3.0
247
# This file is part of jobservice. # Copyright 2010 Jacob Peddicord <jpeddicord@ubuntu.com> # # jobservice 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)...
jpeddicord/jobservice
JobService/policy.py
Python
gpl-3.0
2,319
from django.conf.urls import url,include from django.views.decorators.csrf import csrf_exempt from django.views.generic import TemplateView from .views import ( ListRetriveView,ListRegisterView,ListUpdateView,ListDetailView,ListDeleteView, ItemListView,ItemRegisterView,ItemUpdateView,ItemDeleteView,ItemCompleted ) f...
jovanpacheco/todo-eureka
eureka/list/urls.py
Python
gpl-3.0
2,662
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-01-13 10:10 from __future__ import unicode_literals import re import uuid import django.core.validators import django.utils.timezone import jsonfield.fields import model_utils.fields import sortedm2m.fields from django.db import migrations, models import djan...
cosgrid001/cosgrid_dn
django_netjsonconfig/migrations/0001_initial.py
Python
gpl-3.0
3,287
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-11-03 22:23 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_depende...
Petrole/MaturePyRobots
WebPyRobot/backend/migrations/0007_battlehistory.py
Python
gpl-3.0
1,190
def string_match(a, b): shorter = min(len(a), len(b)) count = 0 for i in range(shorter-1): a_sub = a[i:i+2] b_sub = b[i:i+2] if a_sub == b_sub: count = count + 1 return count
shubhamoy/CodingBatPython
string_match.py
Python
gpl-3.0
192
# -*- coding: utf-8 -*- import subprocess import os cmd=['/Users/jehlke/workspace/epywing/src/epywing/utils/mecab/bin/mecab', '-Owakati', '--dicdir=mecab/dic/ipadic'] #cmd = ['mecab', '-Owakati', '--dicdir=../dic/ipadic'] a = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE...
aehlke/epywing
src/epywing/utils/test.py
Python
gpl-3.0
527
from __future__ import print_function import numpy as np np.random.seed(1337) # for reproducibility from keras.preprocessing import sequence from keras.models import Model from keras.layers import Dense, Activation, Embedding, GlobalMaxPooling1D,Convolution1D, Input,LSTM,merge from keras.datasets import imdb max_fe...
ercanezin/ce888labs
lab8/imdb.py
Python
gpl-3.0
2,192
from django.conf.urls import url from object_history import views urlpatterns = [ url(r'^object_history/(?P<pk>[0-9]+)/$', views.ObjectHistory.as_view(), name='object_history', ), ]
nocarryr/AV-Asset-Manager
avam/object_history/urls.py
Python
gpl-3.0
208
""" Copyright (c) 2012 Philip Schliehauf (uniphil@gmail.com) and the Queen's University Applied Sustainability Centre This project is hosted on github; for up-to-date code and contacts: https://github.com/Queens-Applied-Sustainability/PyRTM This file is part of PyRTM. PyRTM is free so...
Queens-Applied-Sustainability/PyRTM
rtm/test/test_cache.py
Python
gpl-3.0
2,536
# This file is part of cloud-init. See LICENSE file for license information. """cloud-init Integration Test Verify Script.""" from tests.cloud_tests.testcases import base class TestPasswordExpire(base.CloudTestCase): """Test password module.""" def test_shadow(self): """Test user frozen in shadow.""...
larsks/cloud-init
tests/cloud_tests/testcases/modules/set_password_expire.py
Python
gpl-3.0
727
# # MemoryReaderBaseWin.py # # MemoryReader - Remote process memory inspection python module # https://github.com/assafnativ/NativDebugging.git # Nativ.Assaf@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 publi...
assafnativ/NativDebugging
src/Win32/MemReaderBaseWin.py
Python
gpl-3.0
16,875
# ========================================================================== # This module performs unit tests for the GammaLib CTA module. # # Copyright (C) 2012-2021 Juergen Knoedlseder # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as p...
gammalib/gammalib
inst/cta/test/test_CTA.py
Python
gpl-3.0
25,438
#!/usr/bin/env python3 import sys import asyncio from charfinder import UnicodeNameIndex CRLF = b'\r\n' PROMPT = b'?> ' index = None # a UnicodeNameIndex instance @asyncio.coroutine def handle_queries(reader, writer): while True: writer.write(PROMPT) # can't yield from! yiel...
YuxuanLing/trunk
trunk/code/study/python/Fluent-Python-example-code/attic/concurrency/charfinder/tcp_charfinder.py
Python
gpl-3.0
1,730
import pickle def run_ensemble_map_and_aggregate(model_class, parameters, param_set_id, seed_base, number_of_trajectories, mapper, aggregator=None, cluster_import=False): """ Generate an ensemble, then run the mappers are aggregator. This will not store the results. """ if...
briandrawert/molnsutil
run_ensemble_map_aggregate.py
Python
gpl-3.0
3,303
# -*- coding: utf-8 -*- """ InaSAFE Disaster risk assessment tool developed by AusAid and World Bank - **Shake Event Test Cases.** 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 publishe...
maning/inasafe
realtime/test_shake_event.py
Python
gpl-3.0
24,765
#import pythonista
yueqiw/ophys-game-ios
__init__.py
Python
gpl-3.0
18
import sys def updt(total, progress, extra=""): """ Displays or updates a console progress bar. Original source: https://stackoverflow.com/a/15860757/1391441 """ barLength, status = 20, "" progress = float(progress) / float(total) if progress >= 1.: progress, status = 1, "\r\n" ...
asteca/ASteCA
packages/update_progress.py
Python
gpl-3.0
553
# -*- coding: UTF-8 -*- # Copyright (C) 2005-2010 J. David Ibáñez <jdavid.ibp@gmail.com> # Copyright (C) 2006-2007 Nicolas Deram <nderam@gmail.com> # Copyright (C) 2010 Alexis Huet <alexis@itaapy.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
hforge/itools
test/test_ical.py
Python
gpl-3.0
16,037
from setuptools import setup, find_packages # Always prefer setuptools over distutils from codecs import open # To use a consistent encoding from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the relevant file with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8...
ChameleonCloud/openstack-nagios-plugins
setup.py
Python
gpl-3.0
4,527
from PyQt4.QtGui import QFileDialog def get_pcv_filename(): """Opens the PCV file with a QFileDialog.""" return QFileDialog.getOpenFileName(None, "Open Pcoords graph", "", "Pcoords Files (*.pgdl *.pcv)")
mike-perdide/pcoords-gui
pcoordsgui/utils.py
Python
gpl-3.0
292
from minimax_kata.executioner import Executioner from minimax_kata.interface import WALL_SPACE_CHAR from minimax_kata.interface import EMPTY_SPACE_CHAR from minimax_kata.interface import PLAYER_ONE_TRAIL_CHAR from minimax_kata.interface import PLAYER_TWO_TRAIL_CHAR from minimax_kata.interface import PLAYER_ONE_CHARS f...
JamesChristie/minimax_kata
minimax_kata/interface/char_policy.py
Python
gpl-3.0
1,673
# coding:utf-8 ''' Author : qbeenslee Created : 15/4/3 ''' UID = 'uid' TOKEN = 'token' CLIENT = 'client' DESCRIPTION = 'description' EMAIL = 'email' WHAT = 'what' IMEI = 'imei' USERNAME = 'nickname' PWD = 'pwd' IMAGE_FILES = 'imagefiles' MSG = 'msg' VERSION = 'version' URL = 'url' NICKNAME = 'nickname' MOTTO = 'motto'...
qbeenslee/Nepenthes-Server
config/param.py
Python
gpl-3.0
728
# encoding: utf-8 import os import re import shutil import subprocess import tempfile import textwrap import time from test.constant import (ARR_D, ARR_L, ARR_R, ARR_U, BS, ESC, PYTHON3, SEQUENCES) def wait_until_file_exists(file_path, times=None, interval=0.01): while times is None o...
wincent/ultisnips
test/vim_interface.py
Python
gpl-3.0
6,882
# -*- coding: utf-8 -* __kupfer_name__ = _("XFCE Session Management") __kupfer_sources__ = ("XfceItemsSource", ) __description__ = _("Special items and actions for XFCE environment") __version__ = "2012-09-17" __author__ = "Karol Będkowski <karol.bedkowski@gmail.com>" from kupfer.plugin import session_support as supp...
KarolBedkowski/kupfer-adds
kupfer/plugin/session_xfce.py
Python
gpl-3.0
793
def eratosthene(n): l = range(2, n / 2 + 1) primes = set(range(2, n)) for number in l: if number in primes: current_multiple = 2 * number while current_multiple < n: if current_multiple in primes: primes.remove(current_multiple) ...
rodgzilla/project-euler
problem_050/problem.py
Python
gpl-3.0
1,428
import math # Determines the day of the year # INPUT # yr: year of interest (ex. 1989) # month: month of interest (Jan=1...Dec=12) # day: day (of the month) of interest # OUTPUT # dayj: Julian day of the year def DAYOYR(yr, month, day): daysinmonth = [0,31,59,90,120,151,181,212,243,273,304,334] ...
allthroughthenight/aces
python/functions/DAYOYR.py
Python
gpl-3.0
547
# Copyright 2014 The Android Open Source Project # # 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 a...
wiki2014/Learning-Summary
alps/cts/apps/CameraITS/tests/scene1/test_tonemap_sequence.py
Python
gpl-3.0
2,663
from TextStreamer import TextStreamer from parser import ( LinguistListParser ) from FeatureEngine import FeatureEngine
JordiCarreraVentura/spellchecker
lib/__init__.py
Python
gpl-3.0
127
import uuid from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class AnnouncementSerializer(serializers.Serializer): ID = serializers.CharField(required=False, allow_blank=True, allow_null=True) SUBJECT = serializers.CharField(required=True, max_length=1024, label=...
jumpserver/jumpserver
apps/settings/serializers/basic.py
Python
gpl-3.0
2,221
#!/usr/bin/python """ This is a simple plugin that does the same deal as the l2t_find_evil.py script does. It loads up a YARA rule file and runs it against each line in the CSV file and if there is a match it will fire up an alert. Copyright 2012 Kristinn Gudjonsson (kristinn ( a t ) log2timeline (d o t) net) This fi...
kiddinn/l2t-tools
plugins/yara_match.py
Python
gpl-3.0
3,103
""" Collection of utilities for dealing with security files (i.e. proxy files) """ import os import stat import tempfile from DIRAC import S_OK, S_ERROR from DIRAC.Core.Utilities import DErrno from DIRAC.Core.Security.X509Chain import X509Chain # pylint: disable=import-error from DIRAC.Core.Security.Locations import ...
ic-hep/DIRAC
src/DIRAC/Core/Security/ProxyFile.py
Python
gpl-3.0
3,507
# -*- coding: utf-8 -*- from django.db import models from django.db.models import signals class Post(models.Model): title = models.CharField(max_length=60) short_body = models.TextField(max_length=255) body = models.TextField() comment_count = models.IntegerField(editable=False, default=0) created...
rooty/django-test
djtest/blog/models.py
Python
gpl-3.0
1,274
from os import path TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [ path.join(path.dirname(__file__), '..', 'tardis_portal/templates/').replace('\\', '/'), ], 'OPTIONS': { 'context_processors': [ ...
wettenhj/mytardis
tardis/default_settings/templates.py
Python
gpl-3.0
1,575
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "office.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that the ...
individual-it/office-traffic-light
manage.py
Python
gpl-3.0
804
import os import re source_dir = "src/main/res/" target_dir = "../fastlane/metadata/android/" def copy_key_from_strings_xml_to_file(xml, key, filename): match = re.search("<string name=\"" + key + "\">\"?(.*?)\"?</string>", xml, re.DOTALL) if match: with open(filename, "w", encoding='utf8') as file: file.wri...
Binnette/StreetComplete
app/copyShopDescriptions.py
Python
gpl-3.0
1,324
from OpenGL.GL import * from OpenGL.GLUT import * from OpenGL.GLU import * import Leap from Leap import * from time import sleep window = 0 # glut window number width, height = 800, 600 # window size x,y = 0,0 leap = None r = 1.0 g = 0.0 b = ...
TouchBack/leap-gl-test
gl.py
Python
gpl-3.0
3,061
from vsg import deprecated_rule class rule_024(deprecated_rule.Rule): ''' This rule has been split into: * `generic_map_008 <generic_map_rules.html#generic-map-008>`_ * `port_map_008 <port_map_rules.html#port-map-008>`_ ''' def __init__(self): deprecated_rule.Rule.__init__(self, 'ins...
jeremiah-c-leary/vhdl-style-guide
vsg/rules/instantiation/rule_024.py
Python
gpl-3.0
526
import time import os import sys cclist = ['commander', 'nilc', 'sevem', 'smica'] nulist = ['0', '1'] hlist = ['hot0', 'hot1', 'hot2'] clist = ['cold0', 'cold1', 'cold2'] nslist = ['F', 'N', 'S'] readonly = 'T' nmaps = 1000 print "=============== F ==============" for nu in nulist: print " -------------------------...
zqhuang/COOP
mapio/pyscripts/check_QU.py
Python
gpl-3.0
1,311
import os import sys import tempfile import unittest from zoo.libs.utils import zlogging, env logger = zlogging.getLogger(__name__) def decorating_meta(decorator): class DecoratingMetaclass(type): def __new__(cls, class_name, bases, namespace): for key, value in list(namespace.items()): ...
dsparrow27/zoocore
zoo/libs/utils/unittestBase.py
Python
gpl-3.0
3,624
#!/usr/bin/env python # # Copyright 2006,2007 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your op...
trnewman/VT-USRP-daughterboard-drivers_python
gr-pager/src/usrp_flex.py
Python
gpl-3.0
7,028
# Copyright (C) 2017 Sarah Parisot <s.parisot@imperial.ac.uk>, , Sofia Ira Ktena <ira.ktena@imperial.ac.uk> # # 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 ...
parisots/population-gcn
fetch_data.py
Python
gpl-3.0
2,398
# -*- coding: utf-8 -*- # # diffoscope: in-depth comparison of files, archives, and directories # # Copyright © 2015 Jérémy Bobbio <lunar@debian.org> # 2016-2017 Mattia Rizzolo <mattia@debian.org> # # diffoscope is free software: you can redistribute it and/or modify # it under the terms of the GNU Gen...
ReproducibleBuilds/diffoscope
tests/utils/tools.py
Python
gpl-3.0
4,691
#!/usr/bin/env python """ MultiQC Submodule to parse output from Qualimap RNASeq """ from __future__ import print_function from collections import OrderedDict import logging import re from multiqc import config from multiqc.plots import bargraph, linegraph # Initialise the logger log = logging.getLogger(__name__) ...
robinandeer/MultiQC
multiqc/modules/qualimap/QM_RNASeq.py
Python
gpl-3.0
6,595
# (C) British Crown Copyright 2010 - 2013, Met Office # # This file is part of Iris. # # Iris is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any l...
kwilliams-mo/iris
lib/iris/analysis/interpolate.py
Python
gpl-3.0
39,449
# Copyright (c) David Wilson 2015 # Icarus 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. # Icarus is distributed in the hope that it...
jeroanan/GameCollection
Tests/Interactors/Game/TestAddGameInteractor.py
Python
gpl-3.0
3,393
#!/usr/bin/env python ################################################## # Gnuradio Python Flow Graph # Title: USRP Feng Yun 1 HRPT Receiver # Author: POES Weather Ltd # Description: Feng Yun 1 HRPT Receiver # Generated: Fri Jan 7 15:21:35 2011 ################################################## from gnuradio import e...
mbsat/gr-poes-weather
apps/FY1/gui/usrp_rx_fy1_bb_hrpt.py
Python
gpl-3.0
19,883
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2017-12-27 14:32 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('candidates', '0026_auto_20171227_1429'), ] operations = [ migrations.RemoveField( ...
macwis/simplehr
candidates/migrations/0027_auto_20171227_1432.py
Python
gpl-3.0
507
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2021 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...
fiete201/qutebrowser
qutebrowser/misc/editor.py
Python
gpl-3.0
10,070
#!/usr/bin/python # -*- coding:UTF-8 -*- ################################################################################ # # Copyright 2010-2012 Carlos Ramisch, Vitor De Araujo # # combine_freqs.py is part of mwetoolkit # # mwetoolkit is free software: you can redistribute it and/or modify # it under the terms of the...
KWARC/mwetoolkit
bin/combine_freqs.py
Python
gpl-3.0
12,449
# structureModifyPowerRechargeRate # # Used by: # Structure Modules from group: Structure Capacitor Power Relay (2 of 2) type = "passive" def handler(fit, module, context): fit.ship.multiplyItemAttr("rechargeRate", module.getModifiedItemAttr("capacitorRechargeRateMultiplier"))
bsmr-eve/Pyfa
eos/effects/structuremodifypowerrechargerate.py
Python
gpl-3.0
284
from pele.systems import BaseSystem import pele.utils.elements.elements as elem # This is a dictionary of element parameters for atoms class MolecularSystem(BaseSystem): """ Representation for a molecular system, this system stores info about atoms, bonds, angles and torsions. It is possible to re...
js850/pele
pele/systems/molecularsystem.py
Python
gpl-3.0
861
#!/usr/bin/env python # -*- coding: utf-8 -*- import socket import THMessage import struct SERVER_PORT = 5678 SERVER_HOST = "localhost" TMP_FLAG = 1 HEADER_FMT = "BBBBL" HEADER_LENGTH = 16 # XXX: Update this. class ClientSocket: """ This class create a socket that connects to specified host server and ...
yangyingchao/TeleHealth
src/client/python/THSocket.py
Python
gpl-3.0
1,613
# Copyright (c) 2014 Yubico AB # All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program...
Yubico/yubioath-desktop-dpkg
yubioath/core/legacy_otp.py
Python
gpl-3.0
7,391
# ScatterBackup - A chaotic backup solution # Copyright (C) 2015 Ingo Ruhnke <grumbel@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 ...
Grumbel/scatterbackup
scatterbackup/units.py
Python
gpl-3.0
3,221
import time DEFAULT_SLEEP_FACTOR = 0.8 class Loop(object): class LoopInterruptException(Exception): pass def __init__(self, fps, timeshift=0, sleep_factor=DEFAULT_SLEEP_FACTOR): """ Sleep factor could be set to 1.0? as python 3.5 respects time better """ self.set_per...
calaldees/libs
python3/calaldees/loop.py
Python
gpl-3.0
2,814
""" This script parses an ENA metadata file in XML format and prints a subset of information. Usage: python parse_ENA_sampleInfo_XML.py ERP000909.xml > samples.txt Input: an XML file exported for a list of ERS accession numbers from ENA using the REST URLs API. For example, one can download an XML file for sample...
wanyuac/BINF_toolkit
parse_ENA_sampleInfo_XML.py
Python
gpl-3.0
2,321
# Copyright (C) 2012,2013 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms of the G...
espressopp/espressopp
src/analysis/NeighborFluctuation.py
Python
gpl-3.0
1,852
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('presentation', '0015_auto_20160515_1658'), ] operations = [ migrations.RenameField( model_name='membership', ...
lesglaneurs/lesglaneurs
presentation/migrations/0016_auto_20160516_0806.py
Python
gpl-3.0
398
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.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, eith...
miyataken999/weblate
weblate/trans/autofixes/whitespace.py
Python
gpl-3.0
1,794
#!/usr/bin/python """ :: This experiment is used to study Half wave rectifiers """ from __future__ import print_function from PSL_Apps.utilitiesClass import utilitiesClass from PSL_Apps.templates import ui_template_graph_nofft as template_graph_nofft from PyQt4 import QtGui,QtCore import sys,time params = ...
jithinbp/pslab-desktop-apps
psl_res/GUI/B_ELECTRONICS/B_Opamps/L_Summing.py
Python
gpl-3.0
4,802
import re import datetime from pupa.scrape import Scraper, Bill, VoteEvent as Vote from openstates.utils import LXMLMixin import lxml.html import scrapelib SUB_BLACKLIST = [ "Second Substitute", "Third Substitute", "Fourth Substitute", "Fifth Substitute", "Sixth Substitute", "Seventh Substit...
votervoice/openstates
openstates/ut/bills.py
Python
gpl-3.0
16,082
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import cPickle, shutil from PyQt5.Qt import QAbstractListModel, Qt, QFont, QModelIn...
timpalpant/calibre
src/calibre/gui2/convert/single.py
Python
gpl-3.0
12,211
# -*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocol...
nagyistoce/netzob
src/netzob/UI/Vocabulary/Views/MessageTableView.py
Python
gpl-3.0
29,245