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 |
|---|---|---|---|---|---|
from mvc.converter import FFmpegConverterInfo
from mvc.basicconverters import MP4
class AndroidConversion(FFmpegConverterInfo):
media_type = 'android'
extension = 'mp4'
parameters = ('-acodec aac -ac 2 -ab 160k '
'-vcodec libx264 -preset slow -profile:v baseline -level 30 '
... | pculture/mirovideoconverter3 | mvc/resources/converters/android.py | Python | gpl-3.0 | 2,535 |
# 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 writing, software
# distributed under the Li... | AnthonyMRios/pymetamap | pymetamap/__init__.py | Python | apache-2.0 | 1,075 |
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | ywcui1990/nupic | tests/unit/nupic/frameworks/opf/previous_value_model_test.py | Python | agpl-3.0 | 6,324 |
import numpy
import matplotlib
matplotlib.use("GTK3Agg")
import matplotlib.pyplot as plt
"""
Code to generate figures for lecture 1.
"""
numpy.random.seed(21)
outputDir = "/home/charanpal/Documents/Postdoc/Documents/stats-notes/Lecture1/Figures/"
outputFilename = outputDir + "DiscreteHist.eps"
X = numpy.random... | charanpald/stats-notes | src/lecture1.py | Python | gpl-3.0 | 1,810 |
# Copyright 2015 Huawei Technologies India Pvt Ltd.
# 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
#
# ... | rackerlabs/rackspace-python-neutronclient | neutronclient/tests/unit/test_cli20_rbac.py | Python | apache-2.0 | 5,756 |
# Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.com
#
# 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 ... | WendellDuncan/or-tools | examples/python/post_office_problem2.py | Python | apache-2.0 | 3,872 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
backwatertest.py
Created by Jacob C. on 2008-02-26.
Copyright (c) 2010 Spaceship No Future. All rights reserved.
"""
import unittest
import spider
from spider.source import Source
from spider.weblog import Weblog
from spider.linklog import Linklog
from spider.commentl... | braveulysses/backwater | backwatertest.py | Python | bsd-3-clause | 31,229 |
# Copyright 2016 Pinterest, 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... | pinterest/teletraan | deploy-agent/deployd/download/download_helper.py | Python | apache-2.0 | 1,309 |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# Imports
#
import os
import re
import requests
import sys
import urllib
import urlparse
import xbmc
import xbmcgui
import xbmcplugin
from BeautifulSoup import BeautifulSoup
from datetime import datetime
import time
from dumpert_const import ADDON, SETTINGS, LANGUAGE, I... | skipmodea1/repository.skipmodea1 | plugin.video.dumpertcf/resources/lib/dumpert_timemachine.py | Python | gpl-3.0 | 3,996 |
"""hero URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/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-based ... | luis92arma/Marvel | hero/urls.py | Python | cc0-1.0 | 992 |
import csv
# noinspection PyPackageRequirements
import wx
# noinspection PyPackageRequirements
import wx.propgrid as wxpg
from logbook import Logger
import gui.builtinMarketBrowser.pfSearchBox as SBox
import gui.display as d
import gui.globalEvents as GE
from eos.db.gamedata.queries import getAttributeInfo, getItem
f... | pyfa-org/Pyfa | gui/propertyEditor.py | Python | gpl-3.0 | 11,285 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-07-25 13:15
from __future__ import unicode_literals
import autodidact.models
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('autodidact', '0007_auto_20170308_1... | JaapJoris/bps | autodidact/migrations/new/0008_pagefile.py | Python | agpl-3.0 | 837 |
from __future__ import absolute_import, division, print_function
import logging; _L = logging.getLogger('openaddr.process_one')
from urllib.parse import urlparse
from os.path import join, basename, dirname, exists, splitext, relpath
from shutil import copy, move, rmtree
from argparse import ArgumentParser
from os impo... | openaddresses/machine | openaddr/process_one.py | Python | isc | 15,917 |
from friendloc.base.tests import SimpleGobTest
class TestSprawlToContacts(SimpleGobTest):
def test_mdists(self):
btx = dict(lat=31,lng=-96,code="PPLA2",fid=17)
cstx = dict(lat=30,lng=-96,code="PPLA2",fid=32)
self.FS['gnp_gps.03'] = [
(btx,[-96,32],),
(btx,[-96,32],... | JeffAMcGee/friendloc | friendloc/explore/tests/fixgis_tests.py | Python | bsd-2-clause | 655 |
#!/usr/bin/env python
"""
"""
from mininet.topo import Topo
from mininet.net import Mininet
from mininet.node import RemoteController
from mininet.node import Node
from mininet.node import CPULimitedHost
from mininet.link import TCLink
from mininet.cli import CLI
from mininet.log import setLogLevel
from mininet.util i... | maxkondr/onos-porta | tools/test/topos/attmpls.py | Python | apache-2.0 | 8,318 |
from random import randint
from myhdl import *
def _b(s):
s = s.replace('_', '')
s = s.replace('x', '0')
return int(s,2)
class SPIEEPROM(object):
def __init__(self, addr_width=24, data_width=8, max_size=1024):
if max_size > 0:
size = max_size
else:
si... | cfelton/minnesota | mn/models/spi/_spi_eeprom.py | Python | gpl-3.0 | 4,666 |
#!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
# Creat... | accraze/bitcoin | qa/rpc-tests/fundrawtransaction.py | Python | mit | 24,513 |
## Copyright (C) 2011 Stellenbosch University
##
## This file is part of SUCEM.
##
## SUCEM 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 v... | cemagg/sucem-fem | examples/2D_waveguide/h_plane_hollow_rectangular_S_parameters.py | Python | gpl-3.0 | 11,106 |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import mock
import pytest
import responses
import six
from django.core.urlresolvers import reverse
from exam import fixture
from social_auth.models import UserSocialAuth
from sentry.models import (
UserEmail, LostPasswordHash, User, UserOption
)
fro... | jean/sentry | tests/sentry/web/frontend/accounts/tests.py | Python | bsd-3-clause | 12,541 |
""" Custom tf layers and operations """
#pylint: disable=no-name-in-module
from .layer import Layer
from .conv_block import conv_block, ConvBlock, update_layers
from .core import flatten, flatten2d, activation, dense, maxout, mip, xip, combine
from .core import Flatten, Flatten2D, Activation, Dense, Dropout, AlphaDropo... | analysiscenter/dataset | batchflow/models/tf/layers/__init__.py | Python | apache-2.0 | 1,441 |
import imp
import os
import sys
import shutil
from os.path import join
from numpy.distutils import log
from distutils.dep_util import newer
from distutils.sysconfig import get_config_var
import warnings
import re
from setup_common import *
# Set to True to enable multiple file compilations (experimental)
try:
os.... | plaes/numpy | numpy/core/setup.py | Python | bsd-3-clause | 31,723 |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.contrib.auth.mixins import LoginRequiredMixin
from django.shortcuts import redirect, render, render_to_response
from django.views.generic import DetailView, TemplateView, ListView, CreateView, UpdateView
from django.urls impor... | xyb994/housing | ssu_housing/listings/views.py | Python | mit | 4,870 |
#! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import glob
import os
import subprocess
import sys
from waflib import Configure,Context,Logs,Node,Options,Task,Utils
from waflib.TaskGen import feature,before,after
... | bit-trade-one/SoundModuleAP | lib-src/lv2/sratom/waflib/extras/autowaf.py | Python | gpl-2.0 | 22,661 |
# Copyright 2013-2020 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 MirrorSourcewareBroken(AutotoolsPackage, SourcewarePackage):
"""Simple sourceware.org pack... | iulian787/spack | var/spack/repos/builtin.mock/packages/mirror-sourceware-broken/package.py | Python | lgpl-2.1 | 541 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('void', '0001_initial'),
]
operations = [
migrations.RenameField(
model_name='edmrec... | delving/nave | nave/void/migrations/0002_auto_20150308_1150.py | Python | gpl-2.0 | 1,465 |
"""Fill missing values"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import os
def fill_missing_values(df_data):
"""Fill missing values in data frame, in place."""
##########################################################
# TODO: Your code here (DO NOT modify anything else)
... | dmytroKarataiev/MachineLearning | capstone/forward_fill.py | Python | mit | 2,022 |
from django.shortcuts import render, redirect
from datetime import date, timedelta
from django.conf import settings
from django.db.models import Max, Min
from django.contrib.auth.models import User
from django.db.transaction import atomic
from django.core.exceptions import ValidationError, PermissionDenied
from django... | rectory-school/rectory-apps | enrichmentmanager/views/assign.py | Python | mit | 14,089 |
#!/usr/bin/env python
"""
fuck you
"""
# Import Modules
import os, pygame, time, random
from pygame.locals import *
if not pygame.font: print ('Warning, fonts disabled')
main_dir = os.path.split(os.path.abspath(__file__))[0]
def main():
"""this function is called when the program starts.
... | Musickiller/trashbin | wasted-night.py | Python | gpl-3.0 | 2,760 |
'''Test cases for QImage'''
import unittest
import py3kcompat as py3k
from PySide.QtGui import *
from helper import UsesQApplication, adjust_filename
xpm = [
"27 22 206 2",
" c None",
". c #FEFEFE",
"+ c #FFFFFF",
"@ c #F9F9F9",
"# c #ECECEC",
"$ c #D5D5D5",
"% c #A0A0A0",
... | enthought/pyside | tests/QtGui/qimage_test.py | Python | lgpl-2.1 | 7,077 |
"""
Utilities for parseing SExtractor files.
H. Ferguson - revised 4/23/03 to promote ints to floats if a value
with a decimal point appears somewhere in the column originally thought
to be integers
version::
v2.1 - fails gracefully when the catalog has no sources
v3.0 - added gettypes to return column types... | sniemi/SamPy | smnIO/sextutils.py | Python | bsd-2-clause | 15,984 |
"""Utility functions."""
import sys
import logging
import amfast
from amfast.encoder import Encoder
from amfast.decoder import Decoder
from amfast.remoting import Service, CallableTarget
import controller
def setup_channel_set(channel_set):
"""Configures an amfast.remoting.channel.ChannelSet object."""
# Se... | limscoder/amfast | examples/auth/python/utils.py | Python | mit | 1,088 |
# -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014, 2015 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
from e... | ancafarcas/superdesk-core | apps/publish/content/kill.py | Python | agpl-3.0 | 8,067 |
# This file is part of Indico.
# Copyright (C) 2002 - 2020 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from blinker import Namespace
_signals = Namespace()
moved = _signals.signal('moved', """
Called when ... | mic4ael/indico | indico/core/signals/category.py | Python | mit | 815 |
# Copyright 2015, Google Inc.
# 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 copyright
# notice, this list of conditions and the f... | crast/grpc | src/python/grpcio/grpc/framework/core/_interfaces.py | Python | bsd-3-clause | 10,792 |
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# ThinkOpen Solutions Brasil
# Copyright (C) Thinkopen Solutions <http://www.tkobr.com>.
#
# This... | elego/tkobr-addons | unported/tko_l10n_br_base/__openerp__.py | Python | agpl-3.0 | 2,366 |
import codecs
import os
import re
from setuptools import Command, find_packages, setup
here = os.path.abspath(os.path.dirname(__file__))
version = "0.0.0"
changes = os.path.join(here, "CHANGES.rst")
match = r"^#*\s*(?P<version>[0-9]+\.[0-9]+(\.[0-9]+)?)$"
with codecs.open(changes, encoding="utf-8") as changes:
f... | allisson/python-vindi | setup.py | Python | mit | 1,845 |
# coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# 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 applicab... | google-research/google-research | non_semantic_speech_benchmark/data_prep/data_prep_utils_test.py | Python | apache-2.0 | 5,458 |
#!/usr/bin/env python
# Copyright 2016 gRPC authors.
#
# 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 o... | donnadionne/grpc | tools/run_tests/artifacts/artifact_targets.py | Python | apache-2.0 | 16,431 |
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
#
# 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 applicabl... | chitr/neutron | neutron/agent/linux/keepalived.py | Python | apache-2.0 | 15,590 |
# coding: utf-8
__author__ = "Sebastien Renard"
| marcanpilami/MAGE | lib/__init__.py | Python | apache-2.0 | 48 |
import _plotly_utils.basevalidators
class Yperiod0Validator(_plotly_utils.basevalidators.AnyValidator):
def __init__(self, plotly_name="yperiod0", parent_name="waterfall", **kwargs):
super(Yperiod0Validator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | plotly/plotly.py | packages/python/plotly/plotly/validators/waterfall/_yperiod0.py | Python | mit | 398 |
import logging
from argh import arg
from pnc_cli import utils
from pnc_cli.swagger_client import RunningbuildrecordsApi
import cli_types
import pnc_cli.user_config as uc
running_api = RunningbuildrecordsApi(uc.user.get_api_client())
@arg("-p", "--page-size", help="Limit the amount of BuildRecords returned")
@arg("... | thauser/pnc-cli | pnc_cli/runningbuilds.py | Python | apache-2.0 | 1,040 |
"""Javascript Object Signing and Encryption (JOSE).
This package is a Python implementation of the standards developed by
IETF `Javascript Object Signing and Encryption (Active WG)`_, in
particular the following RFCs:
- `JSON Web Algorithms (JWA)`_
- `JSON Web Key (JWK)`_
- `JSON Web Signature (JWS)`_
Originally dev... | kawamon/hue | desktop/core/ext-py/josepy-1.1.0/src/josepy/__init__.py | Python | apache-2.0 | 2,021 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for `dparse.updater`"""
from dparse.parser import parse
from dparse.updater import RequirementsTXTUpdater, CondaYMLUpdater, ToxINIUpdater, PipfileLockUpdater, PipfileUpdater
from dparse import filetypes
def test_update_tox_ini():
content = "[testenv:bandit]... | pyupio/dparse | tests/test_updater.py | Python | mit | 16,823 |
import json
import pusher
from django.conf import settings
if settings.PUSHER_APP_ID:
p = pusher.Pusher(
app_id=settings.PUSHER_APP_ID,
key=settings.PUSHER_KEY,
secret=settings.PUSHER_SECRET
)
def track_played_pusher(track):
if not p:
return
data = json.dumps({
... | pokelondon/pokeradio | web/pokeradio/api/push.py | Python | gpl-3.0 | 595 |
def foo():
print('ok')
def bar():
print('ok') | smmribeiro/intellij-community | python/testData/inspections/PyRelativeImportInspection/PlainDirectoryDottedImportFromTwoElementsWithAs/plainDirectory/util.py | Python | apache-2.0 | 55 |
# -*- coding: utf-8 -*-
#
# pywrap documentation build configuration file, created by
# sphinx-quickstart on Thu Dec 25 23:33:41 2014.
#
# 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.
#
# Al... | AlexanderFabisch/cythonwrapper | doc/source/conf.py | Python | bsd-3-clause | 8,545 |
import itertools
import string
import threading
import typing as tp
from satella.exceptions import MetricAlreadyExists
from .aggregate import AggregateMetric
from .data import MetricDataCollection, MetricData
from .labeled import LabeledMetric
from .metric_types import METRIC_NAMES_TO_CLASSES, MetricLevel, Metric, DEB... | piotrmaslanka/satella | satella/instrumentation/metrics/__init__.py | Python | mit | 4,070 |
# Copyright 2016 Fortinet, 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
#
# Unless required b... | samsu/networking-fortinet | networking_fortinet/common/exceptions.py | Python | apache-2.0 | 6,028 |
from st2actions.runners.pythonrunner import Action
# http://python-consul.readthedocs.org/en/latest/#
import consul
class ConsulBaseAction(Action):
def __init__(self, config):
super(ConsulBaseAction, self).__init__(config)
self.consul = self._get_client()
def _get_client(self):
host... | pearsontechnology/st2contrib | packs/consul/actions/lib/action.py | Python | apache-2.0 | 596 |
#from __future__ import division
import copy
from sympycore import Logic, SymbolicEquality, Calculus, heads, Symbol
from sympycore.arithmetic.numbers import div
from . import Matrix
class Polyhedron(object):
""" A basis class that provides a H-representation for general
polyhedra.
Consider the following... | pearu/sympycore | sympycore/matrices/polyhedra.py | Python | bsd-3-clause | 8,744 |
g = (x * x for x in range(10))
print(next(g))
while True:
try:
print(next(g))
except StopIteration as e:
print(e.value)
break
def odd():
print('step 1')
yield 1
print('step 2')
yield(3)
print('step 3')
yield(5)
o=odd()
next(o)
next(o)
next(... | IIIIIIIIll/sdy_notes_liaoxf | LiaoXueFeng/Advanced_properties/generator.py | Python | gpl-3.0 | 322 |
import unittest
from Ann import Ann, timeit
import numpy as np
import random
import copy
import os
import pickle
import logging
logger = logging.getLogger(__name__)
class Test(unittest.TestCase):
def init_logger(self, level='info'):
if (level == 'debug'):
logging.basicConfig(level=logging.DEB... | ijkilchenko/Ann | Ann-py/Ann_test.py | Python | mit | 28,034 |
from django.test import TestCase
# TODO
| mhnbcu/wagtailbakery | tests.py | Python | gpl-3.0 | 41 |
from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
url(r'^$', 'home.views.index', name='home'),
... | Ghost-script/dyno-chat | kickchat/urls.py | Python | gpl-2.0 | 948 |
class cModel(object):
def __init__(self, obj):
# The following need to be "overwritten" by
# by the object class.. ie. rectangle or circle in case of 2D
self.object = obj
self.type = obj.getType()
self.cmodel = obj.getCollisionData()
def intersect(self, cother):
... | explosiveduck/ed2d | ed2d/physics/cmodel.py | Python | bsd-2-clause | 1,843 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
OTR chatting session manager
============================
a simple OTR principle inspired chatting session manager. NOT compatible with
any of existing OTR implementations.
"""
import time
from hash import hash_generator, object_hasher
from _geheimnis_ import get_uuid... | geheimnis/core-commands | otr.py | Python | gpl-3.0 | 10,245 |
from plugins.bases.handlers import HandlersBase
class forgotpassword(HandlersBase):
WEB_PATH = r"/forgotpassword"
STORE_ATTRS = True
STORE_UNREF = True
OPTS = {}
PAGE_TITLE = "Reset Password"
CSS_FILES = ["forgotpassword"]
def get(self):
self.show("forgotpassword", ac... | AnzenSolutions/ASWCP-Web | plugins/handlers/forgotpassword/forgotpassword.py | Python | mpl-2.0 | 1,694 |
# Copyright 2017 The TensorFlow Authors. 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
#
# Unless required by applica... | jostep/tensorflow | tensorflow/python/eager/function.py | Python | apache-2.0 | 19,154 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ... | data-exp-lab/girder | plugins/ldap/server/constants.py | Python | apache-2.0 | 854 |
from __future__ import absolute_import
import os
from django.conf import settings
from celery import Celery
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
os.environ.setdefault('DJANGO_CONFIGURATION', 'Local')
app = Celery('eveo... | wengole/eveonline-assistant | eveonline-assistant/config/celery.py | Python | bsd-3-clause | 631 |
from setuptools import setup
from __init__ import __version__
setup(name='geocode',
version=__version__,
description='simple Python geocoding module using the Google Maps API',
author='Ben Morris',
author_email='ben@bendmorris.com',
url='https://github.com/bendmorris/python-geocode',
... | NoahFlowa/glowing-spoon | venv/lib/python2.7/site-packages/geocode/setup.py | Python | apache-2.0 | 427 |
'''
POdB: A purchase order management system for small businesses
Copyright (C) 2016 Paulo S. V. N. Leal
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 ... | psvnl/podb | appconfig.py | Python | gpl-3.0 | 17,121 |
HOST = "wfSciwoncWiki:enw1989@172.31.29.101:27001,172.31.29.102:27001,172.31.29.103:27001,172.31.29.104:27001,172.31.29.105:27001,172.31.29.106:27001,172.31.29.107:27001,172.31.29.108:27001,172.31.29.109:27001/?authSource=admin"
PORT = ""
USER = ""
PASSWORD = ""
DATABASE = "wiki"
READ_PREFERENCE = "secondary"
WRITE_CON... | elainenaomi/sciwonc-dataflow-examples | dissertation2017/Experiment 2/instances/11_2_wikiflow_1sh_1s_annot/computeusergroup_0/ConfigDB_UserGroup_0.py | Python | gpl-3.0 | 582 |
'''tzinfo timezone information for Africa/Lubumbashi.'''
from pytz.tzinfo import StaticTzInfo
from pytz.tzinfo import memorized_timedelta as timedelta
class Lubumbashi(StaticTzInfo):
'''Africa/Lubumbashi timezone definition. See datetime.tzinfo for details'''
zone = 'Africa/Lubumbashi'
_utcoffset = timedel... | newvem/pytz | pytz/zoneinfo/Africa/Lubumbashi.py | Python | mit | 385 |
from pprint import pprint
from django.contrib.auth.decorators import permission_required
from django.http import JsonResponse
from fo2.connections import db_cursor_so
from utils.functions import get_client_ip
from utils.views import request_hash_trail
import estoque.classes
from estoque import queries
@permissio... | anselmobd/fo2 | src/estoque/views/executa_ajuste.py | Python | mit | 3,040 |
import math
import sys
from collections import namedtuple
import numpy as np
import sympy
article = namedtuple(
"Article",
[
"authors",
"title",
"journal",
"volume",
"number",
"year",
"month",
"pages",
"url",
"issn",
"issn... | nschloe/quadpy | src/quadpy/helpers/misc.py | Python | mit | 4,901 |
# -----------------------------------------------------------------------
# Copyright: 2010-2022, imec Vision Lab, University of Antwerp
# 2013-2022, CWI, Amsterdam
#
# Contact: astra@astra-toolbox.com
# Website: http://www.astra-toolbox.com/
#
# This file is part of the ASTRA Toolbox.
#
#
# The ASTRA Toolbo... | astra-toolbox/astra-toolbox | python/astra/plugins/cgls.py | Python | gpl-3.0 | 2,821 |
from django.conf.urls import patterns, include, url
from django.contrib import admin
from views import *
urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
url(r'^$', index),
url(r'^signin', signin),
url(r'^imagesearch', imagesearch),
url(r'^searchhistory', searchhistory),
... | MonkeyLeeT/SnapScout-Frontend | mysite/urls.py | Python | apache-2.0 | 348 |
#!/usr/bin/env python
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import posixpath
import unittest
from devil.android import flag_changer
_CMDLINE_FILE = 'chrome-command-line'
class _FakeDevice(ob... | mrtnrdl/.macdots | scripts/bin/platform-tools/systrace/catapult/devil/devil/android/flag_changer_test.py | Python | unlicense | 4,585 |
# These classes implement a doctest runner plugin for nose, a "known failure"
# error class, and a customized TestProgram for NumPy.
# Because this module imports nose directly, it should not
# be used except by nosetester.py to avoid a general NumPy
# dependency on nose.
import sys
import os
import doctest
import n... | teoliphant/numpy-refactor | numpy/testing/noseclasses.py | Python | bsd-3-clause | 14,288 |
import os
def get_rc_path():
""" Return the full .vacationrc path for convenience. """
return os.path.join(os.path.expanduser('~'), '.vacationrc')
def touch():
""" Create a .vacationrc file if none exists. """
if not os.path.isfile(get_rc_path()):
open(get_rc_path(), 'a').close()
pri... | pulseenergy/vacation | vacation/rc.py | Python | gpl-2.0 | 1,712 |
#!/usr/bin/env python
from setuptools import setup, find_packages
if __name__ == "__main__":
setup(name='tgk',
version='0.2.0-dev',
description='41P/Tuttle-Giacobini-Kresak Outburst Project Pipeline',
author="Michael S. P. Kelley",
author_email="msk@astro.umd.edu",
... | mkelley/41P-LCO | setup.py | Python | mit | 562 |
"""The kodi component."""
import asyncio
import logging
from pykodi import CannotConnectError, InvalidAuthError, Kodi, get_kodi_connection
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
CONF_HOST,
CONF_PASSWORD,
CONF_PORT,
CONF_SSL,
CONF_USERNAME,
EVENT... | sdague/home-assistant | homeassistant/components/kodi/__init__.py | Python | apache-2.0 | 2,759 |
"""django_todo URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/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')
Clas... | GunnerJnr/_CodeInstitute | Stream-3/Full-Stack-Development/21.Django REST Framework/4.User-Authentication/django_todo/django_todo/urls.py | Python | mit | 869 |
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""A fixed version of MailNotifier which treats exception as failure."""
from buildbot.status import mail
from buildbot.status.results import FAILURE, EXCEP... | eunchong/build | scripts/master/exception_notifier.py | Python | bsd-3-clause | 847 |
# coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# 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 applicab... | google-research/google-research | mico/dm_control/train.py | Python | apache-2.0 | 4,371 |
import inspect
import os
from typing import List
import pytest
from allennlp.common.checks import ConfigurationError
from allennlp.common.registrable import Registrable
from allennlp.common.testing import AllenNlpTestCase
from allennlp.common.util import push_python_path
from allennlp.data.dataset_readers.dataset_rea... | allenai/allennlp | tests/common/registrable_test.py | Python | apache-2.0 | 8,275 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import request, render_template, jsonify, Markup, abort, \
send_from_directory
from . import app, redis
from .utils import check_signature, get_jsapi_signature_data
from .response import wechat_response
from .plugins import score, library
from .models import... | paicha/gxgk-wechat-server | main/routes.py | Python | mit | 6,009 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Integer functions
"""
from __future__ import unicode_literals
from __future__ import absolute_import
import sympy
import string
from mathics.builtin.base import Builtin, SympyFunction
from mathics.core.convert import from_sympy
from mathics.core.expression import In... | bnjones/Mathics | mathics/builtin/integer.py | Python | gpl-3.0 | 13,471 |
'''
Created on Mar 18, 2013
@author: Gooch
'''
import unittest
from Pipeline.PipelineSampleData import SampleData
class SampleDataTest(unittest.TestCase):
def setUp(self):
#might not need this, runs before each test
pass
def tearDown(self):
#might not need this, runs after each test
... | kotoroshinoto/Cluster_SimpleJob_Generator | pybin/Test/PipelineSampleDataTest.py | Python | unlicense | 1,017 |
# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^oauth/$', views.oauth, name='apiclient_oauth'),
url(r'^oauth_callback/$', view... | fnp/redakcja | src/apiclient/urls.py | Python | agpl-3.0 | 580 |
#!/usr/bin/python
# -*- 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | quinot/ansible | lib/ansible/modules/network/aci/aci_tenant_span_src_group.py | Python | gpl-3.0 | 4,734 |
from django.test import TestCase
from nutrition.models import NutritionInfo
class NutritionInfoMathTest (TestCase):
def test_add_nutrition_info(self):
"""Add NutritionInfo.
"""
nutrient_a = NutritionInfo(
calories = 50,
fat_calories = 20,
fat ... | wapcaplet/vittles | nutrition/tests/add_mult.py | Python | mit | 3,184 |
# Copyright 2012 Google Inc. All Rights Reserved.
__author__ = 'benvanik@google.com (Ben Vanik)'
| benvanik/stdi | third_party/__init__.py | Python | apache-2.0 | 98 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from collections import OrderedDict
from django.urls import reverse # django 2.0
ACTION_CREATE = 'create'
ACTION_DELETE = 'delete'
ACTION_DETAIL = 'detail'
ACTION_LIST = 'list'
ACTION_UPDATE = 'update'
INSTANCE_ACTIONS = (
ACTION_DELETE,
ACTIO... | oscarmlage/django-cruds-adminlte | cruds_adminlte/utils.py | Python | bsd-3-clause | 3,115 |
# -*- coding: utf-8 -*-
#
# groonga documentation build configuration file, created by
# sphinx-quickstart on Thu Oct 22 15:42:37 2009.
#
# 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... | groonga/groonga | doc/source/conf.py | Python | lgpl-2.1 | 7,245 |
#!/usr/bin/python
# Fetch More Example
# Ported to PyQt4 by Darryl Wallace, 2009 - wallacdj@gmail.com
from PySide import QtCore, QtGui
class FileListModel(QtCore.QAbstractListModel):
numberPopulated = QtCore.Signal(int)
def __init__(self, parent=None):
super(FileListModel, self).__init__(parent)
... | Southpaw-TACTIC/Team | src/python/Lib/site-packages/PySide/examples/itemviews/fetchmore.py | Python | epl-1.0 | 2,891 |
from __future__ import absolute_import
import argparse
import bz2
import gzip
import json
import io
import os
from datetime import datetime, timedelta
from six.moves.urllib.request import urlopen
try:
import zstandard
except ImportError:
zstandard = None
from .utils import git
from . import log
MYPY = Fal... | asajeffrey/servo | tests/wpt/web-platform-tests/tools/manifest/download.py | Python | mpl-2.0 | 6,428 |
# -*- coding: utf-8 -*-
"""
***************************************************************************
dinfdistdown.py
---------------------
Date : October 2012
Copyright : (C) 2012 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
************... | bstroebl/QGIS | python/plugins/sextante/taudem/dinfdistdown.py | Python | gpl-2.0 | 5,278 |
#!/usr/bin/env python3
from __future__ import print_function
from argparse import ArgumentParser
import os
import re
import subprocess
import tempfile
import shutil
import sys
'''Download all versions of the psidev OBO for mzML files'''
CVS_SERVER = ':pserver:anonymous:''@psidev.cvs.sourceforge.net:/cvsroot/psidev'
... | ginkgobioworks/pymzML | example_scripts/download_obo_database.py | Python | lgpl-3.0 | 3,636 |
#!/usr/bin/env python
import csv
outFile = open("result.txt", "w")
buffer = []
keepCurrentSet = True
for line in inFile:
buffer.append(line)
if line.startswith("----"):
#---- starts a new data set
if keepCurrentSet:
outFile.write("".join(buffer))
#now reset our state
... | keyxmakerx/APIDigital | application.py | Python | gpl-3.0 | 465 |
# =========================================================================
# Copyright 2012-present Yunify, Inc.
# -------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this work except in compliance with the Licens... | yunify/qingcloud-cli | qingcloud/cli/iaas_client/actions/s2/delete_s2_servers.py | Python | apache-2.0 | 1,746 |
"""
Example standalone app for calculating series statistics
"""
import optparse
from thunder import ThunderContext
if __name__ == "__main__":
parser = optparse.OptionParser(description="compute summary statistics on time series data",
usage="%prog datafile outputdir mode [opti... | zhwa/thunder | thunder/standalone/stats.py | Python | apache-2.0 | 835 |
import time
import os
import numpy
import tensorflow as tf
def listify(x):
try:
len(x)
except TypeError:
return [x]
return x
# Not averaged over examples
def multi_class_hinge_loss(inner_products, labels, power=1):
membership_indicator = tf.one_hot(labels, tf.shape(inner_products)[1]... | NoahDStein/NeuralNetSandbox | tfutil.py | Python | apache-2.0 | 3,924 |
# Copyright 2013 Openstack Foundation
# 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
#
# Unless requ... | lmaycotte/quark | quark/drivers/optimized_nvp_driver.py | Python | apache-2.0 | 14,438 |
# Copyright (c) 2016 Institute of the Czech National Corpus
#
# 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; version 2
# dated June, 1991.
#
# This program is distributed in the hope that it wi... | czcorpus/kontext | lib/bgcalc/subc_calc.py | Python | gpl-2.0 | 2,023 |
"""
.. versionadded:: 0.9.2
These functions streamline the process of initializing Django's settings module
environment variable. Once this is done, your fabfile may import from your
Django project, or Django itself, without requiring the use of ``manage.py``
plugins or having to set the environment variable yourself ... | jessekl/flixr | venv/lib/python2.7/site-packages/fabric/contrib/django.py | Python | mit | 3,325 |
__version__ = '0.10.0-SNAPSHOT'
| jonahkichwacoders/py4j | py4j-python/src/py4j/version.py | Python | bsd-3-clause | 32 |
from __future__ import division
from __future__ import absolute_import
from myhdl import *
from rhea import cores
from rhea.system import FIFOBus
def fifo_cdc(glbl, emesh_i, emesh_o):
"""
map the packet interfaces to the FIOF interface
"""
fifo_intf = FIFOBus(size=16, width=len(emesh_i.bits))
... | cfelton/parallella_elink | elink/_fifo_cdc.py | Python | mit | 930 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.