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 django.apps import AppConfig class AccountsPayableConfig(AppConfig): name = 'accounts_payable'
Semprini/cbe
cbe/cbe/accounts_payable/apps.py
Python
apache-2.0
106
from PE import * from util import * from Gadget import * exe_path = "D:\\testPoc\\Easy File Sharing Web Server\\fsws.exe" module_list = getModuleList(exe_path) module_list.append(exe_path) import random IAT = {} writableAddress = {} print for module in module_list: print module pe = PE(module) I...
b09780978/SEH_Fuzzer
SEH_Fuzzer/demo/demo_pointer.py
Python
mit
913
import os from mock import patch from ...testcases import DustyTestCase from dusty.payload import Payload from dusty.commands.cp import copy_between_containers, copy_from_local, copy_to_local from dusty.cli.cp import _split_path, _resolve_path, _validate_path_pair, main class TestCpCLI(DustyTestCase): def test_s...
gamechanger/dusty
tests/unit/cli/cp_test.py
Python
mit
2,120
#!/usr/bin/env python # -*- coding: UTF-8 -*- # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distri...
EdLogan18/logan-repository
plugin.video.logan/addon.py
Python
gpl-2.0
27,696
# -*- coding: utf-8 -*- #/* # * Copyright (C) 2013 Libor Zoubek # * # * # * 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, or (at your option) # * any later version...
lzoubek/xbmc-plugin-mpdc
default.py
Python
gpl-3.0
5,774
#!/usr/bin/env python3 ''' This file is intended to be used to configure PETSc for dynamite. It should be run in the PETSc root source directory. To see all possible options, run "./configure --help" in the PETSc root directory. You may want to pipe to "less"; it is a big help page ;) ''' configure_options = [ ...
GregDMeyer/dynamite
petsc_config/complex-opt.py
Python
mit
1,519
""" Copyright 2016 Richard Koshak 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...
rkoshak/mqttReporter
execActuator.py
Python
apache-2.0
2,860
SLEEP = 900 # 15 min import spyder.data.metal_sources as _data import spyder.web.metal_sources as _web import re import time Sources = [ (_web.Blabbermouth(), _data.Blabbermouth()), (_web.Lambgoat(), _data.Lambgoat())] def _valid(title, artist): p = re.compile(r'(?:^|\s)%s(?:$|\s|[:])' % artist['na...
msmathers/SpasmDB
spasm/crawlers/metal_news.py
Python
mit
845
#!/usr/bin/env python # -*- coding:utf-8 -*- __author__ = 'ghost' import time import threading mutex = threading.RLock() class MyThread(threading.Thread): def run(self): if mutex.acquire(1): print "thread {} get mutex".format(self.name) time.sleep(1) mutex.acquire...
rsj217/flask--scaffold
learn-threading/rlock.py
Python
mit
582
#!/usr/bin/python # # Copyright 2018 Google LLC # # 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 ag...
google/google-ctf
2017/quals/2017-misc-datastore/notes-server/index.py
Python
apache-2.0
5,339
#! /usr/bin/env -S python3 -i # -*- coding: utf-8 -*- """ This is a minimal calfbox python example. It is meant as a starting point to find bugs and test performance. Copyright, Nils Hilbricht, Germany ( https://www.hilbricht.net ) This code is free software: you can redistribute it and/or modify it under the terms o...
kfoltman/calfbox
experiments/interactive.py
Python
gpl-3.0
2,154
# # Copyright 2012 New Dream Network, LLC (DreamHost) # # 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...
openstack/ceilometer
ceilometer/image/glance.py
Python
apache-2.0
1,943
#! /usr/bin/python import pygst pygst.require('0.10') import gst import gobject gobject.threads_init () def gst_buffer_to_numpy_array(buffer, chan): import numpy samples = numpy.frombuffer(buffer.data, dtype=numpy.float32) if chan == 1: return samples.T else: samples.resize([len(sampl...
owenwuef/aubio
python/aubioinput.py
Python
gpl-3.0
4,739
#!/usr/bin/env python3 """ test for the Enummatcher module. """ import unittest from base_test import PschedTestBase from pscheduler.enummatcher import EnumMatcher class TestEnummatcher(PschedTestBase): """ Enummatcher tests. """ def test_ematcher(self): """Enum matcher tests""" m...
perfsonar/pscheduler
python-pscheduler/pscheduler/tests/enummatcher_test.py
Python
apache-2.0
699
#!/usr/bin/env python # -*- coding:utf-8 -*- IP_LIST = ( '192.168.4.155', # 1: box05 '192.168.4.156', # 2: box06 '192.168.4.157', # 3: box07 '192.168.4.158', # 4: box08 '192.168.4.159', # 5: unlabeled '192.168.4.161', # 6: psen02 '192.168.4.162', # 7: box12 '192.168.4.163', # 8:...
irvs/ros_tms
tms_ss/tms_ss_kinect_v2/scripts/NETWORK_SETTING.py
Python
bsd-3-clause
399
# -*- coding: utf-8 -*- ''' Created on 19 Sep 2012 @author: piel Copyright © 2012-2013 Éric Piel & Kimon Tsitsikas, Delmic This file is part of Odemis. Odemis is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Fo...
gstiebler/odemis
src/odemis/util/test/img_test.py
Python
gpl-2.0
31,642
import time import re import socket import feedparser import httplib as http import urllib2 from pprint import pprint from datetime import datetime from djangofeeds import conf from djangofeeds import models from djangofeeds import feedutil from djangofeeds import exceptions from djangofeeds.utils import get_default_...
chrisspen/django-feeds
djangofeeds/importers.py
Python
bsd-2-clause
13,979
from core.Extension import BaseExtension, StaticExtension class DerpExtension(BaseExtension): desc = 'Derp' def __init__(self): print 'Derp' def __del__(self): print 'What did I do?!' def onDerpEvent(self,e): print "Derp" return 1 def onBodyBuildE...
justinbrewer/DerPy
ext/TestExtension.py
Python
lgpl-3.0
535
import random import math import sys DIM = 0 if len(sys.argv) != 2: print("usage: ", sys.argv[0] , " NUM ") exit(1) else: DIM = int(sys.argv[1]) circle_count = 0 for i in range(0,DIM): x = random.uniform(0.0, 1.0) y = random.uniform(0.0, 1.0) if ((math.pow(x, 2.0) + math.pow(y, 2.0)) < ...
lstorchi/teaching
xyzviewer/mcpi/mcpi.py
Python
gpl-3.0
423
'''This module provides ERFA,\\n\\ the Essential Routine for Fundamental Astronomy,\\n\\ interface to Python\\n\\ ''' from build_extension_module import * module_name = '_erfa' module_filename = '_erfamodule.c' module_doc = __doc__ include_files = ['"structseq.h"', '<math.h>', '<time...
nirinA/scripts_python
erfa_def.py
Python
unlicense
183,805
########################################################################### # # Copyright 2020 Google LLC # # 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 # # https://www.apache.org/l...
google/starthinker
starthinker/util/pubsub.py
Python
apache-2.0
3,156
#!/usr/bin/python -u # -*- coding: utf-8 -*- ''' Module for experiments with CONSEQ operator ''' from tool.experiment import RAN, VAR, SLI, DEF, CQL_ALG, NAIVE_SUBSEQ_ALG, \ INC_SUBSEQ_ALG, PARAMETER, QUERY_LIST, Q_MOVE, DIRECTORY, \ ALGORITHM_LIST, Q_PLACE, gen_experiment_list from tool.io import CONSEQ_MAIN...
streampref/wcimport
conseqgen.py
Python
gpl-3.0
2,964
# -*- encoding: utf-8 -*- import logging import typing import numpy as np from scipy.sparse import issparse, spmatrix from sklearn.base import BaseEstimator from sklearn.exceptions import NotFittedError from autosklearn.data.feature_validator import FeatureValidator, SUPPORTED_FEAT_TYPES from autosklearn.data.targe...
automl/auto-sklearn
autosklearn/data/validation.py
Python
bsd-3-clause
7,361
# -*- coding: utf-8 -*- """ Created on Thu Apr 27 20:42:19 2017 @author: rstreet """ # -*- coding: utf-8 -*- """ Created on Sat Apr 1 13:08:01 2017 @author: rstreet """ from django.core.management.base import BaseCommand from django.contrib.auth.models import User from events.models import ObsRequest class Comman...
ytsapras/robonet_site
events/management/commands/cancel_select_obs.py
Python
gpl-2.0
1,090
def json_date(datetime): return datetime.strftime("%Y-%m-%dT%H:%M:%SZ")
theju/django-couch-wiki
wiki/utils.py
Python
mit
76
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
heke123/chromium-crosswalk
third_party/protobuf/python/google/protobuf/__init__.py
Python
bsd-3-clause
1,706
# -*- coding: utf-8 -*- # # 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, softw...
KL-WLCR/incubator-airflow
tests/executors/test_celery_executor.py
Python
apache-2.0
1,866
from ..filesystem_creation import CreateFilesystemsCommand from .utils import MigrationCommanderTestCase class TestCreateFilesystemsCommand(MigrationCommanderTestCase): def test_execute(self): self._init_test_data('ubuntu16', 'target__device_identification') CreateFilesystemsCommand(self.source)...
jdepoix/goto_cloud
goto_cloud/migration_commander/tests/test_filesystem_creation.py
Python
mit
1,261
# Copyright 2021 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
google/CFU-Playground
proj/hps_accel/gateware/gen1/set.py
Python
apache-2.0
4,133
#!/usr/bin/env python # Copyright 2020 Google 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...
GoogleCloudPlatform/python-docs-samples
servicedirectory/snippets.py
Python
apache-2.0
4,996
#!/usr/bin/python IgnoreAutodep = True from pisi.actionsapi import shelltools, get, autotools, pisitools shelltools.export("HOME", get.workDIR()) def setup(): autotools.configure("--disable-static") def build(): autotools.make() def install(): autotools.rawInstall("DESTDIR=%s" % get.installDIR())
richard-fisher/repository
system/base/gobject-introspection/actions.py
Python
gpl-2.0
317
import json import subprocess from flask import Flask from flask import request from flask import jsonify from flask.ext.cors import CORS app = Flask(__name__) CORS(app) @app.route('/qlayout', methods=['POST']) def qlayout(): obj = request.json json.dump(obj, open('/tmp/data.json', 'w')) p = subprocess.Po...
likr/webqlayout
application.py
Python
mit
1,122
import binascii import hashlib import hmac import os import random import struct from ..utils import run_parser_curio, set_disposable_recv from .base import Plugin from .tls_parser import ( application_data, pack_auth_data, pack_uint16, sni, tls1_2_request, tls1_2_response, ) class TLS1_2Plug...
guyingbo/socks5
shadowproxy/plugins/tls1_2.py
Python
mit
3,210
from gwpy.table import EventTable events = EventTable.read('H1-LDAS_STRAIN-968654552-10.xml.gz', tablename='sngl_burst', columns=['snr']) plot = events.hist('snr', weights=1/10., logbins=True, bins=50, histtype='stepfilled') ax = plot.gca() ax.set_xlabel('Signal-to-noise ratio (SNR)') ax.set_ylabel('Rate [Hz]') ax.set_...
gwpy/gwpy.github.io
docs/latest/table/histogram-1.py
Python
gpl-3.0
408
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-25 15:03 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('testManage', '0002_auto_20161020_1528'), ] operati...
qinggeng/ceShiGuanLiXiTong
site/ceShiGuanLiSite/apps/testManage/migrations/0003_auto_20161025_1503.py
Python
mit
558
# 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...
openstack/senlin-dashboard
senlin_dashboard/cluster/nodes/views.py
Python
apache-2.0
5,747
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
googleapis/python-dialogflow
samples/generated_samples/dialogflow_generated_dialogflow_v2_conversation_profiles_create_conversation_profile_sync.py
Python
apache-2.0
1,755
# -*- coding: utf-8 -*- ''' Created on 23 mars 2014 @author: nestof ''' class Parameter(object): ''' classdocs ''' tableName = 'parametrage' colCodeName = 'code' colTypeName = 'type' colValueName = 'valeur' colCommentName = 'commentaire' def __init__(self): ...
nestof/domoCore
com/nestof/domocore/domain/Parameter.py
Python
gpl-3.0
482
from pytesseract import image_to_string, image_to_boxes from PIL import Image import sys import os import time import platform # the type file is <FileStorage: u'answer.txt' ('text/plain')> # the output is a tuple contains (year, semester, exam name and answer) def readAndSaveAnswerFile(file): # here we have pro...
HuimingCheng/AutoGrading
sample/web/helperFunction.py
Python
mit
3,293
from distutils.core import setup setup(name = 'gecoc', version = '1.0', description = 'geco client lib', author = 'Daniel Garcia Moreno', author_email = '<dani@danigm.net>', url = 'http://bzr.danigm.net/geco', license = 'GPLv3', scripts = ['terminal-geco', 'change-master'], ...
wadobo/GECO
src/gecoc/setup.py
Python
gpl-3.0
354
import mock, shutil, unittest from postcode_api.caches.filesystem_cache import FilesystemCache from random_temp_dir import RandomTempDir class FilesystemCacheTest(unittest.TestCase): def setUp(self): self.root_dir = RandomTempDir() self.temp_file_path = self.root_dir.temp_file_path() ...
ministryofjustice/postcodeinfo
postcodeinfo/apps/postcode_api/tests/caches/test_filesystem_cache.py
Python
mit
2,595
import sys from pyspark import SparkContext, SparkConf from pyspark.streaming import StreamingContext from pyspark.streaming.kafka import KafkaUtils from petrarch2 import EventCoder from _functools import partial from datetime import datetime #from CameoEventCoder import CameoEventCoder def map_articles(articleText)...
Sayeedsalam/spec-petrarch2
PetrarchOnSpark.py
Python
mit
1,749
from django.contrib import admin from django_bulk_update.helper import bulk_update # Register your models here. from danibraz.bolsa.models import PlanoDeContas, Lancamento, CustoCblc, CustoBovespa, CustoCorretagem class CustoCblcInline(admin.TabularInline): model = CustoCblc extra = 1 class CustoBovespaInli...
CoutinhoElias/danibraz
danibraz/bolsa/admin.py
Python
mit
3,364
#!/usr/bin/env python """ strip_asm.py - Cleanup ASM output for the specified file """ from argparse import ArgumentParser import sys import os import re def find_used_labels(asm): found = set() label_re = re.compile("\s*j[a-z]+\s+\.L([a-zA-Z0-9][a-zA-Z0-9_]*)") for l in asm.splitlines(): m = lab...
bbiskup/cpp_benchmarks
vendor/google/benchmark/tools/strip_asm.py
Python
mit
4,418
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from openapi_server.models.base_model_ import Model from openapi_server.models.pipeline_branchesitemlatest_run import PipelineBranchesitemlatestRun from openapi_server....
cliffano/swaggy-jenkins
clients/python-flask/generated/openapi_server/models/pipeline_branchesitem.py
Python
mit
9,124
def extractMochaccinoflavourBlogspotCom(item): ''' Parser for 'mochaccinoflavour.blogspot.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('PRC', 'PRC', 'translate...
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractMochaccinoflavourBlogspotCom.py
Python
bsd-3-clause
572
""" sentry.app ~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from django.conf import settings from sentry.utils.imports import import_string from threading import local class State(local): request = None data = {} de...
beni55/sentry
src/sentry/app.py
Python
bsd-3-clause
500
#!/usr/bin/env python # Copyright 2014, Timur Tabi # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is...
timur-tabi/amazon-vine
amazon-vine.py
Python
gpl-3.0
17,741
import _plotly_utils.basevalidators class XpadValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="scatterternary.marker.colorbar", **kwargs ): super(XpadValidator, self).__init__( plotly_name=plotly_name, parent_...
plotly/plotly.py
packages/python/plotly/plotly/validators/scatterternary/marker/colorbar/_xpad.py
Python
mit
467
# -*- coding: utf-8 -*- { 'name': 'Sale Dummy Confirmation', 'version': '1.0', 'author': 'Ingenieria ADHOC', 'website': 'www.ingenieria.com.ar', 'depends': ["sale_stock"], 'category': 'Sale Management', 'description': ''' Sale Dummy Confirmation ======================= On a multi-company env...
levkar/odoo-addons
sale_dummy_confirmation/__openerp__.py
Python
agpl-3.0
549
from collections import OrderedDict from datetime import datetime from urllib.parse import urlparse from werkzeug import cached_property from udata.models import db, Dataset from udata.i18n import lazy_gettext as _ # Register harvest extras Dataset.extras.register('harvest:source_id', db.StringField) Dataset.extras....
opendatateam/udata
udata/harvest/models.py
Python
agpl-3.0
5,523
from pgmpy.models import BayesianModel from pgmpy.factors.discrete.CPD import TabularCPD from pgmpy.inference import VariableElimination import numpy as np from scipy.stats import truncnorm def update(nodes): # tim node khong co predecessor # n_begin = next( # (node for node in nodes if len(node.predec...
dungvtdev/upsbayescpm
mybayes/influence.py
Python
mit
3,062
from powerschool_apps.powerschool_schema.models.student import Student from django.shortcuts import get_object_or_404 def get_student_parent_contact(student_dcid): student = get_object_or_404(Student, pk=student_dcid) legal_guardian_contacts = student.contacts \ .filter(legal_guardian=True) \ ...
IronCountySchoolDistrict/powerschool_apps
powerschool_apps/health_care_plan/utils.py
Python
mit
3,004
import subprocess import datetime website = "http://nomads.ncep.noaa.gov/cgi-bin/filter_gfs_hd.pl?file=gfs.t12z.mastergrb2f00&all_lev=on&var_HGT=on&var_PRES=on&var_RH=on&var_TMP=on&var_UGRD=on&var_VGRD=on&leftlon=0&rightlon=360&toplat=90&bottomlat=-90&dir=%2Fgfs.2014102612%2Fmaster" dataset = "noaa_wind_t18zf192" ...
Balua/predictor
data_deamon.py
Python
gpl-3.0
375
# Copyright 2019,2020,2021 Sony Corporation. # Copyright 2021 Sony Group Corporation. # # 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...
sony/nnabla
python/src/nnabla/backward_function/tanh_shrink.py
Python
apache-2.0
1,106
try: import urllib.request as urllib_request import urllib.error as urllib_error import io except ImportError: import urllib2 as urllib_request import urllib2 as urllib_error import json from .api import TwitterCall, wrap_response class TwitterJSONIter(object): def __init__(self, handle, uri,...
magloire/twitter
twitter/stream.py
Python
mit
2,159
# python # This file is generated by a program (mib2py). import IANA_LANGUAGE_MIB OIDMAP = { '1.3.6.1.2.1.73': IANA_LANGUAGE_MIB.ianaLanguages, '1.3.6.1.2.1.73.1': IANA_LANGUAGE_MIB.ianaLangJavaByteCode, '1.3.6.1.2.1.73.2': IANA_LANGUAGE_MIB.ianaLangTcl, '1.3.6.1.2.1.73.3': IANA_LANGUAGE_MIB.ianaLangPerl, '1.3.6.1.2...
xiangke/pycopia
mibs/pycopia/mibs/IANA_LANGUAGE_MIB_OID.py
Python
lgpl-2.1
521
from multiprocessing import Pool from continuous_test import main def run_multiple(): import argparse import sys from copy import deepcopy # Setup the parser parser = argparse.ArgumentParser() parser.add_argument('file', help='YAML-file') parser.add_argument('-s', '--steps', help='Number o...
RexValkering/socialforcemodel
research_files/multiprocess.py
Python
mit
1,559
# # Copyright (c) SAS Institute, 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 ...
sassoftware/mirrorball
updatebot/artifactory.py
Python
apache-2.0
11,601
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': "Sale Coupon Delivery", 'summary': """Allows to offer free shippings in coupon reward""", 'description': """Integrate coupon mechanism with shipping costs.""", 'category': 'Sales', 'version':...
t3dev/odoo
addons/sale_coupon_delivery/__manifest__.py
Python
gpl-3.0
442
# -*- coding: utf-8 -*- """ celery.security.utils ~~~~~~~~~~~~~~~~~~~~~ Utilities used by the message signing serializer. """ from __future__ import absolute_import import sys from contextlib import contextmanager from celery.exceptions import SecurityError try: from OpenSSL import crypto except I...
mozilla/firefox-flicks
vendor-local/lib/python/celery/security/utils.py
Python
bsd-3-clause
655
from pythonforandroid.recipe import PythonRecipe from os.path import join class ZopeRecipe(PythonRecipe): name = 'zope' version = '4.1.3' url = 'http://pypi.python.org/packages/source/z/zope.interface/zope.interface-{version}.tar.gz' depends = [] def get_recipe_env(self, arch): env = su...
germn/python-for-android
pythonforandroid/recipes/zope/__init__.py
Python
mit
754
''' Created on Sep 4, 2012 @author: jluker ''' import logging from solr import SolrConnection from flask import g name = __name__ logger = logging.getLogger(__name__) class SolrConfigurationError(Exception): pass class SolrConnectionError(Exception): pass def _create_solr_connection(app): app.config.se...
adsabs/flask-solrpy
flask_solrpy.py
Python
mit
2,242
""" sentry.tsdb.base ~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from django.conf import settings from enum import Enum ONE_MINUTE = 60 ONE_HOUR = ONE_MINUTE * 60 ONE_DAY = ONE_HOU...
Natim/sentry
src/sentry/tsdb/base.py
Python
bsd-3-clause
5,001
# provided by @sjenriquez, here just until upstream patches & updates # stdlib from collections import defaultdict import httplib import os import re import socket import time import urllib import urllib2 from urlparse import urlsplit # project from checks import AgentCheck from config import _is_affirmative from uti...
behance/docker-dd-agent
patches/checks.d/docker.py
Python
mit
18,782
""" Django settings for mdtfitness project. Generated by 'django-admin startproject' using Django 1.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build pat...
sdsangee/MDTFitness
src/mdtfitness/settings/local.py
Python
mit
3,714
# this module implements an interface similar to django.utils.timezone from datetime import datetime, timezone utc = timezone.utc def now(tzinfo=timezone.utc): return datetime.now(tzinfo) def fromtimestamp(ts, tzinfo=timezone.utc): return datetime.utcfromtimestamp(ts).replace(tzinfo=tzinfo)
getsentry/zeus
zeus/utils/timezone.py
Python
apache-2.0
305
from django.shortcuts import render from .forms import MyCodeForm def main(request): context = {} if request.method == 'POST': form = MyCodeForm(request.POST) context['form'] = form if form.is_valid(): code = form.cleaned_data['code'] print('Code:') ...
Pirheas/django-customizable-ace
example/app/views.py
Python
bsd-3-clause
598
from django.db import models from django.template.defaultfilters import slugify class Bar(models.Model): nombre = models.CharField(max_length=128, unique=True) direccion = models.CharField(max_length=128) numero_visita = models.IntegerField(default=0) slug = models.SlugField() def save(self, *...
acasadoquijada/IV
bares/models.py
Python
gpl-3.0
900
# coding: utf-8 import numpy as np import tensorflow as tf coefficients = np.array([[1.],[-10.],[25.]]) w = tf.Variable(0,dtype=tf.float32) x = tf.placeholder(tf.float32,[3,1]) cost = x[0][0] * w**2 + x[1][0]*w + x[2][0] train = tf.train.GradientDescentOptimizer(0.01).minimize(cost) init = tf.global_variables_initia...
excelsimon/AI
DeepLearning/1-ImprovingNeuralNetworks/6-ProgrammingFramework/TensorFlow.py
Python
mit
714
# yellowbrick.contrib.statsmodels # Implements wrappers around hte statsmodels library to use Yellowbrick with. # # Author: Benjamin Bengfort <benjamin@bengfort.com> # Created: Wed Apr 04 13:13:24 2018 -0400 # # ID: __init__.py [d6ebc39] benjamin@bengfort.com $ """ Implements wrappers around hte statsmodels library t...
DistrictDataLabs/yellowbrick
yellowbrick/contrib/statsmodels/__init__.py
Python
apache-2.0
548
from django.shortcuts import render from django.http import HttpResponse, HttpResponseRedirect import onenote import bitbucket # sample repo_uuid = 3d316876-a913-4b20-b183-d57e919f96dc BASE_URL = "https://afternoon-waters-2404.herokuapp.com" # DEV_URL = "https://classnotes-varunagrawal.c9.io" # Create your views h...
varunagrawal/ClassNotes
notes/views.py
Python
mit
4,070
#!/usr/bin/env python from __future__ import print_function from collections import Counter from operator import itemgetter import os _path = os.path.abspath(os.path.dirname(__file__)) SOURCE = os.path.join(_path, 'poems_for_wordcount.txt') DESTINATION = os.path.join(_path, 'poem_words_out.txt') def sort_word_cou...
clarkkarenl/brautbot
wordcount.py
Python
artistic-2.0
1,390
## Package for various utility functions to execute build and shell commands # # @copyright (c) 2007 CSIRO # Australia Telescope National Facility (ATNF) # Commonwealth Scientific and Industrial Research Organisation (CSIRO) # PO Box 76, Epping NSW 1710, Australia # atnf-enquiries@csiro.au # # This file is part of the ...
ATNF/askapsdp
Tools/Dev/rbuild/askapdev/rbuild/utils/create_init_file.py
Python
gpl-2.0
2,053
__all__ = ['biped', 'quadruped', 'octoped', 'fly', 'biped', 'fish'] from . import biped from . import octoped from . import quadruped from . import fly from . import bird from . import fish
AndresMWeber/komodo
rigger/rig_lib/rig/templates/__init__.py
Python
mit
191
from setuptools import setup def get_advanced_templates(): template_base = 'aws/templates/advanced/' template_names = ['advanced-master', 'advanced-priv-agent', 'advanced-pub-agent', 'infra', 'zen'] return [template_base + name + '.json' for name in template_names] setup( name='dcos_image', ver...
BenWhitehead/dcos
setup.py
Python
apache-2.0
3,118
from django.conf import settings from mixpanel import Mixpanel mp = Mixpanel(settings.MIXPANEL_TOKEN)
drulang/foxleaf
server/cobalt/tracking.py
Python
gpl-2.0
103
#!/usr/bin/env from lxml import etree import datetime import requests import csv import sys RUNNERS = { 'male': "8364", 'female': "8541" } MARATHON_SE_URL = "http://www.racetimer.se/sv/race/resultlist/1997?commit=Visa+resultat&layout=marathon&page={}&per_page=250&race_id=1997&rc_id={}" def getdoc(url)...
peterstark72/malmomilen
marathon.py
Python
mit
1,712
from aioworkers.core.base import AbstractWriter, LoggingEntity from aioworkers.net.sender import AbstractSender from aioworkers.worker.base import Worker as BaseWorker class Facade(LoggingEntity, AbstractSender): _queue = None # type: AbstractWriter async def init(self): await super().init() ...
aioworkers/aioworkers
aioworkers/net/sender/proxy.py
Python
apache-2.0
702
# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # ...
eduardocerqueira/mypublicip
mypublicip/util/__init__.py
Python
gpl-3.0
2,404
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2013 Therp BV (<http://therp.nl>) # All Rights Reserved # # This program is free software: you can redistribute it and/or modify #...
grap/server-tools
__unported__/fetchmail_attach_from_folder/wizard/__init__.py
Python
agpl-3.0
1,040
# -*- coding: utf-8 -*- # Copyright 2016 Rooms For (Hong Kong) Limited T/A OSCG # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # import stock_return_picking_hook import stock_picking import stock_location import stock_quant_hook_move_quants_write import stock_quant # vim:expandtab:smartindent:tabstop=...
yostashiro/awo-custom
stock_reverse_owner/models/__init__.py
Python
lgpl-3.0
350
"""Confidence intervals for proportions""" #/*********************************************************************** # * Licensed Materials - Property of IBM # * # * IBM SPSS Products: Statistics Common # * # * (C) Copyright IBM Corp. 1989, 2020 # * # * US Government Users Restricted Rights - Use, duplication or disclo...
IBMPredictiveAnalytics/PROPOR
src/PROPOR.py
Python
apache-2.0
10,440
import tkinter as tk from tkinter import ttk from window_main import MainWindow from input_thread import InputThread import midi_manager as mm # Initialize the input thread input_thread = InputThread() # Initialize the UI root = tk.Tk() root.wm_title("pianopad") root.geometry("600x410") app = MainWindow(input_thread...
danodic/pianopad
src/pianopad.py
Python
mit
574
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ *t4mon* - T4 monitoring **test functions** for gen_report.py """ from __future__ import absolute_import import base64 import imghdr import tempfile import six import pandas as pd from t4mon.gen_report import Report, gen_report from . import base class TestGenRepo...
fernandezcuesta/pySMSCMon
test/unit_tests/test_genreport.py
Python
mit
3,341
#!/usr/bin/env python """ patrol_smach_iterator.py - Version 1.0 2013-10-23 Control a robot using SMACH to patrol a square area a specified number of times Created for the Pi Robot Project: http://www.pirobot.org Copyright (c) 2013 Patrick Goebel. All rights reserved. This program is free software;...
fujy/ROS-Project
src/rbx2/rbx2_tasks/nodes/patrol_smach_iterator.py
Python
mit
9,741
import sys from PyQt5.QtWidgets import (QWidget, QToolTip, QPushButton, QApplication) from PyQt5.QtGui import QFont from PyQt5.QtWidgets import QFileDialog class MyWindow(QWidget): def __init__(self): super().__init__() self.initUI() def initUI(self): # 这种...
jinzekid/codehub
python/test_gui/AutoTime.py
Python
gpl-3.0
2,792
# Copyright (C) 2017 Antoine Fourmy <antoine dot fourmy at gmail dot 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. # # This program is distributed in the hope that it will be useful, # ...
afourmy/pyNMS
pyNMS/main_menus/routing_panel.py
Python
gpl-3.0
2,192
from PLC.Faults import * from PLC.Method import Method from PLC.Parameter import Parameter, Mixed from PLC.Nodes import Node, Nodes from PLC.Slices import Slice, Slices from PLC.Auth import Auth class AddSliceToNodesWhitelist(Method): """ Adds the specified slice to the whitelist on the specified nodes. Nodes ...
dreibh/planetlab-lxc-plcapi
PLC/Methods/AddSliceToNodesWhitelist.py
Python
bsd-3-clause
1,708
# -*- coding: utf-8 -*- """ Functionality related to point tracking. This module can accept a list of candidate points (Circle instances) and output a qualitatively more "stable" list of Point instances. """ import cv2 import math import numpy as np import numpy.linalg as la from collections import deque from color...
timothyb89/tracking
tracking/point.py
Python
mit
15,049
from AudioPython.dsp import * channels = ((pink_noise(amplitude=0.01),),)
VetoProjects/VetoLC
examples/pink_noise.py
Python
mit
75
# -*- encoding: utf-8 -*- ################################################################################# # # # Copyright (C) 2009 Renato Lima - Akretion # # ...
alexsandrohaag/l10n-brazil-data-zip
__openerp__.py
Python
agpl-3.0
3,316
#!/usr/bin/python # Copyright 2003 Dave Abrahams # Copyright 2002, 2003 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) # Test that default build clause actually has any effect. import BoostBuild t = BoostBuil...
davehorton/drachtio-server
deps/boost_1_77_0/tools/build/test/default_build.py
Python
mit
2,334
# # Copyright (c) 2014 Juniper Networks, Inc. All rights reserved. # """ This file contains implementation of data model for physical router configuration manager """ from vnc_api.common.exceptions import NoIdError from physical_router_config import PhysicalRouterConfig from sandesh.dm_introspect import ttypes as sand...
numansiddique/contrail-controller
src/config/device-manager/device_manager/db.py
Python
apache-2.0
36,280
"""distutils.command.upload Implements the Distutils 'upload' subcommand (upload package to PyPI).""" import os import socket import platform from urllib2 import urlopen, Request, HTTPError from base64 import standard_b64encode import urlparse import cStringIO as StringIO from hashlib import md5 from dist...
ktan2020/legacy-automation
win/Lib/distutils/command/upload.py
Python
mit
7,196
# Copyright 2014 Diamond Light Source Ltd. # # 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 t...
swtp1v07/Savu
savu/test/framework_test.py
Python
apache-2.0
3,320
# Copyright 2014 Google 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 by applicable law or ...
raybuhr/python-docs-samples
appengine/ndb/modeling/tests/test_structured_property_models.py
Python
apache-2.0
2,957
import base64 import cgi import Cookie import logging import os import StringIO import tempfile import urlparse import stash from utils import HTTPException logger = logging.getLogger("wptserve") missing = object() class Server(object): """Data about the server environment .. attribute:: config Enviro...
cr/fxos-certsuite
web-platform-tests/tests/tools/wptserve/wptserve/request.py
Python
mpl-2.0
16,439
# -*- coding: utf-8 -*- ''' Stacked Denoising Autoencoders: Learning Useful Representations in a Deep Network with a Local Denoising Criterion. Vincent et al. 2010 My code is non stack version... Use this code with no warranty and please respect the accompanying license. ''' import sys sys.path.append('../common') f...
nimagh/CNN_Implementations
GenerativeModels/CDAE.py
Python
gpl-3.0
6,825
#Kendo #Nhap 10 lan #Tinh gia tri trung binh cua cac so nhap vao L = [] for i in range(3): _input = raw_input("Nhap vao 1 so: ") _input = float(_input) L.append(_input) _sum = sum(L) _len = len(L) print "avg = %f" %(_sum/_len)
pythonvietnam/pbc082015
DuongKendo/Lab456/TinhTB.py
Python
gpl-2.0
233