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
#!/usr/bin/env python # -*- coding: utf-8 -*- from rest_framework import serializers from lecture.feed.models import Feed, FeedRoot class FeedSerializer(serializers.ModelSerializer): class Meta: model = Feed fields = ('id', 'title', 'url') class FeedRootSerializer(serializers.ModelSerializer):...
poulp/lecture
lecture/feed/serializers.py
Python
gpl-3.0
443
from os.path import dirname, basename, isfile import glob # Autodetect all modules in this directory, so they can be automatically imported by 'from <> import *'. module_paths = glob.glob(dirname(__file__)+"/*.py") __all__ = [ basename(f)[:-3] for f in module_paths if isfile(f)]
dominicgs/GreatFET-experimental
host/greatfet/neighbors/__init__.py
Python
bsd-3-clause
282
# -*- noplot -*- """ Although it is usually not a good idea to explicitly point to a single ttf file for a font instance, you can do so using the font_manager.FontProperties fname argument (for a more flexible solution, see the font_fmaily_rc.py and fonts_demo.py examples). """ import sys import os import matplotlib.fo...
lthurlow/Network-Grapher
proj/external/matplotlib-1.2.1/lib/mpl_examples/api/font_file.py
Python
mit
1,196
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE import os from PyQt4 import QtGui, Qt, QtCore from opus_gui.general_manager.views.ui_dependency_viewer import Ui_DependencyViewer class DependencyViewer(QtGui.QDialog, Ui_DependencyViewer): def _...
christianurich/VIBe2UrbanSim
3rdparty/opus/src/opus_gui/general_manager/controllers/dependency_viewer.py
Python
gpl-2.0
1,509
# -- # Load deps import keras import pandas as pd from fuzzywuzzy import fuzz from matplotlib import pyplot as plt import sys sys.path.append('..') from wit import * pd.set_option('display.max_rows', 50) pd.set_option('display.max_columns', 500) pd.set_option('display.width', 120) np.set_printoptions(linewidth=100)...
phronesis-mnemosyne/census-schema-alignment
wit/wit/examples/streamlined-address-matching.py
Python
apache-2.0
2,939
""" Compute Engine definitions for the Pipeline API. """ from abc import ( ABCMeta, abstractmethod, ) from uuid import uuid4 from six import ( iteritems, with_metaclass, ) from numpy import array from pandas import DataFrame, MultiIndex from toolz import groupby, juxt from toolz.curried.operator import...
humdings/zipline
zipline/pipeline/engine.py
Python
apache-2.0
22,892
#!/usr/bin/env python2.7 # # ProFTPD versions - create proftpd versions and dump them into versions.h # # Copyright (c) 2015 by Hypsurus # # import sys # The proftpd versions cycle: # proftpd-1.3.2rc1 # proftpd-1.3.2rc2 # proftpd-1.3.2rc3 # proftpd-1.3.2rc4 # proftpd-1.3.2 # proftpd-1.3.2a # proftpd-1.3.2b # p...
KorayAgaya/ftpmap
tools/proftpd_versions.py
Python
gpl-3.0
1,228
# Copyright (C) 2010-2019 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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 ...
fweik/espresso
testsuite/python/lb_pressure_tensor.py
Python
gpl-3.0
6,864
from yBalance import yBalance from yRead import read_inputfile from yOutput import plot_results, write_results from yOptions import epsilon class ySimulator: def __init__(self, filename): self.__filename = filename self.__balances = list() self.__laws = list() self.__outputs = lis...
drjod/yWaves
ySimulator.py
Python
gpl-3.0
2,389
from django import template register = template.Library() @register.simple_tag def active(request, pattern): import re if re.search(pattern, request.path): return 'ui-btn-active' return ''
jonespen/jebs
bysykkel/templatetags/tags.py
Python
gpl-3.0
208
''' Communication and control with the Goodspeed's Facedancer '''
nccgroup/umap2
umap2/phy/facedancer/__init__.py
Python
agpl-3.0
65
import Nodes import ExprNodes import PyrexTypes import Visitor import Builtin import UtilNodes import TypeSlots import Symtab import Options import Naming from Code import UtilityCode from StringEncoding import EncodedString, BytesLiteral from Errors import error from ParseTreeTransforms import SkipDeclarations impor...
bhy/cython-haoyu
Cython/Compiler/Optimize.py
Python
apache-2.0
127,713
# Generated by Django 1.11.2 on 2017-08-04 01:20 import django.db.models.deletion import django.utils.timezone import model_utils.fields from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( ...
watchdogpolska/poradnia.siecobywatelska.pl
poradnia/stats/migrations/0001_initial.py
Python
bsd-3-clause
3,015
# This file is part of Ansible # # Ansible 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. # # Ansible is distributed in the hope that ...
danieljaouen/ansible
test/units/modules/network/ios/test_ios_facts.py
Python
gpl-3.0
3,496
#!/usr/bin/env python from txamqp.testlib import TestBase from classymq.common import resolve_setting from twisted.internet import reactor from classymq import factory __author__ = 'gdoermann' TEST_RABBIT_MQ_HOST = resolve_setting('TEST_RABBIT_MQ_HOST', 'localhost') TEST_RABBIT_MQ_PORT = resolve_setting('TEST_RABBIT_...
gdoermann/classymq
classymq/tests/base.py
Python
bsd-3-clause
1,241
from biicode.common.exception import (NotInStoreException, NotFoundException, InvalidNameException, ForbiddenException, AuthenticationException) from biicode.server.authorize import Security from biicode.server.model.user import User from biico...
bowlofstew/bii-server
user/user_service.py
Python
mit
12,755
from lib import fbconsole fbconsole.AUTH_SCOPE = ['manage_notifications'] fbconsole.authenticate() print fbconsole.ACCESS_TOKEN
0xlen/fb-notify
test/test.py
Python
mit
131
# Name: Thijs Schouten # Student number: 10887679 ''' This script scrapes regatta data from TIME-TEAM.nl ''' # -------------------------------------------------------------------------- # Libraries # Python library imports import json # Third party library imports: import pattern from pattern.web import Element, UR...
ThijsSchouten/Dataproject
scraper/scraper.py
Python
mit
15,621
# pylint: disable=unused-import # TODO: eventually move this implementation into the user_api """ Django Administration forms module """ from student.forms import PasswordResetFormNoActive
xingyepei/edx-platform
openedx/core/djangoapps/user_api/forms.py
Python
agpl-3.0
189
import os import base64 import logging from aiohttp import web from aiohttp_session import session_middleware from aiohttp_session.cookie_storage import EncryptedCookieStorage from cryptography.fernet import Fernet import aiohttp_jinja2 import jinja2 from . import urls def root_package_name(): return __name__.s...
brainmorsel/python-dhcp-sprout
ds/web/server.py
Python
mit
2,229
__author__ = 'shafengfeng' # -*- coding: utf-8 -*- City_info = { '北京': '101010100', '海淀': '101010200', '朝阳': '101010300', '顺义': '101010400', '怀柔': '101010500', '通州': '101010600', '昌平': '101010700', '延庆': '101010800', '丰台': '101010900', '石景山': '101011000', '大兴': '...
Lemueler/Petro-UI
weather/City_info.py
Python
lgpl-3.0
69,693
#! /usr/bin/env python # -*- coding: utf-8 -*- from ZIBMolPy.internals import Converter, DihedralCoordinate, LinearCoordinate import numpy as np import sys import math from scipy.io import savemat from optparse import OptionParser #=============================================================================== def ...
CMD-at-ZIB/ZIBMolPy
tools/trr2internals.py
Python
lgpl-3.0
2,507
# # Copyright (C) 2004 SIPfoundry Inc. # Licensed by SIPfoundry under the GPL license. # # Copyright (C) 2004 SIP Forum # Licensed to SIPfoundry under a Contributor Agreement. # # # This file is part of SIP Forum User Agent Basic Test Suite which # belongs to the SIP Forum Test Framework. # # SIP Forum User Agent Basic...
VoIP-co-uk/sftf
UserAgentBasicTestSuite/case202.py
Python
gpl-2.0
4,465
import src.console import collections class MessageBox(object): def __init__(self, console, num, pos, event=None): self.console = console self.pos = x,y = pos self.messages = collections.deque([], num) self.maxlen = -float('inf') if event is not None: import src.events src.events.EventHandler().handle...
fiddlerwoaroof/new_rl
gui/text_display.py
Python
apache-2.0
1,557
################################################################ # LiveQ - An interactive volunteering computing batch system # Copyright (C) 2013 Ioannis Charalampidis # # 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 ...
wavesoft/LiveQ
liveq-jobmanager/jobmanager/component.py
Python
gpl-2.0
28,958
#encoding: utf-8 from django.conf.urls import include, url, patterns urlpatterns = patterns('movies.views', url(r'^$','index', name='home'), url(r'^agendar/(?P<pk>\d+)$','add_scheduled_movie', name='scheduled_movie'), url(r'^apagar_filme/(?P<pk>\d+)$','movie_delete', name='delete_movie'), url(r'^editar_filme/(?P<...
HenriqueLR/movie-book
app/movies/urls.py
Python
mit
425
import unittest import consul import os import random class ConsulTestCase(unittest.TestCase): def setUp(self): self.consul_address = os.getenv('CONSUL_HTTP_ADDR') if not self.consul_address: self.assertTrue(self.consul_address, "No CONSUL_HTTP_ADDR provided. Failed to continue") ...
alxark/scmt
server/scmt/storages/test_consul.py
Python
gpl-3.0
1,633
from chapter13.exercise13_2_1 import right_rotate from chapter13.textbook13_2 import rb_search, left_rotate, rb_successor from datastructures.red_black_tree import Red, Black, IntervalPomNode def interval_pom_search(T, k): return rb_search(T.root, k, sentinel=T.nil) def interval_pom_insert(T, i): low_endpoi...
wojtask/CormenPy
src/chapter14/problem14_1.py
Python
gpl-3.0
6,793
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function __all__ = [ "__title__", "__summary__", "__uri__", "__version__", "__a...
astaninger/speakout
venv/lib/python3.6/site-packages/pip/_vendor/packaging/__about__.py
Python
mit
720
#!/usr/bin/env python # -*- coding: latin-1 -*- ''' Created on 26 juil. 2013 @author: Aristote Diasonama ''' from google.appengine.ext import ndb from .base import BaseHandler from market.handlers.base import student_required from shop.shop_exceptions import EventNotFoundException from shop.handlers.base_handler im...
EventBuck/EventBuck
market/handlers/event/attending.py
Python
mit
3,158
# Generated by Django 2.2.4 on 2019-10-03 09:22 from django.db import migrations, transaction from django.db.models import Count def remove_duplicated_attribute_values(apps, schema_editor): """Remove duplicated attribute values. Before this migration Saleor allows create many attribute values with the same ...
maferelo/saleor
saleor/product/migrations/0108_auto_20191003_0422.py
Python
bsd-3-clause
2,456
import colander from datetime import datetime from hashlib import sha1 from sqlalchemy import or_ from sqlalchemy.orm import aliased from sqlalchemy.ext.associationproxy import association_proxy from storyweb.core import db, url_for from storyweb.model.user import User from storyweb.analysis.html import clean_html fro...
pudo/storyweb
storyweb/model/card.py
Python
mit
6,387
OFFERING_FIELDS = ( 'name', 'description', 'full_description', 'terms_of_service', 'options', ) OFFERING_COMPONENT_FIELDS = ( 'name', 'type', 'description', 'article_code', 'measured_unit', 'billing_type', 'min_value', 'max_value', 'is_boolean', 'default_limi...
opennode/nodeconductor-assembly-waldur
src/waldur_mastermind/marketplace_remote/constants.py
Python
mit
452
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-02-04 03:57 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('property', '0001_initial'), ] operations = [ ...
Code4Maine/suum
suum/apps/property/migrations/0002_auto_20160203_2257.py
Python
bsd-3-clause
1,033
import os import pickle import pytest import functools try: import pycuda except ImportError: ans = input('PyCUDA not found. Regression tests will take forever. Do you want to continue? [y/n] ') if ans in ['Y', 'y']: pass else: sys.exit() from pygbe.main import main @pytest.mark.par...
barbagroup/pygbe
tests/test_lysozyme.py
Python
bsd-3-clause
1,564
from collections import Counter wordcount = Counter(open("words.txt")) for item in wordcount.items(): print "%d %s" % (item[1], item[0])
dhalleine/tensorflow
fred/wsd/data/count_words.py
Python
apache-2.0
142
from django.contrib.staticfiles.testing import StaticLiveServerTestCase from selenium.webdriver.firefox.webdriver import WebDriver from C4CApplication.db_script import populateDB class MySeleniumTests(StaticLiveServerTestCase): @classmethod def setUpClass(cls): cls.selenium = WebDriver() ...
dsarkozi/care4care-sdp-grp4
Care4Care/C4CApplication/unit_tests/super_class.py
Python
agpl-3.0
609
# Copyright (C) 2014 Alex Nitz # # # 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 t...
soumide1102/pycbc
pycbc/workflow/pegasus_workflow.py
Python
gpl-3.0
15,233
# coding=UTF-8 __author__ = 'whf' # 该脚本用于删除兼职表和二手表中 # delete字段为true的记录 import sys import argparse import mysql.connector import logging import time # 设置命令行参数格式 parser = argparse.ArgumentParser() parser.add_argument('--port', dest='port', help='连接端口') parser.add_argument('--host', dest='host', help='连接地址') parser.add_...
wanghongfei/taolijie
script/delete-data.py
Python
gpl-3.0
3,120
def agts(queue): d = queue.add('diffusion1.py', ncpus=1, walltime=10) queue.add('neb.py', deps=d, ncpus=12, walltime=60)
robwarm/gpaw-symm
doc/tutorials/neb/submit.agts.py
Python
gpl-3.0
134
#!/usr/bin/env python # # Copyright (c) 2016 Cisco and/or its affiliates. # 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 # l # Unless requir...
wfnex/openbras
src/VPP/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py
Python
bsd-3-clause
14,687
# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import now_datetime, cint from frappe.model.document import Document from erpnext.l...
gsnbng/erpnext
erpnext/loan_management/doctype/loan_security_pledge/loan_security_pledge.py
Python
agpl-3.0
1,964
import logging from typing import Any, List from absl import flags from injector import Binder, Module, inject, singleton from rep0st.framework import app from rep0st.framework.scheduler import Scheduler, SchedulerModule from rep0st.service.feature_service import FeatureService, FeatureServiceModule from rep0st.db.po...
ReneHollander/rep0st
rep0st/job/update_features_job.py
Python
mit
1,443
import re, urllib2 class WhatBase: # Some utility functions and constants that I am very lazily bunging into a base class _sitename = "what.cd" def debugMessage(self, message, messagecallback = None): if messagecallback: messagecallback(message) else: print message def downloadResource(self, url, path...
lapsed/whatbot
whatbase.py
Python
unlicense
1,735
import sys import numpy as np from seisflows.config import custom_import, ParameterError from seisflows.plugins import optimize PAR = sys.modules['seisflows_parameters'] PATH = sys.modules['seisflows_paths'] class NLCG(custom_import('optimize', 'base')): """ Nonlinear conjugate gradient method """ def...
luan-th-nguyen/seisflows_ndt
seisflows/optimize/NLCG.py
Python
bsd-2-clause
1,374
import numpy as np import matplotlib.pyplot as pl from matplotlib import gridspec from matplotlib.widgets import Cursor import scipy import scipy.spatial from numpy.polynomial.chebyshev import chebval def get_ellipse_xys(ell): a = ell[0] b = ell[1] pts = np.zeros((361, 2)) beta = -ell[4] * np.pi / ...
scizen9/kpy
SEDMr/GUI.py
Python
gpl-2.0
19,037
# -*- coding: utf-8 -*- from __future__ import division import collections import numpy as np from stingray import Lightcurve import stingray.utils as utils __all__ = ['Covariancespectrum', 'AveragedCovariancespectrum'] class Covariancespectrum(object): def __init__(self, event_list, dt, band_interest=None, ...
pabell/stingray
stingray/covariancespectrum.py
Python
mit
19,380
from __future__ import division, print_function import numpy as np from lmfit.models import VoigtModel, LinearModel from scipy.signal import argrelmax import matplotlib.pyplot as plt def lamda_from_bragg(th, d, n): return 2 * d * np.sin(th / 2.) / n def find_peaks(chi, sides=6, intensity_threshold=0): # Fin...
NSLS-II-XPD/ipython_ophyd
profile_collection_germ/startup/42-energy-calib.py
Python
bsd-2-clause
5,617
from os import listdir import cProfile import pstats from bencodepy.decoder import decode from bencodepy.encode import encode folder_path = '../torrent meta testing samples/' file_data = [] for file_name in listdir(folder_path): with open(folder_path + file_name, 'rb') as f: data = f.read() file_...
eweast/BencodePy
tests/benchmarks/bench_encoding.py
Python
gpl-2.0
1,130
import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) step_pin = 24 dir_pin = 25 ms1_pin = 23 ms2_pin = 18 GPIO.setup(step_pin, GPIO.OUT) GPIO.setup(dir_pin, GPIO.OUT) GPIO.setup(ms1_pin, GPIO.OUT) GPIO.setup(ms2_pin, GPIO.OUT) period = 0.02 def step(steps, direction, period): # (1) GPIO.output(dir_pin, di...
simonmonk/make_action
python/experiments/microstepping.py
Python
mit
1,397
""" Test key names in json config files as shown by inspect subcommand https://bugzilla.redhat.com/show_bug.cgi?id=1092773 1. Create some docker containers 2. Run docker inspect command on them and an image 3. Check output keys againt known keys and a regex """ from dockerinspect import inspect_base from dockertest.o...
luwensu/autotest-docker
subtests/docker_cli/dockerinspect/inspect_keys.py
Python
gpl-2.0
3,367
# -*- coding: utf-8 -*- ## Invenio elmsubmit unit tests. ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2013 CERN. ## ## Invenio 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 Fo...
MSusik/invenio
invenio/testsuite/test_legacy_elmsubmit.py
Python
gpl-2.0
8,077
# -*- coding: utf-8 -*- """Tests for the Category class.""" # # (C) Pywikibot team, 2014-2015 # # Distributed under the terms of the MIT license. # from __future__ import unicode_literals __version__ = '$Id$' import pywikibot import pywikibot.page from tests.aspects import unittest, TestCase class TestCategoryObj...
valhallasw/pywikibot-core
tests/category_tests.py
Python
mit
9,012
#!/usr/bin/python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it w...
sacsant/avocado-misc-tests
io/net/sriov_device_test.py
Python
gpl-2.0
13,822
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): depends_on = ( ('sa_api_v2.cors', '0004__rename_originpermission_to_origin.py'), ) def forwards(self, orm): # Adding model 'K...
codeforsanjose/MobilityMapApi
src/sa_api_v2/south_migrations/0036_auto__add_keypermission__add_rolepermission__add_originpermission.py
Python
gpl-3.0
14,782
#!/usr/bin/env python """ A small script to check how a change to the proof system affects the number of discharged VCs. Usage: git diff | ./analyze_diff.py """ import sys proved = 0 failed = 0 for raw_line in sys.stdin: if len(raw_line) < 2: continue if raw_line[0] == "-": val = -1...
ptroja/spark2014
testsuite/gnatprove/analyse_diff.py
Python
gpl-3.0
782
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible 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) an...
reedloden/ansible
lib/ansible/executor/task_queue_manager.py
Python
gpl-3.0
13,130
import web import datetime import time import datetime db = web.database(dbn='sqlite', db='wrg.db') def get_users(): return db.select('user') def get_user_by_id(id): try: return db.select('user', where='id=$id', vars=locals())[0] except IndexError: return None def g...
benshen/wrg
model.py
Python
mit
1,607
''' Create a Droplet eg: doto start --name Random --size_id 66 --image_id 2158507 --region_id 1 --ssh_key_ids 89221 ''' from __future__ import print_function, division, absolute_import from doto import connect_d0 def main(args): d0 = connect_d0() name = args.name size_id = args.size_id image_id =...
waytai/doto
doto/commands/start.py
Python
mit
1,923
#!/usr/bin/env python # -*- coding: utf-8 -*- """ How many different ways can L2 be made using any number of coins? """ def pe31(target=200): """ >>> pe31() 73682 """ coins = [1, 2, 5, 10, 20, 50, 100, 200] ways = [1] + [0] * target for coin in coins: for i in range(coin, target + 1...
kittttttan/pe
py/pe/pe31.py
Python
mit
641
#!/usr/bin/env python # Copyright 2016 DIANA-HEP # # 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...
diana-hep/femtocode
lang/femtocode/typesystem.py
Python
apache-2.0
90,234
''' Demonstrates iterating over an instrument data set by orbit and plotting the results. ''' import os import pysat import matplotlib.pyplot as plt import pandas as pds # set the directory to save plots to results_dir = '' # select vefi dc magnetometer data, use longitude to determine where # there are changes in t...
aburrell/pysat
demo/cnofs_vefi_dc_b_orbit_plots.py
Python
bsd-3-clause
3,073
import asyncio from typing import Optional from wpull.database.base import NotFound from wpull.pipeline.item import URLRecord from wpull.pipeline.pipeline import ItemTask, ItemSource from wpull.pipeline.app import AppSession class LinkConversionSetupTask(ItemTask[AppSession]): @asyncio.coroutine def process(...
chfoo/wpull
wpull/application/tasks/conversion.py
Python
gpl-3.0
2,011
from twisted.plugin import IPlugin from twisted.words.protocols import irc from txircd.config import ConfigValidationError from txircd.module_interface import Command, ICommand, IMode, IModuleData, Mode, ModuleData from txircd.utils import ipAddressToShow, ircLower, isValidHost, ModeType from zope.interface import impl...
Heufneutje/txircd
txircd/modules/rfc/mech_oper.py
Python
bsd-3-clause
12,050
from typing import List, Tuple import pytest from siebenapp.autolink import AutoLink, ToggleAutoLink from siebenapp.domain import ( EdgeType, ToggleClose, Select, Add, HoldSelect, Insert, Rename, Graph, Delete, ) from siebenapp.tests.dsl import build_goaltree, open_, selected, clos...
ahitrin/SiebenApp
siebenapp/tests/test_autolink.py
Python
mit
12,881
# This workload tests running IMPALA with remote envs from __future__ import absolute_import from __future__ import division from __future__ import print_function import ray from ray.tune import run_experiments from ray.tests.cluster_utils import Cluster num_redis_shards = 5 redis_max_memory = 10**8 object_store_mem...
atumanov/ray
ci/long_running_tests/workloads/impala.py
Python
apache-2.0
1,469
from __future__ import print_function from imports import * import common class Base( common.Base ): pass class TestUnitMiSeqToNewbler( Base ): def _C( self, *args, **kwargs ): from bactpipeline.fix_fastq import miseq_to_newbler_id return miseq_to_newbler_id( *args, **kwargs ) def test_r1...
VDBWRAIR/bactpipeline
test/test_fix_fastq.py
Python
gpl-2.0
2,468
from gi.repository import Clutter from pyclut.effects.transitions import Transition, Direction from pyclut.animation import ScaleAndFadeAnimation class ZoomTransition(Transition): def __init__(self, actor_in, actor_out, duration=500, style=Clutter.AnimationMode.LINEAR): Transition.__init__(self, actor_out, actor_in...
ericcolleu/pyclutter-widgets
pyclut/effects/transitions/zoom.py
Python
lgpl-2.1
1,202
import logging import os import signal from setproctitle import setproctitle class Proc(object): signal_map = {} def __init__(self): self.logger = logging.getLogger(self.__module__) self.pid = None self.parent_pid = None @property def name(self): return self.__clas...
wglass/rotterdam
rotterdam/proc.py
Python
mit
873
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def HostCnxFailedBadUsernameEvent(vim, *args, **kwargs): '''This event records a failure ...
xuru/pyvisdk
pyvisdk/do/host_cnx_failed_bad_username_event.py
Python
mit
1,223
from django.contrib import admin import messages_extends.admin # Ensure it got registered. import messages_extends.models from .attempt import * from .clarification import * from .compiler import * from .contest import * from .notification import * from .problem import * admin.site.unregist...
LernaProject/Lerna
core/admin/__init__.py
Python
gpl-2.0
356
"""Model representation of an encounter where data is collected """ from __future__ import absolute_import import cjson import logging from django.conf import settings from collections import defaultdict from django.db import models #from sana.mrs import openmrs from sana.api.deprecated import BINARY_TYPES, CONTENT_T...
satvikdhandhania/vit-11
sana/mrs/_models/encounter.py
Python
bsd-3-clause
4,937
#!/usr/bin/env python import csv, sys from monitores import app, db from monitores.models import Monitor with open(sys.argv[1], 'rb') as csvfile: reader = csv.reader(csvfile) for row in reader: monitor_id = row[0] brand = row[2] serial = row[3] specs = row[6].decode('utf-8') ...
utfsmlabs/monitores
import_csv.py
Python
gpl-3.0
480
from django.views.generic.edit import FormView, ModelFormMixin from django.views.generic.detail import SingleObjectTemplateResponseMixin from extra_views.formsets import BaseInlineFormSetMixin from django.http import HttpResponseRedirect from django.forms.formsets import all_valid class InlineFormSet(BaseInlineFormS...
incuna/django-extra-views
extra_views/advanced.py
Python
mit
3,309
# This file is part of PRAW. # # PRAW 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. # # PRAW is distributed in the hope that i...
patrickstocklin/chattR
lib/python2.7/site-packages/praw/decorators.py
Python
gpl-2.0
15,373
#!/usr/bin/env python """Create a "virtual" Python installation """ # If you change the version here, change it in setup.py # and docs/conf.py as well. virtualenv_version = "1.7.1.2.post1" import base64 import sys import os import optparse import re import shutil import logging import tempfile import zlib import errn...
msabramo/virtualenv
virtualenv.py
Python
mit
102,735
# Copyright 2014 Google Inc. All Rights Reserved. """Command for removing health checks from target pools.""" from googlecloudsdk.compute.lib import base_classes from googlecloudsdk.compute.lib import utils class RemoveHealthChecks(base_classes.NoOutputAsyncMutator): """Remove an HTTP health check from a target poo...
wemanuel/smry
smry/server-auth/ls/google-cloud-sdk/lib/googlecloudsdk/compute/subcommands/target_pools/remove_health_checks.py
Python
apache-2.0
2,038
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Andy Sayler # 2014, 2015 # pcollections Tests import warnings from atomic_redis_tests import * if __name__ == '__main__': warnings.simplefilter("always") unittest.main()
asayler/pcollections
tests/atomic_redis_test_runner_py2.py
Python
lgpl-3.0
233
class DifferentDimensionVectors(BaseException): pass class Vector: """ Class implementing vectors. """ def __init__(self, *args): """ Initialize a Vector object. Example: >> Vector(1, 2, 3) => <matrix_vector.vector.Vector object> Arguments: ...
Guldjan/matrix_vector
matrix_vector/vector.py
Python
mit
7,789
# Copyright 2014 Knowledge Economy Developments Ltd # # Henry Gomersall # heng@kedevelopments.co.uk # # 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 ret...
frederikhermans/pyfftw-arm
test/test_pyfftw_real_forward.py
Python
bsd-3-clause
5,145
from django.contrib.auth.models import Group from django.core.cache import cache from django.db.models.signals import post_save, post_delete, m2m_changed, pre_delete from django.dispatch import receiver from django_registration.signals import user_registered from apps.editor.models import UserRegionalInfo # pylint: ...
sinnwerkstatt/landmatrix
apps/landmatrix/signals.py
Python
agpl-3.0
2,177
from django.urls import path from opportunity import views app_name = "api_opportunities" urlpatterns = [ path("", views.OpportunityListView.as_view()), path("<int:pk>/", views.OpportunityDetailView.as_view()), path("comment/<int:pk>/", views.OpportunityCommentView.as_view()), path("attachment/<int:pk...
MicroPyramid/Django-CRM
opportunity/urls.py
Python
mit
371
def get_viewport_rect(session): return session.execute_script(""" return { height: window.innerHeight || document.documentElement.clientHeight, width: window.innerWidth || document.documentElement.clientWidth, }; """) def get_inview_center(elem_rect, viewport_rect): x =...
scheib/chromium
third_party/blink/web_tests/external/wpt/webdriver/tests/perform_actions/support/mouse.py
Python
bsd-3-clause
927
#!/usr/bin/python # # Copyright 2013, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. import base64 import logging import threading import struct import time import unittest from vtdb import keyrange_constants from vtdb import keys...
apmichaud/vitess-apm
test/keyspace_test.py
Python
bsd-3-clause
10,189
from typing import Union import torch from allennlp.common import FromParams from allennlp.modules.transformer.transformer_module import TransformerModule from transformers.models.bert.modeling_bert import ACT2FN class ActivationLayer(TransformerModule, FromParams): def __init__( self, hidden_s...
allenai/allennlp
allennlp/modules/transformer/activation_layer.py
Python
apache-2.0
1,019
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
snyderr/robotframework
src/robot/utils/error.py
Python
apache-2.0
7,072
from django.conf.urls import patterns, url urlpatterns = patterns( '', url(r'^$', 'home.views.dashboard'), url(r'^torrents$', 'home.views.torrents'), url(r'^view_log$', 'home.views.view_log'), url(r'^checks$', 'home.views.checks'), url(r'^stats$', 'home.views.stats'), url(r'^userscripts$', ...
MADindustries/WhatManager2
home/urls.py
Python
mit
947
#!/usr/bin/env python """ Copyright (c) 2021 Alex Forencich 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 the rights to use, copy, modify, merg...
alexforencich/verilog-axis
tb/axis_register/test_axis_register.py
Python
mit
7,304
"""------------------------------------------------- Satay Game Engine Copyright (C) 2013 Andy Brennan THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SH...
Valdez42/Satay
Satay/BaseGame/Functions.py
Python
mit
2,767
# Copyright 2015 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...
laosiaudi/tensorflow
tensorflow/python/kernel_tests/cast_op_test.py
Python
apache-2.0
7,839
# -*- coding: utf-8 -*- """ *************************************************************************** OgrToPostGis.py --------------------- Date : November 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ************************...
dwadler/QGIS
python/plugins/processing/algs/gdal/OgrToPostGis.py
Python
gpl-2.0
18,322
import enum import google.cloud.storage as gcloud_storage import sqlalchemy from . import config class CompileStatus(enum.Enum): """The compilation status of a bot.""" UPLOADED = "Uploaded" IN_PROGRESS = "InProgress" SUCCESSFUL = "Successful" FAILED = "Failed" DISABLED = "Disabled" class C...
HaliteChallenge/Halite-II
apiserver/apiserver/model.py
Python
mit
10,268
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. from pootle_fs.management.commands import FS...
ta2-1/pootle
pootle/apps/pootle_fs/management/commands/fs_commands/unstage.py
Python
gpl-3.0
439
# © 2016 ADHOC SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Account Payment with Multiple methods", "version": "15.0.1.0.0", "category": "Accounting", "website": "www.adhoc.com.ar", "author": "ADHOC SA, AITIC S.A.S", "license": "AGPL-3", "application": False,...
ingadhoc/account-payment
account_payment_group/__manifest__.py
Python
agpl-3.0
1,305
from __future__ import with_statement from fabric.contrib.console import confirm from fabric.api import * from fabric.operations import * from properties import * from installNodeJS import * @task def install(namehost,username,passworduser): #initilisation des proprietes de l'image properties(namehost,userna...
Spirals-Team/peak-forecast
peakforecast/scriptFabric/scriptFabric/nodejs/fabfile.py
Python
agpl-3.0
940
import base64 import getopt import httplib import json import re import os import sys import StringIO import urlparse import xml.dom.minidom import zipfile from ApigeePlatformTools import httptools, deploytools def printUsage(): print 'Usage: deployproxy -n [name] -o [organization] -e [environment]' print ' ...
r3mus/api-platform-tools
ApigeePlatformTools/deployproxy.py
Python
apache-2.0
3,434
# -*- encoding: utf-8 -*- from thefuck.utils import memoize, get_alias target_layout = '''qwertyuiop[]asdfghjkl;'zxcvbnm,./QWERTYUIOP{}ASDFGHJKL:"ZXCVBNM<>?''' source_layouts = [u'''йцукенгшщзхъфывапролджэячсмитьбю.ЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ,''', u'''ضصثقفغعهخحجچشسیبلاتنمکگظطزرذدپو./ًٌٍَُِّْ][...
PLNech/thefuck
thefuck/rules/switch_lang.py
Python
mit
1,566
#!/usr/bin/python # -*- coding: utf-8 -*- ''' This script transforms the JSON Stream containing exported Google Readers shared items to SQL that inserts them into the feed table in tt-rss. You can export the json in the preferences of Google Reader (choose the custom Google one) Requires Python 2.6+ and your MySQL D...
nhoening/gritttt-rss
greader-import/import.py
Python
bsd-2-clause
6,179
from bears.natural_language.AlexBear import AlexBear from tests.LocalBearTestHelper import verify_local_bear good_file = "Their network looks good." bad_file = "His network looks good." AlexBearTest = verify_local_bear(AlexBear, valid_files=(good_file,), ...
chriscoyfish/coala-bears
tests/natural_language/AlexBearTest.py
Python
agpl-3.0
352
from miro import flashscraper from miro.test.framework import EventLoopTest, uses_httpclient class FlashScraperBase(EventLoopTest): def setUp(self): EventLoopTest.setUp(self) self.event_loop_timeout = 20 self.start_http_server() def run_event_loop(self, timeout=None): if timeo...
debugger06/MiroX
tv/lib/test/flashscrapertest.py
Python
gpl-2.0
2,363