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
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'http://thbs600.neill.id.au' RELATIVE_URLS = F...
neillc/thbs600
publishconf.py
Python
gpl-3.0
534
# 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...
belokop/indico_bare
indico/modules/admin/__init__.py
Python
gpl-3.0
2,175
from .base import * import os import pwd import sys DEBUG=True TEMPLATE_DEBUG = DEBUG def get_username(): return pwd.getpwuid( os.getuid() )[ 0 ] CONDA_ENV_PATH = os.getenv("CONDA_ENV_PATH") ENV_NAME = os.path.split(CONDA_ENV_PATH)[1] DATABASES = { 'default': { 'ENGINE': 'django.db.backends.post...
thesgc/chembiohub_ws
deployment/settings/default.py
Python
gpl-3.0
4,286
def sqrt_value(x): import numpy as np y = np.sqrt(x) print('The original value is: ', x) print('The root of value is: ', y) print('-----------------------') print('Scipt complete') return
keoghdata/bradlib
bradlib/misc_test/sqrt_value.py
Python
gpl-3.0
216
# -*- coding: utf-8 -*- from flask import request, abort from views.baseapi import BaseApiBlueprint, BaseApiCallback class MonsterBlueprint(BaseApiBlueprint): @property def datamapper(self): return self.basemapper.monster @property def campaignmapper(self): return self.basemapper.camp...
SebastiaanPasterkamp/dnd-machine
app/views/monster.py
Python
gpl-3.0
2,730
from ipywidgets import DOMWidget, register from traitlets import Bool, Dict, Instance, Integer, Unicode, observe, Float from aipython.searchProblem import Search_problem_from_explicit_graph from ... import __version__ from .searchjsonbridge import (json_to_search_problem, search_problem_to_json, ...
AISpace2/AISpace2
aispace2/jupyter/search/searchbuilder.py
Python
gpl-3.0
1,809
#!/usr/bin/python3 # -!- encoding:utf8 -!- # ---------------------------- IMPORTS from subprocess import call from ...fs.fs import list_heatmap_streets from ...fs.fs import load_heatmap_streets from ...fs.fs import dump_heatmap_grid from ...fs.fs import dump_heatmap_psd from ...printer.printer import print_progress ...
Hexanonyme/PLD_SmartCity
Backend/api/maintenance/heatmap/process_streets.py
Python
gpl-3.0
3,008
# coding=utf-8 # Copyright (C) Alex Urban (2019) # # This file is part of the GW DetChar python package. # # GW DetChar 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...
uberpye/gwdetchar
gwdetchar/nagios/tests/test_nagios.py
Python
gpl-3.0
1,592
import json import math import urllib.parse import requests from bs4 import BeautifulSoup as bSoup from utils import utils class DarazScraper: # Declare URL and class names to picked BASE_URL = 'https://www.daraz.pk/catalog/?q={}' @staticmethod def search_item(product): # Read the page cont...
xuhaibahmad/PELL
pell/price_notifier/scrapers/DarazScraper.py
Python
gpl-3.0
2,166
#!/usr/bin/env python # -*- coding: utf-8 -*- import gi gi.require_version('Gtk', '3.0') import sys import pygame from gi.repository import Gtk from sugar3.activity.activity import Activity from sugar3.graphics.toolbarbox import ToolbarBox from sugar3.activity.widgets import ActivityToolbarButton from sugar3.graphic...
AlanJAS/iknowEditor
activity.py
Python
gpl-3.0
4,743
from django.contrib.auth.models import Group, User from django.db import models from django.utils.translation import gettext_lazy as _ class GroupContact(models.Model): """ Groups displayed in contact page and their informations. """ class Meta: verbose_name = _("Groupe de la page de contact"...
ChantyTaguan/zds-site
zds/pages/models.py
Python
gpl-3.0
982
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('wizard', '0004_auto_20150331_1815'), ] operations = [ migrations.AddField( model_name='globals', nam...
micha-shepher/oervoer-wizard
oervoer-django/oervoer/src/wizard/migrations/0005_auto_20150414_1052.py
Python
gpl-3.0
1,008
import config #This module is used for calling the Wolfram Alpha API #It defines a function that constructs an URL based on the query. #NOTE: This module returns only the URL. This URL is passed in the bot.py file. Telegram Takes care of the rest. def query(query): question = query.replace(" ","+") ...
SiddharthSham/PetAteMyHW
wolfram.py
Python
gpl-3.0
692
# Import Public Furniture listing into local database from CSV import sys sys.path.append('..') from settings import * import psycopg2 import psycopg2.extensions import csv class Point(object): def __init__(self, dataString): #clip out parenthesis, and split over comma data = dataString[1:-1].split...
daxtens/planyourpicnic
tools/import_furniture.py
Python
gpl-3.0
1,520
#!BPY # -*- coding: utf-8 -*- # """ Name: 'Glome Mesh Exporter' Blender: 259 Group: 'Export' Tooltip: 'Export meshes to Binary file format for Glome Game Renega Desruga' """ # Copyright (C) 2011 Fractal Corp. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Gene...
fr4c74l/glome
scripts/mesh_export.py
Python
gpl-3.0
8,298
#!/usr/bin/python __author__ = 'joaci' try: import time from pyfase import MicroService except Exception as e: print('require module exception: %s' % e) exit(0) class Pong(MicroService): def __init__(self): super(Pong, self).__init__(self, sender_endpoint='ipc:///tmp/sender', receiver_end...
jomorais/pyfase
examples/pingpong/pong.py
Python
gpl-3.0
655
# Utility functions # Copyright (C) 2014 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 option) any later versio...
Grumbel/rfactortools
rfactortools/util.py
Python
gpl-3.0
4,219
from channels.auth import channel_session_user,channel_session_user_from_http,http_session from channels.routing import route, route_class from channels.sessions import channel_and_http_session,channel_session import datetime import json import copy import pprint as pp from django.http import HttpResponse from django....
Degreane/PsySys
Clients/dealersRouting.py
Python
gpl-3.0
9,487
#!/usr/bin/env python from time import sleep class ButtonListener(): """ Service that polls the button status device and calls a callback funtion for each button pressed. Callback function should return a boolean to show whether or not the listening should continue. """ def __init__(se...
kd0kfo/pi_lcd_controller
python/picontroller/button_listener.py
Python
gpl-3.0
1,373
############################################################################## # # Copyright (c) 2001, 2002 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. # T...
Donkyhotay/MoonPy
zope/component/adapter.py
Python
gpl-3.0
5,839
# Our friend Monk has an exam that has quite weird rules. Each question has a difficulty level in the form of an # Integer. Now, Monk can only solve the problems that have difficulty level less than X . Now the rules are- # # Score of the student is equal to the maximum number of answers he/she has attempted without sk...
OmkarPathak/Python-Programs
CompetitiveProgramming/HackerEarth/DataStructures/Arrays/P02_Mark-The-Answer.py
Python
gpl-3.0
1,372
from scapy.all import * from veripy.assertions import * from veripy.models import ComplianceTestCase class StubFragmentHeaderTestCase(ComplianceTestCase): """ Stub Fragment Header Verify that a node accepts the offset zero fragment with the More Fragments flag clear. @private Source:...
mwrlabs/veripy
contrib/rfc2460/stub_fragment_header.py
Python
gpl-3.0
1,193
#!/home/bjs66/anaconda2/bin/python2.7 """ Created on Mon Feb 01 15:03:56 2016 @author: Nablaquabla """ import h5py import numpy as np import easyfit as ef import datetime import pytz import os # Prepare timezones and beginning of epcoch for later use utc = pytz.utc eastern = pytz.timezone('US/Eastern') epochBeginnin...
Nablaquabla/sns-analysis
_getAcceptanceVsTime.py
Python
gpl-3.0
6,613
#coding:utf8 import re import random import time import lxml.html import json def sleep(sleep_time): sleep_time=sleep_time+random.randint(-2,2) #print sleep_time if sleep_time<=0: sleep_time=0 #print('Sleeping for '+str(sleep_time)+' seconds') time.sleep(sleep_time) #print('Wake up') d...
Adoni/WeiboSpider
monitor/helper.py
Python
gpl-3.0
873
import bisect import json import progress import zoning def calculate_stream_size(stream): old_pos = stream.tell() stream.seek(0, 2) size = f.tell() stream.seek(old_pos, 0) return size class NullFeatures(object): def __init__(self, map1_len, map2_len): self._mapping = map1_len * map2_l...
ESultanik/ZoningMaps
intersect_maps.py
Python
gpl-3.0
10,096
"""Collection of DIRAC useful file related modules. .. warning:: By default on Error they return None. """ # pylint: skip-file # getGlobbedFiles gives "RuntimeError: maximum recursion depth exceeded" in pylint import os import hashlib import random import glob import sys import re import errno __RCSID__ = "$Id$"...
arrabito/DIRAC
Core/Utilities/File.py
Python
gpl-3.0
7,925
from pox.core import core import pox.openflow.libopenflow_01 as of from pox.lib.revent import * from pox.lib.util import dpidToStr from pox.lib.addresses import EthAddr, IPAddr from collections import namedtuple import pox.lib.packet as pkt import os import string,sys,socket,json, subprocess import thread log = core....
tinchoa/broflow
pox/misc/ip_s.py
Python
gpl-3.0
5,114
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, divi...
mganeva/mantid
scripts/test/SANS/gui_logic/settings_diagnostic_presenter_test.py
Python
gpl-3.0
3,279
#Generated by bots open source edi translator from UN-docs. from bots.botsconfig import * from edifact import syntax from recordsD96AUN import recorddefs structure = [ {ID: 'UNH', MIN: 1, MAX: 1, LEVEL: [ {ID: 'BGM', MIN: 1, MAX: 1}, {ID: 'DTM', MIN: 1, MAX: 35}, {ID: 'PAI', MIN: 0, MAX: 1}, {ID: 'ALI...
Micronaet/micronaet-bots
edifact2fixed_orders-desadv-invoic-aperak/usersys/grammars/edifact/INVOICD96AUNEAN008.py
Python
gpl-3.0
6,663
# coding: utf-8 """ EVE Swagger Interface An OpenAPI for EVE Online OpenAPI spec version: 0.4.6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class GetUniverseMoonsMoonIdPosition(object): """ NOTE: ...
minlexx/pyevemon
esi_client/models/get_universe_moons_moon_id_position.py
Python
gpl-3.0
4,328
#!/usr/bin/env python '''A relatively simple distributed network implementation, using async SGD.''' from fastnet import net, layer, data, parser, weights from fastnet.util import EZTimer from mpi4py import MPI import ctypes import cudaconv2 import numpy as np import os WORLD = MPI.COMM_WORLD cudaconv2.init(WORLD....
rjpower/fastnet
fastnet/distributed/asgd.py
Python
gpl-3.0
4,309
__author__ = 'joseph' import statistics import numpy as np class AccelData(object): def __init__(self,Accel): #Static accelerometer data self.Accel = Accel def applyCalib(self,params,Accel): ax = params['ax'] ay = params['ay'] az = params['az'] scaling_Matrix ...
jchrismer/PiQuad
Calibration/Inertial_Calibration.py
Python
gpl-3.0
9,316
# -*- coding: utf-8 -*- # Copyright 2007-2016 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...
to266/hyperspy
hyperspy/_components/eels_cl_edge.py
Python
gpl-3.0
14,359
import os import rospkg import lxml.etree as ET from openag_brain import params from openag.models import SoftwareModule, SoftwareModuleType from openag.db_names import SOFTWARE_MODULE, SOFTWARE_MODULE_TYPE # maping from python types to roslaunch acceptable ones PARAM_TYPE_MAPPING = {'float' : 'double'} def create_n...
serein7/openag_brain
src/openag_brain/commands/update_launch.py
Python
gpl-3.0
5,299
#!/usr/bin/env python # coding: utf-8 import argparse import sys import yaml from pyarlo import PyArlo def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--username', '-u') parser.add_argument('--password', '-p') parser.add_argument('--config', '-c', ty...
pschmitt/hass-config
scripts/arlo-mode.py
Python
gpl-3.0
1,367
#!/usr/bin/env python # # Copyright 2011,2013 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 optio...
Gabotero/GNURadioNext
gr-vocoder/python/qa_ulaw_vocoder.py
Python
gpl-3.0
1,610
# -*- coding: utf-8 -*- # * Authors: # * TJEBBES Gaston <g.t@majerti.fr> # * Arezki Feth <f.a@majerti.fr>; # * Miotte Julien <j.m@majerti.fr>; from autonomie.utils.files import ( encode_path, decode_path, issubdir, filesizeformat, ) def test_encode_decode(): st = u"$deù % ù$ùdeù ...
CroissanceCommune/autonomie
autonomie/tests/utils/test_files.py
Python
gpl-3.0
850
#!/usr/bin/python ############################################################ # Generates commands for the muscle alignment program ############################################################ import sys, os, core, argparse ############################################################ # Options parser = argparse.Arg...
gwct/core
python/generators/muscle_gen.py
Python
gpl-3.0
5,889
from __future__ import absolute_import import ast import re import operator as op import pyparsing from ..exceptions import CloudflareSolveError from . import JavaScriptInterpreter # ------------------------------------------------------------------------------- # _OP_MAP = { ast.Add: op.add, ...
alfa-addon/addon
plugin.video.alfa/lib/cloudscraper/interpreters/native.py
Python
gpl-3.0
8,626
from test_basics import setUp, app def test_visit_login(): r = app.get('/mod/login') assert "<form name=\"login\"" in r def test_login(): r = app.get('/mod/login') r.form['username'] = 'admin' r.form['password'] = 'adminadmin1' r = r.form.submit() assert "You are now logged in" in r
sixohsix/xychan
tests/test_user.py
Python
gpl-3.0
315
from contrib.rfc3736.builder import * from contrib.rfc3736.constants import * from contrib.rfc3736.dhcpv6 import DHCPv6Helper from scapy.all import * from veripy.assertions import * class MessageValidationHelper(DHCPv6Helper): def run(self): q = self.restart_and_wait_for_information_request(self.node(1),...
mwrlabs/veripy
contrib/rfc3736/client/client_message_validation.py
Python
gpl-3.0
8,446
import gtk from plugin_base.find_extension import FindExtension class SizeFindFiles(FindExtension): """Size extension for find files tool""" def __init__(self, parent): FindExtension.__init__(self, parent) # create container table = gtk.Table(2, 4, False) table.set_border_wi...
Hammer2900/SunflowerX
application/plugins/find_file_extensions/size.py
Python
gpl-3.0
2,732
from .people import IDPersonScraper from .bills import IDBillScraper from utils import url_xpath, State # from .committees import IDCommitteeScraper class Idaho(State): scrapers = { "people": IDPersonScraper, # 'committees': IDCommitteeScraper, "bills": IDBillScraper, } legislativ...
sunlightlabs/openstates
scrapers/id/__init__.py
Python
gpl-3.0
4,859
from __future__ import unicode_literals import datetime from django.db import models from django.utils import timezone # Create your models here. class Question(models.Model): question_text = models.CharField(max_length=200) pub_date = models.DateTimeField('date published') def __str__(self): return self.q...
lilcorey/django_clemson_specials
polls/models.py
Python
gpl-3.0
696
''' Coursera: - Software Defined Networking (SDN) course -- Network Virtualization Professor: Nick Feamster Teaching Assistant: Arpit Gupta ''' from pox.core import core from collections import defaultdict import pox.openflow.libopenflow_01 as of import pox.openflow.discovery import pox.openflow.spanning_tree from ...
pragya1990/pox_whole_code
pox/misc/videoSlice1.py
Python
gpl-3.0
10,272
# -*- coding: utf-8 -*- """ Grill logging module. """ # standard from __future__ import annotations import logging from pathlib import Path from naming import NameConfig from grill.names import DateTimeFile _LOG_FILE_SUFFIX = 'log' class ErrorFilter(logging.Filter): """ Pass any message meant for stderr. ...
chrizzFTD/grill
grill/logger/model.py
Python
gpl-3.0
1,265
from django.conf.urls import url from annotate import views urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^create$', views.create_annotation, name='create'), url(r'^edit$', views.edit_annotation, name='edit'), url(r'^json$', views.export_json, name='export_json'), url(r'^rdf$', views...
opensemanticsearch/open-semantic-search-apps
src/annotate/urls.py
Python
gpl-3.0
494
# pygen.py # Copyright (C) 2006, 2007, 2008, 2009, 2010 Michael Bayer mike_mp@zzzcomputing.com # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """utilities for generating and formatting literal Python code.""" import re, string from ...
codendev/rapidwsgi
src/mako/pygen.py
Python
gpl-3.0
10,042
# Copyright (C) 2013-2016 2ndQuadrant Italia Srl # # This file is part of Barman. # # Barman 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...
hareevs/pgbarman
tests/test_output.py
Python
gpl-3.0
36,915
import os import sys import json import yaml import getpass import boto """ Configure VDC instance, or read config'd settings into class This will read a default yaml file and output to a instance-specific file, to be read by processes as needed """ from reporting import ErrorObject from global_vars import * cla...
yro/openveda
openveda/config.py
Python
gpl-3.0
6,037
from django.db import models # Create your models here. class Record(models.Model): description=models.TextField() distance=models.IntegerField() reg_date=models.DateTimeField('date published') reg_user=models.IntegerField()
speedyGonzales/RunTrainer
record/models.py
Python
gpl-3.0
244
class Person: def __init__(self): self.name = 'jeff' self.age = 10 p = Person() print(p.__dict__)
mikeckennedy/python-data-driven-nov9
playground/classdict.py
Python
gpl-3.0
121
# -*- coding: utf-8 -*- # Action Launcher Bot: This is a bot how can execute differents actions depends commands # Code wrote by Zagur of PortalLinux.es and modified by NeoRanger of neositelinux.com # For a good use of the bot please read the README file import telebot from telebot import types import time ...
neoranger/ActionLauncher
action_launcher.py
Python
gpl-3.0
8,866
#!/usr/bin/env python "This module contains an object that represents an action." class Action(object): """This object represents an action. Use :class:`Action` methods to get instances of this class. Attributes: name (int): target (str): text (str): markup (str): ...
raelga/pybot
pybot/common/action.py
Python
gpl-3.0
957
""" # Notes: - This simulation seeks to emulate the COBAHH benchmark simulations of (Brette et al. 2007) using the Brian2 simulator for speed benchmark comparison to DynaSim. However, this simulation includes CLOCK-DRIVEN synapses, for direct comparison to DynaSim's clock-driven architecture. The synaptic connec...
asoplata/dynasim-benchmark-brette-2007
Brian2/brian2_benchmark_COBAHH_clocksyn_hidens_compiled_0001.py
Python
gpl-3.0
3,932
''' available factories: feed_forward_perceptron ''' import numpy from mlpdata import MLPData class zero_matrix(object): def __init__(self, rows, cols): self.__rows = rows self.__cols = cols def rows(self): return self.__rows def cols(self): return self.__c...
aolsux/DeepThought
deepthought/factories.py
Python
gpl-3.0
1,527
#!/usr/bin/env python # Abraxas Collaborative Password Utility Documentation # # Converts a restructured text version of the manpages to nroff. # License {{{1 # 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 Softwa...
KenKundert/abraxas
manpage.py
Python
gpl-3.0
83,088
# -*- coding: utf-8 -*- # Brandeis - A tool to convert plaintext court cases (from the lochner # tool: http://gitorious.org/lochner/) to wikitext. # # Copyright (C) 2013 Molly White # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publ...
molly/brandeis
tests/testvalidator.py
Python
gpl-3.0
3,946
'''Proxy support for HTTP requests.''' import asyncio import base64 import io import logging import wpull.string from wpull.errors import NetworkError from wpull.network.pool import ConnectionPool from wpull.protocol.http.request import RawRequest from wpull.protocol.http.stream import Stream _logger = logging.getLog...
chfoo/wpull
wpull/proxy/client.py
Python
gpl-3.0
5,519
"""Triton Daemon - Communication server for Oxford Triton system The Triton fridge already has communication capacity to directly control and read both the temperatures and other elements of the fridge (pressure sensors, valves, compressor, ...). However, the Triton logging uses binary format files that can only be o...
yausern/stlab
devices/TritonDaemon/TritonDaemon.py
Python
gpl-3.0
4,577
# -*- coding: utf-8 -*- import os import lxml.etree import io from . import pipeline_item import core.docvert_exception class GeneratePostConversionEditorFiles(pipeline_item.pipeline_stage): def stage(self, pipeline_value): return pipeline_value
holloway/docvert-python3
core/pipeline_type/generatepostconversioneditorfiles.py
Python
gpl-3.0
263
# -*- coding: utf-8 -*-. import dxf2gmlcatastro # carpeta de trabajo path = '/carpeta/archivos/' # define archivos dxf = 'parcelacad.dxf' gml = 'catastrogml.gml' #Define variables dxffile = path + dxf gmlfile = path + gml src = '25830' # Crea GML dxf2gmlcatastro.crea_gml(dxffile, gmlfile, src) #Añade capa GML a QG...
sigdeletras/dxf2gmlcatastro
ejemplo/catastroqgis.py
Python
gpl-3.0
383
#! /usr/bin/python class A1(object): def method(*argv): return argv a = A1() print 'Call a.method() ->', a.method() print 'Call a.method(1,2,3) ->', a.method(1,2,3) print ''' !! Note that the \'a\' instance is passed (implicitely) as the first !! function parameter (something like <__main__.A1 ob...
xanthospap/chaos-ngpt
mipy/class-static-mths.py
Python
gpl-3.0
2,368
from electrum_doge.util import print_error import httplib, urllib import socket import threading import hashlib import json from urlparse import urlparse, parse_qs try: import PyQt4 except Exception: sys.exit("Error: Could not import PyQt4 on Linux systems, you may try 'sudo apt-get install python-qt4'") from...
electrumalt/electrum-doge
plugins/labels.py
Python
gpl-3.0
9,169
# To change this license header, choose License Headers in Project Properties. # To change this template file, choose Tools | Templates # and open the template in the editor. import unittest from context import src class NewTestCase(unittest.TestCase): def test_connections_handling(self): assert sr...
Drrechu/rna2d
tests/TestConnections.py
Python
gpl-3.0
610
#! /usr/bin/env python # -*- coding: utf-8 -*- import json import cgi import urllib2 #取得本机外网IP myip = urllib2.urlopen('http://members.3322.org/dyndns/getip').read() myip=myip.strip() #加载SSR JSON文件 f = file("/usr/local/shadowsocksr/mudb.json"); json = json.load(f); # 接受表达提交的数据 form = cgi.FieldStorage() # 解析处理提交的数据 g...
zhaifangzhi/1
www/cgi-bin/show_info.py
Python
gpl-3.0
3,348
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('search', '0003_auto_20150321_1848'), ] operations = [ migrations.AddField( model_name='searchquery', ...
IllegalCactus/argument-workbench
querytool/search/migrations/0004_searchquery_scope.py
Python
gpl-3.0
437
""" Module defining priors. Copyright (C) 2016 Suzanne Aigrain 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 ver...
OxES/k2sc
src/priors.py
Python
gpl-3.0
2,483
# Demo code for statistical analysis of computational model (simulated data) Ito et al., 2017 # Takuya Ito (takuya.ito@rutgers.edu) # Citation: Ito T, Kulkarni KR, Schultz DH, Mill RD, Chen RH, Solomyak LI, Cole MW (2017). Cognitive task information is transferred between brain regions via resting-state netw ork top...
ColeLab/informationtransfermapping
TheoreticalResults/analysis.py
Python
gpl-3.0
9,130
#!/usr/bin/python from PyQt4 import QtCore, QtGui class Bubble(QtGui.QLabel): def __init__(self,text): super(Bubble,self).__init__(text) self.setContentsMargins(5,5,5,5) def paintEvent(self, e): p = QtGui.QPainter(self) p.setRenderHint(QtGui.QPainter.Antialiasing,True) ...
shrinidhi666/rbhus
tests/conversationBox.py
Python
gpl-3.0
1,444
# coding: utf-8 """ EVE Swagger Interface An OpenAPI for EVE Online OpenAPI spec version: 0.4.6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class GetUniverseSystemKillsInternalServerError(object): """...
minlexx/pyevemon
esi_client/models/get_universe_system_kills_internal_server_error.py
Python
gpl-3.0
3,107
#!/usr/bin/env python3 """ Setup for root_script. """ # core python libaries import setuptools # third party libaries # custom libraries setuptools.setup()
craig5/python-samples
root_script/{{cookiecutter.proj_name}}/setup.py
Python
gpl-3.0
158
import math def poohbear(code): out = [] step = 1024 capa = step mem = bytearray('\0' * capa, 'ascii') mc = capa // 2 copied = None loop = [] cl = len(code) cc = 0 while cc < cl: c = code[cc] if c == '+': mem[mc] = 0 if mem[mc] == 255 else mem[mc] +...
rexfrommars/havefun
python/RawEdoc/esolang/_poohbear.py
Python
gpl-3.0
2,092
from .MetadataDict import MetadataDict from .Job import JobInfo, Job, JobStatusError, JobError
ganga-devs/ganga
ganga/GangaCore/GPIDev/Lib/Job/__init__.py
Python
gpl-3.0
96
""" Syncronize with OPIMD General information about opimd is available here (L{http://wiki.openmoko.org/wiki/Opimd}). This file is part of Pisi. Pisi 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 vers...
kichkasch/pisi
modules/contacts_opimd.py
Python
gpl-3.0
12,467
f = open("Sorted_Files.csv") j = open("File_Percentages.csv",'w') lines = f.readlines() lineCount = 0 percentages = [] print("How many months were there?") total = input() print(int(total)) for line in lines: if lineCount == 0: lineCount +=1 continue num = line.split(",")[1] fi = lin...
Samathy/MinorityReport
get_percentages.py
Python
gpl-3.0
546
#!/usr/bin/env python import fileinput import sys import re t0first=len(sys.argv) < 2 or sys.argv[1] != "1" t0firstLayers=sys.argv[2:] if len(t0firstLayers) == 0: t0firstLayers=map(str,range(0,1000)) # t0firstLayers=["0"] numeric="([-+]?(?:(?: \d* \. \d+ )|(?: \d+ \.? )))" rX=re.compile("X"+numeric,re.VERBOS...
vectorgraphics/robox
bin/firstnozzle.py
Python
gpl-3.0
5,461
import sys from math import sqrt def opr(f): def op(registers, args): registers[args[2]] = f(registers[args[0]], registers[args[1]]) return op def opi(f): def op(registers, args): registers[args[2]] = f(registers[args[0]], args[1]) return op def opir(f): def op(registers, args)...
plilja/adventofcode
2018/day19/day19.py
Python
gpl-3.0
2,591
#!/usr/bin/python # Copyright (c) 2010, Ciaran Farrell <cfarrell1980@gmail.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted # provided that the following conditions are met: # # * Redistributions of source code must retain the above copyri...
jnweiger/buttermill
scripts/buttermill_parse.py
Python
gpl-3.0
11,423
from flask_sqlalchemy import SQLAlchemy from sqlalchemy.orm import relationship from sqlalchemy.sql import func db = SQLAlchemy() class BaseTable(db.Model): __abstract__ = True updated = db.Column(db.DateTime, default=func.now(), onupdate=func.current_timestamp()) created = db.Column(db.DateTime, default=func....
Salamek/git-deploy
git_deploy/database.py
Python
gpl-3.0
3,246
"""overflow URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-ba...
TIY-Durham/TIY-Overflow
api/overflow/urls.py
Python
gpl-3.0
1,416
import re import time import isodate import requests from cloudbot import hook from cloudbot.util import timeformat from cloudbot.util.formatting import pluralize from cloudbot.util.colors import parse youtube_re = re.compile(r'(?:youtube.*?(?:v=|/v/)|youtu\.be/|yooouuutuuube.*?id=)([-_a-zA-Z0-9]+)', re.I) base_url...
paris-ci/CloudBot
plugins/youtube.py
Python
gpl-3.0
6,992
#! /usr/bin/env python # # python script to generate a valid stepfile for WRF cycling # import sys import pandas import calendar filename = 'stepfile' # default filename lleap = True # allow leap days (not used in some GCM calendars) lecho = False lperiod = False dateargs = [] # list of date arguments passed to date_...
aerler/WRF-Tools
Python/wrfrun/generateStepfile.py
Python
gpl-3.0
4,142
# Copyright 2016 Casey Jaymes # This file is part of PySCAP. # # PySCAP is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # PySCAP is ...
cjaymes/pyscap
src/scap/model/xnl_2_0/GeneralSuffixElement.py
Python
gpl-3.0
962
#!/usr/bin/python # # aes.py: implements AES - Advanced Encryption Standard # from the SlowAES project, http://code.google.com/p/slowaes/ # # Copyright (c) 2008 Josh Davis ( http://www.josh-davis.org ), # Alex Martelli ( http://www.aleax.it ) # # Ported from C code written by Laurent Haan ( http://www.prog...
AdamISZ/joinmarket_core
joinmarket_core/slowaes.py
Python
gpl-3.0
28,009
#!/usr/bin/env python from ciscoconfparse import CiscoConfParse def main(): cisco_cfg = CiscoConfParse("cisco_ipsec.txt") cr_map_list = cisco_cfg.find_objects(r"^crypto map CRYPTO") for item in cr_map_list: print item.text for child in item.children: print child.text if __name__ == "__main__": main() ...
Paricitoi/python_4_eng
python_week1/v2/week1_ex8v2.py
Python
gpl-3.0
321
#!/usr/bin/python import simplejson as json i = open('/proc/cpuinfo') my_text = i.readlines() i.close() username = "" for line in my_text: line = line.strip() ar = line.split(' ') if ar[0].startswith('Serial'): username = "a" + ar[1] if not username: exit(-1) o = open('/home/pi/.cgminer/c...
glukolog/calc256
cgserial.py
Python
gpl-3.0
673
"This module provides uniform and local mesh refinement." # Copyright (C) 2009 Anders Logg # # This file is part of DOLFIN. # # DOLFIN 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 o...
alogg/dolfin
site-packages/dolfin/mesh/refinement.py
Python
gpl-3.0
2,329
from odoo import api from odoo import fields from odoo import models class booking_settings(models.Model): _name="booking.settings" post_booking_time = fields.Integer('Post Booking Time') pre_booking_time = fields.Integer('Pre Booking Time') # Post Booking Time – Numeric field # Pre Booking Time ...
romeoabulencia/booking_order
models/booking_setting.py
Python
gpl-3.0
888
# Glotaran package __init__.py from . import model, parameter, io # noqa: F401 __version__ = '0.0.10' ParameterGroup = parameter.ParameterGroup read_parameter_from_csv_file = ParameterGroup.from_csv read_parameter_from_yml = ParameterGroup.from_yaml read_parameter_from_yml_file = ParameterGroup.from_yaml_file fr...
glotaran/glotaran
glotaran/__init__.py
Python
gpl-3.0
577
# -*- coding: UTF-8 -*- # # Copyright (C) 2013 Alan Pipitone # # This file is part of Al'EXA-IDE. # # Al'EXA-IDE 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 o...
AlexaProjects/Alexa2
ALEXA-IDE/core/user_files/alexa_ide/addins/plugins/alexatools/windowcropregion.py
Python
gpl-3.0
8,071
""" This file is part of Freeermind. Freeermind 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. ...
tectronics/freeermind
src/gui/dialog.py
Python
gpl-3.0
3,910
""" Low level *Skype for Linux* interface implemented using *XWindows messaging*. Uses direct *Xlib* calls through *ctypes* module. This module handles the options that you can pass to `Skype.__init__` for Linux machines when the transport is set to *X11*. No further options are currently supported. Warning PyGTK fr...
jpablobr/emacs.d
vendor/misc/emacs-skype/build/Skype4Py/Skype4Py/api/posix_x11.py
Python
gpl-3.0
17,077
from operator import itemgetter import logging def test_coder(): # original = [1,2,3,3,3,4,18,18,2,3,4,4,4,5] # original = [1, 2, 3, 3, 3, 4, 18, 18, 2, 3, 4, 4, 4, 5, 44, 44, 45, 46, 46, 46, 49, 49, 49, 45] original = [1, 2, 0, 0, 0, 0, 3, 3, 3, 4, 18, 18, 2, 3, 4, 4, 4, 5, 44, 44, 45, 46, 46, 46, 49, 4...
zolyomiake/400
rle_coder.py
Python
gpl-3.0
3,975
""" Django settings for mutual_funds project. Generated by 'django-admin startproject' using Django 1.9.9. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import ...
ArtemBernatskyy/FundExpert.NET
mutual_funds/settings.py
Python
gpl-3.0
6,336
#!/usr/bin/python # ------------------------------------------------------------------------------------ # FileName: memory_cfg.py # Copyright (c) 2008 - 2010 Shen Zhen Coship Electronics CO., LTD. # # Version: Ver 1.0 # Author: wuzhengbing (wuzhengbing@coship.com) # # File Description: # ...
footoflove/coship
TestCase/test/main/memory_cfg.py
Python
gpl-3.0
23,733
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import logging import argparse #import subprocess import json import pywemo import urllib.request import urllib.error import urllib.parse import socketserver from datetime import datetime __version__ = '0.93' logging.basicConfig(level=logging.DEBUG, ...
minscof/wemoJeedomPlugin
resources/wemo_server.py
Python
gpl-3.0
16,264
# -*- coding: utf-8 -*- # # diffoscope: in-depth comparison of files, archives, and directories # # Copyright © 2015 Jérémy Bobbio <lunar@debian.org> # # diffoscope 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 Foundati...
bnewbold/diffoscope
tests/comparators/test_debian.py
Python
gpl-3.0
5,786
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2019-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...
forkbong/qutebrowser
tests/unit/browser/webkit/test_webkitsettings.py
Python
gpl-3.0
1,119
#!/usr/bin/env python import mirheo as mir ranks = (1, 1, 1) domain = (4, 4, 4) u = mir.Mirheo(ranks, domain, debug_level=3, log_filename='log', no_splash=True) u.save_dependency_graph_graphml("tasks.full", current=False) # sTEST: dump.graph.full # cd dump # rm -rf tasks.graphml # mir.run --runargs "-n 1" ./graph...
dimaleks/uDeviceX
tests/dump/graph.full.py
Python
gpl-3.0
371