code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
#!/usr/bin/env python # -*- coding: utf-8 -*- from nose.tools import * from utilities import execution_path, run_all import os, mapnik def setup(): # All of the paths used are relative, if we run the tests # from another directory we need to chdir() os.chdir(execution_path('.')) if 'topojson' in mapnik.D...
TemplateVoid/mapnik
tests/python_tests/topojson_plugin_test.py
Python
lgpl-2.1
3,428
import tidyxml import pprint import datetime import pytz import hashlib import re wnotice = 'https://www.math.uwaterloo.ca/~wnotice/notice_prgms/wreg' emailfrom = 'wnotice@math.uwaterloo.ca' debug = False def get_depts(): res = tidyxml.parse_url(wnotice+'/view_notice.pl') content = res['content'][0]['content'][1]...
worldwise001/webnotice_ics
webnotice.py
Python
mit
5,851
#from bs4 import BeautifulSoup from pprint import pprint from bs4 import BeautifulSoup import requests import urllib2 import re ''' info = 'http://codeforces.com/api/user.status?handle=tacklemore&from=1&count=1' solution = 'view-source:http://codeforces.com/contest/686/submission/18671530' do not include problems wi...
ethancaballero/neural-engineers-first-attempt
scrapers/codeforces/codeforces_get_list_and_tags.py
Python
mit
1,818
# Copyright 2016 Leon Sixt # # 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 # # distributed under the License is distributed on an "AS IS" BAS...
BioroboticsLab/diktya
tests/layers/test_core.py
Python
apache-2.0
3,466
# -*- coding: utf-8 -*- # # PySDL2 documentation build configuration file, created by # sphinx-quickstart on Thu Mar 22 07:51:57 2012. # # 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 ...
MarcJenningsUK/SensorPlatform
python/python-utilities/doc/conf.py
Python
gpl-3.0
8,215
#!/usr/bin/env python3 # encoding: utf-8 import os import sys import shlex import argparse from subprocess import Popen, PIPE keywords = ("iptables-translate", "ip6tables-translate", "ebtables-translate") if sys.stdout.isatty(): colors = {"magenta": "\033[95m", "green": "\033[92m", "yellow": "\033[93m", ...
pexip/os-iptables
xlate-test.py
Python
gpl-2.0
3,647
# ../../skins/bika/bika_widgets/artemplatepartitionswidget.pt from AccessControl import ClassSecurityInfo from Products.Archetypes.Registry import registerWidget, registerPropertyType from Products.Archetypes.Widget import TypesWidget from Products.CMFCore.utils import getToolByName from bika.lims.browser import Browse...
anneline/Bika-LIMS
bika/lims/browser/widgets/artemplateanalyseswidget.py
Python
agpl-3.0
7,475
import json from django.conf import settings from django.test.client import Client, MULTIPART_CONTENT from django.utils.encoding import force_text from rest_framework import status from rest_framework import permissions try: from django.urls import reverse except ImportError: from django.core.urlresolvers im...
Tivix/django-rest-auth
rest_auth/tests/mixins.py
Python
mit
3,866
__author__ = 'seyriz' from urllib.request import * from urllib.error import * from urllib.parse import * from sys import argv import os import time import shutil import logcrawler import xmlexport class crawler(object): def __init__(self): self.namu = "https://namu.wiki/raw/" self.document = argv[1] self.docume...
senior9324/NamuCrawler
crawler.py
Python
gpl-3.0
1,726
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
chengduoZH/Paddle
python/paddle/fluid/tests/unittests/test_buffer_shared_memory_reuse_pass_and_fuse_optimization_op_pass.py
Python
apache-2.0
1,511
import maya maya.stringTable['y_renderSetupWindow.kMayaHelp'] = u'Autodesk Maya Help' maya.stringTable['y_renderSetupWindow.kMayaLTHelp'] = u'Autodesk Maya LT Help' maya.stringTable['y_renderSetupWindow.kExportAVOsNoHandler'] = u'The current renderer has not registered to handle exporting AOVs.' maya.stringTable['y_re...
wgergely/After-Effects
Maya/akaPipe/views/renderSetupWindow_res.py
Python
mit
4,426
from django import forms from django.core.exceptions import PermissionDenied from django.forms import widgets from projects.models import Project, Release, Item # for custom select widget ''' from django.utils.html import mark_safe, escape, conditional_escape from django.utils.encoding import force_unicode from django...
dangeratio/scrum
projects/forms.py
Python
gpl-2.0
1,904
# coding: utf-8 from __future__ import unicode_literals import json import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( determine_ext, float_or_none, int_or_none, try_get, unified_timestamp, url_or_none, ) class PinterestBaseIE(InfoExtractor): ...
rg3/youtube-dl
youtube_dl/extractor/pinterest.py
Python
unlicense
7,598
from tkinter import * def gcd(): n1,n2 = correct() prime1 = prime(n1) prime2 = prime(n2) gcd,lcm = gcd_lcm(n1,n2) lab_prime_n1["text"] = prime1 lab_prime_n2["text"] = prime2 lab_gcd["text"] = gcd lab_lcm["text"] = lcm def correct(): a = ent_n1.get() b = ent_n2.get() try: ...
lenatatata/kpk2016lenatatata_v2
nod_nok.py
Python
gpl-3.0
1,975
from __future__ import absolute_import, division, print_function import pytest import numpy as np from odo import odo, into from odo.utils import tmpfile, filetext from odo.backends.csv import CSV def test_into_convert(): assert odo((1, 2, 3), list) == [1, 2, 3] def test_into_append(): lst = [] resul...
ywang007/odo
odo/tests/test_into.py
Python
bsd-3-clause
1,543
import sys import json import gevent from gevent import monkey monkey.patch_all() import unittest from flexmock import flexmock from opserver.stats import StatQuerier from opserver.opserver_util import OpServerUtils test_num = 0 query_dict = {} got_expected_log_str = False result_1 =\ '{"value": [\n{"T=":14424465600...
tcpcloud/contrail-controller
src/opserver/test/test_stats.py
Python
apache-2.0
2,702
import numpy if __name__ == '__main__': coe = [float(i) for i in input().split(" ")] x = float(input()) print(numpy.polyval(coe, x))
nifannn/HackerRank
Practice/Python/Numpy/polynomials.py
Python
mit
145
# -*- coding: utf-8 -*- from __future__ import print_function import urllib2 import sys import json import os.path import io import colorama from multiprocessing import Pool colorama.init() MANIFEST_URL = 'http://206drody.mobboss-online.com/index.php?action=manifest&app_version=0&controller=file&dpi=2x&la...
GameOfWarVault/DataDownloader
main.py
Python
mit
4,838
# Copyright (c) 2011 Florian Mounier # Copyright (c) 2012, 2014-2015 Tycho Andersen # Copyright (c) 2013 Mattias Svala # Copyright (c) 2013 Craig Barnes # Copyright (c) 2014 ramnes # Copyright (c) 2014 Sean Vig # Copyright (c) 2014 Adi Sieker # Copyright (c) 2014 Chris Wesseling # # Permission is hereby granted, free o...
qtile/qtile
test/layouts/test_stack.py
Python
mit
8,292
# Copyright 2014 Quip # # 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, softwar...
quip/quip-api
samples/webhooks/main.py
Python
apache-2.0
6,831
from pyo import * import mapper from Audio import DarkAtmosphere, Wind, MyFM s = Server(audio="jack", sr=44100, buffersize=512) s.boot() s.start() dark1 = DarkAtmosphere() dark2 = DarkAtmosphere() dark3 = DarkAtmosphere() dark4 = DarkAtmosphere() wind = Wind(.5) myfm = MyFM() dark1.out() dark2.out() dark3.out() dar...
tiagovaz/pyMapperGUI
testing/mapper_input.py
Python
gpl-3.0
1,882
# -*- coding: utf-8 -*- # Copyright 2017 Quartile Limited # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Stock VCI Revaluation", "version": "8.0.1.1.0", "category": "Stock", "website": "https://www.odoo-asia.com/", "author": "Quartile Limited", "license": "AGPL-3", ...
rfhk/awo-custom
stock_vci_revaluation/__openerp__.py
Python
lgpl-3.0
530
import unittest from tito.buildparser import BuildTargetParser from tito.compat import * # NOQA from tito.exception import TitoException class BuildTargetParserTests(unittest.TestCase): def setUp(self): unittest.TestCase.setUp(self) self.valid_branches = ["branch1", "branch2"] self.rel...
ehelms/tito
test/unit/test_build_target_parser.py
Python
gpl-2.0
3,871
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
PaddlePaddle/Paddle
python/paddle/fluid/tests/unittests/mlu/test_matmul_op_mlu.py
Python
apache-2.0
8,758
from django.contrib.auth.decorators import login_required, permission_required,\ user_passes_test from django.shortcuts import render_to_response, get_object_or_404 from django.template.context import RequestContext from project.tramitacao.forms import FormStatusPendencia, FormAuthGroup from project.tramitacao.mode...
waldenilson/TerraLegal
project/tramitacao/restrito/grupo.py
Python
gpl-2.0
7,907
# Copyright 2016 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import fields, models class BasePartnerMergeAutomaticWizard(models.TransientModel): _inherit = "base.partner.merge.automatic.wizard" exclude_is_company = fields.Boolean("'Is a company?...
OCA/partner-contact
partner_deduplicate_filter/wizards/partner_merge.py
Python
agpl-3.0
1,347
import json import urllib import urllib2 import constants import logging from ecl_tools.utils import Objectifier logger = logging.getLogger(__name__) class GoogleCall(object): def __init__(self, path_components=[], token=None, name=None): self.token = token self.path_components = path_components ...
viswimmer1/PythonGenerator
data/python_files/28936980/google.py
Python
gpl-2.0
6,590
# Generated by Django 2.2.11 on 2020-04-15 13:46 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('coredata', '0022_add_new_visit_data'), ] operations = [ migrations.AlterField( model_name='combinedoffering', name=...
sfu-fas/coursys
coredata/migrations/0023_update_choices.py
Python
gpl-3.0
2,507
""" 02-read-from-disk-2.py - Catching the `end-of-file` signal from the SfPlayer object. This example demonstrates how to use the `end-of-file` signal of the SfPlayer object to trigger another playback (possibly with another sound, another speed, etc.). When a SfPlayer reaches the end of the file, it sends a trigger ...
belangeo/pyo
pyo/examples/04-soundfiles/02-read-from-disk-2.py
Python
lgpl-3.0
1,308
from .validators import * from .utils import * from .schema import *
capless/valley
valley/tests/__init__.py
Python
gpl-3.0
68
""" ================================= Permutation T-test on sensor data ================================= One tests if the signal significantly deviates from 0 during a fixed time window of interest. Here computation is performed on MNE sample dataset between 40 and 60 ms. """ # Authors: Alexandre Gramfort <alexandre...
rkmaddox/mne-python
examples/stats/sensor_permutation_test.py
Python
bsd-3-clause
2,435
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014 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...
zenodo/invenio
invenio/base/views.py
Python
gpl-2.0
947
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # 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/LICEN...
tobegit3hub/cinder_docker
cinder/api/views/backups.py
Python
apache-2.0
3,979
# -*- coding: utf-8 -*- # # Russian metadata plugin for Plex, which uses http://www.kinopoisk.ru/ to get the tag data. # Плагин для обновления информации о фильмах использующий КиноПоиск (http://www.kinopoisk.ru/). # Copyright (C) 2012 Yevgeny Nyden # # This program is free software; you can redistribute it and/or # mo...
chimkentec/KodiMODo_rep
plugin.video.torrenter/resources/scrapers/kinopoisk/HTTP.py
Python
gpl-3.0
6,971
import distutils.version try: import greenlet getcurrent = greenlet.greenlet.getcurrent GreenletExit = greenlet.greenlet.GreenletExit preserves_excinfo = (distutils.version.LooseVersion(greenlet.__version__) >= distutils.version.LooseVersion('0.3.2')) greenlet = greenlet.greenlet except...
ioram7/keystone-federado-pgid2013
build/eventlet/eventlet/support/greenlets.py
Python
apache-2.0
1,085
# -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 from django.conf.urls.defaults import * urlpatterns = patterns("user.views", (r'^preferences', 'preferences'), (r'^login', 'login'), (r'^logout', 'logout'), (r'^register', 'register'), )
maysara/pandora_image
pandora/user/urls.py
Python
gpl-3.0
258
"""Mercator proposal.""" from adhocracy_core.resources import add_resource_type_to_registry from adhocracy_core.resources import process from adhocracy_core.resources import proposal from adhocracy_core.sheets.geo import IPoint from adhocracy_core.sheets.geo import ILocationReference from adhocracy_core.sheets.image im...
liqd/adhocracy3.mercator
src/adhocracy_meinberlin/adhocracy_meinberlin/resources/kiezkassen.py
Python
agpl-3.0
1,552
class Car(object): condition = "new" def __init__(self, model, color, mpg): self.model = model self.color = color self.mpg = mpg def display_car(self): return 'This is a ' + self.color +' '+ self.model + ' with ' + str(self.mpg) + ' MPG.' def drive_car(self): se...
yairsz/Code-Academy-Python-Course
car.py
Python
unlicense
739
# -*- coding: utf-8 -*- from cms.constants import LEFT, REFRESH_PAGE from cms.models import UserSettings, Placeholder from cms.toolbar.items import Menu, ToolbarAPIMixin, ButtonList from cms.toolbar_pool import toolbar_pool from cms.utils import get_language_from_request from cms.utils.compat.dj import installed_apps f...
SmithsonianEnterprises/django-cms
cms/toolbar/toolbar.py
Python
bsd-3-clause
13,667
__author__ = 'steve' """ Find some other interesting information not written to the logs, and add these to the entry. Copyright information can be found here: http://www.apnic.net/db/dbcopyright.html, and states: " Users will not be able to download the full contents of the database unless the intended use is for ...
Steven-Eardley/ssh_attacks
portality/find_log_metadata.py
Python
mit
3,117
# -*- encoding: utf-8 -*- # Dissemin: open access policy enforcement tool # Copyright (C) 2014 Antonin Delpeuch # # 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 2 # of th...
Lysxia/dissemin
deposit/hal/metadataFormatter.py
Python
agpl-3.0
8,871
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2010 Canonical # # Authors: # Matthew McGowan # Michael Vogt # # 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; version 3. # # This pr...
pombreda/https-gitorious.org-appstream-software-center
softwarecenter/ui/gtk3/widgets/reviews.py
Python
gpl-3.0
38,106
# coding: utf8 # 2/9/2015 jichi # See: http://online-translator.com # See: http://translate.ru MT_LANGUAGES = { # {str fr:[str to]} 'ru': ( 'en', 'de', 'fr', 'es', 'it', 'pt', 'ja', 'fi'), 'en': ('ru', 'de', 'fr', 'es', 'it', 'pt', 'ja'), 'de': ('ru', 'en', 'fr', 'es', 'it', 'pt'), 'fr': ('ru'...
Dangetsu/vnr
Frameworks/Sakura/py/libs/promt/transdef.py
Python
gpl-3.0
967
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('persons', '0007_auto_20150711_2332'), ] operations = [ migrations.CreateModel( name='Activity', fiel...
david2307/backend_159
activities/migrations/0001_initial.py
Python
gpl-3.0
1,103
"""cmput404project URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') ...
CMPUT404Team/CMPUT404-project-socialdistribution
cmput404project/cmput404project/urls.py
Python
apache-2.0
1,075
from cid.forms.siim2.evaluacion_producto.models import EvaluacionProducto
CaliopeProject/CaliopeServer
src/cid/forms/siim2/evaluacion_producto/__init__.py
Python
agpl-3.0
73
"""watershed.py - watershed algorithm This module implements a watershed algorithm that apportions pixels into marked basins. The algorithm uses a priority queue to hold the pixels with the metric for the priority queue being pixel value, then the time of entry into the queue - this settles ties in favor of the closes...
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/skimage/morphology/watershed.py
Python
gpl-3.0
10,719
# -*-coding:Utf-8 -* """Some code to compute the MhaloPeak as a function of redshift as in Ishikawa et al 2017 or Coupon et al 2017 draft, with the Behroozi et al 2010 and 2013 relations""" import numpy as np import matplotlib.pyplot as plt import time """Parameters""" M1_0 = 11.514 M1_a = -1.793 M1_z = -0.251 e_0...
Gorbagzog/StageIAP
MhPeak_Behroozi13.py
Python
gpl-3.0
2,430
"""Support for restoring entity states on startup.""" import asyncio import logging from datetime import timedelta, datetime from typing import Any, Dict, List, Set, Optional # noqa pylint_disable=unused-import from homeassistant.core import ( HomeAssistant, callback, State, CoreState, valid_enti...
fbradyirl/home-assistant
homeassistant/helpers/restore_state.py
Python
apache-2.0
9,556
from django.utils.translation import ugettext_lazy as _ from django.template.loader import render_to_string class AdminThumbnail(object): """ A convenience utility for adding thumbnails to Django's admin change list. """ short_description = _('Thumbnail') allow_tags = True def __init__(self,...
pcompassion/django-imagekit
imagekit/admin.py
Python
bsd-3-clause
1,339
#! /usr/bin/env python # # Copyright (C) 2006 Clodoaldo Pinto Neto <cpn@fahstats.com> # http://fahstats.com http://forum.fahstats.com # # This file is part of fahstats. # # 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 F...
ClodoaldoPinto/kakaostats
fahstats/scripts/python/parsebz2.py
Python
gpl-2.0
2,373
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
google/jax
jax/experimental/jax2tf/examples/tf_js/quickdraw/quickdraw.py
Python
apache-2.0
6,160
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # 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 #...
MostlyOpen/odoo_addons_jcafb
myo_summary_cst/models/summary_person_lab_test_request.py
Python
agpl-3.0
1,938
# Copyright (c) 2015, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals, absolute_import, print_function import sys import click import cProfile import pstats import frappe import frappe.utils from functools import wraps from six import StringIO c...
bohlian/frappe
frappe/commands/__init__.py
Python
mit
1,535
#!/usr/bin/env python3 # (C) 2013-19 - ntop.org # Author: Simone Mainardi <mainardi@ntop.org> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your opt...
madpilot78/ntopng
tools/icinga2/check_ntopng.py
Python
gpl-3.0
8,804
version_tuple = (17, 4, 17, 1) version_string = ".".join(list(map(str, version_tuple)) + ["dev0"])
LeastAuthority/kubetop
src/kubetop/_metadata.py
Python
mit
100
# Miro - an RSS based video player application # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 # Participatory Culture Foundation # # 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...
debugger06/MiroX
tv/lib/errors.py
Python
gpl-2.0
3,734
from sqlalchemy import * from migrate import * from migrate.changeset import schema pre_meta = MetaData() post_meta = MetaData() post = Table('post', pre_meta, Column('id', Integer, primary_key=True, nullable=False), Column('body', String), Column('timestamp', DateTime), Column('user_id', Integer), ) ...
leebox/flask-extend
project/db_repository/versions/005_migration.py
Python
gpl-3.0
1,330
"""Support for the Microsoft Cognitive Services text-to-speech service.""" from http.client import HTTPException import logging import voluptuous as vol from homeassistant.components.tts import CONF_LANG, PLATFORM_SCHEMA, Provider from homeassistant.const import CONF_API_KEY, CONF_TYPE import homeassistant.helpers.co...
Cinntax/home-assistant
homeassistant/components/microsoft/tts.py
Python
apache-2.0
3,986
import subprocess import cairo import os import time import imp BLENDER_BIN_PATH = os.environ.get("MOTION_PICTURE_BLENDER_BIN_PATH", ".") THIS_DIR = os.path.dirname(__file__) SCRIPT_LOADER_FILEPATH = os.path.join(THIS_DIR, "script_loader.py") def get_path_with_ext(path, ext): root, rem = os.path.splitext(path) ...
sujoykroy/motion-picture
editor/blender/drawer.py
Python
gpl-3.0
3,816
# 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...
horance-liu/tensorflow
tensorflow/contrib/kfac/python/kernel_tests/layer_collection_test.py
Python
apache-2.0
20,782
#!/bin/env python import os import wx import inspect import pickle import time cmdFolder = os.path.realpath(os.path.abspath(os.path.split(inspect.getfile( inspect.currentframe() ))[0])) from images import Images from settings import Settings from gcsuffix import parseGCSuffix BUTTONDIM = (48, 48) wildcard = "G Code...
jbernardis/repraptoolbox
src/GCodeQueue/gcodequeue.py
Python
gpl-3.0
11,242
# Author: Michael Lissner # Date created: 2013-06-11 # This court only hears cases that the ND Supreme Court assigns to it. As a # result, years can go by without a case from this court. from juriscraper.opinions.united_states.state import nd class Site(nd.Site): """This class is almost an exact clone of the nd ...
m4h7/juriscraper
juriscraper/opinions/united_states/state/ndctapp.py
Python
bsd-2-clause
1,628
# -*- coding: utf-8 -*- # # Copyright (c) 2010-2012 Cidadania S. Coop. Galega # # This file is part of e-cidadania. # # e-cidadania 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 Licen...
DROPCitizenShip/e-cidadania
src/apps/ecidadania/proposals/views/proposals.py
Python
gpl-3.0
9,316
from jmp_add import add_jmp_opcodes from break_to_atoms import break_to_atoms from linker import link_to_real_address from compile import compile_from_string, build_to_bytecode from opcode_pack import (ALLOWED_OPCODES, PRT_ONLY, PRT_AND_NOP, PNT_PACK, JMP_PACK, REG_PACK, MEM_PACK) from signatu...
TheAnosmic/cheetahs_byte
compile/__init__.py
Python
gpl-2.0
355
#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # *************************************...
dayongxie/zeroc-ice-androidndk
py/demo/Ice/hello/Client.py
Python
gpl-2.0
4,678
from aiohttp_babel.middlewares import _ from aiohttp_session_flash import flash as original_flash from aiohttp_session import get_session from babel.support import LazyProxy DAYS = ("sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday") class RollbackTransactionException(Exception): pass ...
franckinux/my-own-little-business
molb/views/utils.py
Python
agpl-3.0
1,488
# Copyright (C) 2003-2009 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko 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, or (a...
reaperhulk/paramiko
tests/test_sftp_big.py
Python
lgpl-2.1
14,044
# Finds all files matching extensions recursively in current directory (.) # and updates tthe contact e-mail address import re import os OLD_EMAIL = "vistrails@sci.utah.edu" NEW_EMAIL = "contact@vistrails.org" EXTENSIONS = [".py", ".xml", ".xsd", ".php", ".sql", ".sh", ".rst", ".tex"] IGNORE_LIST = ["update_email_con...
CMUSV-VisTrails/WorkflowRecommendation
scripts/update_email_contact.py
Python
bsd-3-clause
996
__version__ = '0.9.0' from core import hsize from core import parse_magnet from core import ratio from core import to_magnet
walidsa3d/torrentutils
torrentutils/__init__.py
Python
mit
125
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from datetime import datetime import math import pytest from flexget.utils import json from flexget.utils.tools import parse_filesize, split_title_year def compare_floa...
jawilson/Flexget
flexget/tests/test_utils.py
Python
mit
3,596
#!/usr/bin/python # # Copyright 2013 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...
lociii/googleads-python-lib
examples/adspygoogle/dfp/v201306/get_all_placements.py
Python
apache-2.0
1,625
import click from ...models import JudgeFactory from ...utils.setup import output_problem, output_contest from ...utils.constants import default_judge from ...utils.exceptions import handle_exceptions from ...utils.logging import logger judge_factory = JudgeFactory() OJs = judge_factory.available_judges if default_ju...
termicoder/termicoder
termicoder/cli/setup/__init__.py
Python
mit
2,086
import logging from email.mime.text import MIMEText from email.utils import parseaddr from .utils import ( get_message_subject, get_rendered_jinja) logger = logging.getLogger('c7n_mailer.utils.email') # Those headers are defined as follows: # 'X-Priority': 1 (Highest), 2 (High), 3 (Normal), 4 (Low),...
capitalone/cloud-custodian
tools/c7n_mailer/c7n_mailer/utils_email.py
Python
apache-2.0
3,819
# Standard library imports import string, pkgutil from xceptions import * # Third party imports #### netcdf --- currently support cdms2, python-netCDF4 and Scientific l = pkgutil.iter_modules() ll = map( lambda x: x[1], l ) supportedNetcdf = ['cdms2','netCDF4','Scientific','ncq3'] installedSupportedNetcdf = [] #...
martinjuckes/ceda_cc
ceda_cc/file_utils.py
Python
bsd-3-clause
12,507
#!/usr/bin/env python # vim: set fileencoding=utf-8 : # @author: Chi Ho CHAN <c.chan@surrey.ac.uk> # @date: Mon July 8 11:33:00 CEST 2013 # # Copyright (C) 2011-2013 CVSSP, University of Surrey, U.K. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
chichan01/xbob.measure.Bootstraps
xbob/measure/Bootstraps/Bootstraps.py
Python
gpl-3.0
11,517
from csv import DictWriter from tastypie.serializers import Serializer import StringIO class CSVSerializer(Serializer): formats = ['json', 'xml', 'yaml', 'html', 'plist', 'csv'] content_types = { 'json': 'application/json', 'xml': 'application/xml', 'yaml': 'text/yaml', 'html': 'text/ht...
muescha/hutmap
huts/utils/csv_serializer.py
Python
mit
949
from django.urls import path from . import dashboard_views app_name = 'exam' urlpatterns = [ path('assignment/new/', dashboard_views.MakeAssignmentView.as_view(), name='assignment_new'), path('assignment/success/', dashboard_views.MakeAssignmentSuccess.as_view(), name='assignment_su...
d120/pyophase
exam/dashboard_urls.py
Python
agpl-3.0
483
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from django.utils.unittest.case import skip from treemap.models import Tree from cases import PlotDetailDeleteUITestCase class PlotEditDeleteTest(PlotDetailDeleteUITestCase): de...
ctaylo37/OTM2
opentreemap/treemap/tests/ui/plot_detail/uitest_delete.py
Python
gpl-3.0
2,978
from utilities import * # Editor's Helper Script version 6.0 - (C) 2005-2006 by Agetian # Batch mod testing commands (C) 2005 by Cerulean the Blue # Sector reader/writer routines are portions of ToEEWB foreported to Python 2.x # (C) copyright 2005 by Michael "Agetian" Kamensky # ======================================...
GrognardsFromHell/TemplePlus
tpdatasrc/co8infra/scr/ed.py
Python
mit
16,295
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
Azure/azure-sdk-for-python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_operations.py
Python
mit
5,336
''' MergePairSelector Wrapper class for routines that randomly select which components kA, kB to attempt to merge USAGE >> MTracker = MergeTracker(SS.K) >> MSelector = MergePairSelector(hmodel, SS) >> kA, kB = MSelector.select_merge_component(MTracker) ''' import numpy as np from ..util import choice class Merge...
daeilkim/refinery
refinery/bnpy/bnpy-dev/bnpy/learnalg/MergePairSelector.py
Python
mit
4,337
#!/usr/bin/python # coding=utf-8 ########################################################################## from test import CollectorTestCase from test import get_collector_config from netscalersnmp import NetscalerSNMPCollector class TestNetscalerSNMPCollector(CollectorTestCase): def setUp(self, allowed_name...
EzyInsights/Diamond
src/collectors/netscalersnmp/test/testnetscalersnmp.py
Python
mit
675
import six from django.db import models, transaction from django.db.models import F, Max, Min from django.contrib.contenttypes.models import ContentType from django.utils.safestring import mark_safe from django.utils.translation import ugettext, ugettext_lazy as _ from django_comments.models import Comment from djan...
jayfk/django-comments-xtd
django_comments_xtd/models.py
Python
bsd-2-clause
5,027
#!/usr/bin/env python # Copyright 2013 Jonathan E. T. Means # Licensed under the Red Spider Project License. # See the License.txt that shipped with your copy of this software for details. from __future__ import print_function import argparse print(4) parser = argparse.ArgumentParser(description='Number chosen by f...
the-xkcd-community/the-red-spider-project
src/random-number.py
Python
mit
418
# -*- coding: utf-8 -*- from __future__ import print_function import re from .FileType import FileType class MultiPatchLog(FileType): """File type written by MultiPatch module. """ extensions = ['.log'] ## list of extensions handled by this class dataTypes = [] ## list of python types handled by t...
pbmanis/acq4
acq4/filetypes/MultiPatchLog.py
Python
mit
1,052
""" ============================================== Motion - Flotilla ============================================== Example with the 'Number'-module ---------------------------------------------- Course: Web Of Things (WOT) Option: New Media Development Department: Graphic and Digital Media College: Arteveld...
gdmgent-1718-wot/Hardware
rpi-flotilla/modules/number/number.py
Python
apache-2.0
822
# coding=UTF-8 import sys from base_string_script import BaseStringScript BAD_ELLIPSIS = "..." GOOD_ELLIPSIS = "…" BAD_ELLIPSIS_SPACING = " …" GOOD_ELLIPSIS_SPACING = "…" BAD_SINGLE_QUOTE = "\\\'%1$s\\\'" BAD_DOUBLE_QUOTE = "\\\"%1$s\\\"" GOOD_DOUBLE_QUOTE = "“%1$s”" class FixTypographyScript(BaseStringScript): ...
samtstern/FirebaseUI-Android
scripts/translations/fix_typography.py
Python
apache-2.0
1,375
# -*- coding: utf-8 -*- # GUI Application automation and testing library # Copyright (C) 2006-2018 Mark Mc Mahon and Contributors # https://github.com/pywinauto/pywinauto/graphs/contributors # http://pywinauto.readthedocs.io/en/latest/credits.html # All rights reserved. # # Redistribution and use in source and binary f...
airelil/pywinauto
pywinauto/linux/keyboard.py
Python
bsd-3-clause
17,458
""" Actions manager for transcripts ajax calls. +++++++++++++++++++++++++++++++++++++++++++ Module do not support rollback (pressing "Cancel" button in Studio) All user changes are saved immediately. """ import copy import os import logging import json import requests from django.http import HttpResponse, Http404 fro...
wwj718/murp-edx
cms/djangoapps/contentstore/views/transcripts_ajax.py
Python
agpl-3.0
19,910
"""bluesky.modules.load Example configuration: { "config":{ "load": { "sources": [ { "name": "firespider", "format": "JSON", "type": "API", "endpoint": "https://h...
pnwairfire/bluesky
bluesky/modules/load.py
Python
gpl-3.0
4,111
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('token_blacklist', '0004_auto_20171017_2013'), ] operations = [ migrations.RemoveField( model_name='outstandingtoken', name='jti', ), ]
davesque/django-rest-framework-simplejwt
rest_framework_simplejwt/token_blacklist/migrations/0005_remove_outstandingtoken_jti.py
Python
mit
294
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # Copyright (C) 2006-2007 Lukáš Lalinský # # 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 Li...
mineo/picard
picard/formats/id3.py
Python
gpl-2.0
27,465
""" Limited dependent variable and qualitative variables. Includes binary outcomes, count data, (ordered) ordinal data and limited dependent variables. General References -------------------- A.C. Cameron and P.K. Trivedi. `Regression Analysis of Count Data`. Cambridge, 1998 G.S. Madalla. `Limited-Dependent a...
pprett/statsmodels
statsmodels/discrete/discrete_model.py
Python
bsd-3-clause
62,310
""" `Django Blog Zinnia`_ allows for the management of a blog in your project. It is well integrated into the `cms`_ component but can also be used independently. """
emencia/emencia_paste_djangocms_3
emencia_paste_djangocms_3/django_buildout/project/mods_available/zinnia/__init__.py
Python
mit
166
#!/usr/bin/env python # encoding: utf-8 name = "Disproportionation/rules" shortDesc = u"" longDesc = u""" """ entry( index = 485, label = "Y_rad_birad_trirad_quadrad;XH_Rrad_birad", kinetics = ArrheniusEP( A = (3e+11, 'cm^3/(mol*s)'), n = 0, alpha = 0, E0 = (0, 'kcal/mol'),...
Molecular-Image-Recognition/Molecular-Image-Recognition
code/rmgpy/test_data/testing_database/kinetics/families/Disproportionation/rules.py
Python
mit
99,414
# -*- 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-aiplatform
samples/generated_samples/aiplatform_v1_generated_job_service_create_data_labeling_job_async.py
Python
apache-2.0
1,988
from .select_sql import SelectSQL from .filter_by import SQLFilter class JoinSQL(SelectSQL): host = None join_type = None join_filters = None def __init__(self, schema, alias, vtable): super(JoinSQL, self).__init__(schema, alias, vtable) self.join_filters = [] def set_host(sel...
dozymoe/fireh_sql
join_sql.py
Python
gpl-3.0
2,089
# Copyright 2011 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 l...
silenceli/nova
nova/version.py
Python
apache-2.0
2,465
__author__ = 'tylin'
wenhuchen/ETHZ-Bootstrapped-Captioning
visual-concepts/coco/PythonAPI/pycocotools/__init__.py
Python
bsd-3-clause
21