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 django.conf import settings # these 3 should be provided by your app FACEBOOK_APP_ID = getattr(settings, 'FACEBOOK_APP_ID', None) FACEBOOK_APP_SECRET = getattr(settings, 'FACEBOOK_APP_SECRET', None) FACEBOOK_DEFAULT_SCOPE = getattr(settings, 'FACEBOOK_DEFAULT_SCOPE', [ 'email', 'user_about_me', 'user_...
fogcitymarathoner/djfb
facebook_example/django_facebook/settings.py
Python
bsd-3-clause
3,806
0.001839
from clint import resources import json resources.init('thomasballinger', 'trello-card-updater') #being used as though they have in-memory caches class LocalStorage(object): def __init__(self, name): object.__setattr__(self, 'res', getattr(resources, name)) def __getattr__(self, att): s = self...
thomasballinger/trellocardupdate
trellocardupdate/local.py
Python
isc
1,142
0.007881
[{"url": "https://raw.githubusercontent.com/ikesuncat/listas/master/Addon.xml", "fanart": ".\\fanart.jpg", "title": "Ike"}]
mrquim/repository.mrquim
repo/plugin.video.live.ike/websocket/tests/.py.py
Python
gpl-2.0
123
0.01626
"""iching. See: https://packaging.python.org/en/latest/distributing.html https://github.com/chengjun/iching """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) ...
chengjun/iching
setup.py
Python
mit
3,708
0.00027
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('core', '0016_remove_user_is_census_admin'), ] operations = [ migrations.AddField( model_name='group', ...
azavea/nyc-trees
src/nyc_trees/apps/core/migrations/0017_group_affiliation.py
Python
agpl-3.0
470
0
#!/usr/bin/env python '''relay handling module''' import time from pymavlink import mavutil from MAVProxy.modules.lib import mp_module class RelayModule(mp_module.MPModule): def __init__(self, mpstate): super(RelayModule, self).__init__(mpstate, "relay") self.add_command('relay', self.cmd_relay, "...
fqez/JdeRobot
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_relay.py
Python
gpl-3.0
3,625
0.007172
from django.contrib import auth from django.contrib.auth.models import User from django.test import TestCase from django.urls.base import reverse class TestAccountRegistration(TestCase): def setUp(self): # create one user for convenience response = self.client.post( reverse('account:re...
jardiacaj/finem_imperii
account/tests.py
Python
agpl-3.0
8,495
0.001766
# -*- coding: utf-8 -*- r""" # .---. .----------- # / \ __ / ------ # / / \( )/ ----- (`-') _ _(`-') <-. (`-')_ # ////// '\/ ` --- ( OO).-/( (OO ).-> .-> \( OO) ) .-> # //// / // : : --- (,------. \ .'_ (`-')----. ,...
edonyM/toolkitem
fileprocess/mergefile/filebuf.py
Python
mit
5,258
0.003233
__all__ = ['LEAGUE_PROPERTIES'] LEAGUE_PROPERTIES = { "PL": { "rl": [18, 20], "cl": [1, 4], "el": [5, 5], }, "EL1": { "rl": [21, 24], "cl": [1, 2], "el": [3, 6] }, "EL2": { "rl": [21, 24], "cl": [1, 2], "el": [3, 6] }, ...
RayYu03/pysoccer
soccer/data/leagueproperties.py
Python
mit
1,439
0.004864
#from interface.services.icontainer_agent import ContainerAgentClient #from pyon.ion.endpoint import ProcessRPCClient from pyon.public import Container, log, IonObject from pyon.util.containers import DotDict from pyon.util.int_test import IonIntegrationTestCase from interface.services.coi.iresource_registry_service i...
ooici/coi-services
ion/services/sa/observatory/test/test_observatory_negotiation.py
Python
bsd-2-clause
2,839
0.00951
# coding=utf-8 import time import datetime __author__ = 'JIE' #! /usr/bin/env python #coding=utf-8 from tornado.tcpserver import TCPServer from tornado.ioloop import IOLoop class Connection(object): clients = set() def __init__(self, stream, address): Connection.clients.add(self) self._stream...
stableShip/tornado_chatRoom
TcpServer.py
Python
mit
1,361
0.005878
# -*- coding: utf-8 -*- # BankCSVtoQif - Smart conversion of csv files from a bank to qif # Copyright (C) 2015-2016 Nikolai Nowaczyk # # 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 v...
niknow/BankCSVtoQif
setup.py
Python
gpl-2.0
1,329
0
import datetime import unittest2 from google.appengine.ext import testbed from consts.event_type import EventType from datafeeds.usfirst_matches_parser import UsfirstMatchesParser from helpers.match_helper import MatchHelper from models.event import Event from models.match import Match class TestAddMatchTimes(unitt...
bvisness/the-blue-alliance
tests/test_add_match_times.py
Python
mit
3,491
0.002292
from pymacy.db import get_db from bson.json_util import dumps db = get_db() results = [] count = 0 for i in db.benchmark.find({"element": "Ni"}): count += 1 if count > 100: break results.append(i) print(results[0]) with open("Ni.json", 'w') as f: file = dumps(results) f.write(file)
czhengsci/veidt
veidt/potential/tests/name/get_data.py
Python
bsd-3-clause
312
0.003205
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2017 Joshua Charles Campbell # 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 o...
orezpraw/partycrasher
partycrasher/config_loader.py
Python
gpl-3.0
1,971
0.002029
from sys import argv script, filename = argv print "We're going to erase %r." % filename print "If you don't want that, hit CTRL-C (^C)." print "If you do want that, hit RETURN." raw_input("?") print "Opening the file..." target = open(filename,'w') print "Truncating the file. Goodbye!" target.truncate() print "N...
CodeSheng/LPLHW
ex16-3.py
Python
apache-2.0
619
0.003231
""" Testing hrf module """ from __future__ import absolute_import from os.path import dirname, join as pjoin import numpy as np from scipy.stats import gamma import scipy.io as sio from ..hrf import ( gamma_params, gamma_expr, lambdify_t, spm_hrf_compat, spmt, dspmt, ddspmt, ) from ...
alexis-roche/nipy
nipy/modalities/fmri/tests/test_hrf.py
Python
bsd-3-clause
3,668
0.000545
#!/usr/bin/env python """Plot information needed file""" ######################################################################## # File: plot_raw_read_alignment.py # executable: plot_raw_read_alignment.py # # Author: Andrew Bailey # History: Created 12/01/17 ###########################################################...
UCSC-nanopore-cgl/nanopore-RNN
nanotensor/visualization/plot_raw_read_alignment.py
Python
mit
7,635
0.002489
#!/usr/bin/python """ Object """ import sys from copy import copy as _copy from collections import defaultdict from .errors import ConfigurationError, ExecutionError, \ InvalidParameterDatatype from .debugging import bacpypes_debugging, ModuleLogger from .primitivedata import Atomic, BitString, Boolean, Charact...
JoelBender/bacpypes
py34/bacpypes/object.py
Python
mit
139,323
0.026715
# -*- coding: utf-8 -*- # Copyright (c) 2016-2017, Zhijiang Yao, Jie Dong and Dongsheng Cao # All rights reserved. # This file is part of the PyBioMed. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the PyBioMed source tree. """ #####...
gadsbyfly/PyBioMed
PyBioMed/Pymolecule.py
Python
bsd-3-clause
16,673
0.00036
# -*- coding: utf-8 -*- # # pymdstat documentation build configuration file, created by # sphinx-quickstart on Sat Dec 20 16:43:07 2014. # # 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. # # ...
nicolargo/pymdstat
docs/conf.py
Python
mit
8,164
0.006247
# Copyright 2020 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Flags: -expose-wasm --wasm-gdb-remote --wasm-pause-waiting-for-debugger test/debugging/wasm/gdb-server/test_files/test_memory.js import struct import sy...
youtube/cobalt
third_party/v8/test/debugging/wasm/gdb-server/memory.py
Python
bsd-3-clause
3,599
0.015004
from django.db import models from guardian.shortcuts import get_objects_for_user from readthedocs.builds.constants import LATEST from readthedocs.builds.constants import LATEST_VERBOSE_NAME from readthedocs.builds.constants import STABLE from readthedocs.builds.constants import STABLE_VERBOSE_NAME from readthedocs.p...
VishvajitP/readthedocs.org
readthedocs/privacy/backend.py
Python
mit
6,504
0.000461
#!/usr/bin/env python # -*- coding: Latin-1 -*- """ @file ParamEffectsOLD.py @author Sascha Krieg @author Daniel Krajzewicz @author Michael Behrisch @date 2008-07-26 @version $Id: ParamEffectsOLD.py 22608 2017-01-17 06:28:54Z behrisch $ Creates files with a comparison of speeds for each edge between the taxis...
702nADOS/sumo
tools/projects/TaxiFCD_Krieg/src/fcdQuality/ParamEffectsOLD.py
Python
gpl-3.0
7,647
0.001308
# # This file is part of pyasn1 software. # # Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com> # License: http://snmplabs.com/pyasn1/license.html # from sys import version_info if version_info[0:2] < (2, 6): def bin(value): bitstring = [] if value > 0: prefix = '0b' el...
endlessm/chromium-browser
tools/swarming_client/third_party/pyasn1/pyasn1/compat/binary.py
Python
bsd-3-clause
698
0
import pytest import unittest from os import path from django.test import SimpleTestCase from django.conf import settings from rest_framework.renderers import BaseRenderer import sunburnt from openapi.search_builder import ( SearchBuilder, SearchWrapper, InvalidFieldError, InvalidQueryError, Unkno...
oriel-hub/api
django/idsapi/openapi/tests/search_wrapper.py
Python
gpl-2.0
14,005
0.003499
# # Copyright 2019 The FATE 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...
FederatedAI/FATE
python/fate_client/flow_sdk/client/api/base.py
Python
apache-2.0
1,520
0
# Copyright (C) 2012,2013 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms of the G...
espressopp/espressopp
src/integrator/CapForce.py
Python
gpl-3.0
2,764
0.006874
# Copyright 2020 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 by applicable law or a...
google/timesketch
api_client/python/timesketch_api_client/credentials.py
Python
apache-2.0
5,272
0.000379
# 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 ...
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/ip_configuration_py3.py
Python
mit
2,962
0.005064
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GL import _types as _cs # End users want this... from OpenGL.raw.GL._types import * from OpenGL.raw.GL import _errors from OpenGL.constant import Constant as _C import ctypes _...
stack-of-tasks/rbdlpy
tutorial/lib/python2.7/site-packages/OpenGL/raw/GL/NV/register_combiners.py
Python
lgpl-3.0
5,260
0.043536
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ychen820/microblog
y/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/python/request_state.py
Python
bsd-3-clause
2,810
0.008897
# Copyright (c) 2015 Midokura SARL, All Rights Reserved. # # @author: Antonio Sagliocco <antonio@midokura.com>, Midokura import logging import subprocess from collections import Counter import os from injector import inject, singleton from requests.exceptions import ConnectionError from yaml import load from midonet_s...
midonet/midonet-sandbox
src/midonet_sandbox/logic/composer.py
Python
apache-2.0
9,157
0.000655
""" Consider this game: Write 8 blanks on a sheet of paper. Randomly pick a digit 0-9. After seeing the digit, choose one of the 8 blanks to place that digit in. Randomly choose another digit (with replacement) and then choose one of the 7 remaining blanks to place it in. Repeat until you've filled all 8 blanks. You wi...
DayGitH/Python-Challenges
DailyProgrammer/20120430B.py
Python
mit
1,804
0.005543
from spotdl.version import __version__ from spotdl.command_line.core import Spotdl
Ritiek/Spotify-Downloader
spotdl/__init__.py
Python
mit
84
0.011905
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # 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 F...
astagi/taiga-back
taiga/projects/api.py
Python
agpl-3.0
20,069
0.001495
###################################################### # # MouseLook.py Blender 2.55 # # Tutorial for using MouseLook.py can be found at # # www.tutorialsforblender3d.com # # Released under the Creative Commons Attribution 3.0 Unported License. # # If you use this code, please include this information ...
TomBurnett/BlenderGameEngineJavabot
Scripts/Camera-Scripts/Mouselook.py
Python
gpl-2.0
5,772
0.04851
import _plotly_utils.basevalidators class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="bar.marker", **kwargs): super(ColorbarValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
plotly/plotly.py
packages/python/plotly/plotly/validators/bar/marker/_colorbar.py
Python
mit
12,732
0.000079
"""Contains functions for dealing with the .pdb file format.""" from datetime import datetime import re from itertools import groupby, chain import valerius from math import ceil from .data import CODES from .structures import Residue, Ligand from .mmcif import add_secondary_structure_to_polymers def pdb_string_to_pd...
samirelanduk/molecupy
atomium/pdb.py
Python
mit
23,845
0.001636
# # Copyright (C) 2001 Andrew T. Csillag <drew_csillag@geocities.com> # # You may distribute under the terms of either the GNU General # Public License or the SkunkWeb License, as specified in the # README file. # import os import DT import sys import time import marshal import stat def phf...
drewcsillag/skunkweb
pylibs/DT/dtrun.py
Python
gpl-2.0
911
0.024149
import pytest from pnc_cli import projects from pnc_cli.swagger_client.apis.projects_api import ProjectsApi from test import testutils import pnc_cli.user_config as uc @pytest.fixture(scope='function', autouse=True) def get_projects_api(): global projects_api projects_api = ProjectsApi(uc.user.get_api_client...
thauser/pnc-cli
test/integration/test_projects_api.py
Python
apache-2.0
2,376
0.001684
''' Non-original introduction script, added solely for the sake of familiarizing myself with Tensorflow. I, Evan Kirsch, do not claim credit whatsoever for this code. It is taken directly from https://www.tensorflow.org/ ''' import tensorflow as tf import numpy as np # Create 100 phony x, y data points in NumPy, y = ...
etkirsch/Tensorflow-Learn
introduction.py
Python
gpl-2.0
1,175
0
from view import CView from template_view import CTemplateView from form_view import CFormView
zacharytamas/django-chelsea
chelsea/views/__init__.py
Python
isc
94
0.010638
from collections import OrderedDict from math import sqrt import numpy as np import pyqtgraph as pg from qtpy import QtWidgets import skrf from . import smith_chart, util class NetworkPlotWidget(QtWidgets.QWidget): S_VALS = OrderedDict(( ("decibels", "db"), ("magnitude", "mag"), ("phase ...
temmeand/scikit-rf
qtapps/skrf_qtwidgets/networkPlotWidget.py
Python
bsd-3-clause
14,303
0.001678
from character import Trait, Perk __author__ = "Johannes Hackbarth" ALL_RACES = {"Deathclaw", "Dog", "Ghoul", "Half Mutant", "Human", "Robot", "Super Mutant"} ANIMALS = {"Deathclaw", "Dog"} ROBOTS = {"Robot"} # TODO: Add all effects to traits TRAIT_LIST = [ Trait("Fast Metabolism", "Your metabolic rate...
DarthBubi/fallout-pnp-character-creator
character-creator/config.py
Python
mit
11,633
0.006804
import os from flask import current_app from flask.cli import FlaskGroup, run_command from opsy.db import db from opsy.app import create_app, create_scheduler from opsy.utils import load_plugins DEFAULT_CONFIG = '%s/opsy.ini' % os.path.abspath(os.path.curdir) def create_opsy_app(info): return create_app(config=o...
derekmoyes/opsy
opsy/shell.py
Python
mit
1,995
0
# -*- coding: UTF-8 -*- from HowOldWebsite.estimators.estimator_sex import EstimatorSex from HowOldWebsite.models import RecordSex __author__ = 'Hao Yu' def sex_estimate(database_face_array, feature_jar): success = False database_record = None try: n_faces = len(database_face_array) re...
jinyu121/HowOldAreYou
HowOldWebsite/process/process_estimate_sex.py
Python
gpl-3.0
1,099
0
from . import cmis_backend from . import ir_model_fields
acsone/alfodoo
cmis_field/models/__init__.py
Python
agpl-3.0
57
0
__author__ = 'suwelack' from msml.io.mapper.base_mapping import * import msml.model.generated.msmlScene as mod import msml.model.generated.abaqus as ab import msml.model.generated.msmlBase as mbase from jinja2 import Template, Environment, PackageLoader class Abaqus2StringMapping(BaseMapping): def __init__(sel...
CognitionGuidedSurgery/msml
src/msml/io/mapper/abaqus2string_mapping.py
Python
gpl-3.0
3,374
0.024896
import pw19.__main__ if __name__ == "__main__": pw19.__main__.main()
SafPlusPlus/pyweek19
run_game.py
Python
apache-2.0
73
0
from flask import * import os from decorators import validate_account_and_region from aws import connect from sgaudit import get_reports, add_description from app.models import IPWhitelist elastatus = Blueprint('elastatus', __name__) @elastatus.route('/') def index(): default_account = current_app.config['CONFI...
PercussiveRepair/elastatus
app/views.py
Python
mit
6,380
0.002821
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals import utool as ut from os.path import join, basename, splitext, exists, dirname # from utool import util_inject # print, rrr, profile = util_inject.inject2(__file__) @ut.reloadable_class class SourceDir(ut.Nice...
Erotemic/local
misc/file_organizer.py
Python
gpl-3.0
15,764
0.001015
"""Tests of the builder registry.""" import unittest from bs4 import BeautifulSoup from bs4.builder import ( builder_registry as registry, HTMLParserTreeBuilder, TreeBuilderRegistry, ) try: from bs4.builder import HTML5TreeBuilder HTML5LIB_PRESENT = True except ImportError: HTML5LIB_PRESENT =...
wangtaoking1/found_website
项目代码/bs4/tests/test_builder_registry.py
Python
gpl-2.0
5,374
0.001861
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2013 VMware, 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.or...
rickerc/cinder_audit
cinder/tests/test_vmware_vmdk.py
Python
apache-2.0
78,544
0
#Serge Aleshin-Guendel #Utilities!!! # # import numpy import matplotlib.pyplot as plt import roc_ci from sklearn.metrics import roc_curve, auc from sklearn.cross_validation import LeaveOneOut from sklearn import preprocessing from matplotlib.backends.backend_pdf import PdfPages #Generate an ROC Curve def plotROC( fp...
sverchkov/ivancic-panel-selection
python/analysis_utilities.py
Python
mit
12,954
0.029643
from distutils.core import setup setup( name='archinfo', version='0.03', packages=['archinfo'], install_requires=[ 'capstone', 'pyelftools', 'pyvex' ] )
zhuyue1314/archinfo
setup.py
Python
bsd-2-clause
169
0.011834
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright 2017 Twitter. 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...
lucperkins/heron
heron/tools/tracker/src/python/handlers/metadatahandler.py
Python
apache-2.0
2,280
0.007456
#--*-- coding:utf-8 --*-- ''' Created on 2015��5��8�� @author: stm ''' from utils import DebugLog from base.msgcodec import MsgCodec from abc import abstractmethod from base.vdstate import CREATEVIOSLPAR_STAT, StateBase from base.cmdmsg import CMDMsg class EngineBase(object): ''' The engine wo...
xhan-shannon/SystemControlView
base/engine.py
Python
gpl-2.0
1,534
0.008541
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
jhseu/tensorflow
tensorflow/python/ops/image_grad.py
Python
apache-2.0
15,566
0.015033
#!/usr/bin/python # # Request for symbolList. Currently RFA only support refresh messages # for symbolList. Hence, polling is required and symbolListRequest is called # internally by getSymbolList. # # IMAGE/REFRESH: # ({'MTYPE':'REFRESH','RIC':'0#BMD','SERVICE':'NIP'}, # {'ACTION':'ADD','MTYPE':'IMAGE','SERVICE':...
devcartel/pyrfa
examples/symbollist.py
Python
mit
814
0.001229
import sys import mechanize import re import json import time import urllib import dogcatcher import HTMLParser import os h = HTMLParser.HTMLParser() cdir = os.path.dirname(os.path.abspath(__file__)) + "/" tmpdir = cdir + "tmp/" voter_state = "SC" source = "State" result = [("authory_name", "first_name", "last_nam...
democracyworks/dog-catcher
south_carolina.py
Python
mit
12,842
0.027176
#!/usr/bin/env python # # Copyright 2015 Martin Cochran # # 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 la...
martincochran/score-minion
list_id_bimap.py
Python
apache-2.0
4,643
0.005815
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
mahabs/nitro
nssrc/com/citrix/netscaler/nitro/resource/config/appfw/appfwprofile_contenttype_binding.py
Python
apache-2.0
9,811
0.040261
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distribu...
kevinsung/OpenFermion
src/openfermion/chem/pubchem_test.py
Python
apache-2.0
3,870
0.000258
import binascii import datetime import hashlib import os from pymongo import ReturnDocument from vj4 import db from vj4.util import argmethod TYPE_REGISTRATION = 1 TYPE_SAVED_SESSION = 2 TYPE_UNSAVED_SESSION = 3 TYPE_LOSTPASS = 4 TYPE_CHANGEMAIL = 5 def _get_id(id_binary): return hashlib.sha256(id_binary).digest...
vijos/vj4
vj4/model/token.py
Python
agpl-3.0
3,999
0.012253
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests.common import TransactionCase class TestGetMailChannel(TransactionCase): def setUp(self): super(TestGetMailChannel, self).setUp() self.operators = self.env['res.users'].create([{ ...
t3dev/odoo
addons/im_livechat/tests/test_get_mail_channel.py
Python
gpl-3.0
2,152
0.003253
import numpy as np import math import time import random import sys from rick.A_star_planning import * from math import pi import matplotlib.pyplot as plt def compute_euclidean_path(pos_rob,pos_obj, points = 5): #pos_rob is a 1x3 matrix with(x,y,teta) & pos_obj is a 1x2 matrix with(x,y) x = np.linspace(pos_rob[0]...
TheCamusean/DLRCev3
rick/rick/mc_please_github_donot_fuck_with_this_ones.py
Python
mit
16,563
0.059711
# This file is part of the django-environ. # # Copyright (c) 2021, Serghei Iakovlev <egrep@protonmail.ch> # Copyright (c) 2013-2021, Daniele Faraglia <daniele.faraglia@gmail.com> # # For the full copyright and license information, please view # the LICENSE.txt file that was distributed with this source code. from envi...
joke2k/django-environ
tests/fixtures.py
Python
mit
3,765
0.001328
try: import cPickle as pickle except ImportError: import pickle as pickle from django.core.management.color import color_style from django.db.models import signals, get_apps, get_app from django_evolution import is_multi_db, models as django_evolution from django_evolution.evolve import get_evolution_sequence...
dekom/threepress-bookworm-read-only
bookworm/django_evolution/management/__init__.py
Python
bsd-3-clause
4,908
0.000407
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from django.http.response import HttpResponse, HttpResponseRedirec...
suutari/shoop
shuup/admin/modules/system/views/telemetry.py
Python
agpl-3.0
1,503
0.001331
import numpy as np import pylab as pl from astropy.io import fits from scipy.interpolate import interp1d sigma_y = 0 * np.pi / 2.355 / 60. /180. #angle in radian sigmasq = sigma_y * sigma_y #f = fits.open('/media/luna1/flender/projects/gasmod/maps/OuterRim/cl_tsz150_Battaglia_c05_R13.fits')[1].data #l = np.arange(10...
vvinuv/HaloModel
plotting_scripts/compare_battaglia_vinu.py
Python
gpl-3.0
1,283
0.01325
"""modify Revision ID: 4cefae1354ee Revises: 51f5ccfba190 Create Date: 2016-07-23 13:16:09.932365 """ # revision identifiers, used by Alembic. revision = '4cefae1354ee' down_revision = '51f5ccfba190' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - please ...
384782946/MyBlog
migrations/versions/4cefae1354ee_modify.py
Python
mit
720
0.009722
# Copyright 2014 IBM Corp. # # 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 ...
kimjaejoong/nova
nova/tests/unit/virt/hyperv/test_vmops.py
Python
apache-2.0
51,872
0.000019
# This file is part of cloud-init. See LICENSE file for license information. from collections import namedtuple import copy import os from uuid import uuid4 from cloudinit import safeyaml from cloudinit import util from cloudinit.tests.helpers import ( CiTestCase, dir2dict, populate_dir, populate_dir_with_ts) fr...
larsks/cloud-init
tests/unittests/test_ds_identify.py
Python
gpl-3.0
39,041
0.000026
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
xiangel/hue
apps/beeswax/src/beeswax/server/dbms.py
Python
apache-2.0
24,355
0.011948
import copy class Histogram( object ): '''Histogram + a few things. This class does not inherit from a ROOT class as we could want to use it with a TH1D, TH1F, and even a 2D at some point. Histogram contains the original ROOT histogram, obj, and a weighted version, weigthed, originally set equal...
cbernet/cpyroot
tools/DataMC/Histogram.py
Python
gpl-2.0
8,121
0.010344
#!/usr/bin/env python import os import sys sys.path.insert(0, os.pardir) from testing_harness import TestHarness class StatepointTestHarness(TestHarness): def __init__(self): self._sp_name = None self._tallies = False self._opts = None self._args = None def _test_output_crea...
mjlong/openmc
tests/test_statepoint_batch/test_statepoint_batch.py
Python
mit
654
0.003058
from pyramid.response import Response from pyramid.view import view_config from sqlalchemy.exc import DBAPIError from .models import ( DBSession, MyModel, ) @view_config(route_name='home', renderer='templates/mytemplate.pt') def my_view(request): try: one = DBSession.query(MyModel).filter(My...
Spindel/python-deployments
mypyramid/mypyramid/views.py
Python
agpl-3.0
1,090
0.001835
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NAME = "hector_imu_tools" PROJECT_SPACE_DIR =...
siketh/ASR
catkin_ws/build/hector_slam/hector_imu_tools/catkin_generated/pkg.develspace.context.pc.py
Python
mit
382
0
#!/usr/bin/env python # pylint: disable=C0103,W0622 # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015 Leandro Toledo de Souza <leandrotoeldodesouza@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public ...
AndrewSamokhvalov/python-telegram-bot
telegram/user.py
Python
gpl-3.0
2,099
0
# # Copyright (C) 2012-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that it wi...
itoed/anaconda
pyanaconda/ui/gui/xkl_wrapper.py
Python
gpl-2.0
14,761
0.002574
from cardboard import types from cardboard.ability import ( AbilityNotImplemented, spell, activated, triggered, static ) from cardboard.cards import card, common, keywords, match @card("Feroz's Ban") def ferozs_ban(card, abilities): def ferozs_ban(): return AbilityNotImplemented return ferozs_ba...
Julian/cardboard
cardboard/cards/sets/homelands.py
Python
mit
22,873
0.000044
from rezgui.qt import QtGui from rezgui.util import create_pane from rezgui.mixins.ContextViewMixin import ContextViewMixin from rezgui.models.ContextModel import ContextModel from rez.config import config from rez.vendor import yaml from rez.vendor.yaml.error import YAMLError from rez.vendor.schema.schema import Schem...
LumaPictures/rez
src/rezgui/widgets/ContextSettingsWidget.py
Python
lgpl-3.0
6,497
0.000308
# encoding: utf-8 # module gio._gio # from /usr/lib/python2.7/dist-packages/gtk-2.0/gio/_gio.so # by generator 1.135 # no doc # imports import gio as __gio import glib as __glib import gobject as __gobject import gobject._gobject as __gobject__gobject class InetSocketAddress(__gio.SocketAddress): """ Object ...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/gio/_gio/InetSocketAddress.py
Python
gpl-2.0
1,078
0.007421
#!/usr/bin/env python # # MountDirectories.py: this file is part of the GRS suite # Copyright (C) 2015 Anthony G. Basile # # 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 ...
gentoo/grss
grs/MountDirectories.py
Python
gpl-2.0
6,242
0.004005
# -*- coding: utf-8 -*- # # pyspark documentation build configuration file, created by # sphinx-quickstart on Thu Aug 28 15:17:47 2014. # # 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. # # A...
chenc10/Spark-PAF
python/docs/conf.py
Python
apache-2.0
10,462
0.006117
#-*- coding: utf-8 -*- import sys from abc import ABCMeta, abstractmethod from src.shell.std import Std class ICommand(Std): """ Interface for a scat command """ def __init__(self, verbose=2): self.__verbose = verbose return def stdout(self, msg, crlf=True): if self...
Frky/scat
src/shell/command/i_command.py
Python
mit
968
0.003099
"""Demo fan platform that has a fake fan.""" from __future__ import annotations from homeassistant.components.fan import ( SUPPORT_DIRECTION, SUPPORT_OSCILLATE, SUPPORT_PRESET_MODE, SUPPORT_SET_SPEED, FanEntity, ) from homeassistant.config_entries import ConfigEntry from homeassistant.core import H...
rohitranjan1991/home-assistant
homeassistant/components/demo/fan.py
Python
mit
8,773
0.000228
''' Copyright 2013 Sven Reissmann <sven@0x80.io> This file is part of ddserver. ddserver is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later vers...
ddserver/ddserver
ddserver/__main__.py
Python
agpl-3.0
1,674
0.006571
from tests.base import TestCase from vilya.models.project import CodeDoubanProject from vilya.models.project_conf import PROJECT_CONF_FILE from nose.tools import raises class TestProjectConf(TestCase): def test_create_project_without_conf(self): self.clean_up() project = CodeDoubanProject.add( ...
xtao/code
tests/test_project_conf.py
Python
bsd-3-clause
2,543
0
import numpy as np from scipy import stats from statsmodels.regression.linear_model import OLS from statsmodels.tools import tools from statsmodels.sandbox.regression.gmm import IV2SLS, IVGMM, DistQuantilesGMM, spec_hausman from statsmodels.sandbox.regression import gmm if __name__ == '__main__': import stats...
hlin117/statsmodels
statsmodels/sandbox/examples/try_gmm_other.py
Python
bsd-3-clause
5,387
0.01188
#!/usr/bin/python """checks bugle trace log for OpenGL problems""" from __future__ import print_function import sys count = 0 lineNo = 0 inList = False inBlock = False legalLists = {} setLists = {} usedInList = {} usedInBlock = {} usedOutBlock = {} def error(error, lineNo, *args): print("Error:", error.format(*...
armagetronad-xtw/0.4-armagetronad-xtw
batch/checkbugle.py
Python
gpl-2.0
3,156
0.012674
""" Course info page. """ from .course_page import CoursePage class CourseInfoPage(CoursePage): """ Course info. """ url_path = "info" def is_browser_on_page(self): return self.is_css_present('section.updates') @property def num_updates(self): """ Return the num...
liuqr/edx-xiaodun
common/test/acceptance/pages/lms/course_info.py
Python
agpl-3.0
619
0
#!/usr/bin/env python # -*- coding: utf-8 -*- from os import path import os from tempfile import NamedTemporaryFile import numpy as np import morfessor from six import PY2 from six.moves import cPickle as pickle from . import polyglot_path from .decorators import memoize from .downloader import downloader from .map...
alantian/polyglot
polyglot/load.py
Python
gpl-3.0
4,095
0.013187
import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from sklearn.datasets import load_sample_image from sklearn.datasets import load_sample_images # Utility functions def plot_image(image): plt.imshow(image, cmap="gray", interpolation="nearest") plt.axis("off") def plot_color_image(image...
KT12/hands_on_machine_learning
convnets.py
Python
mit
1,271
0.013375
""" Provides a set of pluggable permission policies. """ from __future__ import unicode_literals from django.http import Http404 from rest_framework import exceptions from rest_framework.compat import is_authenticated SAFE_METHODS = ('GET', 'HEAD', 'OPTIONS') class BasePermission(object): """ A base class ...
hchen1202/django-react
virtualenv/lib/python3.6/site-packages/rest_framework/permissions.py
Python
mit
6,655
0.00015
''' The tests in this package are to ensure the proper resultant dtypes of set operations. ''' import itertools as it import numpy as np import pytest from pandas.core.dtypes.common import is_dtype_equal import pandas as pd from pandas import Int64Index, RangeIndex from pandas.tests.indexes.conftest import indices_l...
cbertinato/pandas
pandas/tests/indexes/test_setops.py
Python
bsd-3-clause
2,362
0
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012, Intel, 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 # # ...
inkerra/cinder
cinder/volume/rpcapi.py
Python
apache-2.0
7,605
0
from backend import app if __name__ == '__main__': app.run('0.0.0.0',port=8080, threaded=True, debug=True)
zpurcey/bestbuy-demo
runbackend.py
Python
mit
112
0.008929
# -*- coding: utf-8 -*- import time import struct from .errors import ( CopperError, UnknownFrameError, InvalidFrameError, InternalError, ) from collections import deque from .util import take_from_deque __all__ = [ 'Frame', 'PingFrame', 'DataFrame', 'ResetFrame', 'WindowFrame', ...
snaury/copper
contrib/python-copper/lib/copper/frames.py
Python
mit
10,238
0.001856