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
""" Helper Classes and Functions for docking fingerprint computation. The code below contains heavily modified parts of Jacob Durrant's NNScore 2.0.1. The following notice is copied from the original NNScore file: # NNScore 2.01 is released under the GNU General Public License (see # http://www.gnu.org/licenses/gpl.ht...
rbharath/vs-utils
vs_utils/utils/nnscore_utils.py
Python
gpl-3.0
18,840
# -*- coding: utf-8 -*- ############################################################################## # # This file is part of mozaik_mandate, an Odoo module. # # Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>) # # mozaik_mandate is free software: # you can redistribute it and/or # modify it u...
acsone/mozaik
mozaik_mandate/report/mandates_analysis_report.py
Python
agpl-3.0
8,839
# coding=utf-8 """ Figuring out and responding to what happened. This module is dedicated to events, which represent something that happened. Submodules ========== .. currentmodule:: ultros.core.events .. autosummary:: :toctree: events definitions constants manager """ __author__ = "Gareth Coles"...
UltrosBot/Ultros3K
src/ultros/core/events/__init__.py
Python
artistic-2.0
321
# must run pip install -e . in src/python folder before running this unit test import unittest from collections import namedtuple from dart.auth.rmn_required_roles_impl import prepare_inputs, authorization_decorator, does_key_exist class InputTests(unittest.TestCase): # This function creates a fake user_role_Se...
RetailMeNotSandbox/dart
tests/python/dart/auth/rmn_required_roles_test.py
Python
mit
12,394
""" Account-related views. """ from functools import partial from django.conf import settings from django.core.urlresolvers import reverse, resolve from django.http import Http404 from django.shortcuts import redirect, render, get_object_or_404 from django.views.decorators.http import require_POST from django.contri...
peterbe/moztrap
moztrap/view/users/views.py
Python
bsd-2-clause
5,617
import re import math import os import shutil import time import cloudpickle from typing import List, Optional, Dict import numpy as np import torch import torch.nn as nn from torch.autograd import Variable from torch.nn import functional as F from torch.optim import Adam, lr_scheduler from torchtext.data.field impo...
Pinafore/qb
qanta/guesser/rnn.py
Python
mit
22,864
# pulputils # Copyright (C) 2016-2017 Salvo "LtWorf" Tomaselli # # pulputils 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 ...
ltworf/pulputils
src/pulputils/__init__.py
Python
gpl-3.0
1,562
# -*- coding: utf-8 -*- from ladon.server.wsgi import LadonWSGIApplication from werkzeug.wsgi import SharedDataMiddleware import wsgiref.simple_server from wsgiref.util import shift_path_info from os.path import abspath, dirname, join import subprocess import os from tempfile import TemporaryFile THIS_DIR = dirname(ab...
ombre42/robotframework-sudslibrary
test/resources/TestWebServices.py
Python
apache-2.0
3,987
''' This script is used to operate unicode characters Created by Mei Xiao? Kenneth? ''' import re import codecs class UnicodeOps(object): def __init__(self,logger,puncfname): self.logger = logger self.puncfname = puncfname self.logger.debug("Unicode Operation Init...") self.puncs = None def getAllPuncs(...
JeffpanUK/NuPyTools
textgrid2mlf/meiprogram/Dora_scripts/unicodeops.py
Python
mit
2,397
import _plotly_utils.basevalidators class NameValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="name", parent_name="choroplethmapbox", **kwargs): super(NameValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
plotly/plotly.py
packages/python/plotly/plotly/validators/choroplethmapbox/_name.py
Python
mit
397
import re class GetObject(object): """Handles various formatting for the GetObject metadata request""" def ids(self, content_ids, object_ids): """Appends the content and object ids how RETS expects them""" content_ids = self.split(content_ids, False) object_ids = self.split(object_ids...
refindlyllc/rets
rets/utils/get_object.py
Python
mit
1,178
from ..math import vectorops,so3,se3 class SimLogger: """A CSV logger for a simulation. """ def __init__(self,sim,state_fn,contact_fn=None,colliding='all',saveheader=True): """ Logs a simulation to a CSV file. Arguments: - sim: the klampt.Simulator object you wish to use ...
hpbader42/Klampt
Python/klampt/sim/simlog.py
Python
bsd-3-clause
14,115
# # Copyright 2016 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...
google/eclipse2017
common_tests/test_flask_util.py
Python
apache-2.0
20,778
# 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 applicable ...
frreiss/tensorflow-fred
tensorflow/python/tpu/tpu_config.py
Python
apache-2.0
1,011
import trollius from trollius import From import pygazebo.msg.joint_cmd_pb2 import numpy as np class SampleAgent(): def __init__(self, brica_agent, visual_comp, action_comp): self.brica_agent = brica_agent self.sensor_comp = visual_comp self.action_comp = action_comp def run(self): ...
masayoshi-nakamura/CognitiveArchitectureLecture
examples/brainsimulator_agent/pygazebo_agent.py
Python
apache-2.0
1,805
import os, sys; sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..")) from pattern.server import App, Database, html # This example demonstrates a web app with a simple database back-end. # The pattern.server module has a Database object # that can be used with SQLite and MySQL databases. # SQLite ...
krishna11888/ai
third_party/pattern/examples/08-server/04-db/db.py
Python
gpl-2.0
3,542
""" Models for verified track selections. """ import logging from config_models.models import ConfigurationModel from django.db import models from django.db.models.signals import post_save, pre_save from django.dispatch import receiver from django.utils.encoding import python_2_unicode_compatible from django.utils.t...
eduNEXT/edunext-platform
openedx/core/djangoapps/verified_track_content/models.py
Python
agpl-3.0
7,456
from django.shortcuts import get_object_or_404 from rest_framework import status from rest_framework import viewsets from rest_framework.response import Response from holiday_app.serializers import GiftSerializer from holiday_app.models import Gift class GiftViewSet(viewsets.ModelViewSet): """ API endpoint w...
tiamunley/holiday-gift-organizer
holiday_api/holiday_app/views/recipient/gift.py
Python
mit
2,697
import sys import collections import logging import openpathsampling as paths from openpathsampling.pathmover import SubPathMover from .path_simulator import PathSimulator, MCStep from ..ops_logging import initialization_logging logger = logging.getLogger(__name__) init_log = logging.getLogger('openpathsampling.init...
choderalab/openpathsampling
openpathsampling/pathsimulators/bootstrap_init_conds.py
Python
lgpl-2.1
13,754
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyrigt: (c) 2017, Yanis Guenane <yanis+ansible@guenane.org> # 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_ve...
pgmillon/ansible
lib/ansible/modules/crypto/openssl_csr.py
Python
gpl-3.0
40,909
import functools from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module from django.db.models.loading import get_app def safe(view): """Marks a view as safe to be called""" @functools.wraps(view) def wrapper(*args, **kwargs...
LucianU/django-failclose
failclose/utils.py
Python
mit
2,530
# -*- coding: utf-8 -*- from __future__ import unicode_literals from datetime import datetime from test_ella.cases import RedisTestCase as TestCase from nose import tools, SkipTest import django from django.contrib.contenttypes.models import ContentType from django.template.defaultfilters import slugify from django....
MichalMaM/ella
test_ella/test_core/test_views.py
Python
bsd-3-clause
14,629
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from selenium.common.exceptions import NoSuchElementException import unittest, time, re class ddfTestCase(unittest.TestCase): def setUp(self): ...
bradh/ddfbuild
ddfTestCase.py
Python
lgpl-2.1
2,021
from django import http from django.template.response import TemplateResponse from django.test import TestCase from analytics_dashboard.help import HELP_CONTEXT_TOKEN_NAME from analytics_dashboard.help.middleware import HelpURLMiddleware from analytics_dashboard.help.utils import get_doc_url DOC_BASE_URL = 'http://ed...
edx/edx-analytics-dashboard
analytics_dashboard/help/tests.py
Python
agpl-3.0
2,626
#!/usr/bin/python from subprocess import check_output import os import re authorchanges = {} prevrelease = "HEAD" prevdate = "Not released" prevtreehash = "HEAD" for line in check_output("git log --pretty=format:'%t\t%an\t%ai\t%d\t%s'", shell=True).split("\n"): line = line.strip() if not line: contin...
Abraca/Abraca
utils/gen-changelog.py
Python
gpl-2.0
1,841
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
cherrishes/weilai
xingxing/protobuf/python/lib/Python3.4/google/protobuf/internal/cpp_message.py
Python
apache-2.0
23,543
from beaker.container import NamespaceManager, Container from beaker.exceptions import InvalidCacheBackendError, MissingCacheParameter from beaker.synchronization import file_synchronizer, null_synchronizer from beaker.util import verify_directory, SyncDict import warnings _client_libs = {} def _load_client(name='auto...
lann/python-beaker
beaker/ext/memcached.py
Python
bsd-3-clause
5,179
import os import sys from datetime import timedelta from django.conf import settings DEBUG = settings.DEBUG SERVE_STATIC = DEBUG TEMPLATE_DEBUG = DEBUG USE_I18N = True USE_L10N = True USE_TZ = True PROTOCOL = 'http' if DEBUG else 'https' PORT = getattr(settings, 'PORT', '8000') if DEBUG else None if PORT and str(...
PabloCastellano/nodeshot
nodeshot/conf/settings.py
Python
gpl-3.0
13,729
#-*- coding:utf-8 -*- """ This file is part of OpenSesame. OpenSesame 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. OpenSesame is distri...
SCgeeker/OpenSesame
libqtopensesame/widgets/toolbar_items_item.py
Python
gpl-3.0
2,002
from django.apps import AppConfig class SkybotappConfig(AppConfig): name = 'skybotapp'
ComputerProject2Team/SkyBot
skybotapp/apps.py
Python
unlicense
93
# coding=utf-8 # Copyright 2022 The Tensor2Tensor Authors. # # 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...
tensorflow/tensor2tensor
tensor2tensor/utils/adafactor_test.py
Python
apache-2.0
1,282
# # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # # 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 a...
cwolferh/heat-scratch
heat/common/exception.py
Python
apache-2.0
16,737
""" The B{0install download} command-line interface. """ # Copyright (C) 2011, Thomas Leonard # See the README file for details, or visit http://0install.net. from __future__ import print_function import sys from zeroinstall import SafeException, _ from zeroinstall.injector import model, requirements from zeroinsta...
slovenwd/0install
zeroinstall/cmd/update.py
Python
lgpl-2.1
3,427
# -*- coding: utf-8 -*- """ Created on Sat Sep 10 15:25:02 2016 @author: jessime These Events are in alphabetical order. """ class ButtonPress(): def __init__(self, button): self.button = button self.pause_gameplay = True self.filename = 'press' class ChangePos(): def __init__(self...
Jessime/MazeDay2017
src/minesweeper_game/events.py
Python
mit
1,962
# -*- coding: utf-8 -*- from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class FreeWayMe(MultiHoster): __name__ = "FreeWayMe" __type__ = "hoster" __version__ = "0.18" __pattern__ = r'https?://(?:www\.)?free-way\.(bz|me)/.+' __config__ = [("use_premium", "bool",...
Zerknechterer/pyload
module/plugins/hoster/FreeWayMe.py
Python
gpl-3.0
1,842
import twitter import json from collections import Counter from prettytable import PrettyTable from bs4 import BeautifulSoup import requests seen = {} ### https://github.com/edsu/shortpipe/blob/master/shortpipe def unshorten(url): url = url.strip() if url in seen: return seen[url] new_url = url ...
cast42/get-popular-tweets-about-deredactie
gva.py
Python
mit
3,994
#!/usr/bin/env python # -*- coding: utf-8 -*- #This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. import unittest import urllib from trytond.tests.test_tryton import (POOL, DB_NAME, USER, CONTEXT, install_module) from tryton...
openlabs/trytond
trytond/tests/test_mixins.py
Python
gpl-3.0
1,711
import unittest import time import sys import os sys.path.insert( 0, os.path.abspath( os.path.join( os.path.dirname(__file__), ".."))) import emotion from emotion import event config_xml = """ <config> <controller class="mockup" name="test"> <host value="mydummyhost1"/> ...
ESRF-BCU/emotion
tests/TestGroup.py
Python
gpl-2.0
5,419
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 Zadara Storage Inc. # Copyright (c) 2011 OpenStack LLC. # Copyright 2011 University of Southern California # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance w...
tylertian/Openstack
openstack F/cinder/cinder/tests/api/openstack/volume/contrib/test_types_extra_specs.py
Python
apache-2.0
7,880
# -*- coding: utf-8 -*- # Copyright (C) 2015-16 Red Hat, Inc. # This file is part of the Infinity Note Execution Environment. # # The Infinity Note Execution Environment 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 Softw...
gbenson/i8c
src/i8c/runtime/testcase.py
Python
lgpl-2.1
3,847
#!/usr/bin/python3 # encoding=utf-8 # # Copyright © 2015 Alexandre Detiste <alexandre@detiste.be> # # 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...
a-detiste/game-data-packager
tools/mirror.py
Python
gpl-2.0
4,277
__author__ = 'szebenyib' import gback session = gback.GCalSession(oauthfn='gback.oauth', clientfn='logger_google_key.json') for c in session.names: print c
szebenyib/cal
cal.py
Python
lgpl-3.0
184
""" WSGI config for made_with_twd_project project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_...
leifos/tango_with_django
made_with_twd_project/made_with_twd_project/wsgi.py
Python
mit
1,464
#!/usr/bin/env python import os import warnings from glob import glob from setuptools import setup, find_packages, Extension try: from Cython.Build import cythonize from Cython.Tempita import Template except ImportError: use_cython = False warnings.warn('Cython not detected. Re-run setup.py after it is install...
all-umass/superman
setup.py
Python
mit
1,977
# -*- coding: utf-8 -*- # This file is part of the Rocket Web Server # Copyright (c) 2012 Timothy Farrell # # See the included LICENSE.txt file for licensing details. # Import System Modules import time import types import socket import unittest import threading try: from queue import Queue except ImportError: ...
explorigin/Rocket
tests/test_monitor.py
Python
mit
4,248
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
3dfxsoftware/cbss-addons
product_context_date/product.py
Python
gpl-2.0
1,378
#!/usr/bin/env python import os import gi gi.require_version('Gtk', '3.0') gi.require_version('Gdk', '3.0') from gi.repository import Gtk from gi.repository import Gdk HERE = os.path.abspath(os.path.dirname(__file__)) print HERE class Icons(Gtk.Window): def __init__(self): super(Icons, self).__init__(...
KurtJacobson/hazzy
hazzy/widget_factory/TouchPads/ui/icons_test.py
Python
gpl-2.0
771
__author__ = 'Alex Gusev <alex@flancer64.com>' """ Filter related classes (WHERE clause in SQL). Фильтр представляет собой примерно такую структу: * Filter = [ConditionRule | FunctionRule] * ConditionRule = (Condition, Filter1, Filter2, ...) * Expression = [FunctionRule | Alias | Value] * FunctionRule ...
praxigento/teq_test_db_schema_attrs
prxgt/domain/filter/__init__.py
Python
mit
2,076
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # vim: fenc=utf-8:ts=8:sw=8:si:sta:noet import abc try: import mysql.connector except: print('There is no database connection possible (server)') import logging from flsconfig import FLSConfig try: import bsddb3 as bsddb except: print('No SaslDatabase available!') cl...
FLS-Wiesbaden/flscp
flscp/database.py
Python
gpl-3.0
5,107
# -*- coding: utf-8 -*- # (c) Nelen & Schuurmans. GPL licensed, see LICENSE.rst. from __future__ import print_function from __future__ import unicode_literals from __future__ import absolute_import from __future__ import division import argparse import logging from netCDF4 import Dataset import numpy as np from osge...
nens/threedi-wms
threedi_wms/sandbox.py
Python
gpl-3.0
3,261
""" Rope integration for PIDA. Rope is an all-round python analysis/refactoring library. http://rope.sourceforge.net """ from os.path import dirname, basename from pida.core.projects import Project as PidaProject from rope.base.project import Project, get_no_project from rope.base import pynames, pyobjects, built...
fermat618/pida
pida-plugins/python/ropebrowser.py
Python
gpl-2.0
9,650
#Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. #You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #Unless required by applicable law or agreed to in writing, software #distributed under the Lice...
curtiszimmerman/legisgate
utility/scrape_district_and_territorial_courts.py
Python
apache-2.0
2,749
""" Module for formatting output data in Latex. """ from abc import ( ABC, abstractmethod, ) from typing import ( Iterator, List, Optional, Sequence, Tuple, Type, Union, ) import numpy as np from pandas.core.dtypes.generic import ABCMultiIndex from pandas.io.formats.format import ...
datapythonista/pandas
pandas/io/formats/latex.py
Python
bsd-3-clause
25,239
#! /usr/bin/env python # -*- coding:utf-8 -*- # Definition for singly-linked list. class ListNode(object): def __init__(self, x): self.val = x self.next = None class Solution(object): def addTwoNumbers(self, l1, l2): """ :type l1: ListNode :type l2: ListNode :rt...
zongtongyi/leetcode
002_Two_Numbers.py
Python
mit
801
""" Copyright (c) 2016 Gabriel Esteban 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, merge, publish, distribute...
galaxyfeeder/CodeSubmission
problem/apps.py
Python
mit
1,198
import GestionDatetime import Connexion import Slot import Filtre import Resultat import Option from icalendar import Calendar # support des .ics class Edt: def __init__(self): self.connexion = Connexion.Connexion() self.edt = {} self.gestionDate = GestionDatetime.GestionDatetime() self.filtres = {} sel...
ascii-nantes/Edt_Analyser
Edt.py
Python
mit
6,132
import logging import os from functools import partial from typing import Callable, TypeVar, List logger = logging.getLogger(__name__) TV = TypeVar('TV', str, int, List[str]) def get_env_param(name: str, default: TV, factory: Callable[[str], TV]) -> TV: """Return a named environment variable cast to the correct...
rsalmei/clearly
clearly/utils/env_params.py
Python
mit
1,021
# coding=utf-8 # Copyright 2020 The HuggingFace Team. 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 requir...
huggingface/pytorch-transformers
tests/test_tokenization_xlnet.py
Python
apache-2.0
6,008
#!/usr/bin/env python #-*- coding:utf-8 -*- # # This file is part of the NNGT project to generate and analyze # neuronal networks and their activity. # Copyright (C) 2015-2019 Tanguy Fardet # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
Silmathoron/NNGT
nngt/analysis/__init__.py
Python
gpl-3.0
1,096
# # Copyright 2016-2017 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. # # This program is distributed ...
oVirt/vdsm
lib/vdsm/metrics/hawkular.py
Python
gpl-2.0
2,524
__author__ = 'Neil Butcher' from Rota_System.Reporting.HTMLObjects import HTMLObjects from Rota_System.StandardTimes import date_string, time_string def date(an_object): return an_object.date def time(an_object): return an_object.time def role(an_object): return an_object.role def event_title(even...
ergoregion/Rota-Program
Rota_System/Reporting/LinkedBulkReport/Abstract.py
Python
mit
1,466
#!/usr/bin/python # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Copyright (c) 2012 Michael Hull. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are m...
mikehulluk/morphforge
src/morphforgeexamples/exset2_singlecell_simulations/singlecell_simulation010.py
Python
bsd-2-clause
3,237
"""Switch platform for Hyperion.""" from __future__ import annotations import asyncio import base64 import binascii from collections.abc import AsyncGenerator from contextlib import asynccontextmanager import functools from typing import Any from aiohttp import web from hyperion import client from hyperion.const imp...
mezz64/home-assistant
homeassistant/components/hyperion/camera.py
Python
apache-2.0
8,277
"""Truncated SVD for sparse matrices, aka latent semantic analysis (LSA). """ # Author: Lars Buitinck # Olivier Grisel <olivier.grisel@ensta.org> # Michael Becker <mike@beckerfuffle.com> # License: 3-clause BSD. import numpy as np import scipy.sparse as sp try: from scipy.sparse.linalg import svd...
YinongLong/scikit-learn
sklearn/decomposition/truncated_svd.py
Python
bsd-3-clause
7,868
"""Smoke tests of the urls.""" def test_games_as_anonymous(client): response = client.get('/games/') assert response.status_code == 302 def test_games(admin_client): response = admin_client.get('/games/') assert response.status_code == 200
greut/chain-reaction
games/tests/test_urls.py
Python
bsd-3-clause
260
# -*- coding: utf-8 -*- ################################################################################ # Copyright (C) 2009-2012 Travis Shirk <travis@pobox.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 Fr...
daltonsena/eyed3
src/eyed3/id3/headers.py
Python
gpl-2.0
25,339
# # 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 n...
lhfei/spark-in-action
spark-2.x/src/main/python/mllib/gradient_boosting_regression_example.py
Python
apache-2.0
2,498
# ---------------------------------------------------------------------- # Copyright (c) 2014 Rafael Gonzalez. # # 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...
astrorafael/emadb
emadb/server/lazy.py
Python
mit
2,379
# Copyright (c) 2015 Microsoft Corporation from z3 import * from threading import Thread class Tst(Thread): def __init__(self, idx, num): Thread.__init__(self) self.idx = idx self.num = num self.ctx = Context() def run(self): self.result = [] for i in r...
dstaple/z3test
old-regressions/python/thread.py
Python
mit
692
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('hrp', '0002_auto_20160615_1726'), ] operations = [ migrations.AlterField( model_name='locality', nam...
paleocore/paleocore
hrp/migrations/0003_auto_20160617_1105.py
Python
gpl-2.0
432
# -*- coding: utf-8 -*- # Copyright (C) 2008,2009 Sebastian Pölsterl # # This file is part of GNOME DVB Daemon. # # GNOME DVB Daemon 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 Lice...
rainbowintheshell/gnome-dvb-daemon
client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py
Python
gpl-3.0
2,282
# Copyright (c) 2012 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-2.0 # # Unless required by applicable ...
Datera/cinder
cinder/volume/utils.py
Python
apache-2.0
34,817
# -*- coding: utf-8 -*- import hashlib import random from faker import Factory from hayes.analysis import SnowballAnalyzer, StandardAnalyzer from hayes.indexing import ( CompletionSuggestField, DateField, DocumentIndex, IntegerField, StringField, TextField) from hayes_demo.models import Page class Person(di...
andersinno/hayes
hayes_demo/index.py
Python
mit
2,757
# Copyright 2021 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/model-optimization
tensorflow_model_optimization/python/examples/cluster_preserve_qat/keras/mnist_cnn.py
Python
apache-2.0
8,427
# https://bitbucket.org/dimagi/cc-apps/src/caab8f93c1e48d702b5d9032ef16c9cec48868f0/bihar/mockup/bihar_pnc.xml # https://bitbucket.org/dimagi/cc-apps/src/caab8f93c1e48d702b5d9032ef16c9cec48868f0/bihar/mockup/bihar_del.xml # https://bitbucket.org/dimagi/cc-apps/src/caab8f93c1e48d702b5d9032ef16c9cec48868f0/bihar/mockup/b...
gmimano/commcaretest
custom/bihar/calculations/utils/xmlns.py
Python
bsd-3-clause
1,105
from unittest import TestCase from pcs import settings from pcs.common import host def _dest(addr, port): return dict(addr=addr, port=port) class PcsKnownHostFromKnownHost(TestCase): def setUp(self): self.name = "host name" self.token = "token" def test_from_known_host(self): k...
feist/pcs
pcs_test/tier0/common/test_host.py
Python
gpl-2.0
2,882
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/charts/utils.py __version__=''' $Id$ ''' __doc__="Utilities used here and there." from time import mktime, gmtime, strftime from math import ...
Microvellum/Fluid-Designer
win64-vc/2.78/python/lib/reportlab/graphics/charts/utils.py
Python
gpl-3.0
11,499
#!/usr/bin/python # # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
wubr2000/googleads-python-lib
examples/dfp/v201411/contact_service/get_all_contacts.py
Python
apache-2.0
1,872
# Copyright (c) 2012 Qumulo, 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, sof...
Qumulo/qumulo_splunk_app
bin/qumulo/rest/version.py
Python
apache-2.0
776
from datetime import datetime as dt from unittest.mock import patch import pytest from autopilot.utils import get_header, update_changelog @pytest.mark.parametrize('reader,line', [ ('''\ Changelog for autopilot ======================= 0.2.1 (unreleased) ------------------ - Some message ''', 4), ('''\ 0.2.1 (...
jlesquembre/autopilot
tests/changelog_test.py
Python
gpl-2.0
1,737
from distutils.core import setup from Cython.Build import cythonize import numpy setup( ext_modules = cythonize("af2d.pyx"), include_dirs=[numpy.get_include()] )
bkerster/utilities
cy_af2d/setup.py
Python
gpl-2.0
171
from optparse import OptionParser from subprocess import check_output import os, shutil, traceback, sys, json, codecs from itertools import groupby from chameleon_build_comm import * def buildlog(s): print >> sys.stderr, '[chamele_build] %s' %s def runcmd(args): return check_output(args) def getTargetChannel...
uclouddotcn/chameleon
client/tools/buildtool/chameleon_tool/chameleon_build.py
Python
mit
3,947
"""Tests exceptions and DB-API exception wrapping.""" from sqlalchemy import exc as sa_exceptions from sqlalchemy.test import TestBase # Py3K #StandardError = BaseException # Py2K from exceptions import StandardError, KeyboardInterrupt, SystemExit # end Py2K class Error(StandardError): """This class will be old-s...
obeattie/sqlalchemy
test/base/test_except.py
Python
mit
5,046
# 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/attention_ops_test.py
Python
apache-2.0
7,600
from sqlalchemy import Column, Integer, String, ForeignKey from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import backref, mapper, relation, sessionmaker from sqlAlchemyQueryClass import * #from sqlalchemy import * class DbQueries(): """ quest...
arpho/mmasgis5
mmasgis/queriesDb.py
Python
mit
5,822
#!/usr/bin/env python # # # Protool - Python class for manipulating protein structures # Copyright (C) 2010 Jens Erik Nielsen # # 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 o...
dmnfarrell/peat
Protool/__init__.py
Python
mit
1,057
from __future__ import unicode_literals import warnings from django import forms from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.test import ( SimpleTestCase, TestCase, ignore_warnings, override_settings, ) from django.test.client import RequestFact...
gannetson/django
tests/generic_views/test_edit.py
Python
bsd-3-clause
19,212
#!/usr/bin/env python # # Copyright 2010,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your opt...
riveridea/gnuradio
gr-digital/examples/narrowband/uhd_interface.py
Python
gpl-3.0
10,899
import os import stat import mimetypes from urllib.parse import urlsplit from pulsar.utils.httpurl import iri_to_uri from .components import RepoComponents from .. import utils ONEMB = 2**20 class Assets(RepoComponents): pass class Releases(RepoComponents): """Github repository endpoints """ @pr...
quantmind/pulsar-agile
agile/github/releases.py
Python
bsd-3-clause
3,798
#-*- coding: utf-8 -*- # from Tkinter import * # 引入模块 # resize函数是用来改变文字大小的,当进度条改变时调用 # def resize(ev=None): # label.config(font='Helvetica -%d bold' % scale.get()) # config函数就是通过设置组件的参数来改变组件的,这里改变的是font字体大小 # top = Tk() # 主窗口 # top.geometry('600x400') # 设置了主窗口的初始大小600x400 # 设置标签字体的初始大小 # label = Label(top, t...
quchunguang/test
pythonchallenge/testtkinter2.py
Python
mit
7,315
#!/bin/python import os, subprocess import logging from autotest.client import test from autotest.client.shared import error, software_manager sm = software_manager.SoftwareManager() class prelink(test.test): """ Autotest module for testing basic functionality of prelink @author Athira Rajeev <atraj...
rajashreer7/autotest-client-tests
linux-tools/prelink/prelink.py
Python
gpl-2.0
1,662
# -*- Mode: Python; -*- # Copyright (c) 2009 INESC Porto # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation; # # This program is distributed in the hope that it will be useful, #...
mohittahiliani/tcp-eval-suite-ns3
src/flow-monitor/examples/wifi-olsr-flowmon.py
Python
gpl-2.0
7,439
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2017-07-21 18:15:11 import os import tensorflow as tf import numpy as np x_data=np.float32(np.random.rand(2,100)) y_data=np.dot([0.100,0.200],x_data)+0.300 b=tf.Variable()
nwcrazysword/reversalcode
src/test.py
Python
apache-2.0
233
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('django_emarsys', '0003_migrate_eventinstances'), ] operations = [ migrations.RemoveField( model_name='event', ...
machtfit/django-emarsys
django_emarsys/migrations/0004_delete_old_and_rename_new_models.py
Python
mit
1,921
import os import sys root_path = os.path.abspath("../") if root_path not in sys.path: sys.path.append(root_path) import numpy as np from Util.Metas import TimingMeta class Optimizer: def __init__(self, lr=0.01, cache=None): self.lr = lr self._cache = cache def __str__(se...
carefree0910/MachineLearning
f_NN/Optimizers.py
Python
mit
3,492
# 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...
Acehaidrey/incubator-airflow
tests/providers/google/cloud/operators/test_vertex_ai.py
Python
apache-2.0
23,183
# encoding: utf-8 # module samba.dcerpc.wkssvc # from /usr/lib/python2.7/dist-packages/samba/dcerpc/wkssvc.so # by generator 1.135 """ wkssvc DCE/RPC """ # imports import dcerpc as __dcerpc import talloc as __talloc class NetWkstaEnumUsersInfo(__talloc.Object): # no doc def __init__(self, *args, **kwargs): #...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/samba/dcerpc/wkssvc/NetWkstaEnumUsersInfo.py
Python
gpl-2.0
761
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010 Google # Copyright (c) 2008 rPath, Inc. # Copyright (c) 2009 The Echo Nest Corporation # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy...
woggle/mesos-old
third_party/boto-2.0b2/boto/connection.py
Python
apache-2.0
26,856
from netCDF4 import Dataset class Plotting(object): def __init__(self, filename, field_name, stats=None): # get data from file try: self.data = Dataset(filename, "r") except IOError: raise ValueError("File %s does not exist" % filename) # get time variabl...
firedrakeproject/dcore
plotting/plotting.py
Python
mit
1,085
############################################################################## # # Copyright (C) 2018 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino # # The licence is in the file __manifest__.py # ###########################################...
CompassionCH/compassion-switzerland
website_event_compassion/controllers/events_controller.py
Python
agpl-3.0
14,186