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 nose.tools import assert_equal, assert_greater, assert_greater_equal, assert_less, assert_raises import time import numpy as np import audioio.playaudio as ap import audioio.audiomodules as am def test_beep(): am.enable_module() print() print('default module...') ap.beep(blocking=True) ap.bee...
bendalab/audioio
tests/test_playaudio.py
Python
gpl-3.0
3,956
#!/usr/bin/python # -*- coding: utf-8 -*- import cgi import sqlite3, re, string, codecs, os def cercaurbano(cNominativo): c = sqlite3.connect('./data/catasto.db') cur = c.cursor() cSele = "select distinct (id_i.foglio || '-' || id_i.numero ||'-'|| id_i.subalterno), \ '<a href=\"http://nominatim.openstreetmap.o...
marcobra/opencatamap
cgi-bin/genera_html_su_urbano.py
Python
gpl-3.0
3,614
import os import sys import textwrap from collections import OrderedDict from argparse import ArgumentParser, RawDescriptionHelpFormatter from faice.tools.run.__main__ import main as run_main from faice.tools.run.__main__ import DESCRIPTION as RUN_DESCRIPTION from faice.tools.vagrant.__main__ import main as vagrant_ma...
curious-containers/faice
faice/__main__.py
Python
gpl-3.0
1,622
# -*- encoding: utf-8 -*- """Test class for Foreman Discovery @Requirement: Discoveredhost @CaseAutomation: Automated @CaseLevel: Acceptance @CaseComponent: UI @TestType: Functional @CaseImportance: High @Upstream: No """ import subprocess import time from fauxfactory import gen_string from nailgun import entit...
sthirugn/robottelo
tests/foreman/ui/test_discoveredhost.py
Python
gpl-3.0
51,849
import json import pytest from common.utils.attack_utils import ScanStatus from infection_monkey.model import VictimHost from infection_monkey.telemetry.attack.t1197_telem import T1197Telem DOMAIN_NAME = "domain-name" IP = "127.0.0.1" MACHINE = VictimHost(IP, DOMAIN_NAME) STATUS = ScanStatus.USED USAGE_STR = "[Usage...
guardicore/monkey
monkey/tests/unit_tests/infection_monkey/telemetry/attack/test_t1197_telem.py
Python
gpl-3.0
917
import ecs import raidersem import components as comp import constants as cst import utils import assets import math from sfml import sf ### Graphics ### class DrawMap(ecs.System): def __init__(self, window, mapObstacles, rs): self.window = window self.mapObstacles = mapObstacles self.rs ...
gberthou/raiders
systems.py
Python
gpl-3.0
12,634
#!/usr/bin/env python3 import collections import os import sys from librarytrader.librarystore import LibraryStore s = LibraryStore() s.load(sys.argv[1]) n = 20 if len(sys.argv) > 2: n = int(sys.argv[2]) outgoing_calls = set() incoming_calls = collections.defaultdict(int) for l in s.get_library_objects(): ...
rupran/librarytrader
scripts/most_calls.py
Python
gpl-3.0
1,613
import feedparser import time # Create display instance on default I2C address (0x70) and bus number. from Adafruit_LED_Backpack import AlphaNum4 display = AlphaNum4.AlphaNum4() # Initialize the display. Must be called once before using the display. display.begin() #create string(s) with rss address for multiple feed...
Epikarsios/RssLEDBackpack
RssLED.py
Python
gpl-3.0
1,628
#Copyright (C) 2013 Alex Nitz # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the h...
sfairhur/pycbc
pycbc/strain/strain.py
Python
gpl-3.0
78,684
#! /usr/bin/env python # This file is part of khmer, https://github.com/dib-lab/khmer/, and is # Copyright (C) 2010-2015, Michigan State University. # Copyright (C) 2015, The Regents of the University of California. # # Redistribution and use in source and binary forms, with or without # modification, are permitted pro...
NIASC/VirusMeta
diginorm_module/abundance-dist.py
Python
gpl-3.0
6,918
# -*- coding: utf-8 -*- #=============================================================================== # # Copyright 2013 Horacio Guillermo de Oro <hgdeoro@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 ...
hgdeoro/GarnishMyPic
gmp/dnd.py
Python
gpl-3.0
4,062
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('lizard_efcis', '0065_auto_20150818_1521'), ] operations = [ migrations.AlterField( model_name='mappingfield', ...
lizardsystem/lizard-efcis
lizard_efcis/migrations/0066_auto_20150821_1131.py
Python
gpl-3.0
1,652
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # pycasso documentation build configuration file, created by # sphinx-quickstart on Sun Sep 24 01:54:19 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 # au...
jasonge27/picasso
python-package/doc/source/conf.py
Python
gpl-3.0
5,024
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### ## ## ## Copyright 2011-2012, Neil Wallace <neil@openmolar.com> ## ## ...
rowinggolfer/openmolar2
configure.py
Python
gpl-3.0
6,157
#----------------------------------------------------------------------------- # Copyright (c) 2013-2016, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this s...
ijat/Hotspot-PUTRA-Auto-login
PyInstaller-3.2/PyInstaller/hooks/hook-django.core.mail.py
Python
gpl-3.0
979
# coding=utf-8 # Author: raver2046 <raver2046@gmail.com> # # 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 ...
pedro2d10/SickRage-FR
sickbeard/providers/bluetigers.py
Python
gpl-3.0
5,574
# PAL # Listener # Thomas Elvey # 0.2 import math, audioop, time, wave, os from collections import deque from pocketsphinx import * import pyaudio from VoiceDecoder import VoiceDecoder class Listener(): def __init__(self): print "Listener Created" # INIT FUNCTIONS # self.setupMic...
Tomme/PAL
Listener.py
Python
gpl-3.0
3,589
#!/usr/bin/python # import usb from time import sleep class RocketManager: vendor_product_ids = [(0x1941, 0x8021), (0x0a81, 0x0701), (0x0a81, 0xff01), (0x1130, 0x0202), (0x2123,0x1010)] launcher_types = ["Original", "Webcam", "Wireless", "Striker II", "OIC Webcam"] housing_colors = ["green", "blue", "silv...
hannesrauhe/lunchinator-gadgets
rocket_launcher/pyrocket_backend.py
Python
gpl-3.0
8,133
#!/usr/bin/python3 import datetime import sys import os homedir = os.environ['HOME'] log_path = homedir + "/Pigrow/logs/trigger_log.txt" script = "write_log.py" message = "" for argu in sys.argv[1:]: argu_l = str(argu).lower() if argu_l == 'help' or argu_l == '-h' or argu_l == '--help': print(" Script...
Pragmatismo/Pigrow
scripts/triggers/write_log.py
Python
gpl-3.0
1,392
# -*- coding: utf-8 -*- # Copyright (C) 2005 Osmo Salomaa # # 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 pr...
otsaloma/gaupol
aeidon/revertable.py
Python
gpl-3.0
3,249
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def pathSum(self, root, sum): """ :type root: TreeNode :type sum: int :rtype: List[List[i...
zqfan/leetcode
algorithms/113. Path Sum II/solution.py
Python
gpl-3.0
880
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2015-2019 Bitergia # # 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 l...
grimoirelab/GrimoireELK
utils/gelk.py
Python
gpl-3.0
5,856
from unittest import TestCase from common.timer import timed @timed def fib(n): ls = [1, 1] if n == 0: return 0 if n <= 2: return ls[n - 1] for i in range(3, n + 1): tmp = ls[1] ls[1] = ls[0] + ls[1] ls[0] = tmp return ls[-1] class Test(TestCase): def...
plilja/adventofcode
common/test_timer.py
Python
gpl-3.0
695
from chowdren.writers.objects import ObjectWriter from chowdren.common import get_animation_name, to_c, make_color from chowdren.writers.events import (StaticConditionWriter, StaticActionWriter, StaticExpressionWriter, make_table) class Util(ObjectWriter): class_name = 'Utility' static = True def wr...
joaormatos/anaconda
Chowdren/chowdren/writers/extensions/Stochastic Utility.py
Python
gpl-3.0
1,120
import sys import os.path import setuptools # Fix distutils issues from cffi import FFI ffi = FFI() mod_name = 'instrumental.drivers.cameras._pixelfly.errortext' if sys.platform.startswith('win'): ffi.set_source(mod_name, """ #define PCO_ERR_H_CREATE_OBJECT #define PCO_ERRT_H_CREATE_OBJECT ...
mabuchilab/Instrumental
instrumental/drivers/cameras/_pixelfly/_cffi_build/build_errortext.py
Python
gpl-3.0
586
""" Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor 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 la...
sbrichards/rockstor-core
src/rockstor/storageadmin/views/oauth_app.py
Python
gpl-3.0
3,028
#!/usr/bin/env python import os import sys import re import pdb import pycparser import subprocess KNOWN_TYPES = ['int', 'double', 'float', 'char', 'short', 'long', 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t'] # input is name of interface file. # output is list of args for that fn. # so, for the fn...
KernelAnalysisPlatform/kvalgrind
scripts/apigen.py
Python
gpl-3.0
6,356
#!/usr/bin/env python import datetime as dt import numpy as np import matplotlib.pyplot as plt #import matplotlib.dates as mdates #import matplotlib.cbook as cbook #from matplotlib import pyplot as plt from matplotlib.dates import date2num from statsmodels.distributions.empirical_distribution import ECDF from colle...
emmdim/guifiAnalyzer
plot/plotsServices.py
Python
gpl-3.0
4,467
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
Miserlou/Anomos
Anomos/parsedir.py
Python
gpl-3.0
5,368
import sys import os import pty, shlex import signal import subprocess import socket import time import atexit import re import string import logging import random from .vif import VirtualInterface from .vnet import VirtualNet from .riotnative import RIOT from string import Template import libvirt import hashlib a...
Lotterleben/desvirt
desvirt/vm.py
Python
gpl-3.0
5,090
i = 0 while i < 25: i = i + 1
Jokymon/hpcs
test_input/test_while.py
Python
gpl-3.0
36
# -*- coding: utf-8 -*- # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed ...
persepolisdm/persepolis
persepolis/scripts/mac_notification.py
Python
gpl-3.0
1,424
from rest_framework import generics from .models import Proj from .serializers import ProjSerializer # Create your views here. class ProjList(generics.ListCreateAPIView): """be report project list""" queryset = Proj.objects.all() serializer_class = ProjSerializer class ProjDetail(generics.RetrieveUpdateDe...
cmos3511/cmos_linux
python/op/op_site/proj_checker/views.py
Python
gpl-3.0
442
''' Task Coach - Your friendly task manager Copyright (C) 2004-2013 Task Coach developers <developers@taskcoach.org> Task Coach 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 ...
TaskEvolution/Task-Coach-Evolution
taskcoach/taskcoachlib/domain/attachment/__init__.py
Python
gpl-3.0
878
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-12-06 02:31 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('season', '0003_auto_20161206_0216'), ] operations = [ migrations.AddField( ...
biddellns/litsl
season/migrations/0004_groupround_schedule_is_set.py
Python
gpl-3.0
464
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2013-2016) # # This file is part of GWSumm # # GWSumm 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 opti...
duncanmmacleod/gwsumm
gwsumm/tabs/misc.py
Python
gpl-3.0
3,545
#!/usr/bin/python3 -i import serial # if you have not already done so from time import sleep import matplotlib.pyplot as plt import re import datetime import numpy import pickle class DataExtruder: def __init__(self,port='/dev/ttyACM0',baudrate=115200): self.pattern_pixels=re.compile(r'data=(?P<pixels>[\w ]*)...
superzerg/TCD1304AP_teensy2pp
read_pixels.py
Python
gpl-3.0
2,341
"""Package initialization.""" from .core import * from .main import main from .pandocattributes import PandocAttributes
tomduck/pandoc-xnos
pandocxnos/__init__.py
Python
gpl-3.0
121
""" Copyright 2008, 2009 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion 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 ...
ffu/DSA-3.2.2
grc/base/Port.py
Python
gpl-3.0
2,557
# -*- coding: utf-8 -*- """ Flaskr ~~~~~~ A microblog example application written as Flask tutorial with Flask and sqlite3. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from sqlite3 import dbapi2 as sqlite3 from flask import (Flask, request, session...
unlessbamboo/grocery-shop
language/python/src/flask/flaskr/flaskr.py
Python
gpl-3.0
3,444
import discord from discord.ext import commands from cogs.utils.dataIO import dataIO from collections import namedtuple, defaultdict from datetime import datetime from random import randint from random import choice as randchoice from copy import deepcopy from .utils import checks from __main__ import send_cmd_help imp...
pkkao/musicbot
cogs/economy.py
Python
gpl-3.0
25,638
# -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type class ModuleDocFragment(object): # Standard F5 documentation fragment DOCUMENTATION = r''' options: pro...
F5Networks/f5-ansible
ansible_collections/f5networks/f5_modules/plugins/doc_fragments/f5ssh.py
Python
gpl-3.0
3,698
import time import zlib from bs4 import BeautifulSoup # from geopy.geocoders import Nominatim as Geo from scraper import BaseScraper from price_parser import parse_price_text from MySQL_connector import db_connector db = 'realestate_db' class Parser(object): scr_db = 'scraper_dumps' tgt_db = 'realestate_d...
lyso/scrape_realestate
parser_mysql.py
Python
gpl-3.0
10,544
from __future__ import print_function, absolute_import from .script_interface import ScriptInterfaceHelper, script_interface_register @script_interface_register class ComFixed(ScriptInterfaceHelper): """Fix the center of mass of specific types. Subtracts mass-weighted fraction of the total force action on...
KonradBreitsprecher/espresso
src/python/espressomd/comfixed.py
Python
gpl-3.0
699
import sys input_data = sys.stdin.readlines() static = input_data.pop(0).rstrip().split() teams = int(static[0]) pizza = int(static[1]) nopizza= int(static[2]) input_data.pop(0) pizza_scores = input_data[0:pizza] input_data = input_data[pizza:] pizza_scores = [-1 if x.rstrip() == '?' else int(x.rstrip()) for x in p...
gustavemichel/IEEEXtreme10-Technomancers
P23 - P is NP/PisNP.py
Python
gpl-3.0
555
#!/usr/bin/python2.6 # This file is a part of Metagam project. # # Metagam 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 # any later version. # # Metagam is distributed ...
JoyTeam/metagam
mg/constructor/stats.py
Python
gpl-3.0
13,373
# -*- coding: utf-8 -*- # Copyright (C) 2016 Adam Collin, Mathew Topper # Copyright (C) 2017-2018 Mathew Topper # # 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...
DTOcean/dtocean-core
dtocean_core/interfaces/plots_installation.py
Python
gpl-3.0
18,785
import pytest from cplpy import run_test, prepare_config import subprocess as sp import os import glob class cd: """Context manager for changing the current working directory""" def __init__(self, newPath): self.newPath = os.path.expanduser(newPath) def __enter__(self): self.savedPath = os...
Crompulence/cpl-library
test/valgrind/test_valgrind.py
Python
gpl-3.0
3,969
# Legibilidad 2 (beta) # Averigua la legibilidad de un texto # Spanish readability calculations # © 2016 Alejandro Muñoz Fernández #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 ...
amunozf/legibilidad
legibilidad.py
Python
gpl-3.0
8,040
VERSION = None BRANCH = 'master'
julien78910/CouchPotatoServer
version.py
Python
gpl-3.0
32
#!/usr/bin/env python # encoding: utf-8 """ trend.datasource.trendfile.py Handling and parsing of trendfiles (*.hdb) Copyright (C) 2016/2017 Stefan Braun 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 Foundat...
stefanbraun-private/pyVisiToolkit
src/trend/datasource/trendfile.py
Python
gpl-3.0
49,022
#!/usr/bin/env python3 # This file is part of OpenSoccerManager-Editor. # # 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 la...
OpenSoccerManager/opensoccermanager-editor
uigtk/nations.py
Python
gpl-3.0
6,581
# coding: utf-8 import numpy as np import matplotlib.pyplot as plt import scipy.ndimage as snd import seaborn as sns from skimage import img_as_float, morphology, measure from skimage.color import rgb2hsv from skimage.morphology import reconstruction from skimage.exposure import rescale_intensity from skimage.measure...
arneck/Macropores
biopore_detect.py
Python
gpl-3.0
12,967
# -*- coding: utf-8 -*- from django import forms from django.utils.translation import ugettext_lazy as _ from taggit.forms import TagField from places_core.forms import BootstrapBaseForm from .models import Category, News class NewsForm(forms.ModelForm, BootstrapBaseForm): """ Edit/update/create blog entry. ""...
CivilHub/CivilHub
blog/forms.py
Python
gpl-3.0
1,065
# Copyright 2010 by Dana Larose # This file is part of crashRun. # crashRun 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. # crashR...
DanaL/crashRun
src/Maze.py
Python
gpl-3.0
3,974
# Copyright (C) 2015-2020 Nikos Roussos <nikos@roussos.cc>. # This file is part of Monopati - https://github.com/comzeradd/monopati # Monopati 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 ...
comzeradd/monopati
monopati/helpers.py
Python
gpl-3.0
2,103
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-11-12 10:46 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('db', '0052_auto_20161112_2141'), ] operations = [ migrations.AlterField( ...
caw/curriculum
db/migrations/0053_auto_20161112_2146.py
Python
gpl-3.0
543
import logging from django.core.management.base import BaseCommand from citation.ping_urls import verify_url_status logger = logging.getLogger(__name__) class Command(BaseCommand): help = '''Method that check if the code archived urls are active and working or not ''' def handle(self, *args, **options): ...
dhruvilpatel/citation
citation/management/commands/validate_urls.py
Python
gpl-3.0
389
# -*- coding: utf-8 -*- # outgoing/service.py # Copyright (C) 2013-2017 LEAP # # 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...
leapcode/bitmask-dev
src/leap/bitmask/mail/outgoing/service.py
Python
gpl-3.0
17,108
#!/usr/bin/env python """ @file rebuildSchemata.py @author Michael Behrisch @date 2011-07-11 @version $Id: rebuildSchemata.py 11671 2012-01-07 20:14:30Z behrisch $ Let all SUMO binarie write the schema for their config SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ Copyright (C) 2011-2012...
smendez-hi/SUMO-hib
tools/xml/rebuildSchemata.py
Python
gpl-3.0
848
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Output classes for ETL. # # Author: Just van den Broecke # from stetl.output import Output from stetl.util import Util from stetl.packet import FORMAT import httplib import base64 log = Util.get_log('httpoutput') class HttpOutput(Output): """ Output via HTTP p...
sebastic/stetl
stetl/outputs/httpoutput.py
Python
gpl-3.0
3,524
"""Module provides provides a convinient class :class:`Attachment` to access (Create, Read, Delete) document attachments.""" import base64, logging from os.path import basename from copy import deepcopy from mimetypes import guess_type from httperror import *...
prataprc/CouchPy
couchpy/.Attic/attachment.py
Python
gpl-3.0
7,105
# -*- coding: utf-8 -*- # # codimension - graphics python two-way code editor and analyzer # Copyright (C) 2010-2019 Sergey Satskiy <sergey.satskiy@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 Softw...
SergeySatskiy/codimension
codimension/ui/floatingrendererwindow.py
Python
gpl-3.0
12,510
from vsvbp import container, solver import argparse, sys, os, re def parse(inputfile): """ Parse a file using format from Brandao et al. [Bin Packing and Related Problems: General Arc-flow Formulation with Graph Compression (2013)] Format: d (number of dimensions) C_1 ... C_d ca...
mgabay/Variable-Size-Vector-Bin-Packing
scripts/vbp-optim.py
Python
gpl-3.0
4,279
from django.test import TestCase from apps.taxonomy.models import Act from apps.taxonomy.tests import factories from apps.taxonomy.tests.base import TaxonomyBaseTestMixin class TestActCreation(TestCase): def setUp(self): super(TestActCreation, self).setUp() factories.TaxonRankFactory(id=0) ...
TU-NHM/plutof-taxonomy-module
apps/taxonomy/tests/act_tests.py
Python
gpl-3.0
2,683
from __future__ import absolute_import """ This module provides loaders for local file system and over http local and remote access """ import os import hmac import requests import yaml import six from six.moves.urllib.parse import unquote_plus, urlsplit, urlencode import time import pkgutil import base64 import cg...
ikreymer/pywb
pywb/utils/loaders.py
Python
gpl-3.0
14,279
# Copyright (C) 2016 Statoil ASA, Norway. # # This file is part of ERT - Ensemble based Reservoir Tool. # # ERT 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 ...
Ensembles/ert
python/python/ert/enkf/config/field_type_enum.py
Python
gpl-3.0
1,042
# -*- coding: utf-8 -*- from resources.lib.gui.gui import cGui from resources.lib.gui.guiElement import cGuiElement from resources.lib.handler.requestHandler import cRequestHandler from resources.lib.parser import cParser from resources.lib.handler.ParameterHandler import ParameterHandler from resources.lib import logg...
xStream-Kodi/plugin.video.xstream
sites/animes-stream24_tv.py
Python
gpl-3.0
12,975
# Generated by Django 2.2.5 on 2019-09-26 12:18 from django.db import migrations, models import weblate.utils.backup class Migration(migrations.Migration): dependencies = [("wladmin", "0005_auto_20190926_1332")] operations = [ migrations.AddField( model_name="backupservice", ...
dontnod/weblate
weblate/wladmin/migrations/0006_auto_20190926_1218.py
Python
gpl-3.0
1,322
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^list/$', views.list, name='list'), url(r'^search/$', views.search, name='search'), url(r'^add/$', views.add, name='add'), url(r'^restaurant/(?P<id>[0-9]+)$', views.restaurant, name='r...
fblupi/master_informatica-SSBW
tarea6/sitio_web/restaurantes/urls.py
Python
gpl-3.0
408
# -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2018-07-17 21:15 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('book', '0004_auto_20180717_1547'), ] operations = [ migrations.AddField( ...
erudit/zenon
eruditorg/apps/public/book/migrations/0005_auto_20180717_1615.py
Python
gpl-3.0
754
# -*- coding: utf-8 -*- # # Copyright (C) 2010-2012 Roberto Longobardi # # This file is part of the Test Manager plugin for Trac. # # The Test Manager plugin for Trac 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 Fo...
CoRfr/testman4trac
tracgenericworkflow/trunk/setup.py
Python
gpl-3.0
2,209
# -*- coding: utf-8 -*- # Copyright (c) 2010 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing the cooperation server. """ from __future__ import unicode_literals from PyQt5.QtCore import pyqtSignal from PyQt5.QtNetwork import QTcpServer from .Connection import Connection import Prefere...
davy39/eric
Cooperation/CooperationServer.py
Python
gpl-3.0
2,057
from django.contrib import messages from django.core.exceptions import PermissionDenied class UploadPermissionDenied(PermissionDenied): def __init__(self, request, log_func, error_message, *args, **kwargs): log_func(error_message) messages.error(request, error_message) super(UploadPermiss...
musashiXXX/django-clamav-upload
clamav_upload/exceptions.py
Python
gpl-3.0
363
#!/usr/bin/env python # coding=utf-8 """288. An enormous factorial https://projecteuler.net/problem=288 For any prime p the number N(p,q) is defined by N(p,q) = ∑n=0 to q Tn*pn with Tn generated by the following random number generator: S0 = 290797 Sn+1 = Sn2 mod 50515093 Tn = Sn mod p Let Nfac(p,q) be the fa...
openqt/algorithms
projecteuler/pe288-an-enormous-factorial.py
Python
gpl-3.0
477
import pandas import numpy import operator from sklearn.preprocessing import OneHotEncoder from typing import Mapping def one_hot_encode(vector, dtype='float32', categories=None, index=None): if isinstance(vector, pandas.Series): index = vector.index vector = vector.values encoder = OneHotEncoder( categori...
jpn--/larch
larch/util/data_manipulation.py
Python
gpl-3.0
2,789
# -*- coding: utf8 -*- # # electrode: numeric tools for Paul traps # # Copyright (C) 2011-2012 Robert Jordens <jordens@phys.ethz.ch> # # 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, e...
nist-ionstorage/electrode
electrode/pattern_constraints.py
Python
gpl-3.0
8,125
import time import maestro # servo 0 is left/right # servo 1 is up/down try: servo = maestro.Controller() servo.setRange(1,4000,8000) # about 5 clicks per full motion # 1040 for left/right + is left, - is right. # 800 for up/down + is up, - is down. x = servo.getPosition(1) + 800 servo.setAccel(1,6) ...
WaterSheltieDragon/Wango-the-Robot
faceup.py
Python
gpl-3.0
368
from . import advancetools from flask import render_template,redirect,Response,url_for @advancetools.route('/') def index(): return redirect(url_for('auto_decode_base')) @advancetools.route('/auto_decode_base') def auto_decode_base(): return render_template('advancetool/auto_decode_base.html')
sarleon/HackGame
app/advancetool/views.py
Python
gpl-3.0
307
# -*- coding: utf-8-*- import random import re import wolframalpha import time import sys from sys import maxint from client import jarvispath WORDS = ["WHO", "WHAT", "WHERE", "HOW MUCH"] def handle(text, mic, profile): app_id=profile['keys']['WOLFRAMALPHA'] client = wolframalpha.Client(app_id) query = ...
affordablewindurbines/jarvisproject
client/modules/knowledged.py
Python
gpl-3.0
982
# A comment # Anything after # is ignored by python print "I could have code like this." # and the comment after is ignored # You can also use a comment to "disable" or comment out a piece of code # print "This won't run" print "This won't not run"
srinivasanmit/all-in-all
1/ex2.py
Python
gpl-3.0
248
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Érudit.org documentation build configuration file, created by # sphinx-quickstart on Mon Dec 14 17:16:39 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this #...
erudit/zenon
docs/conf.py
Python
gpl-3.0
9,700
import numpy as np import os from tensorutils.antisym import get_antisymmetrizer_product as asym test_dir_path = os.path.dirname(os.path.realpath(__file__)) array_path_template = os.path.join(test_dir_path, "random_arrays", "{:s}.npy") def test__composition_1(): array1 = np.load(array_path_template.format("15x1...
avcopan/meinsum
test/test_antisym.py
Python
gpl-3.0
5,061
from kivy.uix.floatlayout import FloatLayout from kivy.properties import NumericProperty, ObjectProperty from kivy.graphics import Color, Ellipse, Line from kivy.graphics.transformation import Matrix from kivy.core.window ...
shy21grams/GroundControl
Simulation/simulationCanvas.py
Python
gpl-3.0
3,902
from __future__ import division, print_function, absolute_import import numpy as np from scipy.lib.six import callable def binned_statistic(x, values, statistic='mean', bins=10, range=None): """ Compute a binned statistic for a set of data. This is a generalization of a h...
beiko-lab/gengis
bin/Lib/site-packages/scipy/stats/_binned_statistic.py
Python
gpl-3.0
15,105
#!/usr/bin/python # This file is part of Morse. # # Morse 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. # # Morse ...
retooth/morse
morse/models/bans.py
Python
gpl-3.0
7,601
# -*- coding: utf-8 -*- """ Created on Sun Jan 22 23:03:45 2017 @author: Shabaka """ # import pandas import pandas as pd # Import Pyplot as plt from matplotlib import matplotlib.pyplot as plt from sqlalchemy import create_engine # Import func from sqlalchemy.sql import func from sqlalchemy import ...
qalhata/Python-Scripts-Repo-on-Data-Science
SQL_Det_Pop_Sum_by_Column.py
Python
gpl-3.0
1,516
import sys # where RobotControl.py, etc lives sys.path.append('/home/pi/Desktop/ADL/YeastRobot/PythonLibrary') from RobotControl import * ################################# ### Define Deck Layout ################################# deck="""\ DW96P DW96P DW96W DW96W BLANK DW96P DW96P DW96W DW96W BLANK DW96P DW...
tdlong/YeastRobot
UserPrograms/ASE/Mon_ToBeads_3.py
Python
gpl-3.0
2,655
#!/usr/bin/env python # coding: utf-8 from __future__ import division import sys, os, time, platform, math from struct import unpack, pack """ 生成测试数据: rm test.txt test.txt.bz2 echo 'hello, world(世界)!!!!' > test.txt bzip2 -z test.txt 解压数据: python bzip2.py 参考资料: https://en.wikipedia.org/wiki/...
LuoZijun/solidity-sc2-replay-reader
bzip2.py
Python
gpl-3.0
17,390
import time import plugins import hangups def _initialise(bot): plugins.register_handler(on_hangout_call, type="call") def on_hangout_call(bot, event, command): if event.conv_event._event.hangout_event.event_type == hangups.schemas.ClientHangoutEventType.END_HANGOUT: lastcall = bot.conversation_me...
ravrahn/HangoutsBot
hangupsbot/plugins/humor_hangoutcalls.py
Python
gpl-3.0
1,755
#!/usr/bin/env python #-*- coding:utf-8 -*- # # This file is part of the NNGT project to generate and analyze # neuronal networks and their activity. # Copyright (C) 2015-2019 Tanguy Fardet # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
Silmathoron/NNGT
doc/examples/spatial_graphs.py
Python
gpl-3.0
2,249
# -*- coding: utf-8 -*- """ Created on Tue Jul 07 09:44:36 2015 @author: Marcus """ import pygimli as pg import numpy as np from pygimli.physics.traveltime.fastMarchingTest import fastMarch import matplotlib.pyplot as plt import time as time from pygimli.mplviewer import drawMesh # , drawField, drawStrea...
KristoferHellman/gimli
python/pygimli/physics/traveltime/TravelTimeFMM.py
Python
gpl-3.0
18,865
import pygame import src.sprite as game pygame.init() screen = pygame.display.set_mode((400,300)) done = False GameUpdateList = [] GameRenderList = [] catapult = game.Sprite("data/img/catapult.png", 5) boulder = None catapultAnim = game.Animation(catapult, 96, 96, 5, 100) GameUpdateList.append(catapultAnim) GameR...
GustJc/PyPhysics
projects/03-Game/main.py
Python
gpl-3.0
1,567
"""Retrieves the paths to the required schedule files.""" from datetime import datetime import logging import pytz from unipath import Path # Setup Logging LOG = logging.getLogger(__name__) def get_date(tz_string): """Generates todays date as string (in format yyyy-mm-dd)""" schedule_tz = pytz.timezone(tz_...
studybuffalo/rdrhc_calendar
modules/retrieve.py
Python
gpl-3.0
1,263
# https://www.codeeval.com/open_challenges/106/ import sys from collections import namedtuple test_cases = open(sys.argv[1], 'r') # test_cases = open('roman_numerals.txt', 'r') test_lines = (line.rstrip() for line in test_cases) def num_to_components(num): num_comp = namedtuple('NumComponents', ('thousands', 'hundre...
stascrash/codeeval
roman_numerals.py
Python
gpl-3.0
1,983
#!/usr/bin/env python ############################################################################## # # diffpy.pyfullprof by DANSE Diffraction group # Simon J. L. Billinge # (c) 2010 Trustees of the Columbia University # in the City of New York. All rights reserve...
xpclove/autofp
diffpy/pyfullprof/baseclass.py
Python
gpl-3.0
17,485
''' Created on 15.11.2021 @author: michael ''' from alexandriabase.daos import DocumentDao, DaoModule, DOCUMENT_TABLE,\ DocumentFileInfoDao from injector import Injector, inject from alexandriabase import AlexBaseModule from alexandriabase.services import ServiceModule, DocumentFileManager,\ DocumentFileNotFou...
archivsozialebewegungen/AlexandriaBase
alexandriabase/tools.py
Python
gpl-3.0
5,581
# Authors: # Jason Gerard DeRose <jderose@redhat.com> # # Copyright (C) 2008 Red Hat # see file 'COPYING' for use and warranty information # # 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, ei...
pspacek/freeipa
ipatests/test_ipalib/test_frontend.py
Python
gpl-3.0
39,007
from django.core.management.base import BaseCommand, CommandError from django.db.models import Q from django.template.defaultfilters import filesizeformat from hav.apps.media.models import Media from hav.apps.hav_collections.models import Collection from hav.apps.archive.models import ArchiveFile from ...tasks import c...
whav/hav
src/hav/apps/webassets/management/commands/recreate_webassets.py
Python
gpl-3.0
3,208
import threading, time, Queue, os, sys, shutil, random from util import user_dir, appdata_dir, print_error, print_msg from bitcoin import * import interface from blockchain import Blockchain DEFAULT_PORTS = {'t':'50011', 's':'50012', 'h':'8181', 'g':'8282'} DEFAULT_SERVERS = { 'server.electrum-exe.org': DEFAULT_P...
fukukami/electrum-exe-stealth
lib/network.py
Python
gpl-3.0
13,813