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 ImportDependence import * from CustomClass import * class CIA(AppForm): useddf=pd.DataFrame() Lines = [] Tags = [] description = 'Chemical Index of Alteration' unuseful = ['Name', 'Mineral', 'Author', 'DataType', 'Label', ...
chinageology/GeoPython
geopytool/CIA.py
Python
gpl-3.0
10,636
0.010566
# -*- coding: utf-8 -*- import usb class LuxaforFlag(object): DEVICE_VENDOR_ID = 0x04d8 DEVICE_PRODUCT_ID = 0xf372 MODE_STATIC_COLOUR = 1 MODE_FADE_COLOUR = 2 MODE_STROBE = 3 MODE_WAVE = 4 MODE_PATTERN = 6 LED_TAB_1 = 1 LED_TAB_2 = 2 LED_TAB_3 = 3 LED_BACK_1 = 4 LED_B...
takeontom/pyluxafor
pyluxafor/pyluxafor.py
Python
mit
4,987
0
#!/usr/bin/python ## This driver is based is based on reverse engineering of HeavyWeather 2800 v 1.54 ## All copyright goes to La Crosse Technology (c) 2008 ## Python port by Eddi De Pieri <eddi@depieri.net> ## Use this software as your own risk. ## Me and La Crosse Technology is not responsable for any damage using ...
dpeddi/ws-28xx
CWeatherStationConfig.py
Python
gpl-3.0
11,102
0.037651
from....import a from...import b from..import c from.import d from : keyword.control.import.python, source.python .... : punctuation.separator.period.python, source.python import : keyword.control.import.python, source.python : source.python a : source.python from ...
MagicStack/MagicPython
test/statements/import3.py
Python
mit
1,061
0.042413
from __future__ import print_function, division, absolute_import from fontTools.misc.py23 import * from fontTools.misc.textTools import safeEval, readHex from fontTools.ttLib import getSearchRange from fontTools.unicode import Unicode from . import DefaultTable import sys import struct import array import operator cl...
googlei18n/fontuley
src/third_party/fontTools/Lib/fontTools/ttLib/tables/_c_m_a_p.py
Python
apache-2.0
45,080
0.032276
#!/usr/bin/env python # -*- coding: utf-8 -*- # Datetools provide a method of manipulating and working dates and times. # Copyright (C) 2013-2018 Chris Caron <lead2gold@gmail.com> # # This file is part of Datetools. Datetools is free software; you can # redistribute it and/or modify it under the terms of the GNU Gener...
caronc/datetools
src/pytest.py
Python
gpl-2.0
2,031
0
import pandas as pd import numpy as np from random import sample from sklearn.ensemble import RandomForestClassifier def ML_BuySell(all_data, predictDate, predictors, previous_results, limit=0.0051, limit_comp=np.arange(-.015, 0.02, 0.001), days_previous=252, train_split=0.8, n=3,acc_limit=0.75): "...
simonward86/MySJcLqwwx
ML_predict.py
Python
apache-2.0
3,255
0.006759
#!/usr/bin/env python """ This script is a python version of TimingAccuracyDHC. We use numpy functions to simplify the creation of random coefficients. """ import os import sys import time import numpy as np sys.path.append(os.path.join(os.path.dirname(__file__), "../../..")) import pyshtools as shtools #==== MAIN F...
ian-r-rose/SHTOOLS
examples/python/TimingAccuracy/TimingAccuracyDHC.py
Python
bsd-3-clause
2,509
0.007573
# -*- coding: utf-8 -*- # Copyright 2021 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 agr...
googleapis/python-functions
docs/conf.py
Python
apache-2.0
12,404
0.000564
import numpy as np import quimb as qu class NNI: """An simple interacting hamiltonian object used, for instance, in TEBD. Once instantiated, the ``NNI`` hamiltonian can be called like ``H_nni()`` to get the default two-site term, or ``H_nni((i, j))`` to get the term specific to sites ``i`` and ``j``....
jcmgray/quijy
quimb/tensor/tensor_tebd.py
Python
mit
20,340
0
import sys if sys.platform.startswith('win32'): import win32gui GetForegroundWindow = win32gui.GetForegroundWindow SetForegroundWindow = win32gui.SetForegroundWindow elif sys.platform.startswith('darwin'): from Foundation import NSAppleScript def GetForegroundWindow(): return NSAppl...
Germanika/plover
plover/oslayer/wmctrl.py
Python
gpl-2.0
1,274
0
#!/usr/bin/env python #/****************************************************************************** # * $Id$ # * # * Project: GDAL Make Histogram and Cumulative graph from Tab delimited tab as # generated by gdal_hist.py # * Purpose: Take a gdal_hist.py output and create a histogram plot using matp...
USGS-Astrogeology/GDAL_scripts
gdal_baseline_slope/python2/slope_histogram_cumulative_graph.py
Python
unlicense
4,103
0.013892
# -*- coding: utf-8 -*- ''' Pupil Player Third Party Plugins by cpicanco Copyright (C) 2016 Rafael Picanço. The present file is distributed under the terms of the GNU General Public License (GPL v3.0). You should have received a copy of the GNU General Public License along with this program. If not, see <ht...
cpicanco/player_plugins
filter_opencv_threshold.py
Python
gpl-3.0
3,093
0.012937
import antlr3; import sqlite3; import pickle; import sys, os; import re; from SpeakPython.SpeakPython import SpeakPython; from SpeakPython.SpeakPythonLexer import SpeakPythonLexer; from SpeakPython.SpeakPythonParser import SpeakPythonParser; #sort results based on length of labels def sortResults(results): l = len(r...
netgio/voicecount
devicecode/SpeakPythonMakeDB.py
Python
mit
4,765
0.057712
from distutils.core import setup version = '1.1.1' setup(name='CacheGenerator', version=version, description="CacheGenerator for Django", author="Ricardo Santos", author_email="ricardo@getgears.com", url="http://github.com/ricardovice/CacheGenerator/", packages = ['cachegenerator']...
ricardovice/CacheGenerator
setup.py
Python
mit
329
0.006079
# 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 ap...
luotao1/Paddle
python/paddle/fluid/tests/unittests/distributed_passes/test_dist_fuse_bn_add_act_pass.py
Python
apache-2.0
3,476
0.000863
from django.conf.urls import patterns, include, url from django.conf import settings # Here, user contacts.profile will cause some 'mismatch' since contacts is also a module from profile import ProfileView from contacts import ContactsView from authen import Authenticate strid = settings.CONTACT_URL['strid'] user = s...
sharehub/DBRest
dbrest/contacts/urls.py
Python
mit
858
0.005828
import sys from django.core.management.base import BaseCommand, CommandError import nflgame from terminaltables import AsciiTable from ...models import Player, Team, Season, Week, WeeklyStats class Command(BaseCommand): help = 'takes option position, displays top players as table' def add_arguments(self, ...
johnshiver/football_tools
football/core/management/commands/show_top_players.py
Python
mit
607
0.001647
# -*- coding: utf-8 -*- # Copyright (c) 2010 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 app...
openstack/neutron-vpnaas
doc/source/conf.py
Python
apache-2.0
8,813
0.003858
# -*- coding: utf8 -*- import logging import math from Graphx import graphx from GameEngine.GameObjects.gameObjectBehaviour import GameObjectBehaviour from Brains.human import HumanBrain from conf import conf class CarBehaviour(GameObjectBehaviour): brainTypes = { 'human': HumanBrain } """ Behaviour of the ...
Hiestaa/cognitive-racer
GameEngine/GameObjects/Car/behaviour.py
Python
lgpl-3.0
3,344
0.031998
#!/usr/bin/env python3 # Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of the BST. # Basically, the deletion can be divided into two stages: # Search for a node to remove. # If the node is found, delete the node. # Not...
eroicaleo/LearningPython
interview/leet/450_Delete_Node_in_a_BST.py
Python
mit
2,059
0.004371
# -*- coding: utf-8 -*- """ requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. """ import os import re import time import hashlib from base64 import b64encode from .compat import urlparse, str from .cookies import extract_cookies_to_jar from .utils import parse_dict_header ...
Botong/songtaste
lib/requests/auth.py
Python
apache-2.0
6,120
0.000817
#!/usr/bin/python # # ==-- jobstats - support for reading the contents of stats dirs --==# # # This source file is part of the Swift.org open source project # # Copyright (c) 2014-2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/...
zisko/swift
utils/jobstats/jobstats.py
Python
apache-2.0
10,591
0.000189
from models import db from models.Post import Post class PostFile(db.Model): __tablename__ = 'PostFile' Id = db.Column(db.Integer, primary_key = True) Post = db.Column(db.Integer, db.ForeignKey(Post.Id)) FileName = db.Column(db.String(128)) def __init__(self, post, file): self.Post = post self.F...
goors/flask-microblog
models/PostFile.py
Python
apache-2.0
335
0.026866
# -*- coding: utf-8 -*- """ Created on Fri Jun 25 16:20:12 2015 @author: Balázs Hidasi @lastmodified: Loreto Parisi (loretoparisi at gmail dot com) """ import sys import os import numpy as np import pandas as pd import datetime as dt # To redirect output to file class Logger(object): def __init__(self, filename=...
loretoparisi/docker
theano/rsc15/preprocess.py
Python
mit
3,325
0.008724
a = [1 2 3]
smmribeiro/intellij-community
python/testData/psi/MissingListSeparators.py
Python
apache-2.0
11
0.090909
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : May 23, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : brush.tyler@...
drnextgis/QGIS
python/plugins/db_manager/db_plugins/postgis/plugin.py
Python
gpl-2.0
14,923
0.002278
from yaml import dump from twisted.internet.defer import succeed, fail from txaws.s3.exception import S3Error from juju.lib.testing import TestCase from juju.providers.ec2.tests.common import EC2TestMixin class EC2StateTest(TestCase, EC2TestMixin): def setUp(self): EC2TestMixin.setUp(self) sup...
anbangr/trusted-juju
juju/providers/ec2/tests/test_state.py
Python
agpl-3.0
4,134
0
from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.conf import settings from django.contrib import admin urlpatterns = patterns('', # Examples: # url(r'^$', 'isucdc2.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/...
ISEAGE-ISU/cdc2-2015-www
isucdc2/urls.py
Python
mit
469
0.008529
""" 33. get_or_create() ``get_or_create()`` does what it says: it tries to look up an object with the given parameters. If an object isn't found, it creates one with the given parameters. """ from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compa...
jyotsna1820/django
tests/get_or_create/models.py
Python
bsd-3-clause
1,518
0.000659
""" smashlib.plugins.cli_update The handler for "smash --update". This will default to using whatever branch is already checked out """ from fabric import api from goulash.python import splitext, ops from smashlib import get_smash from smashlib.util import CLOpt from smashlib.plugins import Plugin from smash...
mattvonrocketstein/smash
smashlib/plugins/cli_update.py
Python
mit
1,850
0.004324
from django.core.management.base import BaseCommand from lizard_blockbox import import_helpers class Command(BaseCommand): args = "" help = "Merge the measure shapes to get one json." def handle(self, *args, **kwargs): import_helpers.merge_measures_blockbox(self.stdout)
lizardsystem/lizard-blockbox
lizard_blockbox/management/commands/merge_measures_blockbox.py
Python
gpl-3.0
294
0
import clr clr.AddReference('RevitAPI') from Autodesk.Revit.DB import * mats = UnwrapElement(IN[0]) colorlist = list() glowlist = list() classlist = list() shinylist = list() smoothlist = list() translist = list() for mat in mats: colorlist.append(mat.Color) if mat.Glow: glowlist.append(True) else: glowlist.ap...
andydandy74/ClockworkForDynamo
nodes/1.x/python/Material.Properties.py
Python
mit
540
0.02963
# The MIT License (MIT) # # Copyright shifvb 2015 # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge,...
shifvb/DarkChina
http_proxy/tools/async_IO.py
Python
mit
1,931
0.000518
import sys import random import collections import itertools import bisect # @include def nonuniform_random_number_generation(values, probabilities): prefix_sum_of_probabilities = ( [0.0] + list(itertools.accumulate(probabilities))) interval_idx = bisect.bisect(prefix_sum_of_probabilities, ...
meisamhe/GPLshared
Programming/MPI — AMath 483 583, Spring 2013 1.0 documentation_files/nonuniform_random_number_generation.py
Python
gpl-3.0
1,235
0
""" def toLocal(dt, offset = 8): dt: datetime offset: default 8 china time """ import datetime def toLocal(dt, offset = 8): localDateTime = dt + datetime.timedelta(hours=offset) return localDateTime if __name__ == '__main__': now = datetime.datetime.utcnow() print now print toLocal(now) print now
pisceanfoot/py_easyXY
py_easyXY/datetime/tzone.py
Python
apache-2.0
309
0.038835
#!/usr/bin/env python3 # # The MIT License (MIT) # # Copyright (C) 2015 - Francois Doray <francois.pierre-doray@polymtl.ca> # # 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 restricti...
fdoray/tracecompare-benchmark
scripts/summary.py
Python
gpl-3.0
9,109
0.016797
# Copyright (c) 2010-2013 by Yaco Sistemas <goinnn@gmail.com> or <pmartin@yaco.es> # # This program 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 3 of the License, or # (at your option)...
paridin/django-inplaceedit
testing/testing/example_extra_fields/urls.py
Python
lgpl-3.0
1,090
0.001835
# coding=utf-8 # URL: https://pymedusa.com # # This file is part of Medusa. # # Medusa 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....
Thraxis/pymedusa
sickbeard/indexers/indexer_exceptions.py
Python
gpl-3.0
1,776
0.003378
############################################################################## # Copyright (c) 2013-2017, 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...
skosukhin/spack
lib/spack/llnl/util/tty/color.py
Python
lgpl-2.1
9,290
0
import matplotlib.pyplot as plt import numpy as np from scipy.optimize import root import bct eps = np.finfo(float).eps def pij_wij(x,y,t): xij = np.outer(x,x) yij = np.outer(y,y) pij = xij*((yij)**t)/(1.0+xij*(yij**t) - (yij**t)) wij = (t*(xij-1.0)*(yij**t))/((1.0 + xij*(yij**t) - (yij**t) )) - 1.0/(n...
CarloNicolini/CarloNicolini.github.io
sections/science/_posts/example_cEWRG.py
Python
mit
4,329
0.026565
from configparser import ConfigParser import psycopg2 class Postgres(object): def __init__(self, db_name): filename = 'database.ini' section = 'postgresql' parser = ConfigParser() parser.read(filename) self.db = {} if parser.has_section(section): self.db['database'] = db_name par...
ICOS-Carbon-Portal/data
src/main/python/mongo-to-pg/Postgres.py
Python
gpl-3.0
1,006
0.033797
import io import json import os import subprocess import sys import unittest from os.path import join, abspath, dirname sys.path.append('..') from python_driver import __version__, get_processor_instance from python_driver.requestprocessor import ( Request, Response, RequestProcessorJSON, InBuffer, EmptyCodeExcept...
juanjux/python-driver
native/python_package/test/test_python_driver.py
Python
gpl-3.0
6,751
0.003555
# -*- coding: utf-8 -*- """Factories to help in tests.""" from factory import PostGenerationMethodCall, Sequence from factory.alchemy import SQLAlchemyModelFactory from authmgr.database import db from authmgr.user.models import User class BaseFactory(SQLAlchemyModelFactory): """Base factory.""" class Meta: ...
bcarroll/authmgr
authmgr/tests/factories.py
Python
bsd-3-clause
761
0
############################################################################### # Name: txtutil.py # # Purpose: Text Utilities. # # Author: Cody Precord <cprecord@editra.org> # ...
163gal/Time-Line
libs/wx/tools/Editra/src/ebmlib/txtutil.py
Python
gpl-3.0
1,195
0.003347
def on_square(): pass def total_after(): pass
rootulp/xpython
exercises/grains/grains.py
Python
mit
56
0
# -*- coding: utf-8 -*- import user import inscription import notes import util import stage # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
anaslamaizi/Projet-ODOO
__init__.py
Python
artistic-2.0
160
0.00625
print("test\n")
heavywatal/practice-py
Kazuki526/test.py
Python
mit
16
0
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-06-01 12:02 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('website', '0030_github_user'), ] operations = [ migrations.AddField( ...
hiezust/teask
website/migrations/0031_auto_20170601_1502.py
Python
gpl-3.0
1,475
0
from django.db import models class BranchManager(models.Manager): def get_branch(self, user, project): try: return self.get(user=user, project=project, active=True) except: return self.create(user=user, project=project, active=True) class Branch(models.Model): user = ...
alex/readthedocs.org
readthedocs/editor/models.py
Python
mit
726
0.00551
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class NavConfig(AppConfig): name = 'cms.nav' verbose_name = _('Navigation')
HurtowniaPixeli/pixelcms-server
cms/nav/apps.py
Python
mit
176
0
import sys import os import cv2 from keras.models import load_model sys.path.append("/Users/alexpapiu/Documents/Conv/OpenCV_CNN") from webcam_cnn_pipeline import return_compiled_model_2, real_time_pred model_name = sys.argv[1] w = 1.5*144 h = 2*144 #keep track of all labels: all_labels = {"model_hand":["A", "B", "C...
apapiu/live_cnn
live_cnn/reusing_model.py
Python
apache-2.0
861
0.019744
# pandas and numpy for data manipulation import pandas as pd import numpy as np import sqlite3 from bokeh.plotting import Figure from bokeh.models import ( CategoricalColorMapper, HoverTool, ColumnDataSource, Panel, FuncTickFormatter, SingleIntervalTicker, LinearAxis, ) from bokeh.models im...
murrayo/yape
yapesrv/scripts/perfmon_tab.py
Python
mit
3,197
0.001877
# Copyright (c) Meta Platforms, Inc. and affiliates. # Copyright (c) Mercurial Contributors. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from __future__ import absolute_import from testutil.dott import feature, sh, testtmp #...
facebookexperimental/eden
eden/scm/tests/test-issue1438-t.py
Python
gpl-2.0
789
0.001267
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Module containing the various stages that a builder runs.""" import json import logging import os from chromite.cbuildbot import commands from ch...
bpsinc-native/src_third_party_chromite
cbuildbot/stages/release_stages.py
Python
bsd-3-clause
14,805
0.006754
""" This file contains the logic for cohorts, as exposed internally to the forums, and to the cohort admin views. """ import logging import random import request_cache from courseware import courses from django.contrib.auth.models import User from django.core.exceptions import ValidationError from django.core.validat...
pepeportela/edx-platform
openedx/core/djangoapps/course_groups/cohorts.py
Python
agpl-3.0
21,299
0.002535
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class ExuberantCtags(AutotoolsPackage): """The canonical ctags generator""" homepage = "http...
iulian787/spack
var/spack/repos/builtin/packages/exuberant-ctags/package.py
Python
lgpl-2.1
532
0.005639
# Getting started with APIC-EM APIs # Follows APIC-EM Basics Learning Lab # Basics Learning Lab Full example for Get Devices, Get Hosts, Get Policies, Get Applications # * THIS SAMPLE APPLICATION AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY # * OF ANY KIND BY CISCO, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT ...
SivagnanamCiena/coding-skills-sample-code
coding102-REST-python/learning-lab-basics-step3.py
Python
apache-2.0
4,557
0.010753
#!/usr/bin/env python import click import logging import os import pagoda import pagoda.viewer def full(name): return os.path.join(os.path.dirname(__file__), name) @click.command() def main(): logging.basicConfig() w = pagoda.cooper.World(dt=1. / 120) w.load_skeleton(full('../optimized-skeleton.txt...
EmbodiedCognition/pagoda
examples/cooper.py
Python
mit
478
0
# module for the Container List <dsc> import xml.etree.cElementTree as ET from components import components import globals import wx from messages import error from mixed_content import mixed_content def dsc(dsc_root, FASheet, version): from wx.lib.pubsub import pub wx.CallAfter(pub.sendMessage, "update_spread", msg...
gwiedeman/eadmachine
source/EADtoSpreadsheet/func/dsc.py
Python
unlicense
7,348
0.02613
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file is part of overview archive. # Copyright © 2015 seamus tuohy, <stuohy@internews.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...
elationfoundation/overview_archive
overview_archive/utils/identify.py
Python
gpl-2.0
1,836
0.001635
# 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...
Xeralux/tensorflow
tensorflow/contrib/py2tf/pyct/static_analysis/live_values.py
Python
apache-2.0
4,891
0.008587
# Copyright 2015 Mellanox Technologies, Ltd # # 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 t...
mmnelemane/neutron
neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/extension_drivers/test_qos_driver.py
Python
apache-2.0
3,672
0.001362
""" mod_customized Controllers =================== In this module, users can test their fork branch with customized set of regression tests """ from flask import Blueprint, g, request, redirect, url_for, flash from github import GitHub, ApiError from datetime import datetime, timedelta from decorators import template_...
satyammittal/sample-platform
mod_customized/controllers.py
Python
isc
5,822
0.002233
#!/usr/bin/python # Copyright 2017 Dhvani Patel # # This file is part of UnnaturalCode. # # UnnaturalCode is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the Licen...
naturalness/unnaturalcode
unnaturalcode/test_eclipse.py
Python
agpl-3.0
1,489
0.012089
#!/usr/bin/env python3 # -*- coding: utf8 -*- # Gaik Tamazian, 2019 # mail (at) gtamazian (dot) com """Routines for producing synteny plots.""" import gzip import sys from functools import reduce from operator import itemgetter import matplotlib.pyplot as plt from matplotlib.lines import Line2D from matplotlib.patch...
gtamazian/bioformats
bioformats/synteny_plot.py
Python
mit
10,165
0.000197
# This file is generated by /tmp/buildd/python-numpy-1.8.2/setup.py # It contains system_info results at the time of building this package. __all__ = ["get_info","show"] blas_info={'libraries': ['blas'], 'library_dirs': ['/usr/lib'], 'language': 'f77'} lapack_info={'libraries': ['lapack'], 'library_dirs': ['/usr/lib']...
ruibarreira/linuxtrail
usr/lib/python2.7/dist-packages/numpy/distutils/__config__.py
Python
gpl-3.0
1,269
0.020489
import numpy as np from gym.spaces import Box from metaworld.envs import reward_utils from metaworld.envs.asset_path_utils import full_v2_path_for from metaworld.envs.mujoco.sawyer_xyz.sawyer_xyz_env import SawyerXYZEnv, _assert_task_is_set class SawyerHammerEnvV2(SawyerXYZEnv): HAMMER_HANDLE_LENGTH = 0.14 ...
rlworkgroup/metaworld
metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_hammer_v2.py
Python
mit
5,835
0.000343
from random import randint import os PAN_HOST = "pan.baidu.com" PAN_INDEX = "http://" + PAN_HOST DISK_HOME = PAN_INDEX + '/disk/home' FILE_MANAGER = PAN_INDEX + "/api/filemanager" CLOUD_DL = PAN_INDEX + "/rest/2.0/services/cloud_dl" PASSPORT_HOST = 'passport.baidu.com' PASSPORT_INDEX = "https://" + PASSPORT_HOST PASSPO...
xiviwo/baiducloud
const.py
Python
gpl-3.0
977
0.012282
# -*- coding: utf-8 -*- from __future__ import unicode_literals from wtforms import validators from jinja2 import Markup from flask.ext.admin.contrib.sqla import ModelView from studio.core.engines import db from suibe.models import SlideModel, ArticleModel from .forms import CKTextAreaField class Article(ModelView)...
qisanstudio/qsapp-suibe
src/suibe/panel/article.py
Python
mit
2,836
0.000724
# -*- coding: utf-8 -*- import mock import pytest from future.moves.urllib.parse import urlparse, urljoin from addons.base.tests import views from addons.base.tests.utils import MockFolder from addons.mendeley.models import Mendeley from addons.mendeley.tests.utils import MendeleyTestCase, mock_responses from tests.b...
Johnetordoff/osf.io
addons/mendeley/tests/test_views.py
Python
apache-2.0
1,232
0.004058
# Copyright (C) 2010-2019 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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 v...
espressomd/espresso
samples/visualization_cellsystem.py
Python
gpl-3.0
2,509
0.000399
# -*- coding: utf-8 -*- """ ################################################ Plataforma ActivUFRJ ################################################ :Author: *Núcleo de Computação Eletrônica (NCE/UFRJ)* :Contact: carlo@nce.ufrj.br :Date: $Date: 2009-2010 $ :Status: This is a "work in progress" :Revision: $Revision: 0.0...
labase/activnce
main/activity/database.py
Python
gpl-2.0
5,622
0.012132
# encoding: utf-8 from setuptools import setup, find_packages import toasyncio setup( name='toasyncio', packages=find_packages(exclude=['tests']), install_requires=( 'tornado>=4.2', 'asyncio', ), author=toasyncio.__author__, version=toasyncio.__version__, author_email=", ".j...
alternativehood/toasyncio
setup.py
Python
mit
897
0.003344
# Project : Dlab-Finance # W251 Nital Patwa and Ritesh Soni # Desc : This program counts for each exchange, the #of times it produced best bid (or ask) and average size of bid (or ask) # The purpose is to understand what roles exchanges such as BATS play. # Usage Instructions # Change inputDir for daily quote file and ...
rdhyee/dlab-finance
crossings/nbboex.py
Python
isc
5,138
0.011872
# Now make a simple example using the custom projection. import pdb import sys import os import pkg_resources pkg_resources.require('matplotlib==1.4.0') import datetime from dateutil.relativedelta import relativedelta import re import math from matplotlib.ticker import ScalarFormatter, MultipleLocator from matplotlib...
peterwilletts24/Python-Scripts
Tephigram/Tephigrams_From_Radiosonde_Climatology_Onset.py
Python
mit
11,003
0.020813
from __future__ import absolute_import from changes.api.base import APIView from changes.models import Task class TaskIndexAPIView(APIView): def get(self): queryset = Task.query.order_by(Task.date_created.desc()) return self.paginate(queryset)
bowlofstew/changes
changes/api/task_index.py
Python
apache-2.0
268
0
#!/usr/bin/env python # vi:ai:et:ts=4 sw=4 # # -*- coding: utf8 -*- # # PyMmr My Music Renamer # Copyright (C) 2007-2010 mathgl67@gmail.com # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundatio...
mathgl67/pymmr
mmr/plugins/research/freedb.py
Python
gpl-2.0
2,675
0.003364
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Nicolas Duhamel # # This file is part of a weboob module. # # This weboob module 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 3 of the...
laurentb/weboob
modules/bp/pages/__init__.py
Python
lgpl-3.0
1,981
0.003029
""" Tests for users API """ import datetime import ddt import pytz from django.conf import settings from django.template import defaultfilters from django.test import RequestFactory, override_settings from django.utils import timezone from milestones.tests.utils import MilestonesTestCaseMixin from mock import patch f...
teltek/edx-platform
lms/djangoapps/mobile_api/users/tests.py
Python
agpl-3.0
20,030
0.002646
# Copyright 2018 Politecnico di Torino # # 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...
shield-h2020/dare-sec-topo
cybertop/vnsfo.py
Python
apache-2.0
1,650
0.000606
import pandas as pd from sklearn import linear_model import matplotlib.pyplot as plt df = pd.read_fwf('brain_body.txt') x_values = df[['Brain']] y_values = df[['Body']] #train model on data body_reg = linear_model.LinearRegression() body_reg.fit(x_values, y_values) # visualise results plt.scatter(x_values, y_value...
morphean/deep-learning
linear-regression/linear-regression.py
Python
apache-2.0
380
0.005263
import sys import time import traceback import javascript from browser import document as doc, window, alert has_ace = True try: editor = window.ace.edit("editor") session = editor.getSession() session.setMode("ace/mode/python") editor.setOptions({ 'enableLiveAutocompletion': True, 'enableS...
kmolab/kmolab.github.io
data/py/script1.py
Python
agpl-3.0
2,826
0.008922
from crits.vocabulary.vocab import vocab class RelationshipTypes(vocab): """ Vocabulary for Relationship Types. """ COMPRESSED_FROM = "Compressed From" COMPRESSED_INTO = "Compressed Into" CONNECTED_FROM = "Connected From" CONNECTED_TO = "Connected To" CONTAINS = "Contains" CONTA...
ckane/crits
crits/vocabulary/relationships.py
Python
mit
4,362
0.000688
from .Base_Action import * class ProfileAction(Base_Action): def __init__(self, action_xml, root_action=None): super(self.__class__, self).__init__(action_xml, root_action) self.shouldUseLaunchSchemeArgsEnv = self.contents.get('shouldUseLaunchSchemeArgsEnv'); self.savedToolIdentifier =...
samdmarshall/pyxcscheme
pyxcscheme/ProfileAction.py
Python
bsd-3-clause
611
0.018003
# Copyright 2015 ETH Zurich # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, sof...
caterinaurban/Typpete
typpete/tests/scion_err/lib/defines.py
Python
mpl-2.0
4,117
0.000729
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
BorgERP/borg-erp-6of3
server/openerp/workflow/wkf_expr.py
Python
agpl-3.0
3,130
0.007348
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # 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 above copyright # ...
JakubBrachTieto/openthread
tests/scripts/thread-cert/Cert_5_6_01_NetworkDataRegisterBeforeAttachLeader.py
Python
bsd-3-clause
4,513
0.000665
""" This demo creates multiple processes of Producers to spam a socketcan bus. """ import time import logging import concurrent.futures import can can.rc['interface'] = 'socketcan_native' from can.interfaces.interface import Bus can_interface = 'vcan0' def producer(id): """:param id: Spam the bus with messages ...
BateauNautilus/DriveSimulator
lib/pythoncan/examples/virtual_can_demo.py
Python
mit
822
0.006083
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2017 Didotech SRL import logging from openerp.osv import fields, orm import tools from openerp import addons _logger = logging.getLogger(__name__) ...
iw3hxn/LibrERP
res_users_kanban/models/inherit_res_users.py
Python
agpl-3.0
2,957
0.005749
""".""" def get_systeminfo(resource, config, interactive=False): """.""" return {'ohai': 'there!'}
lil-cain/satori
satori/sysinfo/ohai.py
Python
apache-2.0
109
0
from abc import ABCMeta, abstractmethod class Parent(object): __metaclass__ = ABCMeta @abstractmethod def my_method2(self): pass @abstractmethod def my_method(self, foo): pass
akosyakov/intellij-community
python/testData/refactoring/pullup/abstractMethodHasMeta/SuperClass.after.py
Python
apache-2.0
215
0.004651
import os, sys from functools import partial if 'DJANGO_SETTINGS_MODULE' not in os.environ: sys.path.append('.') os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' from django.conf import settings from django.test.client import Client from django.test.utils import setup_test_environment, teardown_test_environmen...
0101/django-pytest
django_pytest/conftest.py
Python
bsd-3-clause
3,390
0.00236
#!/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/api_server.py
Python
bsd-3-clause
33,071
0.006108
import os import signal import socket from pathlib import Path from tornado.ioloop import IOLoop from tornado.locks import Lock from tornado.web import Application from pcs import settings from pcs.daemon import log, ruby_pcsd, session, ssl, systemd from pcs.daemon.app import sinatra_ui, sinatra_remote, ui from pcs.d...
feist/pcs
pcs/daemon/run.py
Python
gpl-2.0
4,728
0
#!/usr/bin/env python ''' ******************************************************************************* Description: This tool can help you determine the character encoding of a text file by converting one line from the file to every(?) possible character encoding. It wri...
Alamot/code-snippets
encodings/test_encodings.py
Python
unlicense
4,814
0.00187
# #LiloConf.py # import sys, re, os import logging import GrubConf class LiloImage(object): def __init__(self, lines, path): self.reset(lines, path) def __repr__(self): return ("title: %s\n" " root: %s\n" " kernel: %s\n" " args: %s\n" ...
mikesun/xen-cow-checkpointing
tools/pygrub/src/LiloConf.py
Python
gpl-2.0
4,887
0.006753
# Copyright 2019 DeepMind Technologies Limited # # 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 agr...
deepmind/open_spiel
open_spiel/python/algorithms/adidas_utils/games/big.py
Python
apache-2.0
4,268
0.005155
import socket import struct import sys import util from threading import Thread from service import Service class smb(Service): def __init__(self): super(smb, self).__init__('SMB Service') self.config['port'].value = 445 self.captured_hashes = {} self.info = """ ...
bacemtayeb/Tierra
src/modules/services/smb.py
Python
gpl-3.0
8,923
0.001121
import time import requests from collectors.lib import utils from collectors.lib.collectorbase import CollectorBase # reference by https://hadoop.apache.org/docs/r2.7.2/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapredAppMasterRest.html REST_API = {"YARN_APPS_PATH": "ws/v1/cluster/apps", "MAPREDU...
wangy1931/tcollector
collectors/builtin/map_reduce.py
Python
lgpl-3.0
11,834
0.003634