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 setuptools import setup, find_packages setup( name='vent', version='v0.4.0', packages=['vent', 'vent.core', 'vent.core.file-drop', 'vent.core.rq-worker', 'vent.core.rq-dashboard', 'vent.menus', 'vent.menus.tutorials', 'vent.core.rmq-es-connector', 'vent.helper...
cprafullchandra/vent
setup.py
Python
apache-2.0
838
# This file is part of the Trezor project. # # Copyright (C) 2012-2018 SatoshiLabs and contributors # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3 # as published by the Free Software Foundation. # # This library is distrib...
romanz/python-trezor
trezorlib/tests/device_tests/test_msg_lisk_signtx.py
Python
lgpl-3.0
9,294
#ecef.py #https://code.google.com/p/pysatel/source/browse/trunk/coord.py?r=22 from math import pow, degrees, radians from scipy import mat, cos, sin, arctan, sqrt, pi, arctan2, deg2rad, rad2deg #TO-DO: UPDATE THESE NUMBERS USING THE earth_radius.py # # Constants defined by the World Geodetic System 1984 (WGS84) a = 6...
bosmanoglu/adore-doris
lib/python/basic/projections/ecef.py
Python
gpl-2.0
1,932
# -*- coding: utf-8 -*- from __future__ import absolute_import from exam import fixture from sentry.interfaces.base import InterfaceValidationError from sentry.interfaces.http import Http from sentry.testutils import TestCase class HttpTest(TestCase): @fixture def interface(self): return Http.to_py...
JackDanger/sentry
tests/sentry/interfaces/test_http.py
Python
bsd-3-clause
5,583
import detectlanguage def detect(data): result = detectlanguage.client.post('detect', { 'q': data }) return result['data']['detections'] def simple_detect(data): result = detect(data) return result[0]['language'] def user_status(): return detectlanguage.client.get('user/status') def languages(): return detect...
detectlanguage/detectlanguage-python
detectlanguage/api.py
Python
mit
353
#!/usr/bin/python import unittest import logging import datetime import os # own modules from datalogger import Timeseries as Timeseries from datalogger import TimeseriesArray as TimeseriesArray from datalogger import TimeseriesArrayStats as TimeseriesArrayStats from datalogger import TimeseriesStats as TimeseriesStat...
gunny26/datalogger
datalogger/test_DataLogger.py
Python
apache-2.0
4,739
""" porkchop.server ~~~~~~~~~~~~~~~ :copyright: (c) 2011-2012 DISQUS. :license: Apache License 2.0, see LICENSE for more details. """ from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from SocketServer import ThreadingMixIn import json import traceback import urlparse from porkchop.plugin import PorkchopP...
disqus/porkchop
porkchop/server.py
Python
apache-2.0
3,450
import sys def setup(core, object): object.setAttachment('objType', 'ring') object.setStfFilename('static_item_n') object.setStfName('item_entertainer_ring_01_02') object.setDetailFilename('static_item_d') object.setDetailName('item_entertainer_ring_01_02') object.setIntAttribute('cat_stat_mod_bonus.@stat_n:cons...
agry/NGECore2
scripts/object/tangible/wearables/ring/item_entertainer_ring_01_02.py
Python
lgpl-3.0
542
import numpy as np import scipy.sparse as ssp from sklearn.metrics import roc_auc_score def precisionAtK(Y_pred_orig, Y_true_orig, k, verbose=False): Y_pred = Y_pred_orig.copy() Y_true = Y_true_orig.copy() row_sum = np.asarray(Y_true.sum(axis=1)).reshape(-1) indices = row_sum.argsort() row_sum.sort...
nirbhayjm/Large-Scale-Multi-label-Learning
src/evaluation.py
Python
mit
3,293
#!/usr/bin/env python ############################################################################### # Copyright 2017 The Apollo 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 ...
msbeta/apollo
modules/tools/control_info/control_info.py
Python
apache-2.0
15,205
# Copyright (C) 2010-2014 GRNET S.A. # # 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 i...
olgabrani/synnefo
snf-cyclades-app/setup.py
Python
gpl-3.0
6,899
# -*- coding: utf-8 -*- from flask import url_for from sqlalchemy import Column, ForeignKey, func, Integer, select, Text from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.orm import column_property from pokr.models import Meeting from pokr.database import Base class Statement(Base): __tablename_...
teampopong/pokr.kr
pokr/models/statement.py
Python
apache-2.0
1,051
#!/usr/bin/env python # Copyright (c) 2012 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. """Runs install and update tests. Install tests are performed using a single Chrome build, whereas two or more builds are needed f...
espadrine/opera
chromium/src/chrome/test/install_test/run_install_tests.py
Python
bsd-3-clause
5,168
"""Module to provide generic utilities for other accelerometer modules.""" from collections import OrderedDict import datetime import glob import json import math import numpy as np import os import pandas as pd import re DAYS = ['mon', 'tue', 'wed', 'thur', 'fri', 'sat', 'sun'] TIME_SERIES_COL = 'time' def formatN...
aidendoherty/biobankAccelerometerAnalysis
accelerometer/accUtils.py
Python
bsd-2-clause
17,668
# Copyright 2011 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 a...
ryantierney513/capirca
aclcheck_cmdline.py
Python
apache-2.0
2,354
from gh import AddLabel, RemoveLabel from .handler import Handler from .command import GetCommands from .issue_event import GetIssue class LabelIssueCommentEventHandler(Handler): def __init__(self): super().__init__() def handles(self, event): return (event.type == 'IssueCommentEvent' ...
skim1420/spinnaker
spinbot/event/label_issue_comment_event_handler.py
Python
apache-2.0
1,094
__author__ = 'j' from somecrawler.queue import PriorityQueue from somecrawler.user import User, UserController class QueueManager: pQueue = PriorityQueue.PQueue() userCon = UserController.UserController() def __init__(self): pass def add_to_queue(self, pQueue, job, priority): pQueue.p...
ProjectCalla/SomeCrawler
somecrawler/queue/QueueManager.py
Python
gpl-3.0
802
from jinja2 import DictLoader, Environment MACRO_TEMPLATE = \ """{%- macro channel(channel_name, channel, options=None) %} <{{ channel_name }}> <SourceChannelName>{{ channel }}</SourceChannelName> {%- if options is mapping %} <ContrastEnhancement> <Normalize> <VendorOption name="al...
danlamanna/scratch
geonotebook/vis/geoserver/sld.py
Python
apache-2.0
6,739
# import time # # from selenium.webdriver.common.keys import Keys # # # from .base_selenium_test import BaseSeleniumTest # # # class TestAdminFormsInfant(BaseSeleniumTest): # # def login_navigate_to_admin(self): # self.login() # time.sleep(1) # self.browser.get(self.live_server_url + '/admin...
botswana-harvard/microbiome
microbiome/apps/mb_infant/tests/test_admin_forms_infant.py
Python
gpl-2.0
9,810
''' Python 3.X ThreadPoolExecutor 模块演示 Demo ''' import concurrent from concurrent.futures import ThreadPoolExecutor from urllib import request class TestThreadPoolExecutor(object): def __init__(self): self.urls = [ 'https://www.baidu.com/', 'http://blog.jobbole.com/', '...
yanbober/SmallReptileTraining
ConcurrentSpider/demo_thread_pool_executor.py
Python
mit
1,562
""" Class for IQ Data TDMS format Xaratustrah Aug-2015 """ import os import time import logging as log import numpy as np from iqtools.iqbase import IQBase import pytdms class TDMSData(IQBase): def __init__(self, filename): super().__init__(filename) # Additional fields in this subclass ...
xaratustrah/iq_suite
iqtools/tdmsdata.py
Python
gpl-2.0
7,679
import wx from wx.lib.pubsub import Publisher as pub from publisherconstants import * class AbstractSessionPanel(wx.Panel): def __init__(self, parent, session): super(AbstractSessionPanel, self).__init__(parent) self.session = session pub.subscribe(self.OnSessionStatusPublish, SUBJECT_STAT...
m4sterm1nd/python
betfair/AlgoView/sessions/abstractsessionpanel.py
Python
gpl-2.0
384
#!/usr/bin/env python # $Id$ # # gendata.py -- generates test data # # created on 00/05/19 by wesc # from random import randint, choice from time import ctime from sys import maxint # (value, not function) from string import lowercase from os.path import exists doms = ( 'com', 'edu', 'net', 'or...
opensvn/test
src/study/python/cpp/ch15/alt/gendata.py
Python
gpl-2.0
1,461
# -*- coding: utf-8 -*- import re from transformer.registry import register from transformer.transforms.base import BaseTransform # updated to include seperate regexes - testing is much easier here: # orig and default (UNI1): https://regex101.com/r/FCS4px/1 # uni2: https://regex101.com/r/sk6MVY/1 # na: https://regex1...
zapier/transformer
transformer/transforms/string/phone_number_extract.py
Python
gpl-3.0
3,211
# -*- coding: utf-8 -*- """ werkzeug.debug.tbtools ~~~~~~~~~~~~~~~~~~~~~~ This module provides various traceback related utility functions. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD. """ import re import os import sys import json import inspect import ...
thepiper/standoff
vpy/lib/python2.7/site-packages/werkzeug/debug/tbtools.py
Python
gpl-3.0
16,913
def is_pangram(word): word = sorted(word) i = 1 count = 0 while i < len(word): if (word[i] != word[i-1]) & (word[i].isalpha()): count += 1 i += 1 if count == 26: return True else: return False
ZachGangwer/Exercism
python/pangram/pangram.py
Python
gpl-3.0
273
from django.conf.urls import include, url urlpatterns = [ url(r'^sticky-uploads/', include('stickyuploads.urls')), ]
caktus/django-sticky-uploads
stickyuploads/tests/urls.py
Python
bsd-3-clause
123
# !/usr/bin/env python # -*- coding: UTF-8 -*- # # # ================== # VIZ MARKDOWN - multiple file, markdown format # ================== import os, sys import json from ..utils import * from ..builder import * # loads and sets up Django from ..viz_factory import VizFactory class MarkdownViz(VizFactory): "...
lambdamusic/OntoSPy
ontospy/ontodocs/viz/viz_markdown.py
Python
gpl-3.0
3,160
## ## Run: git log --author="DeepBlue14" --pretty=tformat: --numstat > counter_log.txt ## Then run this file my_sum = 0 with open("counter_log.txt") as f: content = f.readlines() for i in content: #print(i) no_ws = i.rstrip() if no_ws: last_char = no_ws[-1] #print(last_char) ...
DeepBlue14/rqt_ide
ChangeCounter.py
Python
mit
621
""" Default configuration file. This settings should be redifined. """ DEBUG = False # bool. can be set by env var PYPEMAN_DEBUG (0|1|true|false) or pypeman cmd args TESTING = False # bool. can be set by env var PYPEMAN_TESTING (0|1|true|false) pypeman cmd args DEBUG_PARAMS = dict( slow_callback_duration=0.1 ) ...
jrmi/pypeman
pypeman/default_settings.py
Python
apache-2.0
1,361
""" Integration tests for the stem.control.BaseController class. """ import re import threading import time import unittest import stem.control import stem.socket import stem.util.system import test.runner from test.runner import require_controller class StateObserver(object): """ Simple container for listeni...
FedericoCeratto/stem
test/integ/control/base_controller.py
Python
lgpl-3.0
8,385
# Copyright (c) 2011 Mounier Florian # Copyright (c) 2011 Paul Colomiets # Copyright (c) 2012 Craig Barnes # Copyright (c) 2012, 2014 Tycho Andersen # Copyright (c) 2013 Tao Sauvage # Copyright (c) 2014 ramnes # Copyright (c) 2014 Sean Vig # Copyright (c) 2014 dmpayton # Copyright (c) 2014 dequis # # Permission is here...
xplv/qtile
libqtile/layout/zoomy.py
Python
mit
5,680
import os import platform # toolchains options ARCH='risc-v' CPU='nuclei' CROSS_TOOL='gcc' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' if platform.system().lower() == "windows": EXEC_PATH = 'D:/NucleiStudio/toolchain/gcc/bin' else: ...
nongxiaoming/rt-thread
bsp/nuclei/nuclei_fpga_eval/rtconfig.py
Python
apache-2.0
2,308
import booby from booby import fields from booby.inspection import get_fields, is_model from booby.validators import Required from pydoc import locate from collections import OrderedDict from collections import OrderedDict from tabulate import tabulate import readline MODEL_MAP = {} class tabCompleter(object): ...
makkus/pyclist
pyclist/model_helpers.py
Python
apache-2.0
8,972
""" The unit tests in here interact directly with hydra-base (rather than using the Web API). """ from helpers import * from fixtures import * from hydra_base_fixtures import * from hydra_pywr.importer import PywrHydraImporter from hydra_pywr.template import generate_pywr_attributes, generate_pywr_template, pywr_templa...
UMWRG/PywrApp
tests/test_hydra_base_importing.py
Python
gpl-3.0
2,167
#!/usr/bin/python # -*- coding: utf-8 -*- import xbmc, xbmcvfs, xbmcgui, xbmcplugin, xbmcaddon import os import sys import shutil import urllib import urllib.request import urllib.parse import http.cookiejar import json import gzip import threading import time import datetime import hashlib from traceback import form...
eschava/soap4me-proxy
service.py
Python
lgpl-3.0
35,156
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): orm.Package.objects.filter(pkgbase=None).update(pkgbase=models.F('pkgname')) def backwards(self, orm): if not db.d...
pyropeter/archweb
main/migrations/0016_always_fill_pkgbase.py
Python
gpl-2.0
15,215
#!/usr/bin/env python # #title :const.py #description : # # const class does not allow rebinding value to name so that name is constant. # #========================================================================================== class _const: class ConstError(TypeError): pass def __setattr__(se...
libengu/llilc
test/const.py
Python
mit
540
from django.contrib import admin # Register your models here. from Food.models import Food admin.site.register(Food)
neewy/InStoKiloGram
Food/admin.py
Python
apache-2.0
118
# Copyright (c) Facebook, Inc. and its affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2. # tracing-level: trace from __future__ import absolute_import import os from bindings import tracing from testutil.autofix import eq from testutil.do...
facebookexperimental/eden
eden/hg-server/tests/test-sparse-fetch-t.py
Python
gpl-2.0
3,529
""" progressbar2 related utils""" from codekit.codetools import warn from public import public from time import sleep import progressbar import functools @public def setup_logging(verbosity=0): """Configure progressbar sys.stderr wrapper which is required to play nice with logging and not have strange format...
lsst-sqre/sqre-codekit
codekit/progressbar.py
Python
mit
2,070
"""Shark IQ Integration.""" import asyncio import async_timeout from sharkiqpy import ( AylaApi, SharkIqAuthError, SharkIqAuthExpiringError, SharkIqNotAuthedError, get_ayla_api, ) from homeassistant import exceptions from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from .const import...
turbokongen/home-assistant
homeassistant/components/sharkiq/__init__.py
Python
apache-2.0
3,446
from django.conf.urls import patterns, include, url urlpatterns = patterns('', url(r'^(?P<project_id>\d+)/stories/(?P<tag_filter>\w+)/(?P<hash_key>\w+)/$', 'pivotal.views.stories', name='pivotal_stories'), url(r'^(?P<project_id>\d+)/stories/(?P<tag_filter>\w+)/(?P<hash_key>\w+)/(?P<story_id>\d+)/$', 'pivotal.v...
cloudanswers/task-status-portal
pivotal/urls.py
Python
gpl-2.0
672
import unittest import os import sys from base_positive_integer_sort_test import BasePositiveIntegerSortTest sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, 'sort')) import counting_sort class CountingSortTest(unittest.TestCase, BasePositiveIntegerSortTest): def setUp(self...
GrowingWithTheWeb/py-sorting
test/counting_sort_test.py
Python
mit
404
from __future__ import absolute_import from django.conf.urls import url from oauth2_provider import views from .views import CoffeestatsApplicationRegistration, \ CoffeestatsApplicationDetail, \ CoffeestatsApplicationApproval, \ CoffeestatsApplicationRejection, \ CoffeestatsApplicationFullList urlpat...
coffeestats/coffeestats-django
coffeestats/caffeine_oauth2/urls.py
Python
mit
1,723
from dataclasses import dataclass, field from enum import Enum from typing import Any from .state import ClientStateHolder from .session import Session class TextActionType(Enum): Nothing = 0 SearchResults = 1 BasketRefresh = 2 Feedback = 3 Shutdown = 4 @dataclass class TextAction: action_ty...
thijsmie/tantalus
pos_endpoint/application.py
Python
mit
2,322
# Copyright 2016, 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...
googleapis/gax-python
google/gax/bundling.py
Python
bsd-3-clause
14,059
# Copyright 2015 ETH Zurich # # 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, sof...
caterinaurban/Typpete
typpete/tests/scion_err/lib/defines.py
Python
mpl-2.0
4,117
import os import unittest from dataset_creator.dataset import Dataset from .data import test_data FASTA_DATA_PATH = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'Fasta') class TestGenBankFASTA(unittest.TestCase): def setUp(self): self.maxDiff = None def test_dataset(self): data...
carlosp420/dataset-creator
tests/test_genbankfasta.py
Python
bsd-2-clause
562
########################################################################## # # Copyright (c) 2010, Image Engine Design 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: # # * Redistribu...
appleseedhq/cortex
test/IECoreScene/LimitSmoothSkinningInfluencesOpTest.py
Python
bsd-3-clause
17,858
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2019 Bitergia # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This ...
valeriocos/perceval
perceval/backends/core/bugzilla.py
Python
gpl-3.0
19,041
#!/usr/bin/env python """ General Utilities (part of web.py) """ from __future__ import print_function __all__ = [ "Storage", "storage", "storify", "Counter", "counter", "iters", "rstrips", "lstrips", "strips", "safeunicode", "safestr", "timelimit", "Memoize", "memoize", "re_compile", "re_subm", ...
TheXYZLAB/RaspCloudPrint
web/utils.py
Python
mit
42,406
import json import six from .. import base from .api_test import DockerClientTest, url_prefix, response from docker.utils import create_ipam_config, create_ipam_pool try: from unittest import mock except ImportError: import mock class NetworkTest(DockerClientTest): @base.requires_api_version('1.21') ...
rhatdan/docker-py
tests/unit/network_test.py
Python
apache-2.0
5,949
# Copyright 2021 Red Hat, 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 writing...
stratis-storage/stratis-cli
tests/whitebox/integration/pool/test_explain.py
Python
apache-2.0
1,139
# coding: utf-8 """ ORCID Member No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: Latest Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import si...
Royal-Society-of-New-Zealand/NZ-ORCID-Hub
orcid_api_v3/models/amount_v30_rc1.py
Python
mit
3,888
#!/usr/bin/python import getopt import pymqi, CMQC, CMQCFC, CMQXC import sys def usage(): print """Usage: list_mq_queues.py -H <hostName> -g <qmgrName> -a <channelName> [-p <portNumber>] [-t <queueType>] [-u <usageType>]""" def help(): usage() print """ List MQ queues -H, --host Host nam...
klapper/nagios-plugins-mq
list_mq_queues.py
Python
mit
5,325
#!/usr/bin/python # # Copyright (c) 2017 Obezimnaka Boms, <t-ozboms@microsoft.com> # # 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', ...
veger/ansible
lib/ansible/modules/cloud/azure/azure_rm_dnsrecordset_facts.py
Python
gpl-3.0
6,511
#! /usr/bin/env python import amqpav from kombu import Connection from kombu import Exchange from kombu import Queue import uuid import datetime import base64 import socket import time import random # AV exchanges av_exchange = Exchange('check', 'fanout', durable=True) reply_exchange = Exchange('check-result', 'fa...
dvoraka/amqpav
examples/avclient.py
Python
gpl-2.0
2,556
# Copyright (c) 2017 pandas-gbq Authors All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. """Helper methods for loading data into BigQuery""" import io from google.cloud import bigquery from pandas_gbq.features import FEATURES import pandas_gb...
pydata/pandas-gbq
pandas_gbq/load.py
Python
bsd-3-clause
3,099
""" Sets up the terminal color scheme. """ import functools import os import sys from django.utils import termcolors def supports_color(): """ Returns True if the running system's terminal supports color, and False otherwise. """ plat = sys.platform supported_platform = plat != 'Pocket PC' a...
mattseymour/django
django/core/management/color.py
Python
bsd-3-clause
1,824
from __future__ import print_function from __future__ import division __author__ = """Alex "O." Holcombe""" ## double-quotes will be silently removed, single quotes will be left, eg, O'Connor import numpy as np import itertools #to calculate all subsets from copy import deepcopy from math import atan, pi, cos, sin, sqr...
alexholcombe/MOTcircular
experiment_specific/transient_attention/helpersAOHtargetFinalCueLocatn.py
Python
mit
31,372
def foo(): global <weak_warning descr="Global variable 'bar' is undefined at the module level">bar</weak_warning> bar = "something"
siosio/intellij-community
python/testData/inspections/PyGlobalUndefinedInspection/reassignedAndAbsent.py
Python
apache-2.0
140
from django.core.exceptions import ImproperlyConfigured from django.db.models.fields import CharField, DecimalField from django.utils import six from django.utils.translation import ugettext_lazy as _ from phonenumber_field.modelfields import PhoneNumberField from oscar.core import validators from oscar.forms import f...
vicky2135/lucious
src/oscar/models/fields/__init__.py
Python
bsd-3-clause
5,511
import collections import inspect import json class Named(object): @property def name(self): name = Named.typename(self.__class__) hex_hash = '%016x' % abs(hash(self)) return '%s//%s' % (name, hex_hash) @staticmethod def typename(typ): module = typ.__module__ m...
solidsnack/confit
confit/meta.py
Python
apache-2.0
3,756
"""Agrega alturas.codprov y alturas.cp Revision ID: f5195fe91e09 Revises: fccbcd8362d7 Create Date: 2017-07-09 22:01:51.280360 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'f5195fe91e09' down_revision = 'fccbcd8362d7' branch_labels = None depends_on = None ...
OpenDataCordoba/codigo-postal-argentino
alembic/versions/f5195fe91e09_agrega_alturas_codprov_y_alturas_cp.py
Python
gpl-2.0
796
#!/usr/bin/env python # Copyright 2014-2019 The PySCF Developers. 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 # # U...
gkc1000/pyscf
pyscf/shciscf/examples/01_O2_PT.py
Python
apache-2.0
2,512
from .ruv import RUVIE from .abc import ABCIE from .academicearth import AcademicEarthCourseIE from .addanime import AddAnimeIE from .adultswim import AdultSwimIE from .aftonbladet import AftonbladetIE from .anitube import AnitubeIE from .anysex import AnySexIE from .aol import AolIE from .allocine import AllocineIE fr...
kthordarson/youtube-dl-ruv
youtube_dl/extractor/__init__.py
Python
unlicense
14,468
import numpy as np import math import time import random import sys from rick.A_star_planning import * from math import pi import matplotlib.pyplot as plt def compute_euclidean_path(pos_rob,pos_obj, points = 5): #pos_rob is a 1x3 matrix with(x,y,teta) & pos_obj is a 1x2 matrix with(x,y) x = np.linspace(pos_rob[0]...
TheCamusean/DLRCev3
rick/rick/mc_please_github_donot_fuck_with_this_ones.py
Python
mit
16,563
import threading import RPi.GPIO as GPIO import time import random import math from . import switch_timer from .. import utils from .. import pins from .. import queue_common from .. import event # For reading the color sensors from color_sensors import ColorSensors from leds import LedStrip from sensor_targets import...
RoboErik/RUBIK
Rubik/RubikSolver/rubik_solver.py
Python
apache-2.0
18,065
from pySecDec import make_package make_package( name = 'easy', integration_variables = ['x','y'], regulators = ['eps'], requested_orders = [0], polynomials_to_decompose = ['(x+y)^(-2+eps)'], )
mppmu/secdec
examples/easy_cuda/generate_easy.py
Python
gpl-3.0
197
""" WSGI config for captain project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` ...
mozilla/captain
captain/wsgi.py
Python
mpl-2.0
1,653
""" Django settings for erp project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import...
HarrisonHDU/myerp
erp/settings.py
Python
mit
3,334
#!/usr/bin/python # # (c) 2017, Dario Zanzico (git@dariozanzico.com) # 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 = {'status': ['preview'], 'suppor...
orgito/ansible
lib/ansible/modules/cloud/docker/docker_swarm_service.py
Python
gpl-3.0
46,290
#!/usr/bin/env python # (C) Copyright IBM Corporation 2004, 2005 # All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # ...
guorendong/iridium-browser-ubuntu
third_party/mesa/src/src/mapi/glapi/gen/glX_proto_send.py
Python
bsd-3-clause
33,001
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
mdworks2016/work_development
Python/05_FirstPython/Chapter9_WebApp/fppython_develop/lib/python3.7/site-packages/zope/interface/interfaces.py
Python
apache-2.0
50,271
# Copyright 2016 Bridgewater Associates # # 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 appli...
Netflix/security_monkey
security_monkey/watchers/vpc/endpoint.py
Python
apache-2.0
4,242
import urllib3 import cloudshare import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 ''' IMPORTS ''' # Disable insecure warnings urllib3.disable_warnings() ''' CONSTANTS ''' ''' CLIENT CLASS ''' class Client(): def __init__(self, hostname: str, api_id: str = None, api_k...
demisto/content
Packs/CloudShare/Integrations/CloudShare/CloudShare.py
Python
mit
42,863
import os from setuptools import setup def read(fname): with open(os.path.join(os.path.dirname(__file__), fname)) as buf: return buf.read() conf = dict( name='colorcut', version='0.1', description='Detect colored points and cut images', long_description=read('README.md'),...
boyska/SplitByColor
setup.py
Python
gpl-3.0
1,033
import copy import numbers from collections import Hashable from functools import partial from bson import ObjectId, json_util from bson.dbref import DBRef from bson.son import SON import pymongo import six from mongoengine import signals from mongoengine.base.common import get_document from mongoengine.base.datastru...
Pablo126/SSBW
Tarea4/tarea4/lib/python3.5/site-packages/mongoengine/base/document.py
Python
gpl-3.0
41,762
#!/usr/bin/env python # Copyright 2012 Google Inc. All Rights Reserved. """Client actions related to plist files.""" import cStringIO import types from grr.client import actions from grr.client import vfs from grr.lib import plist as plist_lib from grr.lib import rdfvalue from grr.parsers import binplist class ...
wandec/grr
client/client_actions/plist.py
Python
apache-2.0
2,452
from ores.task_tracker.null_task_tracker import NullTaskTracker def test_null_task_tracker(): task_tracker = NullTaskTracker() assert task_tracker.lock('fooo', 'value') is True assert task_tracker.get_in_progress_task('fooo') is None assert task_tracker.release('fooo') is True
wiki-ai/ores
tests/task_tracker/tests/test_null_task_tracker.py
Python
mit
296
# coding=utf-8 # # Copyright 2017 F5 Networks 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 a...
F5Networks/f5-common-python
f5/bigip/tm/asm/policies/login_enforcement.py
Python
apache-2.0
1,423
import sys import pickle import math import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np from subprocess import Popen, PIPE from collections import defaultdict def tree(): return defaultdict(tree) def run_command_with_params_and_get_output(command, args): # Compile first ...
pxinghao/dimmwitted
SVRG/run_full_benchmark.py
Python
apache-2.0
28,082
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2018-09-24 12:19 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('models', '0036_auto_20180115_1849'), ] operations = [ migrations.AddField( ...
Ale-/civics
apps/models/migrations/0037_auto_20180924_1219.py
Python
gpl-3.0
2,703
''' purpose: Creating Face Parameters ''' import os import metautil.json_util class DefaultFaceParameters(): def __init__(self): ''' parameter: [pose_frame, pose_sdk_multiplier, control_opposite_parameter(if any), mirror_parameter(if any), regions] control_opposite_parameter means if this parameter has a valu...
deathglitch/metarigging
python/face/face_parameters_export.py
Python
mit
29,430
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2012, Jean-Rémy Bancel <jean-remy.bancel@telecom-paristech.org> # 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 o...
JRBANCEL/Chromagnon
chromagnonCache.py
Python
bsd-3-clause
4,390
# coding: utf-8 from __future__ import unicode_literals import itertools import json import re from .common import InfoExtractor, SearchInfoExtractor from ..compat import ( compat_urllib_parse, compat_urlparse, ) from ..utils import ( clean_html, unescapeHTML, ExtractorError, int_or_none, ...
lzambella/Qyoutube-dl
youtube_dl/extractor/yahoo.py
Python
gpl-3.0
15,027
from numpy import * import matplotlib.pyplot as plt #Define array for results wav_array = zeros((900,900), dtype=float32) #Define wave sources pa = (300,450) pb = (600,450) #Loop over all cells in array to calculate values for i in range(900): for j in range(900): adist = sin( sqrt((i-pa[0])**2 + (j-pa[1])**2)) b...
AdamHarries/CUDA_Talk
code/waves_normal.py
Python
unlicense
506
from sms import *
cheddarfinancial/quarry-platform
chassis/sms/__init__.py
Python
bsd-3-clause
18
# -*- coding: utf-8 -*- # # 2020-06-04 Cornelius Kölbel <cornelius.koelbel@netknights.i> # Initial Code # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Affero General Public # License, version 3, as published by the Free Software Foundat...
privacyidea/privacyidea
privacyidea/lib/smsprovider/ScriptSMSProvider.py
Python
agpl-3.0
5,045
INSTALLED_APPS = ( 'geelweb.django.editos', ) SECRET_KEY = '$-muc7nzd^9g9z^f+^8@^inpbpixz=)d8k%g%qsgrw*3+)^1t_' MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib....
geelweb/django-editos
tests/test_settings.py
Python
mit
1,471
from lacuna.building import MyBuilding class citadelofknope(MyBuilding): path = 'citadelofknope' def __init__( self, client, body_id:int = 0, building_id:int = 0 ): super().__init__( client, body_id, building_id )
tmtowtdi/MontyLacuna
lib/lacuna/buildings/permanent/citadelofknope.py
Python
mit
233
from django.utils.translation import ugettext_lazy as _ STATUS_NEW = 0 STATUS_SUCCESS = 1 STATUS_FAILED = 2 STATUSES = ( (STATUS_NEW, _('new')), (STATUS_SUCCESS, _('success')), (STATUS_FAILED, _('failed')), ) GITHUB_STATES = { STATUS_NEW: 'pending', STATUS_SUCCESS: 'success', STATUS_FAILED: ...
nvbn/coviolations_web
tasks/const.py
Python
mit
462
"""Test for the tutorials.utils package""" import datetime import unittest from mock import patch from django.template import Template from ..utils import send_email_message today = datetime.date.today() class TestSendEmailMessage(unittest.TestCase): @patch('django.core.mail.message.EmailMessage.send') ...
pyconjp/pyconjp-website
pycon/tutorials/tests/test_utils.py
Python
bsd-3-clause
1,188
""" Simple Python class to access the Tesla JSON API https://github.com/gglockner/teslajson The Tesla JSON API is described at: https://tesla-api.timdorr.com Example: import teslajson c = teslajson.Connection('youremail', 'yourpassword') v = c.vehicles[0] v.wake_up() v.data_request('charge_state') v.command('charge_...
gglockner/teslajson
teslajson/teslajson.py
Python
mit
7,625
# coding=utf-8 # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals from future.utils import PY3 def assertRegex(self, text, expected_regex, msg=None): "...
twitter/pants
tests/python/pants_test/testutils/py2_compat.py
Python
apache-2.0
1,035
import numpy as np import pandas as pd from bokeh.document import Document from bokeh.embed import file_html from bokeh.layouts import column, gridplot from bokeh.models import (Circle, ColumnDataSource, Div, Grid, Line, LinearAxis, Plot, Range1d,) from bokeh.resources import INLINE from boke...
ericmjl/bokeh
examples/models/file/anscombe.py
Python
bsd-3-clause
3,276
# -*- coding: utf-8 -*- """ @author: Satoshi Hara """ import sys sys.path.append('../') from defragTrees import * import BATree from RForest import RForest import numpy as np import re from sklearn import tree from sklearn.grid_search import GridSearchCV #************************ # inTree Class #********************...
sato9hara/defragTrees
paper/baselines/Baselines.py
Python
mit
9,354
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='cool-commits', # Versions should comply with PEP440. For a discuss...
OrDuan/cool_commits
setup.py
Python
apache-2.0
1,475
class C: def __init__(self): self.instance_attr = 42 match C(): case C(instance<caret>=True): pass
jwren/intellij-community
python/testData/completion/existingKeywordPattern.py
Python
apache-2.0
124