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
from __future__ import absolute_import # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import numpy as np import scipy.stats as sp_stats # Use the nibabel image object from nibabel import Nifti1Image as Image from nibabel.affines import apply_affine fr...
alexis-roche/nipy
nipy/labs/statistical_mapping.py
Python
bsd-3-clause
15,304
0.000915
import ConfigParser as configparser import os import sys from pyspark import SparkContext, SparkConf, SparkFiles from pyspark.sql import SQLContext, Row from datetime import datetime from os_utils import make_directory, preparing_path, time_execution_log, check_file_exists from subprocess import Popen, PIPE from vina_u...
rodrigofaccioli/drugdesign
virtualscreening/vina/spark/prepare_receptor.py
Python
apache-2.0
2,232
0.002688
#!/usr/bin/env python # -*- coding: UTF-8 -*- from __future__ import division import logging import time from quant import config from quant.brokers import broker_factory from .basicbot import BasicBot from quant.common import log MESSAGE_TRY_AGAIN = 'Please try again' class T_Bithumb(BasicBot): """ bch: ...
doubleDragon/QuantBot
quant/observers/t_bithumb.py
Python
mit
40,197
0.004183
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' destination.factory ''' from destination.zeus import ZeusDestination from destination.aws import AwsDestination from exceptions import AutocertError from config import CFG from app import app class DestinationFactoryError(AutocertError): def __init__(self, destin...
mozilla-it/autocert
autocert/api/destination/factory.py
Python
mit
854
0.003513
# -*- coding: utf8 -*- from django.db import models from django.db.models import F class Revision(models.Model): """ A blank model (except for ``id``) that is merely an implementation detail of django-revisionfield. """ number = models.PositiveIntegerField() @staticmethod def next(): ...
bradleyayers/django-revisionfield
django_revisionfield/models.py
Python
bsd-2-clause
828
0.001208
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
klmitch/nova
nova/tests/unit/compute/test_provider_config.py
Python
apache-2.0
17,242
0.000058
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
EmreAtes/spack
lib/spack/spack/test/cmd/url.py
Python
lgpl-2.1
5,856
0.000342
from __future__ import print_function, division, unicode_literals import operator from pymatgen.core.periodic_table import Element from pymatgen.core.structure import Structure from mpinterfaces.mat2d.intercalation.analysis import get_interstitial_sites __author__ = "Michael Ashton" __copyright__ = "Copyright 2017...
henniggroup/MPInterfaces
mpinterfaces/mat2d/intercalation/startup.py
Python
mit
3,088
0.000648
def exec_after_process(app, inp_data, out_data, param_dict, tool, stdout, stderr): for name,data in out_data.items(): if name == "seq_file2": data.dbkey = param_dict['dbkey_2'] app.model.context.add( data ) app.model.context.flush() break
volpino/Yeps-EURAC
tools/filters/axt_to_lav_code.py
Python
mit
306
0.01634
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "craken_project.settings.local") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
crakensio/djph2
craken_project/manage.py
Python
mit
263
0.003802
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import unittest import requests import base64 import json import os import io import re import zipfile from hashlib import sha256 from email.mime.application import MIMEApplication from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from em...
MISP/misp-modules
tests/test.py
Python
agpl-3.0
34,783
0.002048
#!/usr/bin/env python from sys import argv from os import system from php_tester import php_tester if __name__ == "__main__": assert(len(argv) > 3); repo_src = argv[1]; repo_test = argv[2]; revision = argv[3]; if (len(argv) == 4): out_file = "revlog" + revision + ".txt"; revision2 =...
jyi/ITSP
prophet-gpl/tools/rev-test.py
Python
mit
2,304
0.027344
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2011, 2012 University of Oslo, Norway # # This file is part of Cerebrum. # # Cerebrum 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 ...
unioslo/cerebrum
Cerebrum/modules/no/uio/PostmasterCommands.py
Python
gpl-2.0
4,574
0.001968
# phppo2pypo unit tests # Author: Wil Clouser <wclouser@mozilla.com> # Date: 2009-12-03 from io import BytesIO from translate.convert import test_convert from translate.tools import phppo2pypo class TestPhpPo2PyPo: def test_single_po(self): inputfile = b""" # This user comment refers to: %1$s #. This de...
miurahr/translate
translate/tools/test_phppo2pypo.py
Python
gpl-2.0
1,682
0
# # acute-dbapi setup # Ken Kuhlman (acute at redlagoon dot net), 2007 from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages, Extension import sys import os setup( name="acute-dbapi", version="0.1.0", description="Python DB-API testsuite", author="Ken Kuhlma...
lalinsky/acute-dbapi
setup.py
Python
mit
1,836
0.014161
''' Parse execution data log stream. Allows access to selected parts of program memory at the time of recorded events. ''' # Copyright (c) 2012-2013 Wladimir J. van der Laan # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Softw...
commshare/etna_viv
tools/etnaviv/parse_fdr.py
Python
gpl-3.0
9,109
0.004611
import re,json def isValid(number): match=re.match(r'[456]\d{3}-?\d{4}-?\d{4}-?\d{4}$',number) if not match: return False else: digits=number.replace("-","") result=re.search(r'(\d)\1\1\1',digits) if result: return False return True records=json.load(open("greenparadise.json")) f...
derivationBud/prez
source/greenparadise.py
Python
mit
548
0.032847
#!/bin/python from __future__ import print_function import subprocess import sys import os import json from util import appendline, get_ip_address if __name__ == "__main__": path = os.path.dirname(os.path.realpath(__file__)) config = json.load(open(path+'/cluster-config.json')); for node in config['nodes']: files...
wangyangjun/RealtimeStreamBenchmark
script/pull-updates.py
Python
apache-2.0
715
0.018182
import json import copy formtable = {"name":[u'name'], "gender":[u'gender'], "contact":[u'contact'], "address":[u'address']} def is_reserved_layer(dict,reserved_word): for key in dict: if len(reserved_word)<=len(key) and reserved_word == key[:len(reserved_word)]: ...
Reimilia/Privacy_Server
resources/common/json_parser.py
Python
mit
8,021
0.012093
# pylint: disable=g-bad-file-header # 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/LICENS...
tensorflow/tensorflow
tensorflow/python/tools/optimize_for_inference.py
Python
apache-2.0
5,141
0.005057
import math from param import * class Sample: def __init__(self): self.time = 0 self.home1_x = 0.0 self.home1_y = 0.0 self.home1_theta = 0.0 self.home2_x = 0.0 self.home2_y = 0.0 self.home2_theta = 0.0 self.away1_x = 0.0 self.away1_y = 0.0 ...
lukehsiao/RobotSoccer
MotionControl/scripts/kalman_filter/Sample.py
Python
mit
2,688
0.011161
from django.contrib import admin from .models import ( Store, Seller ) admin.site.register(Store) admin.site.register(Seller)
pymelibre/ecolepo
agrostore/stores/admin.py
Python
gpl-3.0
135
0
# -*- coding: utf-8 -*- """ Created on Mon May 05 23:10:12 2014 @author: Sudeep Mandal """ import numpy as np from scipy.optimize import curve_fit import matplotlib.pyplot as plt def histfit(data, ax=None, **kwargs): """ Emulates MATLAB histfit() function. Plots histogram & Gaussian fit to data Currently ...
HamsterHuey/py_matlab_funcs
histfit.py
Python
mit
2,005
0.009476
from zope.i18nmessageid import MessageFactory PloneMessageFactory = MessageFactory('plone') from Products.CMFCore.permissions import setDefaultRoles setDefaultRoles('signature.portlets.gdsignature: Add GroupDocs Signature portlet', ('Manager', 'Site Administrator', 'Owner',))
liosha2007/plone-groupdocs-signature-source
src/groupdocs/signature/portlets/__init__.py
Python
apache-2.0
294
0.006803
# # Copyright (c) 2009-2015, Jack Poulson # All rights reserved. # # This file is part of Elemental and is under the BSD 2-Clause License, # which can be found in the LICENSE file in the root directory, or at # http://opensource.org/licenses/BSD-2-Clause # import El, math, time m = 10 cutoff = 1000 output = Tru...
justusc/Elemental
examples/interface/SOC.py
Python
bsd-3-clause
4,486
0.041685
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2013-2014, Nigel Small # # 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...
mariosky/evo-drawings
venv/lib/python2.7/site-packages/py2neo/packages/httpstream/__init__.py
Python
agpl-3.0
842
0
# rock_n_roll/apps.py from django.apps import AppConfig class BibliographyConfig(AppConfig): name = 'bibliography' verbose_name = "bibliography" #pippio = "pippo"
chiara-paci/baskerville
baskervilleweb/bibliography/apps.py
Python
gpl-3.0
177
0.011299
#!/usr/bin/env python import dateutil.parser import dateutil.tz import feedparser import re from datetime import datetime, timedelta from joblist import JobList class FilterException(Exception): pass class IndeedJobList(JobList): '''Joblist class for Indeed This joblist is for the indeed.com rss feed. I...
keisetsu/joblist
indeed.py
Python
mit
5,528
0.000543
import ntpath import mp3parser from modifyTag import TagWrapper from glob import glob from os.path import join def pathLeaf(path): head, tail = ntpath.split(path) return tail or ntpath.basename(head) class Runner(): def __init__(self, configs): # We do this here to make it clear what data we need ...
marco-lilek/musiClr
src/utils/runner.py
Python
mit
1,645
0.021884
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The nealcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test running nealcoind with the -rpcbind and -rpcallowip options.""" from test_framework.test_framewo...
appop/bitcoin
qa/rpc-tests/rpcbind_test.py
Python
mit
4,449
0.004271
# -*- coding: UTF-8 -*- from base import TestCase from jinja2_maps.base import _normalize_location class Location(object): def __init__(self, **kw): for k, v in kw.items(): setattr(self, k, v) class TestBase(TestCase): def test_normalize_location_dict(self): d = {"latitude": 42....
bfontaine/jinja2_maps
tests/test_base.py
Python
mit
718
0.005571
def f2(): def f3(): print("f3") f3() f2()
pez2001/sVimPy
test_scripts/test_nested_function.py
Python
gpl-2.0
46
0.086957
from GenericStore import GenericStore class ChangeOverStore(GenericStore): """Store used to manage Source entities. BookingSync doc : http://developers.bookingsync.com/reference/endpoints/change_overs/ """ def __init__(self,credential_manager): super(ChangeOverStore, self).__init__(credential...
BNBLORD/bookingsynclord
bookingsynclord/data_store/ChangeOverStore.py
Python
gpl-3.0
346
0.008671
import sys class outPip(object): def __init__(self, fileDir): self.fileDir = fileDir self.console = sys.stdout def write(self, s): self.console.write(s) with open(self.fileDir, 'a') as f: f.write(s) def flush(self): self.console.flush() new_input = input...
littlecodersh/EasierLife
Scripts/LogInput&Output/py3.py
Python
mit
642
0.012461
""" MIT License Copyright (c) 2017 cgalleguillosm, AlessioNetti 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, ...
cgalleguillosm/accasim
accasim/base/scheduler_class.py
Python
mit
26,009
0.009574
# This file is part of Shuup. # # Copyright (c) 2012-2021, Shuup Commerce Inc. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. import datetime import pytest from shuup.simple_cms.models import Page from shuup.simple_...
shoopio/shoop
shuup_tests/simple_cms/test_custom_templates.py
Python
agpl-3.0
1,062
0.000942
# -*- coding=utf-8 -*- #Copyright 2012 Daniel Osvaldo Mondaca Seguel # #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...
Zincr0/pyscrap
setup.py
Python
apache-2.0
1,541
0.012979
__version__ = '0.3.0'
alexhayes/django-psi
psi/__init__.py
Python
mit
22
0
import files CURRENT_LANGUAGE = 'ger' class dictionary: def __init__(self): pass score = {'ger': 'Punkte', 'bay': 'Punkte', } rank = {'ger': 'Platz', 'bay': 'Bloz', } time = {'ger': 'Datum', 'bay': 'Datum', } usern...
andb0t/Fuxenpruefung
src/i18n.py
Python
gpl-3.0
9,386
0.003525
from __future__ import absolute_import, division, print_function, unicode_literals import string import urllib try: from urllib.parse import urlparse, urlencode, urljoin, parse_qsl, urlunparse from urllib.request import urlopen, Request from urllib.error import HTTPError except ImportError: from urlpars...
VulcanTechnologies/oauth2lib
oauth2lib/utils.py
Python
mit
2,411
0.005807
# # Copyright 2015 Free Software Foundation, Inc. # # This file is part of PyBOMBS # # PyBOMBS 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 option) # any later version. # # PyB...
namccart/pybombs
pybombs/utils/sysutils.py
Python
gpl-3.0
4,522
0.002654
"""Tables, Widgets, and Groups! An example of tables and most of the included widgets. """ import pygame from pygame.locals import * # the following line is not needed if pgu is installed import sys; sys.path.insert(0, "..") from pgu import gui # Load an alternate theme to show how it is done. You can also # speci...
danstoner/python_experiments
pgu/examples/gui5.py
Python
gpl-2.0
1,996
0.021042
#!/usr/bin/env python # encoding: utf-8 from django.db import models,connection from django.contrib.auth.models import User,UserManager class UserProfile(models.Model): GENDER_CHOICES = ( (1, '男'), (2, '女'), ) PROVINCE_CHOICES = ( ('JiangSu','江苏'), ('ShangHai','上海'), ('ShangHai','上海...
maweis1981/hey001
mayversion/mayversion/accounts/models.py
Python
lgpl-3.0
4,215
0.024061
import numpy as np from scipy import sparse import scipy.sparse.linalg as spla import pylab as plt from scipy.linalg import block_diag # # nSub = 2 def load_matrix_basic(pathToFile,makeSparse,makeSymmetric, offset): f0 = open(pathToFile).readlines() firstLine = f0.pop(0) #removes the first line tmp = np.z...
ostravaTokyo/hfls
python/readFetiData.py
Python
unlicense
14,274
0.027533
#!/usr/bin/env python3 # encoding: UTF-8 # This file is part of volcasample. # # volcasample 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 ve...
tundish/volcasample
volcasample/project.py
Python
gpl-3.0
8,341
0.000959
#!/usr/bin/python -S # # Copyright 2009 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Perform auto-approvals and auto-blocks on translation import queue""" import _pythonpath from lp.translations.scripts.import_queue_gardener import Impor...
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/cronscripts/rosetta-approve-imports.py
Python
agpl-3.0
523
0
__author__ = 'Mario' import wx import wx.xrc ########################################################################### ## Class MainPanel ########################################################################### class MainPanel ( wx.Panel ): def __init__( self, parent ): wx.Panel.__init__ ( self, pa...
marioharper182/OptionsPricing
Accelerate/pnlEuropean.py
Python
apache-2.0
3,084
0.027562
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # 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...
citrix-openstack-build/debtcollector
debtcollector/removals.py
Python
apache-2.0
3,792
0
# Copyright 2016 F5 Networks 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 writi...
F5Networks/f5-common-python
f5/bigip/tm/sys/test/functional/test_folder.py
Python
apache-2.0
3,258
0
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-12-09 21:59 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('osf', '0025_preprintprovider_social_instagram'), ] op...
mluo613/osf.io
osf/migrations/0026_preprintservice_license.py
Python
apache-2.0
583
0.001715
# Copyright (c) 2015 Red Hat, 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 require...
huntxu/neutron
neutron/tests/functional/agent/test_dhcp_agent.py
Python
apache-2.0
17,256
0.000174
# Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.building.DistributedSuitInterior from panda3d.core import Point3, Vec3, headsUp from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from ElevatorConstants import * import ElevatorUtils from toontown.toonbase i...
DedMemez/ODS-August-2017
building/DistributedSuitInterior.py
Python
apache-2.0
16,068
0.004232
""" Views for the Projects App """ import datetime import subprocess import sys from django.http import StreamingHttpResponse, HttpResponseRedirect from django.db.models.aggregates import Count from django.contrib import messages from django.views.generic import CreateView, UpdateView, DetailView, View, DeleteView, R...
Xobb/fabric-bolt
src/fabric_bolt/projects/views.py
Python
mit
17,972
0.003561
from django.conf import settings from django.conf.urls.defaults import * urlpatterns = patterns('', url( regex = '^(?P<prefix>%s)(?P<tiny>\w+)$' % '|'.join(settings.SHORTEN_MODELS.keys()), view = 'shorturls.views.redirect', ), )
coxmediagroup/django-shorturls
src/shorturls/urls.py
Python
bsd-3-clause
255
0.039216
from typing import List, Optional from backend.common.consts.ranking_sort_orders import SORT_ORDER_INFO from backend.common.models.event_details import EventDetails from backend.common.models.event_ranking import EventRanking from backend.common.models.event_team_status import WLTRecord from backend.common.models.keys...
the-blue-alliance/the-blue-alliance
src/backend/common/helpers/rankings_helper.py
Python
mit
1,985
0.001008
import boto3 import logging import time from string import Template from pyhocon import ConfigTree from botocore.exceptions import ClientError from typing import List, Any, Tuple, Dict from . import Instance from .instancemanager import InstanceManager from ..utils import random_str, random_int log = logging.getLogg...
d53dave/cgopt
csaopt/instancemanager/awstools.py
Python
mit
13,839
0.004119
# 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 ...
SUSE/azure-sdk-for-python
azure-servicefabric/azure/servicefabric/version.py
Python
mit
494
0
# Copyright (C) 2015 Ross D Milligan # GNU GENERAL PUBLIC LICENSE Version 3 (full notice can be found at https://github.com/rdmilligan/SaltwashAR) from rockyrobotframes import * from sportyrobotframes import * from constants import * class Robot: def __init__(self): self.body_frame = None self.he...
rdmilligan/SaltwashAR
scripts/robot.py
Python
gpl-3.0
3,499
0.003715
from . import Cl, conformalize layout_orig, blades_orig = Cl(3) layout, blades, stuff = conformalize(layout_orig) locals().update(blades) locals().update(stuff) # for shorter reprs layout.__name__ = 'layout' layout.__module__ = __name__
arsenovic/clifford
clifford/g3c.py
Python
bsd-3-clause
240
0
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2018 jem@seethis.link # Licensed under the MIT license (http://opensource.org/licenses/MIT) from keyplus.utility import inverse_map AES_KEY_LEN = 16 EP_VENDOR_SIZE = 64 VENDOR_REPORT_LEN = 64 FLASH_WRITE_PACKET_LEN = EP_VENDOR_SIZE - 5 SETTINGS_RF_INFO_SIZE =...
ahtn/keyplus
host-software/keyplus/constants/settings.py
Python
mit
3,115
0.004815
""" WSGI config for captain 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_APPLICATION`` ...
mozilla/captain
captain/wsgi.py
Python
mpl-2.0
1,653
0.00121
# -*- coding: utf-8 -*- # Copyright (C) 2010 Samalyse SARL # Copyright (C) 2010-2014 Parisson SARL # This file is part of Telemeta. # 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, eithe...
ANR-kamoulox/Telemeta
telemeta/models/corpus.py
Python
agpl-3.0
2,752
0.002544
from rest_framework import serializers from .models import Foto class FotoSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Foto fields = ( 'id', 'name', 'location', 'date', 'image', 'created', ...
mhotwagner/backstage
foti/serializers.py
Python
mit
343
0
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
krafczyk/spack
var/spack/repos/builtin/packages/leveldb/package.py
Python
lgpl-2.1
2,768
0.000723
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # ...
1ukash/horizon
horizon/dashboards/project/networks/forms.py
Python
apache-2.0
2,056
0.000486
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import json import os from typing import Any, Dict, Iterator, List from dataflow.core.utterance_tokenizer import UtteranceTokenizer from dataflow.multiwoz.create_programs import create_programs_for_trade_dialogue from dataflow.multiwoz.salience...
microsoft/task_oriented_dialogue_as_dataflow_synthesis
tests/test_dataflow/multiwoz/test_create_programs.py
Python
mit
10,600
0.002075
#!/usr/bin/env python # Thomas Nagy, 2005-2013 # Modifications by Hans-Martin von Gaudecker for econ-project-templates """ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the ab...
RoyalTS/econ-python-environment
waf.py
Python
bsd-3-clause
1,785
0
# -*- coding: utf-8 -*- import datetime from kivy.app import App from kivy.uix.widget import Widget import random from kivy.clock import Clock from kivy.properties import StringProperty, NumericProperty from webScrape import webScraper class MirrorWindow(Widget): dayPrint = ['Sön', 'Mån', 'Tis', 'Ons', 'Tors', ...
jwesstrom/cleverMirror
main.py
Python
gpl-3.0
1,864
0.004299
import os import sys import time from django.db import models ''' @author: lbergesio,omoya,CarolinaFernandez @organization: i2CAT, OFELIA FP7 Django RuleTable Model class ''' #Django is required to run this model class PolicyRuleTableModel(models.Model): class Meta: """Rul...
fp7-ofelia/pypelib
src/pypelib/persistence/backends/django/RuleTableModel.py
Python
lgpl-3.0
1,069
0.034612
# Copyright 2016 Pinterest, 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...
pinterest/teletraan
deploy-agent/tests/unit/deploy/utils/test_exec.py
Python
apache-2.0
5,911
0.001184
from . import census class Stats(census.Stats): namespace = "eq2" def __str__(self): return "EVERQUST 2 STATS API"
abathur/dbg_census
dbg_census/eq2.py
Python
apache-2.0
128
0.03125
#Es necesario cambiar estos datos por los parametros de nuestro servidor, usuarios, password userDb = "userDb" passDb = "passDb" mail = "*********@gmail.com" passMail = "passMail" nameDb = "domotics_db" urlDb = "urlDb" serverPort = 8080 #Security Code Device updateCode = "UPDATE device SET code = '%s' WHERE id = '%s...
PascualArroyo/Domotics
Server/myconfig.py
Python
gpl-2.0
9,785
0.006847
# Copyright 2015-2019 Yelp 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 writin...
Yelp/paasta
paasta_tools/check_services_replication_tools.py
Python
apache-2.0
8,925
0.000896
#!/usr/bin/env python import sys, os, os.path, signal import jsshellhelper from optparse import OptionParser from subprocess import Popen, PIPE, STDOUT # Uses jsshell https://developer.mozilla.org/en/Introduction_to_the_JavaScript_shell class Packer(object): toolsdir = os.path.dirname(os.path.abspath(__file__)) ...
edsfault/Edsfault-processing.js
tools/packer.py
Python
mit
1,163
0.009458
#!/usr/bin/env python3 import sys from os import listdir, chdir from os.path import isfile, abspath UNTIL = '/build/' REPLACE_WITH = '/b/f/w' def bangchange(file_path): script = File(file_path) if script.flist[0].find("#!") == 0: if script.flist[0].find(UNTIL) > 0: print("\033[92m" + "[M...
antmicro/distant-rec
tools/shebang-replace.py
Python
apache-2.0
1,211
0.004129
clock.addListener("clockStopped", "python", "clock_stopped") def clock_stopped(): print("The clock has been stopped")
MyRobotLab/myrobotlab
src/main/resources/resource/Clock/clock_6_clock_stopped.py
Python
apache-2.0
122
0.016393
#!/usr/bin/env python # ############################################################################### # Copyright (C) 2016-2018 Cortney T. Buffington, N0MJS <n0mjs@me.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publishe...
n0mjs710/DMRlink
ipsc/dmrlink_config.py
Python
gpl-3.0
11,481
0.004703
''' 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 use this ...
pluradj/incubator-tinkerpop
gremlin-python/src/main/jython/gremlin_python/process/strategies.py
Python
apache-2.0
5,953
0.001008
# -*- coding: utf-8 -*- # # geoloc.py # # Copyright (C) 2010 Antoine Mercadal <antoine.mercadal@inframonde.eu> # Copyright, 2011 - Franck Villaume <franck.villaume@trivialdev.com> # This file is part of ArchipelProject # http://archipelproject.org # # This program is free software: you can redistribute it and/or modify...
fr34k8/Archipel
ArchipelAgent/archipel-agent-hypervisor-geolocalization/archipelagenthypervisorgeolocalization/geoloc.py
Python
agpl-3.0
7,356
0.006661
import sys import os import numpy as np sys.path.append(os.path.join(os.getcwd(), "..")) from run_utils import run_kmc, parse_input from ParameterJuggler import ParameterSet def main(): controller, path, app, cfg, n_procs = parse_input(sys.argv) alpha_values = ParameterSet(cfg, "alpha\s*=\s*(.*)\;") a...
jorgehog/Deux-kMC
scripts/autocorr/run.py
Python
gpl-3.0
881
0.014756
''' c++ finally ''' def myfunc(): b = False try: print('trying something that will fail...') print('some call that fails at runtime') f = open('/tmp/nosuchfile') except: print('got exception') finally: print('finally cleanup') b = True TestError( b == True ) def main(): myfunc()
kustomzone/Rusthon
regtests/c++/try_except_finally.py
Python
bsd-3-clause
301
0.059801
# Copyright (c) 2013 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
xiaoyuanW/gem5
configs/common/MemConfig.py
Python
bsd-3-clause
8,019
0.00212
#!/usr/bin/env python '''Check a queue and get times and info for messages in q''' import sys import os import logging import json import datetime import boto.sqs as sqs QUEUE_OAI_HARVEST = os.environ.get('QUEUE_OAI_HARVEST', 'OAI_harvest') QUEUE_OAI_HARVEST_ERR = os.environ.get('QUEUE_OAI_HARVEST_ERR', 'OAI_harvest_e...
mredar/ucldc_oai_harvest
oai_harvester/read_sqs_queue.py
Python
bsd-3-clause
1,363
0.007337
""" IndicoService Authentication Route Creating and Maintaining Users """ from indico.utils.auth.auth_utils import auth, user_hash from indico.utils.auth.facebook_utils import check_access_token from indico.error import FacebookTokenError from indico.utils import unpack, mongo_callback, type_check from indico.routes.ha...
sihrc/tornado-boilerplate
indico/routes/auth.py
Python
mit
1,532
0.001305
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import IntegrityError, models, transaction from sentry.utils.query import RangeQuerySetWrapperWithProgressBar class Migration(DataMigration): # Flag to indicate if ...
ifduyue/sentry
src/sentry/south_migrations/0373_backfill_projectteam.py
Python
bsd-3-clause
95,648
0.007935
"""CI task management Note : this should remain independant of siconos. """ import os import shutil from subprocess import check_call, CalledProcessError import time import multiprocessing class TimeoutException(Exception): pass class RunableProcessing(multiprocessing.Process): def __init__(self, func, *a...
fperignon/siconos
CI/machinery/ci_task.py
Python
apache-2.0
11,193
0.000893
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2020 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
ubuntu-core/snapcraft
tests/unit/plugins/v2/test_meson.py
Python
gpl-3.0
3,544
0.000847
import operator import math class Vec2d(object): """2d vector class, supports vector and scalar operators, and also provides a bunch of high level functions """ __slots__ = ['x', 'y'] def __init__(self, x_or_pair, y = None): if y == None: self.x = x_or_pair[0...
ajhalme/kbsim
lib/Vec2d.py
Python
gpl-3.0
10,798
0.007409
# This file is part of Shuup. # # Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. import pytest from shuup.simple_cms.plugins import PageLinksPlugin from shuup_tests.front...
suutari-ai/shoop
shuup_tests/simple_cms/test_plugins.py
Python
agpl-3.0
2,133
0.000469
# What if you just wanted to split a word in half and return each half on its own: # You could do the following: def reverse(st): words = list(st.split(' ')) print(words) rev_word = words[::-1] print(rev_word) return ' '.join(rev_word) # but this can be condensed to one sentence: def reverse(...
Matt-Stammers/Python-Foundations
Simple Functions/Reversing_split_words.py
Python
gpl-3.0
450
0.011111
import os import pusher CHANNEL = "response-updates" client = pusher.Pusher( app_id=os.environ.get("PUSHER_APP_ID"), key=os.environ.get("PUSHER_KEY"), secret=os.environ.get("PUSHER_SECRET"), cluster='eu', ssl=True ) if "IS_PROD" in os.environ else None def notify(msg_type, payload): """Notif...
jllivermont/hotjar-task
survey/notifier.py
Python
apache-2.0
457
0
import os from datetime import datetime class HQ(object): def __init__(self, fpath, kpath): self.people_in_hq = 0 self.keys_in_hq = 0 self.joined_users = [] self.hq_status = 'unknown' self.status_since = datetime.now().strftime('%Y-%m-%d %H:%M') self.is_clean = True...
ccc-ffm/christian
modules/hq.py
Python
gpl-3.0
3,293
0.00334
# -*- coding: utf-8 -*- # # Copyright(c) 2010 poweredsites.org # # 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...
felinx/poweredsites
poweredsites/libs/decorators.py
Python
apache-2.0
3,016
0.002984
# import copy # import sys import unittest from rdflib.graph import Graph # from rdflib.namespace import NamespaceManager from rdflib import ( # RDF, # RDFS, Namespace, # Variable, # Literal, # URIRef, # BNode ) from rdflib.util import first from FuXi.Rete.RuleStore import ( # N3RuleStore, Setup...
mpetyx/pyrif
3rdPartyLibraries/FuXi-master/test/additionalDLPTests.py
Python
mit
8,179
0.002078
import tables from numpy import * from matplotlib.pyplot import * from matplotlib.widgets import Button #Open HDF5 data file db = lambda x: 20*log10(x) ax1 = subplot(2,2,1) ax2 = subplot(2,2,2) ax3 = subplot(2,2,3) def update(event): f = tables.open_file('data.h5', mode='r') data_2d = array(f.root.data) c_coord...
ooovector/qtlab_replacement
plotting_scripts/gain_compression_upd.py
Python
gpl-3.0
892
0.045964
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
arborh/tensorflow
tensorflow/python/keras/mixed_precision/experimental/layer_correctness_test.py
Python
apache-2.0
5,874
0.003745
from setuptools import setup, find_packages from orotangi import __version__ as version install_requires = [ 'Django==1.11.18', 'djangorestframework==3.6.2', 'django-cors-headers==2.0.2', 'django-filter==1.0.2', 'python-dateutil==2.6.0' ] setup( name='orotangi', version=version, descri...
foxmask/orotangi
setup.py
Python
bsd-3-clause
1,297
0
# (c) 2019 Telstra Corporation Limited # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # #...
roadmapper/ansible
test/units/modules/cloud/amazon/test_aws_acm.py
Python
gpl-3.0
4,581
0.000873
#!/usr/bin/env python # # Copyright (C) 2011 Nigel Bree # All Rights Reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, this # list of co...
uvbs/steam-limiter
updateapp/main.py
Python
bsd-2-clause
18,251
0.011506
#!/usr/bin/python #coding: utf-8 -*- # (c) 2013, Benno Joy <benno@ansible.com> # # This module 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 ...
stianvi/ansible-modules-core
cloud/openstack/_quantum_router.py
Python
gpl-3.0
7,042
0.007242