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
#codecs support __all__=['RL_Codecs'] from collections import namedtuple import codecs StdCodecData=namedtuple('StdCodecData','exceptions rexceptions') ExtCodecData=namedtuple('ExtCodecData','baseName exceptions rexceptions') class RL_Codecs: __rl_codecs_data = { 'winansi':StdCodecData({ 0x007f:...
piMoll/SEILAPLAN
lib/reportlab/pdfbase/rl_codecs.py
Python
gpl-2.0
55,115
def fib(num): if num == 1 or num == 2: return 1 else: return fib(num - 1) + fib(num - 2) n = int(raw_input('put an integer')) current = 0 sum = 0 while current <= n: if fib(current) % 2 == 0: sum += fib(current) current += 1 else: current += 1 print sum
zxc0328/python
c4_p1 - 副本.py
Python
gpl-2.0
295
# -*- 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. import os import sys # This must be run bef...
ta2-1/pootle
pootle/apps/pootle_app/management/commands/flush_cache.py
Python
gpl-3.0
3,246
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import os.path from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from django.contrib.sites.shortcuts import get_current_site from django.db import models from .forms import LatestEntriesFo...
skirsdeda/djangocms-blog
djangocms_blog/cms_plugins.py
Python
bsd-3-clause
5,709
from __future__ import absolute_import from django.test import TestCase # Create your tests here.
tomleo/tl
tl/project/tests.py
Python
gpl-3.0
100
# (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...
ravibhure/ansible
lib/ansible/template/__init__.py
Python
gpl-3.0
30,801
import datetime from django.test import TestCase from haystack.indexes import * from core.models import MockModel, AThirdMockModel from core.tests.mocks import MockSearchBackend class BadSearchIndex1(SearchIndex): author = CharField(model_attr='author') pub_date = DateTimeField(model_attr='pub_date') class ...
calvinchengx/django-haystack
tests/core/tests/indexes.py
Python
bsd-3-clause
20,056
# -*- coding: utf-8 -*- import requests import json from bs4 import BeautifulSoup from datetime import datetime import time def getHTML(url): html=requests.get(url) data=html.text body=BeautifulSoup(data, 'lxml') return(body) body=getHTML('https://www.navitime.co.jp/category/0201001001') selectPref=body.find('se...
kurofand/parse_seven
mainParse.py
Python
unlicense
1,727
# vim: fdm=indent ''' author: Fabio Zanini date: 31/01/19 content: Test Google Sheet API access ''' import pytest @pytest.fixture(scope="module") def ss(): print('Google Sheet converters') from singlet.io.googleapi.samplesheet import SampleSheet return SampleSheet def test_colind_to_A1(ss):...
iosonofabio/singlet
test/io/test_googleapi.py
Python
mit
866
""" Copyright 2016, 2017 UFPE - Universidade Federal de Pernambuco Este arquivo é parte do programa Amadeus Sistema de Gestão de Aprendizagem, ou simplesmente Amadeus LMS O Amadeus LMS é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como publicada pela ...
amadeusproject/amadeuslms
mailsender/urls.py
Python
gpl-2.0
1,015
import pytest import mock import mailbox @pytest.fixture def maildir(tmpdir): """Empty maildir fixture.""" maildir = tmpdir.mkdir("maildir") maildir.mkdir("cur") maildir.mkdir("new") maildir.mkdir("tmp") return maildir @pytest.fixture def maildir_new_mail(maildir): """Maildir fixture con...
tablet-mode/py3status-modules
tests/fixtures/mailstatus.py
Python
gpl-3.0
2,147
# Copyright (C) 2014, 2015 Robert Jordens <jordens@gmail.com> import numpy as np from scipy.interpolate import splrep, splev, spalde class UnivariateMultiSpline: """Multidimensional wrapper around `scipy.interpolate.sp*` functions. `scipy.inteprolate.splprep` is limited to 12 dimensions. """ def __in...
JQIamo/artiq
artiq/wavesynth/coefficients.py
Python
lgpl-3.0
8,343
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('polls', '0025_auto_20160129_1422'), ] operations = [ migrations.AddField( model_name='pollquestion', ...
xkmato/ureport
ureport/polls/migrations/0026_auto_20160202_0950.py
Python
agpl-3.0
579
""" WSGI config for ShroomsAPI project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_S...
AtelierSoude/shrooms
ShroomsAPI/ShroomsAPI/wsgi.py
Python
gpl-3.0
398
""" Random Numbers Utilities ======================== Defines the random number generator objects: - :func:`colour.algebra.random_triplet_generator` References ---------- - :cite:`Laurent2012a` : Laurent. (2012). Reproducibility of python pseudo-random numbers across systems and versions? Retrieved January 20...
colour-science/colour
colour/algebra/random.py
Python
bsd-3-clause
2,980
from django import template register = template.Library() print 'registered' class VerbatimNode(template.Node): def __init__(self, text): self.text = text def render(self, context): return self.text @register.tag def verbatim(parser, token): text = [] while 1: token = parser.tokens.pop(0) if token.cont...
RedwoodAdmin/RedwoodFramework
expecon/templatetags/verbatim.py
Python
bsd-2-clause
694
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
uclouvain/OSIS-Louvain
base/business/entity_version.py
Python
agpl-3.0
3,495
# ****************************************************************************** # Copyright 2014-2018 Intel 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.apa...
NervanaSystems/neon
tests/test_merge_layer.py
Python
apache-2.0
4,281
"""Core, non-UI functionality for PyLNP."""
PeridexisErrant/python-lnp
core/__init__.py
Python
isc
44
# 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...
Mazecreator/tensorflow
tensorflow/python/ops/control_flow_ops.py
Python
apache-2.0
127,274
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
adviti/melange
thirdparty/google_appengine/google/appengine/runtime/request_environment.py
Python
apache-2.0
3,721
"""WebUI tests for the Docker feature. @Requirement: Docker @CaseAutomation: Automated @CaseLevel: Acceptance @CaseComponent: UI @TestType: Functional @CaseImportance: High @Upstream: No """ from fauxfactory import gen_string, gen_url from nailgun import entities from random import randint, shuffle from robotte...
Ichimonji10/robottelo
tests/foreman/ui/test_docker.py
Python
gpl-3.0
60,566
from builtins import range import sys sys.path.insert(1,"../../") import h2o from tests import pyunit_utils import numpy as np def distance_test(): iris_h2o = h2o.import_file(path=pyunit_utils.locate("smalldata/iris/iris.csv")) iris_np = np.genfromtxt(pyunit_utils.locate("smalldata/iris/iris.csv"), ...
mathemage/h2o-3
h2o-py/tests/testdir_munging/pyunit_distance.py
Python
apache-2.0
1,220
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2018-01-16 14:24 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('statisticscore', '0039_topics_data'), ] operations = [ migrations.AddField( model_name='topic', ...
eyp-developers/statistics
statisticscore/migrations/0040_topic_difficulty.py
Python
gpl-3.0
503
""" A class representing a Type 1 font. This version merely reads pfa and pfb files and splits them for embedding in pdf files. There is no support yet for subsetting or anything like that. Usage (subject to change): font = Type1Font(filename) clear_part, encrypted_part, finale = font.parts Source: Adobe Tech...
tkaitchuck/nupic
external/linux64/lib/python2.6/site-packages/matplotlib/type1font.py
Python
gpl-3.0
6,406
# Nathaniel Smith # StarWars # Week Three Assignment # This program takes input from the usar in order to produce the usar's Star Wars name. def main (): # This code take input from the usar. firstName = input("Please enter your first name: ") lastName = input("Please enter your last name: ") maiden = ...
NathanielS/Week-Three-Assignment
StarWars.py
Python
mit
609
############################################################################### # Second try at problem 4c registration system. Users are now being stored # in a dictionary and repetive ones are the origional with their one added to # their value. Then it is printed with the value. Much more efficient than # the first...
jraymondli/JeremyCode
jeremy-python/codeforces/prob4c-Registration_system_2.0.py
Python
gpl-2.0
808
import os.path import sys import pickle import tables import numpy as np import matplotlib.pyplot as mpl from util import utils from hotpix import hotPixels as hp def quantifyBadTime(inputFileName, startTime=0, endTime=-1, defaultTimeMaskFileName='./testTimeMask.h5', timeStep=...
bmazin/ARCONS-pipeline
hotpix/quantifyBadTime.py
Python
gpl-2.0
19,706
from __future__ import absolute_import from __future__ import division import os import numpy from PIL import Image import tensorflow as tf def getAllFileNames(folderName): return os.listdir(folderName) def loadPicture(folder, fileName): print "loading: "+fileName path = os.path.join(folder, fileName) im = I...
mayfreeman/tf_orientation
LoadPicture.py
Python
gpl-3.0
5,116
#!/usr/bin/python # -*- coding: utf-8 -*- ### # Copyright (2021) Hewlett Packard Enterprise Development LP # # 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/L...
HewlettPackard/oneview-ansible
test/test_oneview_appliance_device_snmp_v3_users_facts.py
Python
apache-2.0
2,703
import os try: from setuptools import setup except ImportError: from distutils.core import setup import tota11y setup( name='django-tota11y', version=tota11y.__version__, description='Easy to install Django app for tota11y - an accessibility visualization toolkit by Khan Academy (http://khan.git...
hiisi13/django-tota11y
setup.py
Python
mit
1,156
# Copyright 2017 Google 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, ...
googleapis/google-resumable-media-python
google/_async_resumable_media/_upload.py
Python
apache-2.0
37,337
#!/usr/bin/env python # Copyright 2014 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import itertools import js2c import multiprocessing import optparse import os import random import re import shutil import signal imp...
kingland/go-v8
v8-3.28/tools/generate-runtime-tests.py
Python
mit
50,817
#!/usr/bin/env python import argparse import os import subprocess import sys import time from codecs import open from pelican.utils import slugify def wp2fields(xml): """Opens a wordpress XML file, and yield pelican fields""" try: from BeautifulSoup import BeautifulStoneSoup except ImportError:...
0x00f/pelican
pelican/tools/pelican_import.py
Python
agpl-3.0
11,582
# -*- coding: utf-8 -*- import os import httplib as http from flask import request from flask import send_from_directory from framework import status from framework import sentry from framework.auth import cas from framework.routing import Rule from framework.flask import redirect from framework.sessions import sessi...
reinaH/osf.io
website/routes.py
Python
apache-2.0
47,853
from ..pulsards import store, register_store class RedisStore(store.PulsarStore): pass register_store('redis', 'pulsar.apps.data.stores.redis.RedisStore')
Ghost-script/dyno-chat
kickchat/apps/pulsar/apps/data/stores/redis/__init__.py
Python
gpl-2.0
178
from menus.home import home as start if __name__ == '__main__': start.prompt()
Tankobot/p2pg
menus/__init__.py
Python
gpl-3.0
85
from __future__ import print_function, absolute_import, unicode_literals import wormhole from twisted.internet import reactor from twisted.internet.defer import Deferred, inlineCallbacks, gatherResults from twisted.internet.protocol import Protocol, Factory from twisted.trial import unittest from ..common import Serve...
warner/magic-wormhole
src/wormhole/test/dilate/test_full.py
Python
mit
11,999
# Copyright 2015 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...
MehdiSfr/tensor-flow
tensorflow/python/framework/tensor_shape_test.py
Python
apache-2.0
11,486
# 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 th...
bndl/elastic
setup.py
Python
apache-2.0
1,800
""" click._termui_impl ~~~~~~~~~~~~~~~~~~ This module contains implementations for the termui module. To keep the import time of Click down, some infrequently used functionality is placed in this module and only imported as needed. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, se...
cbandera/click
click/_termui_impl.py
Python
bsd-3-clause
16,332
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Logit'] , ['PolyTrend'] , ['BestCycle'] , ['SVR'] );
antoinecarme/pyaf
tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_PolyTrend_BestCycle_SVR.py
Python
bsd-3-clause
148
#!/usr/bin/env python import subprocess import os import sys import getpass import httplib import json import random from base64 import encodestring import re TOKEN_FILE = os.path.expanduser("~/.postcommit-github-access-token") USER = os.environ['USER'] def call(*cmd): return subprocess.check_output(cmd) def sh...
helix-collective/post-commit-pr
pr.py
Python
mit
4,276
#!/usr/bin/python # -*- encoding:utf-8 -*- # vim:ft=python """Check well-formedness of XML file and validate against an XML schema.""" from __future__ import print_function, unicode_literals import os import sys import optparse from file_scraper.scraper import Scraper from ipt.utils import concat, get_scraper_info ...
Digital-Preservation-Finland/dpres-ipt
ipt/scripts/check_xml_schema_features.py
Python
lgpl-3.0
2,156
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
111pontes/ydk-py
cisco-ios-xe/ydk/models/cisco_ios_xe/_meta/_BRIDGE_MIB.py
Python
apache-2.0
52,763
from django.db import models from django.db.models.signals import post_delete from django.dispatch.dispatcher import receiver import os # Create your models here. def filebuilder(instance,filename): ext = filename.split(".")[-1] name = os.urandom(16).encode("hex") folder = "uploads/" + instance.__class__....
lacetans/concurs
cartells/models.py
Python
gpl-2.0
1,571
# -*- coding: utf-8 -*- # © 2015 Ainara Galdona - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import models, fields, api, exceptions, _ from openerp.addons import decimal_precision as dp class MrpRepair(models.Model): _inherit = 'mrp.repair' analytic_account = fiel...
esthermm/odoomrp-wip
mrp_repair_analytic/models/mrp_repair.py
Python
agpl-3.0
5,544
""" Based on this example -> https://github.com/open-power/pdbg/blob/master/.build.sh TEMPDIR=`mktemp -d ${HOME}/pdbgobjXXXXXX` RUN_TMP="docker run --rm=true --user=${USER} -w ${TEMPDIR} -v ${HOME}:${HOME} -t ${CONTAINER}" ${RUN_TMP} ${SRCDIR}/configure --host=arm-linux-gnueabi ${RUN_TMP} make rm -rf ${TEMPDIR} "...
litex-hub/lxbe-tool
lxbe_tool/providers/docker.py
Python
apache-2.0
323
import libaudioverse import math import time import random libaudioverse.initialize() simulation = libaudioverse.Simulation(block_size=128) def make_fm(carrier, ratio, index): carrier_node = libaudioverse.SineNode(simulation) modulator_node =libaudioverse.SineNode(simulation) modulator_frequency = ratio*...
camlorn/Unspoken
libaudioverse/demo_everything.py
Python
gpl-2.0
3,004
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-08-26 22:21 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('sessions', '0001_initial'), ('juego', '0005_jugador_...
tecnicatura-villa-el-libertador/mentemaestra
juego/migrations/0006_auto_20160826_2221.py
Python
bsd-3-clause
680
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.contrib import admin from .models import Talk admin.site.register(Talk)
pyve/pyconve-site
pyconve_site/talks/admin.py
Python
bsd-3-clause
168
# -*- coding: utf-8 -*- """ Created on Tue Sep 29 13:06:01 2015 @author: stamylew """ from subprocess import call import time call(["ls"]) call(["ls", "-l"]) call(["df", "-h"]) # for n in range(1, 5): # print n # callthis = "python autocontext.py --train /home/stamylew/ilastik_projects/test_75cube_labeled.il...
simonsgit/bachelor_stuff
other/call_console.py
Python
mit
580
from setuptools import setup setup(name='wexcon', version='1.0', description='Python API to connect to your btc-e account through the btc-e API and ' 'structure your account information so you can focus only developing your trading stragegy.', url='https://github.com/rafael-valera/W...
rafael-valera/btceconnect
setup.py
Python
mit
475
import os import pickle import datetime import tensorflow as tf from utils import ops from utils import losses from utils import distances from scipy.stats import pearsonr from sklearn.metrics import mean_squared_error from tflearn.layers.core import fully_connected from tensorflow.contrib.tensorboard.plugins import ...
mindgarage/Ovation
models/sentence_sentiment_regressor.py
Python
apache-2.0
6,069
# # 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 w...
sassoftware/rmake
rmake_test/functional_test/servertest/daemontest.py
Python
apache-2.0
5,091
""" The `~certbot_dns_nsone.dns_nsone` plugin automates the process of completing a ``dns-01`` challenge (`~acme.challenges.DNS01`) by creating, and subsequently removing, TXT records using the NS1 API. .. note:: The plugin is not installed by default. It can be installed by heading to `certbot.eff.org <https://...
letsencrypt/letsencrypt
certbot-dns-nsone/certbot_dns_nsone/__init__.py
Python
apache-2.0
3,339
import re, time, os.path class Sorter: def merge(self, left, right): result = [] i ,j = 0, 0 while i < len(left) and j < len(right): if left[i][1] <= right[j][1]: result.append(left[i]) i += 1 else: result.append(right...
skyguy126/Python_FrequencyAnalysis
src/FrequencyAnalysis.py
Python
gpl-3.0
3,852
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def fake_data(apps, schema_editor): Account = apps.get_model('mp', 'Account') Notification = apps.get_model('mp', 'Notification') Payment = apps.get_model('mp', 'Payment') # Only generate this if...
asermax/django-mercadopago
django_mercadopago/migrations/0002_auto_20150923_2328.py
Python
isc
5,799
#: E731:1:1 f = lambda x: 2 * x #: E731:1:1 E226:1:16 f = lambda x: 2*x #: E731:2:5 while False: this = lambda y, z: 2 * x #: Okay f = object() f.method = lambda: 'Method' f = {} f['a'] = lambda x: x ** 2 f = [] f.append(lambda x: x ** 2) lambda: 'no-op'
ruchee/vimrc
vimfiles/bundle/vim-python/submodules/pycodestyle/testsuite/E73.py
Python
mit
262
# test_remote.py # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php import random import tempfile from unittest.case import skipIf from git import ( RemoteProg...
nvie/GitPython
git/test/test_remote.py
Python
bsd-3-clause
26,438
# -*- coding: utf-8 -*- # # This file is part of HEPData. # Copyright (C) 2016 CERN. # # HEPData 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...
eamonnmag/hepdata3
hepdata/modules/records/utils/data_processing_utils.py
Python
gpl-2.0
11,626
# -*- coding: utf-8 -*- # # apnsclient documentation build configuration file, created by # sphinx-quickstart on Fri Mar 22 16:00:21 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
ChatSecure/apns-client
docs/conf.py
Python
apache-2.0
9,110
# 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 agreed to in writing, ...
google/fuzzbench
experiment/test_runner.py
Python
apache-2.0
19,098
#!/usr/bin/env python import datetime import sys import IndexedRedis from IndexedRedis import IndexedRedisModel, IRField from IndexedRedis.fields.FieldValueTypes import IRJsonValue # vim: ts=4 sw=4 expandtab class MyJsonModel(IndexedRedisModel): FIELDS = [ \ IRField('name'), IRField('data', valu...
kata198/indexedredis
tests/simple/testJson.py
Python
lgpl-2.1
7,622
from multiprocessing import Pool def calcFunc(n, m): print("Running %d %d" % (n, m)) result = sum([x * x for x in range(n) if x % m == 0]) print("Result %d %d : %d " % (n, m, result)) return result if __name__ == '__main__': inputList = [37645, 8374634, 3487584, 191981, 754967, 12345] pool =...
SvichkarevAnatoly/Course-Python-Bioinformatics
semester1/bioseq9/examples/example_pool.py
Python
gpl-2.0
629
import time import socket import telegram from telegram.ext import Updater, CommandHandler, CallbackQueryHandler, MessageHandler, Filters, Job token = '376950264:xxxxxxx-KL55QtQGhFlPmU' channel = '-xxxxxxxxxxxx' myname = socket.getfqdn(socket.gethostname()) myaddr = socket.gethostbyname(myname) def send2Channel(messa...
erlinux/ToolsProject
Python/机器人/Telegram/BTP.py
Python
mit
1,132
# Copyright (C) 2010-2012 Red Hat, Inc. # This work is licensed under the GNU GPLv2 or later. # To test domain block device resize import time import libvirt from libvirt import libvirtError from libvirttestapi.src import sharedmod from libvirttestapi.utils import utils required_params = ('guestname', 'diskpath', 'd...
libvirt/libvirt-test-API
libvirttestapi/repos/domain/block_resize.py
Python
gpl-2.0
3,091
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # 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.0', 'status': ['previe...
bearstech/ansible
lib/ansible/modules/cloud/centurylink/clc_server_snapshot.py
Python
gpl-3.0
14,120
########################################################################## # # Copyright (c) 2013, 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: # # * Redistrib...
goddardl/gaffer
python/GafferRenderManTest/InteractiveRenderManRenderTest.py
Python
bsd-3-clause
29,201
# -*- coding: utf-8 -*- from django.contrib.localflavor.fr.forms import (FRZipCodeField, FRPhoneNumberField, FRDepartmentSelect) from django.test import SimpleTestCase class FRLocalFlavorTests(SimpleTestCase): def test_FRZipCodeField(self): error_format = [u'Enter a zip code in the format XXXXX.'...
LethusTI/supportcenter
vendor/django/tests/regressiontests/localflavor/fr/tests.py
Python
gpl-3.0
6,186
""" A wrapper around python-arango's database class. Adds some SQLAlchemy like ORM methods to it. """ import logging from copy import deepcopy from inspect import isclass from arango.database import StandardDatabase as ArangoDatabase from arango.exceptions import CollectionDeleteError # from arango.executor import ...
threatify/arango-orm
arango_orm/database.py
Python
gpl-3.0
22,473
# libguestfs Python bindings # Copyright (C) 2011 Red Hat Inc. # # 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. # # Thi...
pombredanne/libguestfs
python/t/800-explicit-close.py
Python
gpl-2.0
1,869
import pytest # Test for storage.keys pytest_plugins = [ 'snovault.tests.serverfixtures', 'snovault.tests.testappfixtures', ] items = [ {'name': 'one', 'alias': 'TEST1'}, {'name': 'two', 'alias': 'TEST2'}, ] bad_items = [ {'name': 'one', 'alias': 'BAD1'}, {'name': 'bad', 'alias': 'TEST1'}, ]...
ENCODE-DCC/snovault
src/snovault/tests/test_key.py
Python
mit
2,468
#!/usr/bin/env python #-*- coding:utf-8 -*- ''' @author qinxue.pan E-mail: xue@acrcloud.com @version 1.0.0 @create 2015.10.01 ''' import os import sys import hmac import time import base64 import hashlib import urllib2 import datetime import mimetools import json import acrcloud_extr_tool ''' Copyright ...
YU1ut/exp3
dialogue-final/build/lib.linux-x86_64-2.7/acrcloud/recognizer.py
Python
mit
9,094
#!/usr/bin/env python3 # coding: utf-8 import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) MIC_PIN = 22 GPIO.setup(MIC_PIN, GPIO.IN) while True: print(GPIO.input(MIC_PIN)) time.sleep(0.1)
VectorSpaceHQ/RPiThermostat
tests/mic_test.py
Python
gpl-3.0
212
import pyqtgraph as pg from pyqtgraph.Qt import QtGui, QtCore from pyqtgraph.parametertree import Parameter, ParameterTree from pyqtgraph.parametertree import types as pTypes import pyqtgraph.configfile import numpy as np import user import collections import sys, os class RelativityGUI(QtGui.QWidget): def __ini...
UpSea/thirdParty
pyqtgraph-0.9.10/examples/relativity/relativity.py
Python
mit
28,282
""" Handling signals of the `core` app """ from django.dispatch import receiver from core import signals from reader import actions @receiver(signals.app_link_ready) def app_link_ready(sender, **kwargs): actions.create_app_link()
signaldetect/messity
reader/receivers/core.py
Python
mit
238
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('workflows', '0013_auto_20160808_1537'), ] operations = [ migrations.AddField( model_name='tasktemplate', ...
GETLIMS/LIMS-Backend
lims/workflows/migrations/0014_tasktemplate_multiple_products_on_labware.py
Python
mit
433
# -*- coding: utf-8; mode: python; indent-tabs-mode: t; tab-width:4 -*- from ..Qt import QtGui, QtCore from ..templates import ui_plotTemplate as plotTemplate from ..utilities.expeyesWidgetsNew import expeyesWidgets import sys,time,functools,os _translate = QtCore.QCoreApplication.translate class AppWindow(QtGui.QWi...
csparkresearch/ExpEYES17-Qt
SPARK17/experiments/acgen.py
Python
mit
1,163
# -*- coding: utf-8 -*- """ brickv (Brick Viewer) Copyright (C) 2018 Olaf Lüke <olaf@tinkerforge.com> __init__.py: package initialization 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 versi...
Tinkerforge/brickv
src/brickv/plugin_system/plugins/industrial_counter/__init__.py
Python
gpl-2.0
953
# Generated by Django 2.2.4 on 2019-08-31 17:11 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('conferences', '0007_auto_20190811_1953'), ('conferences', '0006_auto_20190811_1918'), ] operations = [ ]
patrick91/pycon
backend/conferences/migrations/0008_merge_20190831_1711.py
Python
mit
281
from django.db import models from conf import settings class Menu(models.Model): name = models.CharField(max_length=255) title = models.CharField(max_length=255, blank=True) def __str__(self): return "%s" % (self.title) class MenuLink(models.Model): title = models.CharField(max_length=255...
IVaN4B/maugli
maugli/menu/models.py
Python
gpl-3.0
821
# */ # * Licensed to the Apache Software Foundation (ASF) under one # * or more contributor license agreements. See the NOTICE file # * distributed with this work for additional information # * regarding copyright ownership. The ASF licenses this file # * to you under the Apache License, Version 2.0 (the # * "License...
mdunker/usergrid
utils/usergrid-util-python/samples/beacon-event-example.py
Python
apache-2.0
8,908
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para videos externos de divxstage # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re impor...
titienmiami/mmc.repository
plugin.video.tvalacarta/servers/divxstage.py
Python
gpl-2.0
2,038
import melee import random from Chains.chain import Chain from melee.enums import Action, Button, Stage class BoardTopPlatform(Chain): """The general strategy here is to do a dashing jump from a side platform towards the center platform. Waveland down to it.""" def __init__(self): self.interruptible = ...
altf4/SmashBot
Chains/boardtopplatform.py
Python
gpl-3.0
4,339
""" RESTx: Sane, simple and effective data publishing and integration. Copyright (C) 2010 MuleSoft Inc. http://www.mulesoft.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, either version...
jbrendel/RESTx
src/python/restx/platform_specifics.py
Python
gpl-3.0
2,092
import bcrypt from flask import (flash, g, redirect, render_template, request, url_for) from flask_login import login_required from application import app, db, lm from config import WEBHOME, admin_group_name from .models imp...
evereux/flask_template
application/views_admin.py
Python
mit
7,052
import datetime from mongo_component import MongoComponent date = datetime.datetime(1,1,1,1,1) class ComponentContainer(object): instances = {} @staticmethod def get_mongo_component(config): key = config['target'] + '_' + str(config['port']) if key not in ComponentContainer.instances: connection = Mon...
BlaShadow/Hestia-Mongo
app/components/component_container.py
Python
mit
809
# # PaiMei # Copyright (C) 2006 Pedram Amini <pedram.amini@gmail.com> # # $Id: PAIMEIdocs.py 231 2008-07-21 22:43:36Z pedram.amini $ # # 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...
akibsayyed/paimei
console/modules/PAIMEIdocs.py
Python
gpl-2.0
5,037
# Copyright 2019 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...
ghchinoy/tensorflow
tensorflow/python/data/benchmarks/meta_benchmark.py
Python
apache-2.0
5,667
# Copyright 2015 Mirantis 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...
jcsp/manila
manila_tempest_tests/tests/api/test_shares_actions_negative.py
Python
apache-2.0
5,028
""" Test the unit system. """ # Third party import astropy.units as u from astropy.constants import G,c import numpy as np import pytest # This package from ..units import UnitSystem, DimensionlessUnitSystem def test_create(): # dumb usys = UnitSystem(u.kpc, u.Myr, u.radian, u.Msun) with pytest.rais...
adrn/gary
gala/tests/test_units.py
Python
mit
1,974
"""Base classes for Renault entities.""" from __future__ import annotations from dataclasses import dataclass from typing import Optional, cast from homeassistant.const import ATTR_NAME from homeassistant.helpers.entity import Entity, EntityDescription from homeassistant.helpers.typing import StateType from homeassis...
jawilson/home-assistant
homeassistant/components/renault/renault_entities.py
Python
apache-2.0
2,173
# -*- coding: utf-8 -*- from __future__ import absolute_import import six from sentry.api.serializers import serialize from sentry.incidents.logic import create_alert_rule from sentry.incidents.models import AlertRuleThresholdType from sentry.snuba.models import QueryAggregations from sentry.testutils import TestCas...
mvaled/sentry
tests/sentry/api/serializers/test_alert_rule.py
Python
bsd-3-clause
1,670
# This file is part of MANTIS OS, Operating System # See http://mantis.cs.colorado.edu/ # # Copyright (C) 2003-2005 University of Colorado, Boulder # # This program is free software; you can redistribute it and/or # modify it under the terms of the mos license (see file LICENSE) import wx, thread import net_model cla...
turon/mantis
src/tools/tenodera/net_view.py
Python
bsd-3-clause
15,234
#! usr/bin/env python _author_ = "Matthew Zheng" _purpose_ = "Solution to Project Euler Q3: Largest Prime Factor" import sys import math def main(): numTest = 600851475143 #look for the largest multiple for i in range (1, numTest): if(numTest % i == 0): #check if number is prime ...
MatthewZheng/Project-Euler-Solutions-.C-and-.py-
questionThree.py
Python
mit
1,141
# Copyright (c) 2020 PaddlePaddle 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 appli...
luotao1/Paddle
python/paddle/fluid/tests/unittests/dygraph_to_static/test_bert.py
Python
apache-2.0
8,369
# listings/exemple_FFT_amortissement.py from math import pi,sin, exp from scipy.fftpack import fft from random import gauss from numpy import array, arange, floor, hanning from matplotlib import pyplot as plt import matplotlib.gridspec as gridspec from signal_sinusoidal import * beaucoup = 1000 fe = 64. # Frequence d'e...
lcharleux/numerical_analysis
doc/Traitement_signal/Slides/listings/exemple_FFT_amortissement.py
Python
gpl-2.0
1,578
""" Django admin command to save SoftwareSecurePhotoVerifications given an iterable of verification_ids, thereby re-emitting the post_save signal. """ import datetime import logging import time from django.core.management.base import BaseCommand from lms.djangoapps.verify_student.models import SoftwareSecurePhotoVer...
eduNEXT/edx-platform
lms/djangoapps/verify_student/management/commands/trigger_softwaresecurephotoverifications_post_save_signal.py
Python
agpl-3.0
2,227
# -*- coding: utf-8 -*- # Generated by Django 1.11.9 on 2018-01-04 14:32 from __future__ import unicode_literals from django.db import migrations import xorgauth.utils.fields class Migration(migrations.Migration): dependencies = [ ('authgroupex', '0003_add_verbose_and_help'), ] operations = [ ...
Polytechnique-org/xorgauth
xorgauth/authgroupex/migrations/0004_make_UnboundedCharField_non_unique.py
Python
agpl-3.0
549