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
# from cryptography import * from salmon import MagicSig from crypt import strip_whitespaces, b64_to_num, b64_to_str, b64encode, b64decode, generate_rsa_key, export_rsa_key from activitystreams import salmon, salmon1, salmon2, salmon3 from webfinger import WebfingerClient from convert import str_to_datetime, datetime_...
bijanebrahimi/pystatus
pystatus/libs/__init__.py
Python
gpl-3.0
331
#!/usr/bin/python # -*- coding: utf8 -*- # Soubor: funkce.py # Datum: 26.02.2014 08:50 # Autor: Marek Nožka, nozka <@t> spseol <d.t> cz # Autor: Marek Nožka, marek <@t> tlapicka <d.t> net # Licence: GNU/GPL ############################################################################ def jmeno(a,b,c): a=a*...
tlapicka/2013-2014.3A
funkce.py
Python
gpl-3.0
1,195
#!/usr/bin/env python3 import sys, os import gi gi.require_version('Gst', '1.0') from gi.repository import GObject, Gst data = { 'pipeline' : None, 'video_sink' : None, 'loop' : True, 'playing' : True, 'rate' : 1.0, } def send_seek_event(): global data position = 0 fmat = Gst.Format...
Duckinahat/pyjector
trickmode.py
Python
gpl-3.0
2,590
#!/usr/bin/env python3.2 # # Copyright (c) Net24 Limited, Christchurch, New Zealand 2011-2012 # and Voyager Internet Ltd, New Zealand, 2012-2013 # # This file is part of py-magcode-core. # # Py-magcode-core is free software: you can redistribute it and/or modify # it under the terms of the GNU Gener...
grantma/py-magcode-core
magcode/core/database/event.py
Python
gpl-3.0
32,305
# (C) Copyright 2015-2021 Sei Lisa. All rights reserved. # # This file is part of LSL PyOptimizer. # # LSL PyOptimizer 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 # ...
Sei-Lisa/LSL-PyOptimizer
lslopt/lsloptimizer.py
Python
gpl-3.0
3,714
""" WSGI config for ScrumBoard project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "scrumtools.settings") from django....
acidjunk/django-scrumboard
scrumtools/wsgi.py
Python
gpl-3.0
395
""" This module defines classes whose instances are typically sent to ui.handle_keyboard_input() by the keyboard driver. Till configurations can define as many new keycodes as they need. """ class keycode: """A keyboard input from the user """ def __new__(cls, name, keycap, *args, **kwargs): # If...
sde1000/quicktill
quicktill/keyboard.py
Python
gpl-3.0
3,977
# -*- coding: utf-8 -*- __license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>' import os, glob, functools, re from calibre import guess_type from calibre.customize import (FileTypePlugin, MetadataReaderPlugin, MetadataWriterPlugin, PreferencesPlugin, InterfaceActionBase, StoreBase)...
sharad/calibre
src/calibre/customize/builtins.py
Python
gpl-3.0
66,256
# Copyright (C) 2012 Alex Nitz, Josh Willis, Andrew Miller, Tito Dal Canton # # 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 ve...
hagabbar/pycbc_copy
pycbc/types/array.py
Python
gpl-3.0
33,597
## $Id$ ## ## Flexlay - A Generic 2D Game Editor ## Copyright (C) 2002 Ingo Ruhnke <grumbel@gmx.de> ## ## This program is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License ## as published by the Free Software Foundation; either version 2 ## of the Licen...
Flexlay/flexlay
netpanzer/netpanzer.py
Python
gpl-3.0
12,517
import asyncio import time from functools import partial def wait(): print('work') return asyncio.get_event_loop().run_in_executor(None, partial(time.sleep, 5)) begin = time.time() print('begin') @asyncio.coroutine def main(): yield from asyncio.wait([ wait(), wait(), wait(), ...
bitcraft/tailor
tests/scratch.py
Python
gpl-3.0
437
# -*- coding: utf-8 -*- # Mathmaker creates automatically maths exercises sheets # with their answers # Copyright 2006-2018 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
tests/integration/mental_calculation/05_yellow2/test_05_yellow2_perimeter_of_a_polygon.py
Python
gpl-3.0
1,673
# Built by John W. Harms ## # Version 0.01 -- Initial Build ## # Version 0.02 -- Refactored to be added as module to different project ## # Version 0.08 -- Complete overhaul # -- Changed code using SGP4 calculations (https://pypi.python.org/pypi/sgp4/) # -- Added error messages & "undefined" o...
traxtar3/OrbitCalc
OrbitCalc_v0.0.9/RV2COE.py
Python
gpl-3.0
7,416
import pygame import os from OpenGL.GL import * from OpenGL.GLU import * import app from geometry import * class Texture(object): """An OpenGL 2D texture. Data attributes: filename -- The filename that the texture was loaded from, or an empty string glname -- The OpenGL texture name. size -- The dimensions of t...
DavidMikeSimon/satyrnos
resman.py
Python
gpl-3.0
1,503
''' Created on Sep 4, 2016 This module contains a meta data for HGS simulations for the GRW and a wrapper to load them. @author: Andre R. Erler, GPL v3 ''' import numpy as np from collections import OrderedDict from collections import namedtuple # internal imports import hgs.HGS as hgs # need to prevent name collisi...
aerler/WRF-Projects
src/projects/GreatLakes/GRW_settings.py
Python
gpl-3.0
33,466
def subdict(d, keys): return {k: v for k, v in d.items() if k in keys} # consider https://docs.python.org/3/library/functools.html#functools.total_ordering # just __eq__ and __lt__ #@total_ordering class DictSetOperationsMixin(): """ I was disappointed with pythons builtin support for set operations with ...
calaldees/libs
python3/calaldees/dictset.py
Python
gpl-3.0
2,385
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # o2scl_eos documentation build configuration file, created by # sphinx-quickstart on Thu Apr 20 09:06:02 2017. # # 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 # ...
awsteiner/o2scl
doc/o2scl/eos/sphinx/conf.py
Python
gpl-3.0
6,010
from django.shortcuts import render, redirect def index(request): return redirect('status/', permanent=True)
rogst/drainomote
drainomote/views.py
Python
gpl-3.0
115
# -*- coding: utf-8 -*- """ Created on Sun Apr 24 08:43:26 2016 @author: user """ #import nltk # eo_words = nltk.corpus.udhr.word_tokenizer('Esperanto-UTF8') # eo_words = nltk.corpus.udhr.raw('Esperanto-UTF8') # eo_words #print(eo_words) ###################################### """ English English...
Linguistics-DTU/DTU_8th_Sem_Project
code/bunch-of-taggers.py
Python
gpl-3.0
10,340
"""Print effective userid SYNOPSIS: whoami DESCRIPTION: Print the user name associated with current remote server access rights. * PASSIVE PLUGIN: No requests are sent to server, as current user is known by $USER environment variable (`env USER`); AUTHOR: nil0x42 <http://goo.gl/kb2wf> ""...
nil0x42/phpsploit
plugins/system/whoami/plugin.py
Python
gpl-3.0
371
import numpy as np from random import shuffle def softmax_loss_naive(W, X, y, reg): """ Softmax loss function, naive implementation (with loops) Inputs have dimension D, there are C classes, and we operate on minibatches of N examples. Inputs: - W: A numpy array of shape (D, C) containing weights. - X:...
shengshuyang/StanfordCNNClass
assignment1/cs231n/classifiers/softmax.py
Python
gpl-3.0
3,970
# -*- coding: utf-8 -*- # # Copyright (C) 2007-2013 by # Erwin Marsi and TST-Centrale # # # This file is part of the Algraeph program. # # The Algraeph 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; ...
emsrc/algraeph
lib/graeph/graphml/graphview.py
Python
gpl-3.0
1,755
# -*- coding: utf-8 -*- import argparse import sys def parse_args(): argparser = argparse.ArgumentParser() argparser.add_argument( "domain", help="path to domain pddl file") argparser.add_argument( "task", help="path to task pddl file") argparser.add_argument( "--full-encoding"...
robertmattmueller/sdac-compiler
options.py
Python
gpl-3.0
1,765
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_str from ..utils import ( float_or_none, int_or_none, unified_timestamp, url_or_none, ) class DctpTvIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?dctp\.tv/(?:#/)?filme/(?P<id>[^/?#&]+)' ...
valmynd/MediaFetcher
src/plugins/youtube_dl/youtube_dl/extractor/dctp.py
Python
gpl-3.0
3,148
############################################################################### # ____ _ _ _ ____ _ _ # # | _ \ __ _ _ __| |_(_) ___| | ___/ ___|| |_ __ _| |_ ___ # # | |_) / _` | '__| __| |/ __| |/ _ \___ \| __/ _` | __/ __| # ...
darogan/ParticleStats
setup.py
Python
gpl-3.0
3,803
from numpy import * from stft import * from pvoc import * stft = STFT(16384, 2, 4) pvoc = PhaseVocoder(stft) time = 0 def process(i, o): global time for x in stft.forward(i): x = pvoc.forward(x) x = pvoc.to_bin_offset(x) x = pvoc.shift(x, lambda y: sin(y + time*0.01)*mean(y)) x...
nwoeanhinnogaehr/live-python-jacker
examples/pvoc5.py
Python
gpl-3.0
431
from __future__ import print_function from __future__ import division import numpy as np import torch class GPRRFA: """Random Feature Approximation for Gaussian Process Regression Estimation and prediction of Bayesian linear regression models Basic usage:: R = GPRRFA() hyp = R.estimate(...
amarquand/nispat
pcntoolkit/model/rfa.py
Python
gpl-3.0
7,985
''' This check has been put in place to stop the inclusion of TVA (and friends) addons in builds from build makers that publicly insult or slander TVA's developers and friends. If your build is impacted by this check, you can have it removed by publicly apologizing for your previous statements via youtube and twitt...
gypogypo/plugin.video.sneek
checkbad.py
Python
gpl-3.0
3,056
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import sqlite3 import collections import re def _main(): parser = argparse.ArgumentParser(description="Import GO term into sqlite3") parser.add_argument('go', default='go.obo', type=argparse.FileType('r'), help='default: %(default)s', nargs='?') ...
informationsea/Hyokai
scripts/make-sampledb/geneontololgy/import-go.py
Python
gpl-3.0
2,759
import numpy as np import ctypes # Required Types _uint8_ptr = ctypes.POINTER(ctypes.c_uint8) _uint32_ptr = ctypes.POINTER(ctypes.c_uint32) _float_ptr = ctypes.POINTER(ctypes.c_float) _int = ctypes.c_int32 # Load library _bg = np.ctypeslib.load_library('libbgsub_fast', '.') #void bgsub_accum(unsigned int *image, int...
bwhite/hadoop_vision
performance/bgsub_fast.py
Python
gpl-3.0
1,821
# This file is part of Firemix. # # Copyright 2013-2016 Jonathan Evans <jon@craftyjon.com> # # Firemix 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...
nyarasha/firemix
plugins/radial_wipe.py
Python
gpl-3.0
1,645
#!/usr/bin/python3 import sqlite3 import datetime import random import csv import itertools import smtplib import glob from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.mime.image import MIMEImage import sys import os from distutils.sysconfig import get_python_lib import log...
4815162342lost/get_all_updates_list_via_salt
automatization_scripts/auto_email.py
Python
gpl-3.0
7,682
"""Dose GUI for TDD: colored terminal.""" from __future__ import print_function import os, sys, subprocess, signal, colorama from .misc import attr_item_call_auto_cache DEFAULT_TERMINAL_WIDTH = 80 class TerminalSize(object): r""" Console/terminal width information getter. There should be only one insta...
danilobellini/dose
dose/terminal.py
Python
gpl-3.0
7,486
#!/usr/bin/env python # # Copyright 2012 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version...
stwunsch/volk-sha256
gen/volk_sha256_compile_utils.py
Python
gpl-3.0
2,200
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'PortalTab' db.create_table('lizard_box_portaltab', ( ('id', self.gf('django.db...
lizardsystem/lizard-box
lizard_box/migrations/0008_auto__add_portaltab__add_layoutportaltab__chg_field_box_url.py
Python
gpl-3.0
5,651
from django.db.models import Model, CharField, DateTimeField, ForeignKey from django.utils.translation import ugettext_lazy as _ from dream.core.definitions import GENDER_CHOICES, GENDER_UNDEFINED from . import Club class Team(Model): club = ForeignKey(Club) name = CharField(_('team name'), max_length=60) ...
alumarcu/dream-framework
dream/core/models/team.py
Python
gpl-3.0
598
# 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/ocil_2_0/QuestionResultsType.py
Python
gpl-3.0
1,472
#!/usr/bin/env python # -*- coding: utf-8 -*- # # pipeline.py # AstroObject # # Created by Alexander Rudy on 2012-04-25. # Copyright 2012 Alexander Rudy. All rights reserved. # u""" Basic CCD Reduction Pipeline written with AstroObject """ # Python Imports import shutil import os import collections # Numpy I...
alexrudy/AstroObject
Examples/pipeline.py
Python
gpl-3.0
7,924
# <pep8 compliant> import io import operator from . import read_ascii_xps from . import xps_const from mathutils import Vector def writeBones(xpsSettings, bones): bonesString = io.StringIO() if bones: bonesString.write('{:d} # bones\n'.format(len(bones))) for bone in bones: name...
feureau/Small-Scripts
Blender/Blender config/2.91/scripts/addons/XNALaraMesh/write_ascii_xps.py
Python
gpl-3.0
5,428
#!/usr/bin/env python import nest # Example of uses def set_duration(duration=15): if nest.get_variable('is_online') == True: if nest,get_variable('has_fan') == True: nest.get_variable('fan_timer_duration', duration) return True return False def fan_on(): if nest.get_varia...
gb1035/simple_nest
examples.py
Python
gpl-3.0
855
# -*- coding: utf-8 -*- import logging import pprint import werkzeug from odoo import http from odoo.http import request _logger = logging.getLogger(__name__) class StripeController(http.Controller): @http.route(['/payment/stripe/s2s/create_json'], type='json', auth='public') def stripe_s2s_create_json(sel...
ChawalitK/odoo
addons/payment_stripe/controllers/main.py
Python
gpl-3.0
2,191
from test_support import * import re, os do_flow() hand = open(os.path.join("gnatprove", "main.ali")) for line in hand : line = line.rstrip() if re.search('^F ', line) : print line
ptroja/spark2014
testsuite/gnatprove/tests/O824-010__flow_no_computed_calls_for_ll_subprogram/test.py
Python
gpl-3.0
199
#!/usr/bin/env python3 """ Copyright (C) 2020, Alexandre Gazet. This file is part of ret-sync plugin for Binary Ninja. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, includ...
bootleg/ret-sync
ext_bn/retsync/__init__.py
Python
gpl-3.0
2,930
# This is part of Kaylee # -- this code is licensed GPLv3 # Copyright 2015-2016 Clayton G. Hobbs # Portions Copyright 2013 Jezra import sys import gi from gi.repository import GObject # Gtk gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gdk class GTKTrayInterface(GObject.GObject): __gsignals__ =...
Ratfink/kaylee
kayleevc/gui.py
Python
gpl-3.0
7,189
#!/usr/bin/env python # # https://launchpad.net/wxbanker # transactionlist.py: Copyright 2007-2010 Mike Rooney <mrooney@ubuntu.com> # # This file is part of wxBanker. # # wxBanker is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published b...
mrooney/wxbanker
wxbanker/bankobjects/transactionlist.py
Python
gpl-3.0
1,282
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('MSG', '0017_auto_20150917_0707'), ] operations = [ migrations.RemoveField( model_name='content', nam...
rajeev001114/Grade-Recording-System
project/MSG/migrations/0018_auto_20150917_0722.py
Python
gpl-3.0
550
# coding=utf-8 # # URL: https://sickrage.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 version 3 of the License, or # (at your option) any lat...
ukanga/SickRage
sickbeard/providers/hdbits.py
Python
gpl-3.0
6,545
import logging from google.appengine.api import channel from . import memc log = logging.getLogger(__name__) PUBSUB_PREFIX = 'pubsub' def _build_group_key(channel_id): return "%s:%s" % (PUBSUB_PREFIX, channel_id) def add_client(channel_id, client_id, time=channel.MAXIMUM_TOKEN_DURATION_MINUTES * 60): g...
pawciobiel/fgpst-gae
fgpst/utils/pubsub.py
Python
gpl-3.0
1,412
#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2008 Doug Hellmann All rights reserved. # """ """ __version__ = "$Id$" #end_pymotw_header import mailbox import os def show_maildir(name): os.system('find %s -print' % name) mbox = mailbox.Maildir('Example') print 'Before:', mbox.list_folders() show_mail...
qilicun/python
python2/PyMOTW-1.132/PyMOTW/mailbox/mailbox_maildir_folders.py
Python
gpl-3.0
855
# -*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocol...
nagyistoce/netzob
src/netzob/Common/MMSTD/Transitions/impl/SemiStochasticTransition.py
Python
gpl-3.0
14,257
# -*- coding: utf-8 -*- import os import pygame import sys from pygame.locals import * from math import sin, cos, radians pygame.init() WINDOWSIZE = 250 TIMETICK = 100 BOBSIZE = 15 window = pygame.display.set_mode((WINDOWSIZE, WINDOWSIZE)) pygame.display.set_caption("Pendulum") screen = pygame.display.get_surface...
NicovincX2/Python-3.5
Physique/Mouvement/Dynamique/Systèmes oscillants/Pendule/animate_a_pendulum_pygame.py
Python
gpl-3.0
2,683
# # SPDX-FileCopyrightText: 2017 Dmytro Kolomoiets <amerlyq@gmail.com> and contributors. # # SPDX-License-Identifier: GPL-3.0-only # from . import entity, proxy def run(argv): g = ImmediateGraph(entity.DirEntity('/etc/asciidoc')) proxy.print2lvl(g.get_root()) class ImmediateNode(object): def __init__(se...
miur/miur
OLD/miur/graph/immediate.py
Python
gpl-3.0
768
from subprocess import run @type.__call__ class copy: def __call__(self, obj): run(['pbcopy'], input=str(obj), text=True) __ror__ = __call__ # Pipe! def paste(): return run(['pbpaste'], capture_output=True, text=True).stdout
doctaphred/phredutils
pasteboard.py
Python
gpl-3.0
251
#!/usr/bin/env python # -*- coding: utf-8 -*- """Throwaway where I play with pygit"""
jrbl/pygitplay
pygitplay.py
Python
gpl-3.0
87
import pytest from hbayesdm.models import bandit2arm_delta def test_bandit2arm_delta(): _ = bandit2arm_delta( data="example", niter=10, nwarmup=5, nchain=1, ncore=1) if __name__ == '__main__': pytest.main()
CCS-Lab/hBayesDM
Python/tests/test_bandit2arm_delta.py
Python
gpl-3.0
228
# 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 t...
BackupTheBerlios/espressopp
src/esutil/NormalVariate.py
Python
gpl-3.0
1,470
# framework/modules/get_modem_info.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] 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 2 of the...
firebitsbr/termineter
framework/modules/get_modem_info.py
Python
gpl-3.0
3,174
from ast import Module, ImportFrom, Expr, Call, Name, FunctionDef, Assign, Str from ast import dump, If, Compare, Eq, For, Attribute, Gt, Num, IsNot, BinOp from ast import NameConstant, Mult, Add, Import, List, Dict, Is, BoolOp, And from ast import Subscript, Index, Tuple, Lt, Sub, Global, Return, AugAssign from ast im...
jjconti/ayrton
ayrton/ast_pprinter.py
Python
gpl-3.0
18,702
import numpy as np import sys import os from sklearn import svm from sklearn.externals import joblib from sklearn import preprocessing from sklearn.grid_search import GridSearchCV import getSpaceChannelName as sc def readTrainingTestFiles(outfile): ofid = open(outfile,'rt') ofid.seek(0) lines = ofid.readli...
FBSLikan/Cetico-TCC
thirdparty/illuminants/sourcecode/trainingSVM.py
Python
gpl-3.0
12,867
from rest_framework import permissions class IsAdminOrOwnerPostAnyone(permissions.BasePermission): def has_object_permission(self, request, view, obj): """ Limit access to exact instances, owners can access only their instances. """ if not request.user: return False ...
adaptive-learning/flocs-web
practice/permissions.py
Python
gpl-3.0
567
#!/usr/bin/env python import mymodule print('hello from [{0}]'.format(__file__)) mymodule.print_module_info()
veltzer/demos-python
src/examples/long/modules_basic/use_module.py
Python
gpl-3.0
113
class MyClass: def __init__(self): self._num = 42 c = MyClass() # Should not be accssing the protected attribute: print(c._num)
shweta97/pyta
examples/pylint/W0212_protected_access.py
Python
gpl-3.0
141
#!/usr/bin/python import time class Recorder(object): debug = 0 def __init__(self): self.recordings = [] self.lastRecord = 0 if Recorder.debug: print("init Recorder") def record(self): now = time.time(); if self.lastRecord != 0: self.reco...
detman/stomplooper
recorder.py
Python
gpl-3.0
646
from __future__ import absolute_import # Copyright (c) 2010-2016 openpyxl # lru_cache backport copyright Raymong Hettinger # http://code.activestate.com/recipes/578078-py26-and-py30-backport-of-python-33s-lru-cache/?in=user-178123 from collections import namedtuple from functools import update_wrapper from threading ...
mfsteen/CIQTranslate-Kristian
openpyxl/compat/functools.py
Python
gpl-3.0
6,980
""" Parse flavonoid molecule object read from Indigo toolkit. The molecular identifiers accepted are canonical SMILES, InchI or file like format ..mol (file stored in ChemSpider database), and ..sdf (in PubChem database). """ import collections from re import findall, sub from indigo import Indigo, IndigoException fro...
DongElkan/flavonoid
flavonoid_parser.py
Python
gpl-3.0
15,159
# -*- coding: utf-8 -*- # Copyright: Damien Elmes <anki@ichi2.net> # License: GNU GPL, version 3 or later; http://www.gnu.org/copyleft/gpl.html """\ Importing Anki 0.9+ decks ========================== """ __docformat__ = 'restructuredtext' from anki import DeckStorage from anki.importing import Importer from anki.sy...
jmazon/libanki
anki/importing/anki10.py
Python
gpl-3.0
3,247
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-21 07:16 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('laboratory', '0035_auto_20180621_0020'), ] operations = [ migrations.DeleteModel( ...
solvo/organilab
src/laboratory/migrations/0036_delete_feedbackentry.py
Python
gpl-3.0
371
#!/usr/bin/python # -*- coding: utf-8 -*- un_numero = 75 otro_numero = -134
psicobyte/ejemplos-python
cap5/p54.py
Python
gpl-3.0
77
# -*- coding: utf-8 -*- # Copyright 2007-2020 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
dnjohnstone/hyperspy
hyperspy/drawing/_widgets/vertical_line.py
Python
gpl-3.0
1,544
# -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 # Baruwa - Web 2.0 MailScanner front-end. # Copyright (C) 2010-2015 Andrew Colin Kissa <andrew@topdog.za.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 S...
akissa/baruwa2
baruwa/lib/mq/commands.py
Python
gpl-3.0
5,582
from __future__ import unicode_literals from django.apps import AppConfig class GooglemapstweetConfig(AppConfig): name = 'googleMapsTweet'
anshulsharmanyu/twitter_plot
Twitter Map Cloud Assignment/googleMapsTweet/apps.py
Python
gpl-3.0
145
#!/usr/bin/env python2 # -*- coding: utf8 -*- # from __future__ import unicode_literals ''' This file is part of FIXME Screen Calendar. FIXME Events 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...
gcmalloc/screen-calendar
screen.py
Python
gpl-3.0
5,346
#coding=UTF-8 from pyspark import SparkContext, SparkConf, SQLContext, Row, HiveContext from pyspark.sql.types import * from datetime import date, datetime, timedelta import sys, re, os st = datetime.now() conf = SparkConf().setAppName('PROC_A_R_ENT_CRE_COUNT').setMaster(sys.argv[2]) sc = SparkContext(conf = conf) sc....
cysuncn/python
spark/crm/PROC_A_R_ENT_CRE_COUNT.py
Python
gpl-3.0
3,402
############################################################################## # # Copyright (c) 2006 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SO...
HuygensING/bioport-buildout
plone-buildout/bootstrap.py
Python
gpl-3.0
3,857
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-03-05 18:11 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('teams', '0007_auto_20160305_1726'), ] operations = [ migrations.AlterField( ...
shivamMg/malvo
teams/migrations/0008_auto_20160305_1811.py
Python
gpl-3.0
546
# Copyright 2013 by Kamil Koziara. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """ I/O operations for gene annotation files. """ from __future__ import ...
arkatebi/SwissProt-stats
Ontology/IO/GoaIO.py
Python
gpl-3.0
8,540
FCCS2GENVEG = { "0": "9", "282": "6", "286": "6", "448": "4", "270": "4", "454": "4", "309": "2", "81": "1", "422": "2", "453": "1", "2": "6", "427": "4", "164": "6", "436": "1", "186": "4", "426": "4", "231": "4", "85": "6", "241": "6", "4...
pnwairfire/blueskyutils
blueskyutils/bsf2wrfchem/fccs2genveg.py
Python
gpl-3.0
4,872
""" Copyright (C) 2016 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/testing/test_common/test_common_discid.py
Python
gpl-3.0
1,258
import matplotlib import matplotlib.pyplot as plt # for plotting stuff import os import numpy as np matplotlib.rcParams['text.usetex'] = True # for type-1 fonts def get_line_coordinates(w, x1, x2): y1 = (-w[0] - (w[1] * x1)) / w[2] y2 = (-w[0] - (w[1] * x2)) / w[2] return y1,y2 def plot_data(X, y, x_...
mbilalzafar/fair-classification
preferential_fairness/synthetic_data_demo/plot_synthetic_boundaries.py
Python
gpl-3.0
3,067
##### :: swank.lisp ### ### This file defines the "Swank" TCP server for Emacs to talk to. The ### code in this file is purely portable "Common Lisp". We do require a ### smattering of non-portable functions in order to write the server, ### so we have defined them in `swank-backend.lisp' and implemented ### them separ...
deepfire/partus
swank.py
Python
gpl-3.0
141,360
import bpy from bpy.props import * from mathutils import Vector from ... base_types.node import AnimationNode from ... events import propertyChanged class an_EdgesToPlanesNode(bpy.types.Node, AnimationNode): bl_idname = "an_EdgesToPlanesNode" bl_label = "Edges to Planes" bl_width_default = 150 calcula...
Thortoise/Super-Snake
Blender/animation_nodes-master/nodes/mesh/edges_to_planes.py
Python
gpl-3.0
2,540
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: inertial.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) ...
ryanlelek/SMORESGaitRecorder
proto/inertial_pb2.py
Python
gpl-3.0
4,116
from oioioi.contests.models import Submission from oioioi.dashboard.registry import dashboard_registry from oioioi.disqualification.controllers import \ DisqualificationContestControllerMixin @dashboard_registry.register_decorator(order=10) def disqualification_fragment(request): if not request.user.is_authe...
papedaniel/oioioi
oioioi/disqualification/views.py
Python
gpl-3.0
755
#!/usr/bin/env python3 # This file is part of OpenSoccerManager. # # OpenSoccerManager 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 ver...
OpenSoccerManager/opensoccermanager
structures/shortlist.py
Python
gpl-3.0
1,561
from os.path import dirname from os import listdir path = dirname(__file__) i = path.find(".zip") if i == -1: # OS X app or unpacked python files __all__ = [p[:-3] for p in listdir(path) if p.endswith(".py") and p != "__init__.py"] del p else: # Windows binary ziped .pyc files import zipfile __all__...
chrmoritz/zoxel
src/plugins/__init__.py
Python
gpl-3.0
547
######################################################################## # File : JobWrapper.py # Author : Stuart Paterson ######################################################################## """ The Job Wrapper Class is instantiated with arguments tailored for running a particular job. The JobWrapper starts ...
fstagni/DIRAC
WorkloadManagementSystem/JobWrapper/JobWrapper.py
Python
gpl-3.0
63,187
import pymongo import getpass import os import base64 import ConfigParser import sys from database import * from pymongo.errors import DuplicateKeyError db, logger = None, None def setup_config(args): '''Saves MongoDB settings to a configuration file''' config = ConfigParser.SafeConfigParser() config.a...
oicr-ibc/cssscl
cssscl/configure.py
Python
gpl-3.0
1,425
""" Base command definition. """ class Command(object): help = "" def __init__(self): pass @classmethod def setup_parser(cls, parser): pass
kotnik/reddrip
reddrip/commands/__init__.py
Python
gpl-3.0
175
#!/usr/bin/env python from __future__ import division from math import * import numpy as np from numpy.fft import fft, fftshift, fftfreq def fermi(x, smearing): """Return Fermi function""" return 1./(1. + np.exp(x/smearing)) def step(x, delta, smearing): """Return smoothed step-function Fermi(x-Delta)-Fe...
ottodietz/rough-q1d
q1d/q1d_step.py
Python
gpl-3.0
2,411
import unittest from test import support import binascii import random import sys from test.support import precisionbigmemtest, _1G, _4G zlib = support.import_module('zlib') try: import mmap except ImportError: mmap = None class ChecksumTestCase(unittest.TestCase): # checksum test cases def test_crc...
mancoast/CPythonPyc_test
fail/314_test_zlib.py
Python
gpl-3.0
23,273
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
OmeGak/indico-plugins
previewer_code/indico_previewer_code/plugin.py
Python
gpl-3.0
2,952
import random from enum import Enum, unique @unique class Factions(Enum): """ Enum to represent factions. Numbers match up with faction identification ids from the game. """ UEF = 1 AEON = 2 CYBRAN = 3 SERAPHIM = 4 # Shall remain the last element: not a real faction number. RA...
FAForever/client
src/fa/factions.py
Python
gpl-3.0
1,836
import traceback import telepot from .exception import BadFlavor, WaitTooLong, StopListening def _wrap_none(fn): def w(*args, **kwargs): try: return fn(*args, **kwargs) except (KeyError, BadFlavor): return None return w def per_chat_id(): return _wrap_none(lambda ms...
t1g0r/ramey
src/backend/libs/telepot/delegate.py
Python
gpl-3.0
2,741
#!/usr/bin/env python import numpy import re, os import matplotlib.pyplot as plt import pylab a = 0.8 plt.rc('axes', color_cycle=[[0,0,a], [0,a,0], [a,0,0]]) files = os.listdir('logs') lookup = sorted([[int(re.search('\d+', elem).group(0)), elem] for elem in files], key=lambda x:x[0]) for n, f in lookup: if ...
afrachioni/umbrella
tools/plot_hist.py
Python
gpl-3.0
556
import unittest from time import sleep from math import pi, sin, cos from panda3d.core import Quat as Panda3dQuat from random import random as rnd from motuus.visualize.graph2D import Graph2D from motuus.visualize.graph3D import Graph3D from motuus.movement.constants import * from motuus.movement.utils import build_q,...
Vysybyl/motuus
motuus/visualize/tests.py
Python
gpl-3.0
9,175
test = "#{0}:{1};" import re regex = re.compile(test,re.IGNORECASE) pattern = r'[{]\d[}]' regex = re.compile(pattern,re.IGNORECASE) print regex parsed = [] for idx,match in enumerate(regex.finditer(test)): parsed.append({'start':match.start(),'end':match.end()}) print "%s: %s-%s: %s" % (str(idx),match.start...
Melon-PieldeSapo/IoTFramework
src/tests/test_ground.py
Python
gpl-3.0
1,704
"""A module providing functions useful when dealing with a uniaxial crystal, possibly with optical activity.""" from numpy import array, diag, dot, atleast_1d, sqrt, power, cos, sin # Follow the calculation in Xu&St Section 1.3 # z axis is taken as direction of the optical wavevector def calc_refractive_indices(angl...
GeoffEvans/aol_model
aol_model/optically_uniaxial.py
Python
gpl-3.0
2,095
import sys import logger import message_protocol_util as mpu import reliable_connect as rc import generic_policy as gp import random ORACLE, RANDOM_WALK, STOP = range(3) class AgentModelLess: """" The block world agent that implements oracle, random walk and the stop baseline. Requires no parameters to be tu...
clic-lab/blocks
BlockWorldRoboticAgent/agent_no_model.py
Python
gpl-3.0
5,392
""" This module is deprecated -- use scipy.linalg.blas instead """ from __future__ import division, print_function, absolute_import try: from ._cblas import * except ImportError: empty_module = True import numpy as _np @_np.deprecate(old_name="scipy.linalg.cblas", new_name="scipy.linalg.blas") d...
beiko-lab/gengis
bin/Lib/site-packages/scipy/linalg/cblas.py
Python
gpl-3.0
362
#!/usr/bin/env python # # This file is protected by Copyright. Please refer to the COPYRIGHT file # distributed with this source distribution. # # This file is part of GNUHAWK. # # GNUHAWK is free software: you can redistribute it and/or modify is under the # terms of the GNU General Public License as published by ...
RedhawkSDR/integration-gnuhawk
components/conjugate_cc/tests/test_conjugate_cc.py
Python
gpl-3.0
4,067