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
# Idf init module # (c) 2003 Juergen Riegel # # Gathering all the information to start FreeCAD # This is the second one of three init scripts, the third one # runs when the gui is up #*************************************************************************** #* (c) Juergen Riegel (juergen.riegel@web.de) 2...
JonasThomas/free-cad
src/Mod/Idf/Init.py
Python
lgpl-2.1
2,184
"""SCons.Node The Node package for the SCons software construction utility. This is, in many ways, the heart of SCons. A Node is where we encapsulate all of the dependency information about any thing that SCons can build, or about any thing which SCons can use to build some other thing. The canonical "thing," of co...
michalliu/OpenWrt-Firefly-Libraries
staging_dir/host/lib/scons-2.3.1/SCons/Node/__init__.py
Python
gpl-2.0
49,617
# -*- coding: utf-8 -*- from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.neighbors import KNeighborsClassifier from scipy.sparse import hstack training_set = [ "super ce blog! J'adore ce truc...", "De la balle! c'est vraiment super!", "que des bonnes choses, bien fait et très intér...
opoirion/pres_ml
python_code/soluce.py
Python
mit
1,398
from django.conf.urls import patterns, url urlpatterns = patterns('django.contrib.auth.views', url(r'^login/$', 'login', { 'template_name': 'registration/login.html' }, name='login'), url(r'^logout/$', 'logout_then_login', { 'template_name': 'registration/logout.html' }, name='log...
bruth/django-registration2
registration/auth_urls.py
Python
bsd-3-clause
692
# 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 # distribu...
jarrodmcc/OpenFermion
src/openfermion/hamiltonians/_general_hubbard.py
Python
apache-2.0
15,844
# -*- coding: utf-8 -*- from django.contrib import admin from portal.funnies.models import Funnies class FunniesAdmin(admin.ModelAdmin): list_display = ('text', 'rating', 'date', ) ordering = ('text',) search_fields = ('text',) admin.site.register(Funnies, FunniesAdmin)
rivelo/portal
funnies/admin.py
Python
gpl-2.0
301
import bluetooth class GPSReader(object): def __init__(self): target = "BT-GPS" nearby_devices = bluetooth.discover_devices() for dev in nearby_devices: if bluetooth.lookup_name(dev) == target: # Get GPS stuff pass if __name__ == "__main__": ...
Williangalvani/pynmea
pynmea/gps.py
Python
mit
340
"""Support for System health .""" from __future__ import annotations import asyncio from collections.abc import Awaitable import dataclasses from datetime import datetime import logging from typing import Callable import aiohttp import async_timeout import voluptuous as vol from homeassistant.components import webso...
sander76/home-assistant
homeassistant/components/system_health/__init__.py
Python
apache-2.0
6,868
from __future__ import print_function import numpy as np import datetime import csv import pickle import sys species_map = {'CULEX RESTUANS' : "100000", 'CULEX TERRITANS' : "010000", 'CULEX PIPIENS' : "001000", 'CULEX PIPIENS/RESTUANS' : "101000", 'CULEX ER...
nhlx5haze/Kaggle_WestNileVirus
src/predict.py
Python
bsd-3-clause
5,983
class Solution(object): def findLadders(self, beginWord, endWord, wordlist): """ :type beginWord: str :type endWord: str :type wordlist: Set[str] :rtype: List[List[int]] """ # build the whole graph for the possible solution graph,res={},[] bwse...
Tanych/CodeTracking
126-Word-Ladder-II/solution.py
Python
mit
2,034
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import datetime import os import sys import time import pyproj import urllib.request, urllib.parse, urllib.error import urllib.parse import logging import xml.etree.ElementTree as ET from builtins import input from collections import namedtuple from date...
Stefal/V4MPod
correlate/correlate_with_log.py
Python
mit
77,655
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt, comma_or, nowdate, getdate from frappe import _ from frappe.model.document import Document def validate_sta...
shubhamgupta123/erpnext
erpnext/controllers/status_updater.py
Python
gpl-3.0
14,859
{ "name" : "Process", "version": "2.0", "description": """ OpenERP Web process view. """, "depends" : ["web_diagram"], "js": [ 'static/lib/dracula/*.js', "static/src/js/process.js" ], "css": [ "static/src/css/process.css" ], 'qweb': [ ...
iw3hxn/LibrERP
web_client/ea_web-github/addons/web_process/__openerp__.py
Python
agpl-3.0
385
# # 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 # ...
maestro-hybrid-cloud/heat
heat/tests/test_software_deployment.py
Python
apache-2.0
52,491
import tweepy from textblob import TextBlob consumer_key = '0TI38y7MiWGozjh27xq3juY8s' consumer_secret = 'DERgSRYujeUeuUJ7unuWgkXRevMftm15Vo4N4cigxZnuhPkJD7' access_token = '624916821-nLo973hLFNf5JemrKTOkkZY9aOuE2OqcO5j5IswV' access_token_secret = 'IwhBILv2Kcenw88ea3QOqUkJfYnFzow5PMrAopYO7cR1C' #access to m...
farhaanfsk/Sentimental-Analysis-on-Twitter
senti_twitter.py
Python
gpl-3.0
1,486
# -*- coding: utf-8 -*- # Copyright(C) 2013 Bezleputh # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opt...
Konubinix/weboob
modules/hybride/pages.py
Python
agpl-3.0
3,965
# -*- coding: UTF-8 -*- '''Unit tests for mock_flickr-spellchk ''' from enchant.checker import SpellChecker from flickr_spellcheckr import controller from flickr_spellcheckr.utils import flickr import enchant import mock import unittest class TestBasicController(unittest.TestCase): def setUp(self): sel...
paulcollinsiii/flickr-spellcheckr
src/flickr_spellcheckr/tests/controller_test.py
Python
bsd-2-clause
9,391
"""GOEA and report generation w/bonferroni multiple test corrections from statsmodels. python test_goea_rpt_bonferroni.py python test_goea_rpt_bonferroni.py [LOG FILENAME] """ __copyright__ = "Copyright (C) 2016-2018, DV Klopfenstein, H Tang. All rights reserved." __author__ = "DV Klopfenstein" impor...
tanghaibao/goatools
tests/test_goea_rpt_bonferroni.py
Python
bsd-2-clause
4,094
# Copyright 2018 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...
DavidNorman/tensorflow
tensorflow/python/distribute/collective_all_reduce_strategy.py
Python
apache-2.0
23,809
from trytond.pool import Pool from .reportes import * Pool.register( Sale, Invoice, SeleccionEntidad, module='reportes', type_='model') Pool.register( ReporteClasificado, ReporteAvisoComercial, ReporteSalePresupuestador, ReporteEstadoCuentaEntidad, ReporteInvoicePresupuestador, ...
it10/tryton-dypra
reportes/__init__.py
Python
gpl-3.0
498
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
eadgarchen/tensorflow
tensorflow/contrib/data/python/kernel_tests/reader_dataset_ops_test.py
Python
apache-2.0
27,746
#!/usr/bin/env python3 ''' This tool eliminates the need for "using namespace std" from c++ files by prepending "std::" in front of all standard library types from files passed on command line. Usage: remove-using-namespace-std.py [filepath ...] Limitations: - makes no backups of modified files - modifies in place -...
BitcoinUnlimited/BitcoinUnlimited
contrib/devtools/remove-using-namespace-std.py
Python
mit
6,636
from interactive import VisibleModule, InteractiveModule, TextDisplayModule from viewer import ViewerConstants from state import State import colors import log import math import curses log = log.logger class TextBox(VisibleModule, InteractiveModule): def __init__(self): self.initial_draw_priority = -1 ...
jghibiki/Cursed
terminal/text_box.py
Python
mit
8,640
#! /usr/bin/python # -*- coding: utf-8 -*- """ Module is used for visualization of segmentation stored in pkl file. """ import os.path import os.path as op import sys path_to_script = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(path_to_script, "../extern/dicom2fem/src")) from loguru import...
mjirik/imtools
imtools/show_segmentation.py
Python
mit
18,835
# -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 ## ## Copyright (C) 2012 Async Open Source <http://www.async.com.br> ## All rights reserved ## ## 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 Foundati...
tiagocardosos/stoq
stoqlib/gui/test/test_invoiceprintereditor.py
Python
gpl-2.0
1,662
# # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2014 Star2Billing S.L. # # The primar...
tarikgwa/nfd
newfies/callcenter/models.py
Python
mpl-2.0
9,357
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
marcellodesales/svnedge-console
svn-server/lib/suds/xsd/query.py
Python
agpl-3.0
6,451
#!/usr/bin/env python # # vim: sw=2 ts=2 sts=2 # # Copyright 2007 The Python-Twitter Developers # # 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-...
zetasyanthis/myarchive
src/myarchive/libs/twitter/__init__.py
Python
mit
2,132
"""Flask integration for SimpleDB.""" __version__ = '0.0.1' __author__ = 'Randall Degges' __email__ = 'r@rdegges.com' from .manager import Simple
rdegges/flask-simple
flask_simple/__init__.py
Python
unlicense
150
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j E Y р.' TIME_FORMAT = 'H:i:s' ...
rooshilp/CMPUT410Lab6
virt_env/virt1/lib/python2.7/site-packages/django/conf/locale/uk/formats.py
Python
apache-2.0
785
# -*- coding: utf-8 -*- # # SelfTest/Signature/test_pkcs1_pss.py: Self-test for PKCS#1 PSS signatures # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyon...
nparley/mylatitude
lib/Crypto/SelfTest/Signature/test_pkcs1_pss.py
Python
mit
20,565
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'SurveyQuestion.statistic' db.delete_column(u'survey_sur...
myvoice-nigeria/myvoice
myvoice/survey/migrations/0005_auto__del_field_surveyquestion_statistic.py
Python
bsd-2-clause
12,627
#!/usr/bin/env python import serial import sys import time import hameg2030 as h def main(): sour=serial.Serial(h.dev, h.baud_rate, rtscts=h.rtscts); h.power_on(sour, h.current_limit, h.voltages) print "turned on: %s" % (time.strftime("%Y-%m-%d %H:%M:%S")) ## execute the main if __name__ == "__main__": ...
tbisanz/eudaq
producers/palpidefs/scripts/power_on.py
Python
lgpl-3.0
341
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 OpenStack Foundation # # 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...
armando-migliaccio/neutron
neutron/db/migration/alembic_migrations/versions/e6b16a30d97_cisco_provider_nets.py
Python
apache-2.0
1,753
# Copyright (c) 2014-2017. Mount Sinai School of Medicine # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
hammerlab/mhctools
mhctools/netmhc_cons.py
Python
apache-2.0
1,609
# -*- coding: cp1252 -*- from __future__ import print_function # compatibilité python 3.0 from libsimpa import vec3 from math import * ## # @file make_recsurf_ar.py # \~english # This file contain the Surface Receivers methods. def to_vec3(vec): return vec3(vec[0], vec[1], vec[2]) ## # \~english # @brief Sur...
Ifsttar/I-Simpa
currentRelease/ExperimentalCore/md_octave/build_recsurf.py
Python
gpl-3.0
4,020
# -*- coding: utf-8 -*- from django.contrib.auth.decorators import login_required from django.shortcuts import get_object_or_404 from django.shortcuts import redirect from django.views.decorators.http import require_POST from django.http import Http404 from spirit.core.utils import json_response from spirit.core.util...
nitely/Spirit
spirit/comment/bookmark/views.py
Python
mit
1,155
from numpy import pi, sin, cos, float64, sum from spectralDNS import config, get_solver, solve def initialize(UB_hat, UB, U, B, X, **context): # Taylor-Green initialization U[0] = sin(X[0])*cos(X[1])*cos(X[2]) U[1] = -cos(X[0])*sin(X[1])*cos(X[2]) U[2] = 0 B[0] = sin(X[0])*sin(X[1])*cos(X[2]) B...
mikaem/spectralDNS
tests/TGMHD.py
Python
gpl-3.0
1,482
#!/usr/bin/python ### import yaml from pprint import pprint as pp from sys import argv if len(argv) < 2: print "Usage: {} <path_to_yaml_file>".format(argv[0]) exit() f = open(argv[1]) y1 = yaml.safe_load(f) print yaml.dump(y1) for task in y1[0]['tasks']: print " - name: {}".format(task['name'])
francisluong/python-netdev
scratch/ppyaml.py
Python
mit
313
{% if cookiecutter.use_celery == 'y' %} import os from celery import Celery from django.apps import apps, AppConfig from django.conf import settings if not settings.configured: # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_config.set...
genomics-geek/cookiecutter-django-reactjs
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py
Python
bsd-3-clause
3,199
from profileconf.domain import ContextFunction __author__ = 'corvis' # this one expects to have "current_display" in context predefined_resolution = ContextFunction.builder()\ .set_name('preferredResolution')\ .set_handler(lambda argument, context: context.get('current_display').preferred_mode.resolution)\ ...
Logicify/xrandr-conf
profileconf/modules/xrandr/context.py
Python
gpl-2.0
330
#-*- coding: cp936 -*- from PIL import Image def ice(image): ''' @Ч¹û£º±ù¶³ @param image: instance of Image @return: instance of Image ''' if image.mode != "RGBA": image.convert("RGBA") width, height = image.size pix = image.load() for w in xrange(width):...
QuinnSong/JPG-Tools
src/ice.py
Python
gpl-3.0
742
''' Machine learning related functions. This module makes use of scikits.learn. '''
flaviovdf/vodlibs
vod/learn/__init__.py
Python
mit
83
#!/usr/bin/env python __author__ = "Holden Oullette" __copyright__ = "Copyright 2015" __credits__ = ["Holden Oullette", "Frank Arana", "Megan McMillan", "Erik Steringer"] __license__ = "MIT" __version__ = "0.0.0" __maintainer__ = "Holden Oullette" __email__ = "hjo@uoregon.edu" __status__ = "Development" import argpars...
houllette/ducktheinternet
start.py
Python
mit
5,161
from setuptools import setup from budget._version import __version__ setup( name = 'budget', version = __version__, url = 'https://github.com/dfroger/budget', description = 'Personal budgeting script', license = 'GPL V3', author = 'David Froger', author_email = 'david.froger@mailoo.org', ...
dfroger/budget
setup.py
Python
gpl-3.0
455
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2015-12-30 17:53 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wunderlist', '0011_auto_20151...
passuf/WunderHabit
wunderlist/migrations/0012_auto_20151230_1853.py
Python
mit
631
# # 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"); you may not us...
pgandhi999/spark
python/pyspark/sql/tests/test_group.py
Python
apache-2.0
1,831
# # ovirt-hosted-engine-setup -- ovirt hosted engine setup # Copyright (C) 2016-2017 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, o...
oVirt/ovirt-hosted-engine-setup
src/plugins/gr-he-common/core/__init__.py
Python
lgpl-2.1
1,416
from allauth.account.signals import user_signed_up from dd_invitation import admin_views as invitation def consume_invite_token(sender, **kwargs): request = kwargs.get('request', None) user = kwargs.get('user', None) if request is not None: token = request.session.get('invitation_token', None) ...
datadealer/dd_auth
dd_invitation/__init__.py
Python
artistic-2.0
566
__author__ = 'shuai' class Solution(object): def findMaxLength(self, nums): """ :type nums: List[int] :rtype: int """ for i in xrange(len(nums)): nums[i] = -1 if nums[i] == 0 else 1 length = len(nums) ret = 0 sum = 0 for i in xran...
shuaizi/leetcode
leetcode-python/num525.py
Python
apache-2.0
871
import unittest import numpy as np import data_handling.data_set_creation as data_set_creation class DataSetCreationTestCase(unittest.TestCase): def test_smooth_numeric_data(self): # Arrange matrix = np.arange(100).reshape([10, 10]) columns_to_smooth = [1, 2, 3] smoothing_range ...
puchake/market-teller
tests/data_handling/data_set_creation_tests.py
Python
mit
3,373
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # Opserver # # Operational State Server for VNC # from gevent import monkey monkey.patch_all() try: from collections import OrderedDict except ImportError: # python 2.6 or earlier, use backport from ordereddict import OrderedDict from ...
Juniper/contrail-controller-test
src/opserver/opserver.py
Python
apache-2.0
59,107
# Authors: Eric Larson <larson.eric.d@gmail.com> # Sheraz Khan <sheraz@khansheraz.com> # Denis Engemann <denis.engemann@gmail.com> # # License: BSD (3-clause) import numpy as np from numpy.testing import assert_allclose import pytest from scipy.signal import hilbert from mne.connectivity import enve...
olafhauk/mne-python
mne/connectivity/tests/test_envelope.py
Python
bsd-3-clause
3,228
#!/usr/bin/env python # -*- noplot -*- """ This example shows how to use the agg backend directly to create images, which may be of use to web application developers who want full control over their code without using the pyplot interface to manage figures, figure closing etc. .. note:: It is not necessary to avo...
cactusbin/nyt
matplotlib/examples/pylab_examples/webapp_demo.py
Python
unlicense
1,713
#!/usr/bin/env python """ Drone Pilot - Control of MRUAV """ """ pix-velocity-vector.py -> Script that send the vehicle a velocity vector to form a square and diamond shape. """ __author__ = "Aldo Vargas" __copyright__ = "Copyright 2016 Altax.net" __license__ = "GPL" __version__ = "1" __maintainer__ = "Aldo Vargas" _...
alduxvm/DronePilot
pix-velocity-vector.py
Python
gpl-3.0
2,282
#!/usr/bin/python # # 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 distribut...
tsdmgz/ansible
lib/ansible/modules/network/ios/ios_banner.py
Python
gpl-3.0
5,316
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 Citrix Systems, Inc. # Copyright 2010 OpenStack Foundation # # 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 # # ...
SUSE-Cloud/nova
nova/virt/xenapi/vmops.py
Python
apache-2.0
83,778
# Copyright (C) 2015-2022 by the RBniCS authors # # This file is part of RBniCS. # # SPDX-License-Identifier: LGPL-3.0-or-later from math import sqrt from rbnics.backends.abstract import GramSchmidt as AbstractGramSchmidt from rbnics.utils.decorators import dict_of, overload def GramSchmidt(backend, wrapping): ...
mathLab/RBniCS
rbnics/backends/basic/gram_schmidt.py
Python
lgpl-3.0
2,187
# Copyright 2008-2015 Canonical # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero 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...
zhsso/ubunto-one
src/backends/db/schemas/auth/__init__.py
Python
agpl-3.0
12,510
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # Unl...
ospaceteam/outerspace
server/lib/rsa/bigfile.py
Python
gpl-2.0
3,058
# Copyright (c) 2008-2015 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause from __future__ import print_function import bz2 import datetime import gzip import logging import re import struct from collections import defaultdict, namedtuple, OrderedDict...
deeplycloudy/MetPy
metpy/io/nexrad.py
Python
bsd-3-clause
104,172
# Generated by Django 2.2.17 on 2021-02-04 14:34 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.OAUTH2_PROVIDER_APPLICATION_MOD...
auto-mat/klub
apps/oauth2_manager/migrations/0001_initial.py
Python
gpl-3.0
909
# Copyright (c) 2015 EMC Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
vponomaryov/manila
manila/tests/share/drivers/dell_emc/plugins/vnx/test_connection.py
Python
apache-2.0
66,312
# 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 # d...
hanlind/nova
nova/tests/functional/db/test_host_mapping.py
Python
apache-2.0
5,449
from kivy.uix.label import Label from kivy.core.text.markup import MarkupLabel try: import pygame except: raise # #pygame_cache = {} #pygame_cache_order = [] # #pygame.font.init() class CoreLabelXMU(MarkupLabel): ''' A core label with extended markup capabilities (underline and strikethrough markups) ...
lazuxd/teste-admitere-snpap
extended_markup.py
Python
mit
5,142
from Module import AbstractModule class Module(AbstractModule): def __init__(self): AbstractModule.__init__(self) def run( self, network, in_data, out_attributes, user_options, num_cores, out_path): from genomicode import alignlib alignlib.standardize_reference_genome(...
jefftc/changlab
Betsy/Betsy/modules/is_rsemreference_rsem_indexed.py
Python
mit
978
import re from DistributedClass import DistributedClass from DistributedField import DistributedField from DistributedParameter import DistributedParameter from DistributedType import DistributedType from DistributedImport import DistributedImport regexs = { "dclassDefinition": re.compile('dclass ([^ ]+) (: ([^ ]+) )...
bobbybee/bamboo-lite
bamboo/dcfile.py
Python
mit
2,018
# Copyright (C) 2006, Giovanni Bajo # Based on previous work under copyright (c) 2001, 2002 McMillan Enterprises, 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...
pdubroy/kurt
build/MacOS/PyInstaller/pyinstaller-svn-r812/hooks/hook-time.py
Python
gpl-2.0
1,042
from distutils.core import setup, Extension setup(name="_yappi", version="0.5 beta", description="Yet Another Python Profiler", author="Sumer Cip", author_email="sumerc@gmail.com", ext_modules = [Extension ("_yappi", sources = ["_yappi.c", "_ycallstack.c", "_yhashtab.c", "_ym...
OuO/yappi
setup.py
Python
mit
704
import unittest from charm.schemes.ibenc.ibenc_waters05 import IBE_N04 from charm.toolbox.hash_module import Waters from charm.toolbox.pairinggroup import PairingGroup, GT debug = False class IBE_N04Test(unittest.TestCase): def testIBE_N04(self): # initialize the element object so that object references...
JHUISI/charm
charm/test/schemes/ibenc/ibenc_waters05_test.py
Python
lgpl-3.0
933
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Category.allow_remix' db.add_column('canvas_category', 'allow_remix', self.gf('django.db.m...
canvasnetworks/canvas
website/canvas/migrations/0125_auto__add_field_category_allow_remix__add_field_category_allow_stamps.py
Python
bsd-3-clause
18,925
""" Calculate hillshade and slopeshade. Original code is from: https://github.com/migurski/DEM-Tools/blob/master/Hillup/data/__init__.py#L288-L318 License ----------------------- Copyright (c) 2011, Michal Migurski, Nelson Minar All rights reserved. Redistribution and use in source and binary forms, with or without...
ungarj/mapchete
mapchete/commons/hillshade.py
Python
mit
4,782
#!/usr/bin/env python # coding:utf8 import rely_server # print message rely_server.display() def clientTest(): print "I'm client"
unlessbamboo/grocery-shop
language/python/src/model/rely_client.py
Python
gpl-3.0
137
import sys import os import time t0 = time.time() MAX_DUMP_STOP_LEVEL = 10 class Stopper(object): def __init__(self): self._interrupted = False def do_stop(self, reason): from .log import logger level = 0 callers = [] while True: level += 1 ...
naparuba/kunai
opsbro/stop.py
Python
mit
1,281
"""Define the data structures for a generic deck of cards. Explain how you would subclass the data structures to implement blackjack. """ from random import shuffle class Deck(): def __init__(self): values = ['A', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K'] suits= ['♠', '♥'...
zmarvel/cracking
ch07/01.py
Python
mit
485
#!/usr/bin/env python #adds curvature data to a tst file import sys import string import tstdata import geometry import statistics import math # for pi def tstEdgeCurvature(trianglePoint, pointXyz, pointTriangle, pointNeighbor): '''for each edge, calculate the angle between the triangles around it. calculate po...
ryancoleman/traveldistance
src/tstCurvature.py
Python
gpl-2.0
3,761
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * Copyright (c) 2020 FreeCAD Developers ...
sanguinariojoe/FreeCAD
src/Mod/Draft/Draft.py
Python
lgpl-2.1
16,650
# Copyright (C) 2012,2013 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms of t...
BackupTheBerlios/espressopp
src/tools/__init__.py
Python
gpl-3.0
1,523
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
kawamon/hue
apps/jobbrowser/src/jobbrowser/apis/data_warehouse.py
Python
apache-2.0
3,981
########################################################################### # # 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 # # https://www.apache.org/...
google/orchestra
orchestra/google/marketing_platform/utils/schema/erf/Browser.py
Python
apache-2.0
972
import json import logging import random import threading import urllib from datetime import datetime, timedelta from time import sleep import phue import blinkytape import colorhelp RGB_OFF = (0, 0, 0) class Device(object): def __init__(self): super(Device, self).__init__() self.logger = logg...
shughes-uk/physical_twitch_notifications
devices.py
Python
mit
10,686
# Copyright 2014 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
zsoltdudas/lis-tempest
tempest/api/database/flavors/test_flavors.py
Python
apache-2.0
3,070
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import logging from auxlib.ish import dals log = logging.getLogger(__name__) def test_dals(): test_string = """ This little piggy went to the market. This little piggy stayed home. This little piggy ...
kalefranz/auxlib
tests/test_ish.py
Python
isc
703
#!/usr/bin/env python2 # Copyright (c) 2018 The Zcash developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.mininode import ( NodeConn, NodeConnCB, NetworkThread, msg_ping, SPROUT_PROTO...
litecoinz-project/litecoinz
qa/rpc-tests/p2p_nu_peer_management.py
Python
mit
7,704
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Wed Jan 18 10:17:08 2017 @author: zhouhang """ from sklearn import svm import numpy as np from matplotlib import pyplot as plt X = np.arange(-5.,9.,0.1) X=np.random.permutation(X) X_=[[i] for i in X] #print X b=5. y=0.5 * X ** 2.0 +3. * X + b + np.random...
artzers/MachineLearning
libsvm-learning/SVR.py
Python
mit
1,232
# A quick and dirty replacement for u-boot's mkimage written in python to save # pycorn users from having to install a binary version. # # Copyright 2010 Craig Barker # # This file is part of Pycorn. # # Pycorn is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Licens...
tornewuff/pycorn
libs/embryo/mkimage.py
Python
gpl-3.0
4,460
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob import operator OUT_CPP="src/qt/bitcoinstrings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' format produced by x...
sarakas/hellascoin
share/qt/extract_strings_qt.py
Python
mit
1,796
# Copyright 2016 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...
tensorflow/tensorflow
tensorflow/compiler/tests/adagrad_da_test.py
Python
apache-2.0
6,950
# # 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"); you may not...
Acehaidrey/incubator-airflow
tests/models/test_connection.py
Python
apache-2.0
26,280
# -*- coding: utf-8 -*- '''https://bitkonan.com/info/api''' import requests from decimal import Decimal import time import hmac import hashlib from cryptotik.common import headers, ExchangeWrapper from cryptotik.exceptions import APIError class Bitkonan(ExchangeWrapper): def __init__(self, apikey=None, secret=...
peerchemist/cryptotik
cryptotik/bitkonan.py
Python
bsd-3-clause
9,677
__copyright__ = "Copyright 2013-2015, http://radical.rutgers.edu" __license__ = "MIT" import os import time import saga import thread import threading from radical.pilot.states import * from radical.pilot.utils.logger import logger from radical.pilot.staging_directives import CREATE_PARENTS IDLE_TIME = 1.0 # sec...
JensTimmerman/radical.pilot
src/radical/pilot/controller/output_file_transfer_worker.py
Python
mit
7,846
#!/usr/bin/python # # Simple program to display security cameras. # I could import from packages and save some typing, but I prefer to # have code that anyone can look at, and know what package a function, # class, object, etc. is from sight. You'll thank me later. import pygame, urllib2, StringIO, sys, os, datetime, ...
todhuff/weid
weid.py
Python
gpl-2.0
11,043
############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # 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 ...
meejah/txaio
txaio/__init__.py
Python
mit
5,761
""" This class is a thin wrapper around scipy.sparse.lil_matrix to reduce the notational burden when dealing with sparse vectors. Internally, they are simply stored as sparse matrices. By default, the sparse vectors are created as integer row matrices. The scipy.sparse.lil_matrix representation is used. THIS CLASS HA...
bmmalone/pymisc-utils
pyllars/sparse_vector.py
Python
mit
1,373
from graphcnn.helper import * import scipy.io import numpy as np import datetime import graphcnn.setup.helper import graphcnn.setup as setup def load_cora_dataset(): setup.helper.locate_or_download_file('cora.tgz', 'http://www.cs.umd.edu/~sen/lbc-proj/data/cora.tgz') setup.helper.locate_or_extract_file('cora....
fps7806/Graph-CNN
src/graphcnn/setup/cora.py
Python
mit
1,292
# 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"); you may not u...
jcshen007/cloudstack
tools/marvin/marvin/__init__.py
Python
apache-2.0
824
#04 import sqlite3 def create():#테이블 생성 con = sqlite3.connect("aledger.db") cur = con.cursor() cur.execute("CREATE TABLE IF NOT EXISTS account(account_num TEXT PRIMARY KEY, name TEXT, password TEXT, money INTEGER)") #account테이블 생성, account_num이 기본키 con.commit() con.close() def viewall():#DB에 ...
Martialhimanshu/Account-management-system
ledger_bk.py
Python
mpl-2.0
2,413
import datetime import json from unittest import mock from django.conf import settings from django.contrib.admin.models import LogEntry, ADDITION from django.contrib.contenttypes.models import ContentType from django.urls import reverse from pyquery import PyQuery as pq from waffle.testutils import override_switch ...
wagnerand/addons-server
src/olympia/blocklist/tests/test_admin.py
Python
bsd-3-clause
92,834
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys, os, json import ConfigParser from bottle import post, route, run, request, template, response, redirect, static_file from resmanager2 import ResourceBuilder basedir = "/".join(os.path.abspath(sys.argv[0]).split('/')[0:-1]) filedefs = "%s/resources.def" % basedi...
daemon6667/baconf
backend.py
Python
gpl-3.0
3,005
""" This module contains fabriccolor's `main` method plus related subroutines. """ import fnmatch import os import sys def find_fabsettings(): """ Look for fabsettings.py, which will contain all information about target servers and distros on each server. i """ matches = [] for root, dirna...
calvinchengx/fabriccolors
fabriccolors/main.py
Python
bsd-2-clause
1,828