code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
import json import jwt import logging import os logger = logging.getLogger(__name__) logging.basicConfig(level=logging.DEBUG) client_id = os.environ["SLACK_CLIENT_ID"] client_secret = os.environ["SLACK_CLIENT_SECRET"] redirect_uri = os.environ["SLACK_REDIRECT_URI"] scopes = ["openid", "email", "profile"] from slack_...
slackhq/python-slackclient
integration_tests/samples/openid_connect/sanic_example.py
Python
mit
4,583
import numpy as np from scipy import constants as cst import pyfits as pf from pyfits import Column from time import sleep import matplotlib as mpl from matplotlib import pyplot as plt #import codecs #verifier l'organisation des cubes fits si on les ouvre en python #faire un programme readad qui voit l'extension pour ...
b1quint/samfp
other/pyadhoc.py
Python
bsd-3-clause
8,475
#!/usr/bin/python # Purpose: accept table and aguments for run_oozie_workflow.py import sys, os, fileinput, errno, datetime, commands, re, string, envvars, time import shutil from optparse import OptionParser import subprocess from subprocess import Popen, PIPE def arg_handle(): usage = "usage: run_gen.py (optio...
rbheemana/Sqoop-Automated
code/scripts/run_hive_create.py
Python
apache-2.0
8,083
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright © 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
Framework/PythonInterface/test/python/mantid/kernel/FacilityInfoTest.py
Python
gpl-3.0
1,892
# -*- coding: utf-8 -*- # # Copyright (C) 2003-2016 Sébastien Helleu <flashcode@flashtux.org> # # This file is part of WeeChat.org. # # WeeChat.org 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 versio...
Mkaysi/weechat.org
weechat/themes/urls.py
Python
gpl-3.0
2,147
#!/usr/bin/env python from subprocess import Popen,PIPE import time,sys,argparse reload(sys) sys.setdefaultencoding('utf-8') temperature_file="/sys/class/thermal/thermal_zone0/temp" parser = argparse.ArgumentParser(description="Get the Raspberry Pi's temperature") parser.add_argument("-p","--precision", action="st...
radzima/pitemp
pitemp.py
Python
mit
2,025
from __future__ import (absolute_import, division, print_function, unicode_literals) import binascii from six.moves import cPickle as pickle from struct import Struct from itsdangerous import Serializer, URLSafeSerializerMixin class CookieSerializer(Serializer): packer = Struct(str('16s...
storborg/gimlet
gimlet/serializer.py
Python
mit
1,529
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) Philipp Wagner. All rights reserved. # Licensed under the BSD license. See LICENSE file in the project root for full license information. import sys import os import cv2 import numpy as np class Detector: def detect(self, src): raise NotImplementedErr...
dashmoment/facerecognition
py/facedet/detector.py
Python
bsd-3-clause
5,068
import os import sys import unittest from zipimport import zipimporter from django.utils.importlib import import_module from django.utils.module_loading import module_has_submodule class DefaultLoader(unittest.TestCase): def test_loader(self): "Normal module existence can be tested" test_module = ...
adviti/melange
thirdparty/google_appengine/lib/django_1_2/tests/regressiontests/utils/module_loading.py
Python
apache-2.0
4,790
""" This is the implementation of Copy-NET We start from the basic Seq2seq framework for a auto-encoder. """ import logging import time import numpy as np import sys import copy from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams from experiments.config import setup_lcsts, setup_weibo, setup_syn from...
MingyuanXie/CopyNet
experiments/lcsts_vest.py
Python
mit
9,913
'Link to manual - http://www.infocus.com/resources/documents/IN11xa-IN12xa-IN212xa%20RS232.pdf' DEFAULT_ADMINPORT = 10008 # Extron Bridge 2001 - 2004 param_ipAddress = Parameter({'title': 'IP address', 'schema': {'type': 'string'}}) param_adminPort = Parameter({'title': 'Admin port', 'schema': {'type': 'integer', 'h...
museumvictoria/nodel-recipes
InFocus IN126STa/script.py
Python
mit
4,314
#################################################################################################### # # PyDvi - A Python Library to Process DVI Stream # Copyright (C) 2014 Fabrice Salvaire # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
FabriceSalvaire/PyDVI
PyDviGui/Tools/Path.py
Python
gpl-3.0
2,735
import unittest from skymap.atlas.cambridge_star_atlas import ( CambridgeStarAtlasPage, CambridgeStarAtlasLegend, CambridgeStarAtlasMap, ) class MapInterfaceTest(unittest.TestCase): def test_interface_conic(self): chart_number = 2 c = CambridgeStarAtlasPage("map_test1") Cambrid...
rzinkstok/skymap
test/test_map_interface.py
Python
gpl-3.0
1,456
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2019 Athanasios Theocharis <athatheoc@gmail.com> # This was made under ESA Summer of Code in Space 2019 # by Athanasios Theocharis, mentored by Daniel Estevez # # This file is part of gr-satellites # # SPDX-License-Identifier: GPL-3.0-or-later # from gnuradio...
daniestevez/gr-satellites
python/ccsds/telemetry_packet_reconstruction.py
Python
gpl-3.0
2,817
import json import sys import os import yaml from .data import ContactInfo __all__ = ['query_google_for_names', 'get_unitedstates_for_MoC', 'get_MoCs'] def query_google_for_names(address, key='AIzaSyBDUwLqoWAiAS4sTfFccdaz583W060jbok'): py3 = sys.version_info >= (3, 0) url = 'ht...
bmorris3/make_contact
utils/query.py
Python
mit
2,325
import logging import os from cliff.lister import Lister import tvrage class EpisodeList(Lister): """list episodes""" log = logging.getLogger(__name__) def get_parser(self, prog_name): parser = super(EpisodeList, self).get_parser(prog_name) self.app.add_default_args(parser) pars...
dasevilla/tvragecli
tvragecli/list.py
Python
mit
2,030
import time #import numpy as np import pandas as pd import timeit #import seaborn as sns start = time.time() userMap = pd.read_csv("../data/train_usr-dst-clst-count.csv.gz", index_col = [0,1]) print("done reading {} lines in {} secs.".format(len(userMap.index), time.time() - start)) print("monotonic: {}".format(userM...
goerlitz/kaggle-expedia
python/pandas_dict_test.py
Python
mit
1,428
# -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 import os import re from django.core.management.base import BaseCommand from django.conf import settings import app.monkey_patch from ... import models class Command(BaseCommand): """ """ help = 'migrate timelines to new path' args = '' def hand...
maysara/pandora_image
pandora/archive/management/commands/migrate_timelines.py
Python
gpl-3.0
1,543
# Copyright (C) 2012-2020 Internet Systems Consortium. # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET ...
isc-projects/forge
tests/protosupport/v6/srv_msg.py
Python
isc
45,127
# -*- coding: utf-8 -*- from datetime import datetime from decimal import Decimal from django.db import models from django.db.models import Q from django.db.models.signals import post_save from django.contrib.auth.models import User from markitup.fields import MarkupField from symposion.proposals.models import Prop...
NelleV/pyconfr-test
symposion/reviews/models.py
Python
bsd-3-clause
12,367
from src.heap import Heap from collections import deque """ Shortest Path Tree (SPT) is a structure that is built from the original weighted directed graph. It holds the shortest paths from a single source node to every other node from the original graph. """ class Dijkstra: """ Creates a shortest path tree...
all3fox/algos-py
src/graph/spt.py
Python
mit
3,205
''' All constant data used in the package should be defined here. ''' from collections import OrderedDict as BASE_DICT BLENDING_TYPES = type('Blending', (), { 'NONE': 'NoBlending', 'NORMAL': 'NormalBlending', 'ADDITIVE': 'AdditiveBlending', 'SUBTRACTIVE': 'SubtractiveBlending', 'MULTIPLY': 'Multip...
flimshaw/three.js
utils/exporters/blender/addons/io_three/constants.py
Python
mit
8,136
#!/usr/bin/env python """Implementation of configuration_file types.""" from grr.lib.rdfvalues import structs from grr.proto import config_file_pb2 class LogTarget(structs.RDFProtoStruct): """An RDFValue represenation of a logging target.""" protobuf = config_file_pb2.LogTarget class LogConfig(structs.RDFProtoS...
pidydx/grr
grr/lib/rdfvalues/config_file.py
Python
apache-2.0
2,080
# Generated by Django 2.0 on 2018-01-03 11:22 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('edc_locator', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='subjectlocator', options={'verbose...
botswana-harvard/edc-locator
edc_locator/migrations/0002_auto_20180103_1322.py
Python
gpl-2.0
1,033
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 VMware, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/lice...
subramani95/neutron
neutron/tests/unit/test_routerserviceinsertion.py
Python
apache-2.0
18,053
from core.himesis import Himesis, HimesisPreConditionPatternLHS import uuid class HUnitR07b_CompleteLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the AToM3 model HUnitR07b_CompleteLHS """ # Flag this instance as compiled now self.is_compiled = True sup...
levilucio/SyVOLT
UMLRT2Kiltera_MM/Properties/unit_contracts/HUnitR07b_CompleteLHS.py
Python
mit
4,265
# -*- coding: utf-8 -*- # # namcap tests - infodirectory # Copyright (C) 2011 Rémy Oudompheng <remy@archlinux.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of th...
anatol/namcap
Namcap/tests/package/test_infodirectory.py
Python
gpl-2.0
2,400
#!/usr/bin/env python3 # # Copyright (c) 2019, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
jwhui/openthread
tests/scripts/thread-cert/pktverify/layer_fields.py
Python
bsd-3-clause
26,646
""" saltrepo ~~~~~~~~ SaltStack Repository Sphinx directives """ def source_read_handler(app, docname, source): if "|repo_primary_branch|" in source[0]: source[0] = source[0].replace( "|repo_primary_branch|", app.config.html_context["repo_primary_branch"] ) def setup(app...
saltstack/salt
doc/_ext/saltrepo.py
Python
apache-2.0
498
from ..._misc import tlobject class TLMessage(tlobject.TLObject): """ https://core.telegram.org/mtproto/service_messages#simple-container. Messages are what's ultimately sent to Telegram: message msg_id:long seqno:int bytes:int body:bytes = Message; Each message has its own unique identifier...
LonamiWebs/Telethon
telethon/types/_core/tlmessage.py
Python
mit
1,085
# # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2015 Star2Billing S.L. # # The primar...
Star2Billing/newfies-dialer
newfies/calendar_settings/models.py
Python
mpl-2.0
4,044
#!/usr/bin/env python # # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
dtroyer/dwarf
tests/api/test_image.py
Python
apache-2.0
5,499
# -*- coding: utf-8 -*- from odoo.addons.account.tests.account_test_classes import AccountingTestCase class StockMoveInvoice(AccountingTestCase): def setUp(self): super(StockMoveInvoice, self).setUp() self.ProductProduct = self.env['product.product'] self.SaleOrder = self.env['sale.order...
chienlieu2017/it_management
odoo/addons/delivery/tests/test_delivery_stock_move.py
Python
gpl-3.0
3,091
from common.methods import set_progress from infrastructure.models import Environment import boto3 RESOURCE_IDENTIFIER = 'cluster_name' def connect_to_redshift(env): """ Return boto connection to the redshift in the specified environment's region. """ rh = env.resource_handler.cast() return boto3...
CloudBoltSoftware/cloudbolt-forge
blueprints/aws_redshift/sync.py
Python
apache-2.0
2,046
""" timeparse.py Implements a single function, `timeparse`, which can parse various kinds of time expressions. Created By: - Will Roberts <wildwilhelm@gmail.com> Maintainer: - Luke Rogers <https://github.com/lukeroge> License: MIT License Copyright Will Roberts <wildwilhelm@gmail.com> - 1 February, ...
weylin/CloudBot
cloudbot/util/timeparse.py
Python
gpl-3.0
6,244
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class RefundsDashboardConfig(AppConfig): label = 'refunds_dashboard' name = 'ecommerce.extensions.dashboard.refunds' verbose_name = _('Refunds Dashboard')
janusnic/ecommerce
ecommerce/extensions/dashboard/refunds/config.py
Python
agpl-3.0
259
import httplib2 from oauth2client import client from google.appengine.api import memcache from oauth2client.client import flow_from_clientsecrets import os __all__ = ['OAuthClientService'] class OAuthClientService(object): def __init__(self): CLIENT_SECRETS = os.path.join(os.path.dirname(__file__), 'client...
tongpa/PollSurveyWeb
pollandsurvey/service/oauthclientservice.py
Python
gpl-2.0
510
import tempfile import shutil import os from selenium import webdriver import bok_choy.browser from unittest import TestCase from mock import patch from .pages import ButtonPage, JavaScriptPage class TestBrowser(TestCase): @patch.dict(os.environ, {'SELENIUM_BROWSER': 'firefox'}) def test_local_browser(self)...
drptbl/bok-choy
tests/test_browser.py
Python
apache-2.0
2,667
#/u/GoldenSights import praw # simple interface to the reddit API, also handles rate limiting of requests import time import os import sys import sqlite3 '''USER CONFIGURATION''' USERNAME = "" #This is the bot's Username. In order to send mail, he must have some amount of Karma. PASSWORD = "" #This is the bot's Pass...
tehp/reddit
Automail/automail.py
Python
mit
3,005
#!/usr/bin/env python # coding: utf-8 # Copyright (c) 2012, Machinalis S.R.L. # This file is part of quepy and is distributed under the Modified BSD License. # You should have received a copy of license in the LICENSE file. # # Authors: Rafael Carrascosa <rcarrascosa@machinalis.com> # Gonzalo Garcia Berrotara...
apostolosSotiropoulos/interQuepy
tests/test_quepyapp.py
Python
bsd-3-clause
3,306
# # environment.py # # Requires python 2.3 # # Written by Fred Isaman <iisaman@citi.umich.edu> # Copyright (C) 2004 University of Michigan, Center for # Information Technology Integration # import time import testmod from xdrdef.nfs4_const import * from xdrdef.nfs4_type import * import rpc import ...
gilamsalem/pynfs
nfs4.1/server41tests/environment.py
Python
gpl-2.0
22,898
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('gallery', '0001_initial'), ] ope...
jsmesami/naovoce
src/gallery/migrations/0002_image_author.py
Python
bsd-3-clause
598
import uuid import abc import json from sqlalchemy.ext.declarative import declarative_base, DeclarativeMeta from sqlalchemy.dialects.postgresql import JSON from sqlalchemy.types import TypeDecorator, CHAR from sqlalchemy.dialects.postgresql import UUID from sqlalchemy_utils import Timestamp from app import db class...
RafaAguilar/job-dispatcher
models/core_models.py
Python
gpl-3.0
9,066
# smallest multiple maxmult = int(input("What is the max multiple? ")) found = False smallest = 0 current = maxmult while found == False: div = 0 for i in range(1,maxmult+1): if current%i == 0: div += 1 if div == maxmult: found = True smallest = current else: ...
leocarr/smallestmultiple
smallestmult.py
Python
gpl-2.0
470
#!/usr/bin/env python import struct import os import numpy as np import itertools import pylab as plt import sys import tkMessageBox from Tkinter import Tk from tkFileDialog import askopenfilename import tkSimpleDialog from Tkinter import * import io import platform ''' Tool for converting Siemens TWIX format MRS dat...
akmaier/MagneticImagingProject2016-17
pyImport/twix2dpt_gui_v2b.py
Python
lgpl-3.0
14,163
# coding=utf-8 from django.shortcuts import render from django.core.exceptions import * import urllib import urllib.parse import urllib.request from django.http import JsonResponse import ujson import random import json from apis.models import * from datetime import timedelta, time, datetime from django.views.decorator...
Software-Eng-THU-2015/pacific-rim
apis/views.py
Python
mit
21,809
from __future__ import absolute_import from builtins import str from processing.core.GeoAlgorithm import GeoAlgorithm from processing.core.Processing import Processing from processing.core.ProcessingLog import ProcessingLog from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException from p...
sourcepole/qgis-wps-client
processingwps/WpsAlgorithm.py
Python
gpl-2.0
11,916
# $Id$ import inc_sip as sip import inc_sdp as sdp sdp = \ """ v=0 o=- 0 0 IN IP4 127.0.0.1 s=pjmedia c=IN IP4 127.0.0.1 t=0 0 m=audio 4000 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=sendrecv a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 """ pjsua_args = "--null-audio --auto-answer 200 --timer-min-se 2000 --timer-se 20...
xiejianying/pjsip
tests/pjsua/scripts-sendto/174_timer_se_too_small.py
Python
gpl-2.0
591
#!/usr/bin/env python3 # Quantopian, Inc. licenses this file to you under the Apache License, Version # 2.0 (the "License"); you may not use this file except in compliance with the # License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
quantopian/PenguinDome
server/secret_keeping.py
Python
apache-2.0
20,174
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # Copyright 2012-2015 Frédéric Magniette, Miguel Rubio-Roy # This file is part of Pyrame. # # Pyrame 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, ei...
sbinet-staging/pyrame
scpi/scpi.py
Python
lgpl-3.0
14,943
import argparse import csv def main(): parser = argparse.ArgumentParser() parser.add_argument( "-f", "--file", help="CSV file for postprocessing", dest="source_filename" ) parser.add_argument( "-o", "--output-file", help="Results file", dest="results_filename" ) args = parser.p...
Linaro/test-definitions
automated/linux/aep-pre-post/postprocess_lisa_results.py
Python
gpl-2.0
1,693
cubes = [x**3 for x in range(10)] odd_cubes1 = filter(lambda cube: cube % 2, cubes) odd_cubes2 = (cube for cube in cubes if cube % 2)
mkhuthir/learnPython
Book_learning-python-r1.1/ch5/gen.filter.py
Python
mit
135
import asyncio import os from pathlib import Path from opentrons.config import IS_OSX class CameraException(Exception): pass async def take_picture(filename: Path, loop: asyncio.AbstractEventLoop = None): """ Take a picture and save it to filename :param filename: Name of fil...
Opentrons/labware
api/src/opentrons/system/camera.py
Python
apache-2.0
1,170
"""whitelist Revision ID: 37b19b31785d Revises: 3c06b874a4d Create Date: 2016-08-22 15:54:55.881654 """ # revision identifiers, used by Alembic. revision = '37b19b31785d' down_revision = '3c06b874a4d' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - please...
rootio/rootio_web
alembic/versions/37b19b31785d_whitelist.py
Python
agpl-3.0
856
#!/usr/bin/env python import time import json import re import logging import sys from decimal import Decimal as D import krakenex import dateutil.parser import twitter import local_settings WAIT_SECONDS = 120 PAIR_POSITIONS = None STATE_PATH = 'state.dat' KRAKEN_AUTH_PATH = 'kraken.auth' PAIRS = { 'BTCUS...
poupas/vickicryptofan
main.py
Python
mit
10,206
import logging import random import tba_config import uuid from google.appengine.ext import deferred from google.appengine.api import memcache from google.appengine.api import urlfetch from consts.client_type import ClientType from consts.notification_type import NotificationType from helpers.notification_sender impo...
jaredhasenklein/the-blue-alliance
notifications/base_notification.py
Python
mit
7,113
import copy import html from django.test import RequestFactory, override_settings from django.urls import resolve, reverse from debug_toolbar.toolbar import DebugToolbar from ..base import BaseTestCase, IntegrationTestCase rf = RequestFactory() class HistoryPanelTestCase(BaseTestCase): panel_id = "HistoryPane...
jazzband/django-debug-toolbar
tests/panels/test_history.py
Python
bsd-3-clause
6,757
#!/usr/bin/python2.4 # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # # Copyright (C) 1999-2006 Keith Dart <keith@kdart.com> # # This library 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 Foundati...
xiangke/pycopia
net/pycopia/model/Encapsulations.py
Python
lgpl-2.1
2,538
import math from progressbar import ProgressBar from RatS.base.base_ratings_parser import RatingsParser from RatS.plex.plex_site import Plex class PlexRatingsParser(RatingsParser): def __init__(self, args): super(PlexRatingsParser, self).__init__(Plex(args), args) self.processed_movies_count = 0...
StegSchreck/RatS
RatS/plex/plex_ratings_parser.py
Python
agpl-3.0
2,466
#!/home/ssm/Documents/projects/djangoProjects/october/django-jquery-file-upload/venv/bin/python3 # # The Python Imaging Library # $Id$ # # PIL raster font compiler # # history: # 1997-08-25 fl created # 2002-03-10 fl use "from PIL import" # from __future__ import print_function import glob import sys # drivers f...
Imaginashion/cloud-vision
.fr-d0BNfn/django-jquery-file-upload/venv/bin/pilfont.py
Python
mit
1,105
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Interpreter version: python 2.7 # # Imports ===================================================================== import os.path import StringIO import pytest from marcxml_parser import MARCXMLRecord from marcxml_parser import record_iterator from test_serializer im...
edeposit/marcxml_parser
tests/test_record.py
Python
mit
997
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals from pelican import signals def add_functions(generator): ''' Adds functions to the jinja2 scope ''' for key, function in generator.settings['JINJA_FUNCTIONS'].iteritems(): generator.env.globals[key] = fun...
Saevon/saevon.github.io
plugins/pelican/add_jinja_functions.py
Python
mit
435
# -*- coding: utf-8 -*- # # Copyright (C) 2003-2009 Edgewall Software # Copyright (C) 2003-2005 Jonas Borgström <jonas@edgewall.com> # Copyright (C) 2005 Christopher Lenz <cmlenz@gmx.de> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of th...
walty8/trac
trac/attachment.py
Python
bsd-3-clause
47,208
from .base import * import os ADMINS = (("CLA", "cla-alerts@digital.justice.gov.uk"),) MANAGERS = ADMINS HOST_NAME = os.environ.get("HOST_NAME", "localhost") STATICFILES_STORAGE = "django.contrib.staticfiles.storage.CachedStaticFilesStorage" # LOGGING CONFIG FOR DOCKER ENV LOGGING["filters"] = { "require_debu...
ministryofjustice/cla_frontend
cla_frontend/settings/docker.py
Python
mit
1,384
import os import random import struct import unittest2 from mock import MagicMock, patch from kafka import KafkaClient from kafka.consumer import SimpleConsumer from kafka.common import ( ProduceRequest, BrokerMetadata, PartitionMetadata, TopicAndPartition, KafkaUnavailableError, LeaderUnavailableError, P...
findhy/kafka-python
test/test_consumer.py
Python
apache-2.0
640
"""Constants for the prawcore package.""" import os __version__ = "2.3.0" ACCESS_TOKEN_PATH = "/api/v1/access_token" AUTHORIZATION_PATH = "/api/v1/authorize" REVOKE_TOKEN_PATH = "/api/v1/revoke_token" TIMEOUT = float(os.environ.get("prawcore_timeout", 16))
praw-dev/prawcore
prawcore/const.py
Python
bsd-2-clause
259
""" Django settings for cryptanalyzer project. Generated by 'django-admin startproject' using Django 1.9.7. 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...
curioswati/crypt-analyzer
cryptanalyzer/cryptanalyzer/settings.py
Python
isc
4,030
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _, scrub from frappe.utils import flt def execute(filters=None): if not filters: filters = frappe._dict() company_cu...
aruizramon/alec_erpnext
erpnext/accounts/report/gross_profit/gross_profit.py
Python
agpl-3.0
10,746
info = { "name": "bas", "date_order": "DMY", "january": [ "kɔn", "kɔndɔŋ" ], "february": [ "mac", "màcɛ̂l" ], "march": [ "mat", "màtùmb" ], "april": [ "mto", "màtop" ], "may": [ "mpu", "m̀puyɛ" ...
scrapinghub/dateparser
dateparser/data/date_translation_data/bas.py
Python
bsd-3-clause
2,666
GLOBIBOT_TOKEN_KEY = 'token' ENABLED_PLUGINS_KEY = 'plugins' ENABLED_SERVERS_KEY = 'servers' MASTER_IDS_KEY = 'masters' DB_HOST_KEY = 'host' DB_USER_KEY = 'user'
best-coloc-ever/globibot
bot/src/globibot/constants.py
Python
mit
162
# -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2020-04-01 18:47 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('lotes', '0046_op_deposito'), ] operations = [ ...
anselmobd/fo2
src/lotes/migrations/0047_lote_op_obj.py
Python
mit
543
from setuptools import setup, find_packages version = '0.1' setup( name = "python-hiveserver2", version = version, url = '', description = "Python HiveServer 2 Client Binding", packages = find_packages('src'), package_dir = {'': 'src'}, install_requires = ['setuptools'], ...
y-lan/python-hiveserver2
setup.py
Python
apache-2.0
421
#!/usr/bin/python # Copyright 2015 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Module for initializing and driving a SPI TPM.""" from __future__ import print_function import os import struct import sys import t...
akappy7/ChromeOS_EC_LED_Diagnostics
test/tpm_test/tpmtest.py
Python
bsd-3-clause
5,119
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (t...
apache/allura
ForgeTracker/forgetracker/widgets/admin.py
Python
apache-2.0
3,001
import sys from Ziggeo import Ziggeo if(len(sys.argv) < 3): print ("Error\n") print ("Usage: $>python effectprofile_index.py YOUR_API_TOKEN YOUR_PRIVATE_KEY\n") sys.exit() api_token = sys.argv[1] private_key = sys.argv[2] index_arguments = {} index_arguments["limit"] = 50 ziggeo = Ziggeo(api_token, private_key) ...
Ziggeo/ZiggeoPythonSdk
demos/effectprofile_index.py
Python
apache-2.0
376
# -*- coding: utf-8 -*- # Generated by Django 1.9.11 on 2017-05-10 15:49 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sessao', '0001_initial'), ] operations = [ migrations.AddField( ...
cmjatai/cmj
sapl/sessao/migrations/0002_sessaoplenaria_interativa.py
Python
gpl-3.0
518
import numpy as np import cv2 as cv import socket import time def draw_static(img, connected): ''' Draw the image and boxes. ''' bg = np.zeros((img.shape[0], WIDTH_PX, 3), dtype=np.uint8) bg[:,X_OFFSET:X_OFFSET+WEBCAM_WIDTH_PX,:] = img cv.rectangle(bg, (search[0]+X_OFFSET,search[1]+CONNECTED_BORDER), (...
nichwall/HazyVision-python
hazyVision.py
Python
gpl-2.0
7,798
# This file is part of OpenHatch. # Copyright (C) 2009, 2010 OpenHatch, Inc. # Copyright (C) 2010 John Stumpo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
nirmeshk/oh-mainline
mysite/profile/forms.py
Python
agpl-3.0
5,168
import tuned.logs __all__ = ["PluginLoader"] log = tuned.logs.get() class PluginLoader(object): __slots__ = ["_namespace", "_prefix", "_interface"] def _set_loader_parameters(self): """ This method has to be implemented in child class and should set _namespace, _prefix, and _interface member attributes. "...
fcelda/tuned
tuned/utils/plugin_loader.py
Python
gpl-2.0
1,206
# -*- coding: utf-8 -*- """ Tests for the profile API. """ from django.test import TestCase import ddt from nose.tools import raises from dateutil.parser import parse as parse_datetime from user_api.api import account as account_api from user_api.api import profile as profile_api from user_api.models import UserProfi...
wwj718/ANALYSE
common/djangoapps/user_api/tests/test_profile_api.py
Python
agpl-3.0
4,880
# Global Forest Watch API # Copyright (C) 2015 World Resource Institute # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version...
wri/gfw-api
gfw/migrations/api.py
Python
gpl-2.0
4,362
#!/usr/bin/env python3 # # Docker controlling module # # Copyright (c) 2016 Red Hat Inc. # # Authors: # Fam Zheng <famz@redhat.com> # # This work is licensed under the terms of the GNU GPL, version 2 # or (at your option) any later version. See the COPYING file in # the top-level directory. import os import sys impor...
dslutz/qemu
tests/docker/docker.py
Python
gpl-2.0
23,872
# -*- coding: utf-8 -*- # ================================================================= # # Authors: Tom Kralidis <tomkralidis@gmail.com> # Angelos Tzotsos <tzotsos@gmail.com> # # Copyright (c) 2015 Tom Kralidis # Copyright (c) 2015 Angelos Tzotsos # # Permission is hereby granted, free of charge, to any p...
tomkralidis/pycsw
pycsw/ogc/fes/fes2.py
Python
mit
19,080
# coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # --------------------------------------------------------------------...
Azure/azure-sdk-for-python
sdk/storage/azure-storage-file-datalake/samples/datalake_samples_file_system.py
Python
mit
8,515
from __future__ import absolute_import import mock from raven.base import Client from raven.utils.testutils import TestCase class TornadoTransportTests(TestCase): @mock.patch("raven.transport.tornado.HTTPClient") def test_send(self, fake_client): url = "https://user:pass@host:1234/1" timeout...
icereval/raven-python
tests/transport/tornado/tests.py
Python
bsd-3-clause
1,285
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RProj4(RPackage): """A simple interface to the PROJ.4 cartographic projections library ...
LLNL/spack
var/spack/repos/builtin/packages/r-proj4/package.py
Python
lgpl-2.1
1,019
# -*- coding: utf-8 -*- # # solrpy documentation build configuration file, created by # sphinx-quickstart on Mon Jun 28 14:34:18 2010. # # 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 # autogenerated file. # # All ...
GSA/PricesPaidAPI
docs/conf.py
Python
unlicense
8,391
# Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
zhangjunli177/sahara
sahara/tests/unit/utils/test_general.py
Python
apache-2.0
2,202
#!/usr/bin/env python # 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. """Code for doing logistic regressions. Classes: LogisticRegression Holds information for a LogisticRegression classifier. ...
updownlife/multipleK
dependencies/biopython-1.65/build/lib.linux-x86_64-2.7/Bio/LogisticRegression.py
Python
gpl-2.0
4,485
#!/home/thumbimigwe/Documents/wapad/bin/python from django.core import management if __name__ == "__main__": management.execute_from_command_line()
Thoshh/wapad
bin/django-admin.py
Python
mit
153
# coding=utf-8 # Copyright (c) 2012 NTT DOCOMO, INC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
ChinaMassClouds/copenstack-server
openstack/src/nova-2014.2/nova/virt/baremetal/volume_driver.py
Python
gpl-2.0
10,313
# Generated by Django 2.2.24 on 2021-11-21 14:51 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("socialprofile", "0010_auto_20211101_1214"), ] operations = [ migrations.DeleteModel( name="Group", ), ]
DLRSP/django-sp
src/socialprofile/migrations/0011_delete_group.py
Python
mit
301
# -*- coding: utf-8 -*- """ Created on Wed Sep 09 14:51:02 2015 @author: Administrator """ import pandas as pd data = pd.read_csv('D:\\project\\forcast\\data\\CS_table_No3.csv') print data
wasit7/book_pae
pae/forcast/src/csv/CS_table_No3.py
Python
mit
191
""" Pre processing step: notify success Configuration variables used: None """ from textwrap import dedent from airflow.operators.dagrun_operator import TriggerDagRunOperator from airflow_pipeline.pipelines import pipeline_trigger from common_steps import Step def notify_success(dag, upstream_step): noti...
LREN-CHUV/airflow-mri-preprocessing-dags
preprocessing_steps/notify_success.py
Python
apache-2.0
901
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Copyright 2013 Joe Harris Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 ...
meeb/txcloudflare
examples/ip_ban.py
Python
apache-2.0
2,255
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2018-12-11 04:11 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('server', '0024_auto_20181210_2022'), ] operations = [ migrations.AddField( ...
wodo/WebTool3
webtool/server/migrations/0025_instruction_special.py
Python
bsd-2-clause
519
#!/usr/bin/env python3 """ Copyright Google Inc. 2019 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
GoogleCloudPlatform/training-data-analyst
blogs/popdensity/convert_to_rect.py
Python
apache-2.0
4,662
#!/usr/bin/python from operate import * def index(username): msg=''' 尊敬的用户: %s,欢迎来到您的个人主页 1.查询 2.提现 3.转账 4.还款 5.购物 6.流水''' oper_dic={ 'q':'break', '1':inquire, '2':withdraw, '3':transfer, '4':repayment, '5':shop, '6':bill }...
Ocean-Openstack/01-openstack-homework
Day7/shaobo/index.py
Python
mit
825
# Author: Collin Winter import os import unittest from test.support import load_package_tests def load_tests(*args): return load_package_tests(os.path.dirname(__file__), *args)
Microvellum/Fluid-Designer
win64-vc/2.78/python/lib/lib2to3/tests/__init__.py
Python
gpl-3.0
184
# -*- coding: utf-8 -*- """ *************************************************************************** doSieve.py --------------------- Date : June 2010 Copyright : (C) 2010 by Giuseppe Sucameli Email : brush dot tyler at gmail dot com ********************...
innotechsoftware/Quantum-GIS
python/plugins/GdalTools/tools/doSieve.py
Python
gpl-2.0
4,118