text
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
231
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
score
float64
0
0.34
import glob import os import tempfile import urllib.parse import plugin import pluginconf import requests import telepot util = plugin.get("util") ERROR_USER_UNKNOWN = ("I don't know you, but I'll tell you something. " "Sometimes, I use words that I don't " "know to make ...
alobbs/autome
plugins/telegram.py
Python
mit
5,837
0.000171
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: MIT. See LICENSE no_cache = 1 def get_context(context): context.show_sidebar=True
frappe/frappe
frappe/www/profile.py
Python
mit
165
0.024242
#!/usr/bin/env python # -*- coding: utf-8 -*- panel_file = open('panels.txt','r') name_file = open('testName.txt','r') sample_type_file = open("sampleType.txt") test_panel_results = open("output/testPanelResults.txt", 'w') panel = [] type = [] test_names = [] def get_split_names( name ): split_name_list = name.sp...
mark47/OESandbox
liquibase/OE2.8/testCatalogCI_LNSP/scripts/testPanel.py
Python
mpl-2.0
1,391
0.007908
# -*- coding: utf-8 -*- """ Created on Thu Dec 4 00:18:49 2014 @author: Polcz Péter <ppolcz@gmail.com> """ import sys import numpy as np from PyQt4.QtGui import QVBoxLayout, QMessageBox, QApplication from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationToolbar from intellistock.ui.plo...
morta-code/IntelliStock
intellistock/ui/navigatorplotwidget.py
Python
gpl-2.0
3,270
0.003671
# (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...
kmatzen/ansible
lib/ansible/__init__.py
Python
gpl-3.0
888
0.001126
# -*- encoding: utf-8 -*- ############################################################################## # # Romanian accounting localization for OpenERP V7 # @author - Fekete Mihai, Tatár Attila <atta@nvm.ro> # Copyright (C) 2011-2013 TOTAL PC SYSTEMS (http://www.www.erpsystems.ro). # Copyright (C)...
yoyo2k/l10n-romania
partner_create_by_vat/res_partner.py
Python
agpl-3.0
9,585
0.00407
import pytest from freezegun import freeze_time import demistomock as demisto integration_params = { 'url': 'http://test.com', 'credentials': {'identifier': 'test', 'password': 'pass'}, 'fetch_time': '3 days', 'proxy': 'false', 'unsecure': 'false', } @pytest.fixture(autouse=True) def set_mocks(m...
VirusTotal/content
Packs/PrismaCloud/Integrations/RedLock/RedLock_test.py
Python
mit
5,638
0.004966
# -*- coding: utf-8 -*- # ### # Copyright (c) 2013, Rice University # This software is subject to the provisions of the GNU Affero General # Public License version 3 (AGPLv3). # See LICENCE.txt for details. # ### import os from ._version import get_versions __version__ = get_versions()['version'] del get_versions __...
Connexions/cnx-publishing
cnxpublishing/main.py
Python
agpl-3.0
838
0
#!/usr/bin/env python import os import os.path import sys import string ############################################################### ## # ## Edyta Malolepsza # ## David Wales' group, University of Cambridge ...
marktoakley/LamarckiAnt
SCRIPTS/AMBER/symmetrise_prmtop/perm-prmtop.ff03ua.py
Python
gpl-3.0
31,681
0.023137
import os, sys import datetime from glob import glob import json import numpy as np import pandas from skimage.morphology import binary_erosion from nitime.timeseries import TimeSeries from nitime.analysis import SpectralAnalyzer, FilterAnalyzer import nibabel import nipype.interfaces.spm as spm from nipype.interfac...
klarnemann/jagust_rsfmri
rsfmri/utils.py
Python
mit
19,059
0.007346
from django.shortcuts import render, redirect from django.http.response import HttpResponse, JsonResponse from django.views.decorators.csrf import csrf_exempt from .forms import CertFileUploadForm from .models import DeviceToken, CertFile from .utils import send_notification, upload_certificate import json @csrf_exe...
nnsnodnb/django-ios-notifications
notification/views.py
Python
mit
3,036
0.000988
""" Simple wrapper around requests library, mostly for configuring connection and usage by resources. The get, post, put, and delete methods of the class could be used directly. _run_method doc: Runs given method (requests.post, .get, .put, .delete) with given req_path (the part after /api/v2), and the gi...
bc-jackiehuynh/bigcommerce-api-python
bigcommerce/connection.py
Python
mit
4,916
0.008544
# # Medal of Honor Parser for BigBrotherBot(B3) (www.bigbrotherbot.net) # Copyright (C) 2010 James 'Bakes' Baker (bakes@bigbrotherbot.net) # # 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; eithe...
AusTac/parma
b3/parsers/moh.py
Python
gpl-2.0
24,337
0.012204
#!/bin/env python r"""Solartron Orbit network reader GUI.""" # python modules import sys from time import sleep # external modules from serial.serialutil import SerialException from PyQt4 import QtCore, QtGui # app modules from solartron import Driver from sderrors import * from pedal import DummyPedal as Pedal from...
Jellofishi/solartron
qtsolartron.py
Python
lgpl-3.0
12,301
0.028453
import re import sys class SrtSection: """ This class is used to stock a section from a srt file (subtitle frames). - self.beginning is the time (in seconds) where the subframe begins - self.duration is the duration (in seconds) of the subframe - self.content is the content of the s...
octarin/PySrt
PySrt.py
Python
gpl-3.0
3,556
0.005624
from distutils.core import setup setup( name='standard_deviation', version='0.1dev', packages=['sd_py',], license='MIT', long_description=open('README.md').read(), )
jghenry/standard_deviation
setup.py
Python
mit
187
0.005348
#!/usr/bin/env python from .HTMLElement import HTMLElement from .attr_property import attr_property class HTMLFontElement(HTMLElement): def __init__(self, doc, tag): HTMLElement.__init__(self, doc, tag) color = attr_property("color") face = attr_property("face") size ...
tweemeterjop/thug
thug/DOM/W3C/HTML/HTMLFontElement.py
Python
gpl-2.0
352
0.008523
# -*- coding: utf-8 -*- # © 2017 Comunitea # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import models, fields, api, _ from odoo.tools import float_compare from lxml import etree class SaleOrderLineTemplate(models.Model): _name = 'sale.order.line.template' _inherit = 'sale.order....
Comunitea/CMNT_00098_2017_JIM_addons
custom_sale_order_variant_mgmt/models/sale_order.py
Python
agpl-3.0
13,669
0.001171
from django.template.loader import render_to_string from tasks.const import STATUS_SUCCESS from .base import library @library.register('coverage') def coverage_violation(data): """Coverage violation parser :param data: task data :type data: dict :returns: dict """ data['status'] = STATUS_SUCC...
nvbn/coviolations_web
violations/coverage.py
Python
mit
1,087
0
""" ##BOILERPLATE_COPYRIGHT ##BOILERPLATE_COPYRIGHT """ import datetime from types import IntType from noink import mainDB from noink.data_models import Role, RoleMapping from noink.user_db import UserDB from noink.activity_table import get_activity_dict from noink.exceptions import DuplicateRole, RoleNotFound from...
criswell/noink
src/noink/role_db.py
Python
agpl-3.0
7,210
0.000832
from .serializers import LearnerClassroomSerializer from django.db.models.query import F from kolibri.auth.api import KolibriAuthPermissionsFilter from kolibri.auth.filters import HierarchyRelationsFilter from kolibri.auth.models import Classroom from kolibri.auth.serializers import ClassroomSerializer from kolibri.cor...
christianmemije/kolibri
kolibri/plugins/learn/viewsets.py
Python
mit
2,084
0.00048
""" conference.py -- Udacity conference server-side Python App Engine API; uses Google Cloud Endpoints $Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $ created by wesc on 2014 apr 21 """ __author__ = 'wesc+api@google.com (Wesley Chun)' from datetime import datetime, timedelta, time as timed import j...
taylorhardy/ConferenceApp
conference.py
Python
apache-2.0
34,962
0.003976
"""passlib.exc -- exceptions & warnings raised by passlib""" #============================================================================= # exceptions #============================================================================= class MissingBackendError(RuntimeError): """Error raised if multi-backend handl...
Glottotopia/aagd
moin/local/moin/build/lib.linux-x86_64-2.6/MoinMoin/support/passlib/exc.py
Python
mit
7,667
0.004826
# -*- coding: utf-8 -*- # 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...
googleads/google-ads-python
google/ads/googleads/v8/services/services/gender_view_service/transports/grpc.py
Python
apache-2.0
10,280
0.000875
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
disabler/isida3
lib/chardet/sbcsgroupprober.py
Python
gpl-3.0
2,948
0.010855
""" The admin interface is built on top of Flask-Admin: - https://flask-admin.readthedocs.io/en/latest/ - http://flask-admin.readthedocs.io/en/latest/api/mod_model/ - http://mrjoes.github.io/2015/06/17/flask-admin-120.html """ from flask_admin import AdminIndexView, expose from labonneboite.web.admin.utils import abor...
StartupsPoleEmploi/labonneboite
labonneboite/web/admin/views/index.py
Python
agpl-3.0
619
0
import urllib.parse import unittest.mock import tornado.httpclient import robot.tests class TasksHandlerTest(robot.tests.TestCase): @unittest.mock.patch("robot.tasks.TasksHandler.fetch") def test_get(self, fetch): fetch.return_value = robot.tests.future(unittest.mock.Mock(json={ "rows": [...
sfstpala/robot-ci
robot/tests/test_tasks.py
Python
gpl-3.0
7,594
0
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
mbohlool/client-python
kubernetes/test/test_v1beta1_http_ingress_path.py
Python
apache-2.0
1,011
0.004946
from camera import *
astroufsc/python-si-tcpclient
si/commands/__init__.py
Python
gpl-2.0
22
0
#!/usr/bin/env python from gamepieces.HomeRobot import * from gamepieces.Ball import * import cPickle as pickle class LocationFilter: def __init__(self): self.lastSample = None def callback(self,data): # parse message measuredLocations = Locations() measuredLocations.setDataFromSample(data) m...
lukehsiao/RobotSoccer
MotionControl/scripts/kalman_filter/LocationFilter.py
Python
mit
821
0.013398
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import os import pickle import re import simplejson import autofill_dataset_converter import autofill_dataset_gener...
keishi/chromium
chrome/test/functional/autofill.py
Python
bsd-3-clause
41,065
0.004359
# 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 t...
openstack/python-openstacksdk
openstack/baremetal/v1/node.py
Python
apache-2.0
38,102
0
#! /usr/bin/env python # Copyright (C) 2009 Sebastian Garcia # # 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. # #...
royharoush/rtools
dnc.py
Python
gpl-2.0
13,314
0.026288
# 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 'App.created_at' db.add_column('mobile_apps_app', 'created_at', self.gf('django.db.models.f...
katemsu/kate_website
kate3/mobile_apps/migrations/0002_auto__add_field_app_created_at.py
Python
mit
2,545
0.007859
from . import numeric as _nx from .numeric import asanyarray, newaxis def atleast_1d(*arys): res = [] for ary in arys: ary = asanyarray(ary) if len(ary.shape) == 0 : result = ary.reshape(1) else : result = ary res.append(result) if len(res) == 1: ...
FilipeMaia/afnumpy
afnumpy/core/shape_base.py
Python
bsd-2-clause
1,076
0.009294
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-25 16:19 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Crea...
Crimson-Star-Software/data-combine
datacombine/datacombine/migrations/0001_initial.py
Python
mit
7,003
0.003427
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.core.validators import powerdns.models.powerdns class Migration(migrations.Migration): dependencies = [ ('powerdns', '0014_auto_20151124_0505'), ] operations = [ migrat...
allegro/django-powerdns-dnssec
powerdns/migrations/0015_auto_20151214_0632.py
Python
bsd-2-clause
1,537
0.002602
# -*- coding: utf-8 -*- # # bearcart documentation build configuration file, created by # sphinx-quickstart on Mon May 6 20:08:35 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. # # Al...
jlopezpena/bearcart
docs/conf.py
Python
mit
7,820
0.007417
#!/usr/bin/env python """ Makecpptraj =========== Usage ----- ./makecpptraj.py title trajlen interval parm traj """ import sys def getwindow(trajlen,interval=2000): i = trajlen timewindows=[] while i > 0: timewindows.append(i) i = i - interval timewindows.append(0) return tim...
avishek-r-kumar/dfitools
MD_DFI_analysis/makecpptraj.py
Python
bsd-3-clause
1,742
0.030425
"""Process Capsule: The PExpect Wrapper.""" from errno import ESRCH as NoSuchProcess from os import kill, environ from os.path import join from signal import SIGTERM as CTRL_C from chardet import detect as Chardet from pexpect import ( spawn, TIMEOUT, EOF, ) __author__ = "Minho Ryang (minhoryang@gmail.co...
juice-ryang/online-judge
OnlineJudgeServer/process_capsule.py
Python
gpl-3.0
5,696
0
# This file is part of PyEMMA. # # Copyright (c) 2015, 2014 Computational Molecular Biology Group, Freie Universitaet Berlin (GER) # # PyEMMA 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 vers...
marscher/PyEMMA
pyemma/coordinates/tests/test_stride.py
Python
lgpl-3.0
4,463
0.002241
# -*- coding: utf-8 -*- __author__ = 'Bright Pan' # 注意:我们必须要把old数据库中的yehnet_customer表中的postdate改成add_time import types import urllib.request try: import simplejson as json except Exception: import json import pymysql import datetime import sys print(sys.getdefaultencoding()) def f(x): if isinstance(x, s...
bright-pan/my_data_sync
old2new.py
Python
gpl-2.0
11,662
0.017869
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division import recordlinkage as rl import numpy import pandas FULL_INDEX = pandas.MultiIndex.from_product( [[1, 2, 3], [1, 2, 3]], # 3x3 matrix names=['first', 'second']) LINKS_TRUE = pandas.MultiIndex.from_tuples( [(1, 1), (2, 2), (...
J535D165/recordlinkage
tests/test_measures.py
Python
bsd-3-clause
4,180
0.000478
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import super...
mdhaman/superdesk-core
superdesk/io/commands/add_provider.py
Python
agpl-3.0
2,040
0.003431
#!/usr/bin/python # Copyright 2013, 2014 Joshua Charles Campbell, Alex Wilson, Eddie Santos # # This file is part of UnnaturalCode. # # UnnaturalCode 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 Softwa...
naturalness/unnaturalcode
unnaturalcode/pythonSource.py
Python
agpl-3.0
4,032
0.010665
import six import json from userjs.userjs_settings import JSON_HANDLERS def _json_handlers(obj): """Extra handlers that JSON aren't able to parse. The only built-in conversion is for datetime. User configured handlers are tried for other types. If they all fail, raise TypeError. """ if hasattr...
tweekmonster/django-userjs
userjs/utils.py
Python
bsd-3-clause
1,325
0
""" WSGI config for django_mailing 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.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANG...
Aladom/django-mailing
django_mailing/wsgi.py
Python
mit
405
0
# -*- coding: utf-8 -*- # 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...
googleads/google-ads-python
google/ads/googleads/v8/enums/types/campaign_experiment_traffic_split_type.py
Python
apache-2.0
1,292
0.000774
#!/usr/bin/env python # coding=utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function import time import tensorflow as tf import libs.configs.config_v1 as cfg from . import utils as preprocess_utils FLAGS = tf.app.flags.FLAGS def preprocess_image(image, g...
wuzheng-sjtu/FastFPN
libs/preprocessings/city_v1.py
Python
apache-2.0
3,441
0.011334
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016 CERN. # # Invenio is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
mvesper/invenio-circulation
tests/test_api.py
Python
gpl-2.0
3,899
0
""" A simple HTTP interface for making GET, PUT and POST requests. """ import http.client import json from urllib.parse import urlparse, urlencode # NOQA from base64 import b64encode from functools import partial from collections import namedtuple Response = namedtuple("Response", ("payload", "headers", "status", "i...
ddevlin/GitSavvy
common/interwebs.py
Python
mit
2,509
0.001594
# LayerMapping -- A Django Model/OGR Layer Mapping Utility """ The LayerMapping class provides a way to map the contents of OGR vector files (e.g. SHP files) to Geographic-enabled Django models. This grew out of my personal needs, specifically the code repetition that went into pulling geometries and fields out of...
Shrews/PyGerrit
webapp/django/contrib/gis/utils/layermapping.py
Python
apache-2.0
29,814
0.005601
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Mark Theunissen <mark.theunissen@gmail.com> # Sponsored by Four Kitchens http://fourkitchens.com. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_functi...
tersmitten/ansible
lib/ansible/modules/database/mysql/mysql_db.py
Python
gpl-3.0
15,596
0.002501
import pytest from conftest import assert_complete, create_dummy_filedirs @pytest.mark.bashcomp(temp_cwd=True) class TestKpdf: def test_1(self, bash): files, dirs = create_dummy_filedirs( ".eps .EPS .pdf .PDF .ps .PS .txt".split(), "foo".split(), ) completion = as...
scop/bash-completion
test/t/test_kpdf.py
Python
gpl-2.0
502
0
""" 2439 : 별 찍기 - 2 URL : https://www.acmicpc.net/problem/2439 Input : 5 Output : * ** *** **** ***** """ from itertools import repeat N = int(input()) for i in range(1, N + 1): print(''.join(list(repeat(' ', N - i)) + list(repeat('*', i))))
0x1306e6d/Baekjoon
baekjoon/2439.py
Python
gpl-2.0
326
0.003125
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import loggi...
sivakuna-aap/superdesk
server/apps/ldap/commands.py
Python
agpl-3.0
2,913
0.004806
''' Context processors for AWSTrial pages ''' from django.conf import settings def google_analytics_id(request): """Adds the google analytics id to the context if it's present.""" return { 'google_analytics_id': getattr(settings, 'GOOGLE_ANALYTICS_ID', None), } def theme_assets_root(request): ...
appsembler/awstrial
awstrial/trial/context_processors.py
Python
agpl-3.0
532
0.003759
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- # # PyMTP # Developed by: Nick Devito (nick@nick125.com) # (c) 2008 Nick Devito # Released under the GPLv3 or later. # import os import ctypes import ctypes.util from models import * from constants import * from errors import * _module_path = ctypes.util.find_librar...
nathanbullock/pymtp-nkb
pymtp/main.py
Python
gpl-3.0
23,914
0.031237
#!/usr/bin/python # -*- coding: iso-8859-15 -*- from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): help = "Update permissions without using syncdb." def handle_noargs(self, **options): from django.core.management import setup_environ try: import se...
pocketone/django-shoppy
shoppy/shop/management/commands/shoppy_updatePermissions.py
Python
bsd-3-clause
893
0.003359
#!/usr/bin/env python """ Project-wide application configuration. DO NOT STORE SECRETS, PASSWORDS, ETC. IN THIS FILE. They will be exposed to users. Use environment variables instead. See get_secrets() below for a fast way to access them. """ import os from authomatic.providers import oauth2 from authomatic import ...
claimsmall/waterbug
app_config.py
Python
mit
5,956
0.002015
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Jan-Piet Mens <jpmens () 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 L...
47lining/ansible-modules-core
network/basics/get_url.py
Python
gpl-3.0
11,195
0.004288
# -*- coding: utf8 -*- # # Created by 'myth' on 6/27/15 from django.http import JsonResponse from oauth2_provider.decorators import protected_resource from apps.sso.userinfo import Onlineweb4Userinfo USERINFO_SCOPES = [ 'authentication.onlineuser.username.read', 'authentication.onlineuser.first_name.read', ...
dotKom/onlineweb4
apps/sso/endpoints.py
Python
mit
1,048
0.001908
############################################################################## # # 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
ddd/logic/preparation_programme_annuel_etudiant/domain/service/get_programme_inscription_cours.py
Python
agpl-3.0
8,497
0.002707
from rez.exceptions import ReleaseVCSError from rez.packages_ import get_developer_package from rez.util import which from rez.utils.system import popen from rez.utils.logging_ import print_debug from rez.utils.filesystem import walk_up_dirs from pipes import quote import subprocess def get_release_vcs_types(): "...
cwmartin/rez
src/rez/release_vcs.py
Python
lgpl-3.0
8,750
0.000457
# Find the Lowest Common Ancestor (LCA) in a Binary Search Tree # A Binary Search Tree node class Node: # Constructor to initialise node def __init__(self, data): self.data = data self.left = None self.right = None class BST: def __init__(self): self.root = None def ...
anubhavshrimal/Data_Structures_Algorithms_In_Python
Tree/BinarySearchTree/Lowest_Common_Ancestor.py
Python
mit
1,935
0
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # MIT License. See license.txt from __future__ import unicode_literals """ Contains the Document class representing an object / record """ _toc = ["webnotes.model.doc.Document"] import webnotes import webnotes.model.meta import MySQLdb from webnotes.utils impo...
gangadhar-kadam/sapphite_lib
webnotes/model/doc.py
Python
mit
20,173
0.044218
"""Shared class to maintain Plex server instances.""" import logging import ssl import time from urllib.parse import urlparse from plexapi.client import PlexClient from plexapi.exceptions import BadRequest, NotFound, Unauthorized import plexapi.myplex import plexapi.playqueue import plexapi.server from requests import...
lukas-hetzenecker/home-assistant
homeassistant/components/plex/server.py
Python
apache-2.0
25,421
0.001377
#!/usr/bin/env python from tempfile import TemporaryFile, SpooledTemporaryFile import os, sys, re, socket, time, pickle, csv, uuid, subprocess, argparse, decimal, select, platform class LLDB: def __init__(self): self.debugger = lldb.SBDebugger.Create() self.command_interpreter = self.debugger.GetCommandInter...
mellis13/moose
scripts/memory_logger.py
Python
lgpl-2.1
43,940
0.013359
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either ve...
labordoc/labordoc-next
modules/bibformat/lib/elements/bfe_ILO_conventions_link.py
Python
gpl-2.0
1,688
0.013626
data = { "Shopping Cart": { "color": "#B7E090", "icon": "icon-shopping-cart", "label": "Shopping Cart", "link": "Form/Shopping Cart Settings", "type": "module" } }
gangadhar-kadam/hrshop
shopping_cart/config/desktop.py
Python
agpl-3.0
176
0.039773
from __future__ import absolute_import import logging try: from urllib2 import urlopen except ImportError: from urllib.request import urlopen try: from urllib2 import Request except ImportError: from urllib.request import Request try: from galaxy import eggs eggs.require("poster") except Impor...
ssorgatem/pulsar
pulsar/client/transport/poster.py
Python
apache-2.0
1,308
0.002294
# -*- Python -*- import os import platform import re import subprocess import tempfile import lit.formats import lit.util from lit.llvm import llvm_config from lit.llvm.subst import ToolSubst # Configuration file for the 'lit' integration test runner. # name: The name of this integration test suite. config.name = ...
google/llvm-propeller
mlir/integration_test/lit.cfg.py
Python
apache-2.0
1,725
0
GitHubPackage ('mono', 'mono-addins', '0.6.2', 'adcd75bb47ffc1665c8c410f44dad3511dec0da0', configure = './autogen.sh --prefix="%{prefix}"' )
BansheeMediaPlayer/bockbuild
packages/mono-addins.py
Python
mit
144
0.0625
#!/usr/bin/python """ Copyright 2016 Paul Willworth <ioscode@gmail.com> This file is part of Galaxy Harvester. Galaxy Harvester 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 th...
druss316/G-Harvestor
html/udPassword.py
Python
gpl-3.0
2,697
0.001854
# -*- coding: utf-8 -*- from . import basic Basic = basic.BasicCanonicalSolver
rahulsharma1991/frontera
frontera/contrib/canonicalsolvers/__init__.py
Python
bsd-3-clause
78
0.012821
# https://stackoverflow.com/questions/30155138/how-can-i-write-asyncio-coroutines-that-optionally-act-as-regular-functions import asyncio class SyncAdder(type): """ A metaclass which adds synchronous version of coroutines. This metaclass finds all coroutine functions defined on a class and adds a synchro...
chuckus/chromewhip
chromewhip/base.py
Python
mit
1,195
0.001674
from django.conf.urls import patterns, url from views import (AlbumListView, ImageListView, UpdateImage, UpdateAlbum, CreateImage, CreateAlbum, DeleteImage, \ DeleteAlbum, ImageView, AlbumList) urlpatterns = patterns('imagestore.views', url(r'^$', AlbumListView.as_view(), nam...
goldhand/art-portfolio
art-portfolio/imagestore/urls.py
Python
bsd-3-clause
1,663
0.00902
# It was proposed by Christian Goldbach that every odd composite number can be written as the sum of a prime and twice a square. # 9 = 7 + 2x1^2 # 15 = 7 + 2x2^2 # 21 = 3 + 2x3^2 # 25 = 7 + 2x3^2 # 27 = 19 + 2x2^2 # 33 = 31 + 2x1^2 # It turns out that the conjecture was false. # What is the smallest odd c...
ledbutter/ProjectEulerPython
Problem46.py
Python
mit
1,921
0.032795
#!/usr/bin/python # # Copyright 2016 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...
googleads/googleads-adxbuyer-examples
python/samples/v2_x/list_invitations.py
Python
apache-2.0
2,388
0.0067
from pycket.test.testhelper import * from pycket.values import * import pytest skip = pytest.mark.skipif("True") # Creating Structure Types def test_make_struct_type(doctest): """ > (define-values (struct:a make-a a? a-ref a-set!) (make-struct-type 'a #f 2 1 'uninitialized)) > (define an-a (make...
vishesh/pycket
pycket/test/test_struct.py
Python
mit
17,186
0.0032
# If you run this file, it will make up a random secret and then crack it # using timing information from a string comparison function. Maybe--if it # gets lucky. It takes a long, long time to work. # So, the thing I need help with is statistics. The way this thing works is # extremely stupid. Suppose you want to know...
heathseals/CouchPotatoServer
libs/pyutil/scripts/time_comparisons.py
Python
gpl-3.0
8,758
0.003882
# -*- coding: utf-8 -*- """ *************************************************************************** EditScriptAction.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **********************...
dracos/QGIS
python/plugins/processing/gui/EditScriptAction.py
Python
gpl-2.0
2,221
0
default_app_config = 'journeys.apps.JourneyConfig'
vishalsahu5/carpool
journeys/__init__.py
Python
mit
51
0
# Generated by Django 3.0.7 on 2020-09-27 13:39 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('edegal', '0025_photographer_flickr_handle'), ] operations = [ migrations.CreateModel( ...
conikuvat/edegal
backend/larppikuvat/migrations/0001_initial.py
Python
mit
1,162
0.001721
import shutil from pprint import pprint import pandas as pd import csv import pickle import inspect, os import requests from os import listdir import numpy as np import subprocess from luigi import six from sklearn.decomposition import NMF from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer fro...
felipegerard/arte_mexicano_antiguo
montactuaria/Analisis_access_log/luigi/ functions/functions.py
Python
agpl-3.0
362
0.005525
import logging import numpy as np import openpathsampling as paths from openpathsampling.numerics import ( Histogram, histograms_to_pandas_dataframe, LookupFunction, Histogrammer ) from openpathsampling.numerics import WHAM from openpathsampling.netcdfplus import StorableNamedObject from openpathsampling.analysi...
jhprinz/openpathsampling
openpathsampling/high_level/transition.py
Python
lgpl-2.1
19,446
0.002263
import numpy as np import tables as tb fileName = 'carray1.h5' shape = (200, 300) atom = tb.UInt8Atom() filters = tb.Filters(complevel=5, complib='zlib') h5f = tb.open_file(fileName, 'w') ca = h5f.create_carray(h5f.root, 'carray', atom, shape, filters=filters) # Fill a hyperslab in ``ca``. ca[10:60, 20:70] = np.ones(...
avalentino/PyTables
examples/carray1.py
Python
bsd-3-clause
468
0
# Generated by Django 3.1.2 on 2020-11-10 11:51 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('emailtemplates', '0005_auto_20201110_1115'), ] operations = [ migrations.AlterField( model_name='em...
deployed/django-emailtemplates
emailtemplates/migrations/0006_auto_20201110_1151.py
Python
mit
689
0.002903
# -*- coding: utf-8 -*- #Based on sXML-master projet on gitHub __author__= "Luis C. Pérez Tato (LCPT)" __copyright__= "Copyright 2015 LCPT" __license__= "GPL" __version__= "3.0" __email__= "l.pereztato@gmail.com" __author__= "Luis C. Pérez Tato (LCPT)" __copyright__= "Copyright 2015 LCPT" __license__= "GPL" __versio...
lcpt/xc
python_modules/import_export/sciaXML/scia_loads/LoadCaseContainer.py
Python
gpl-3.0
2,570
0.040109
#!/usr/bin/env python """ Setup file for pyddq. This file was generated with PyScaffold 2.5.6, a tool that easily puts up a scaffold for your new Python project. Learn more under: http://pyscaffold.readthedocs.org/ """ import sys import os import glob import subprocess from setuptools import setup, Co...
FRosner/drunken-data-quality
python/setup.py
Python
apache-2.0
1,956
0.001022
# -*- coding: utf-8 -*- from openerp import models, fields, api, osv # We just create a new model class mother(models.Model): _name = 'test.inherit.mother' _columns = { # check interoperability of field inheritance with old-style fields 'name': osv.fields.char('Name', required=True), } ...
OpenUpgrade-dev/OpenUpgrade
openerp/addons/test_inherit/models.py
Python
agpl-3.0
2,104
0.000951
#******************************************************************************* # # Copyright (C) 2019 Xilinx, Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software w...
Xilinx/meta-petalinux
lib/devtool/plnx-sdk-update.py
Python
mit
6,269
0.005104
"""Node metadata operations""" import json import logging import http.client from collections import namedtuple from .common import * logger = logging.getLogger(__name__) ChangeSet = namedtuple('Changes', ['nodes', 'purged_nodes', 'checkpoint', 'reset']) class MetadataMixin(object): def get_node_list(self, **...
nferch/acd_cli
acdcli/api/metadata.py
Python
gpl-2.0
10,176
0.002752
# Copyright 2018 The Servo Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your #...
asajeffrey/servo
etc/start_servo.py
Python
mpl-2.0
992
0.001008
## Unquill: Copyright (C) 2003 Janez Demsar ## ## During development I peeked a lot at Unquill from John Elliott, 1996-2000. ## ## 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...
janezd/kontrabant
kontrabant.py
Python
gpl-3.0
40,758
0.000589
''' Created on Jul 5, 2014 updated: May 28, 2015: added AMCMC @author: jonaswallin ''' import numpy as np import numpy.random as npr from ..utils.gammad import ln_gamma_d def f_prior_nu(x, nu=0.01): """ deafult prior for nu which is gamma returns : log of prior """ return -nu*x class n...
JonasWallin/logisticnormal
logisticnormal/PurePython/priors.py
Python
gpl-3.0
5,934
0.004887
# -*- coding: utf-8 -*- # Copyright 2022 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...
googleapis/python-service-directory
samples/generated_samples/servicedirectory_v1_generated_registration_service_list_services_sync.py
Python
apache-2.0
1,551
0.000645
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2007 Zuza Software Foundation # 2013 F Wolff # # This file is part of translate. # # translate 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...
biswajitsahu/kuma
vendor/packages/translate/filters/spelling.py
Python
mpl-2.0
2,109
0.000474
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>' # Support for excporting Qt's MenuBars/Menus over DBUS. The API is defined i...
drxaero/calibre
src/calibre/gui2/dbus_export/menu.py
Python
gpl-3.0
14,935
0.00221
# -*- coding: utf-8 -*- # # Diazo documentation build configuration file, created by # sphinx-quickstart on Tue Nov 2 18:58:07 2010. # # 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. # # All c...
ebrehault/diazo
docs/conf.py
Python
bsd-3-clause
6,987
0.006441