repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
ishalyminov/memn2n | tf_config.py | 1 | 1480 | import tensorflow as tf
def configure(in_config):
tf.flags.DEFINE_float(
'learning_rate',
in_config['learning_rate'],
'Learning rate for Adam Optimizer'
)
tf.flags.DEFINE_float(
'epsilon',
in_config['epsilon'],
'Epsilon value for Adam Optimizer'
)
tf... | mit | 703,187,977,260,740,600 | 24.534483 | 51 | 0.55473 | false |
droundy/deft | papers/thesis-kirstie/figs/plot_LJ_Potential.py | 1 | 1142 | #!/usr/bin/python3
#RUN this program from the directory it is listed in
#with command ./plot_LJ_Potential.py
from scipy import special
import numpy as np
import matplotlib.pyplot as plt
import math
#Plot WCA Potential vs r
#R=1/1.781797436 #for a sigma=1 DOESN'T WORK!! graph wrong shape!
R=1/1.781797436
epsilo... | gpl-2.0 | -5,032,273,101,040,815,000 | 23.826087 | 113 | 0.697023 | false |
FowlerLab/Enrich2 | enrich2/seqlib.py | 1 | 15885 | from __future__ import print_function
import logging
import os.path
import pandas as pd
import numpy as np
from collections import OrderedDict
from matplotlib.backends.backend_pdf import PdfPages
import sys
from .plots import counts_plot
from .storemanager import StoreManager, fix_filename, ELEMENT_LABELS
class SeqLi... | bsd-3-clause | 4,788,003,668,979,767,000 | 36.376471 | 88 | 0.556563 | false |
MRCIEU/melodi | melodi/settings.py | 1 | 8804 | """
Django settings for melodi project.
Generated by 'django-admin startproject' using Django 1.8.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths... | mit | -2,412,759,635,708,730,400 | 26.860759 | 100 | 0.578828 | false |
JonathanSeguin/Mariana | Mariana/regularizations.py | 1 | 1924 | from Mariana.abstraction import Abstraction_ABC
__all__ = ["SingleLayerRegularizer_ABC", "L1", "L2", "ActivationL1"]
class SingleLayerRegularizer_ABC(Abstraction_ABC) :
"""An abstract regularization to be applied to a layer."""
def apply(self, layer) :
"""Apply to a layer and update networks's log"""
hyps = {}... | apache-2.0 | -8,295,609,861,615,857,000 | 26.898551 | 79 | 0.692308 | false |
crentagon/chess-with-benefits | game/chess/show_piece_stats.py | 1 | 2090 |
def run(self, board_input, i, j):
origin_piece = board_input[i][j].piece
max_control = {
1: 2,
3: 8,
4: 13,
5: 14,
9: 27,
0: 8
}
origin_piece.status = 'Healthy'
is_threatened_undefended = len(origin_piece.attackers) > len(origin_piece.defenders)
is_threatened_by_lower_rank = [x for x in origin_pie... | gpl-3.0 | -6,851,965,051,956,522,000 | 36.339286 | 107 | 0.728708 | false |
leahrnh/ticktock_text_api | breakdown_detector.py | 1 | 1533 | import readall
import gensim
import nltk
import numpy as np
import pickle
# we need to extract some features, now we make it easy now to just use the word2vec, one turn previous turn.
#
model = gensim.models.Word2Vec.load('/tmp/word2vec_50_break')
all_v1 = readall.readall('/home/ubuntu/zhou/Backend/rating_log/v1')
all... | gpl-2.0 | 3,179,714,820,388,494,300 | 40.432432 | 109 | 0.589693 | false |
PercyODI/PythonCSharpOOComparison | Utilities/checkLinks.py | 1 | 1091 | import sys, os, re
pattern = re.compile('\[.+\]\((?P<file>.+?)\)', re.MULTILINE) # Matches [text](directory/file.md)
folderDict = {}
numBadLinks = 0;
os.chdir("..") # Assumes this utility is one directory deep.
startDirectory = os.path.abspath(".")
mdFiles = []
for root, subFolders, files in os.walk("."):
if("\... | mit | 8,224,985,454,478,719,000 | 30.171429 | 97 | 0.583868 | false |
ActiveState/code | recipes/Python/577746_Inherit_Method_Docstrings_Using_Only/recipe-577746.py | 1 | 2640 | """docfunc module"""
from deferred_binder import DeferredBinder
class DocFunc(DeferredBinder):
TRIGGER = None
def __init__(self, f):
super().__init__(f.__name__, f)
self.f = self.target
@staticmethod
def transform(name, context, target, obj=None):
"""The DeferredBinder trans... | mit | 191,561,495,246,149,060 | 31.592593 | 81 | 0.5875 | false |
google/cauliflowervest | cauliflowervest/client/base_client.py | 1 | 9496 | # Copyright 2017 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... | apache-2.0 | 633,161,878,087,102,700 | 32.202797 | 86 | 0.682393 | false |
jeremiedecock/pyai | ailib/optimize/functions/unconstrained.py | 1 | 31848 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2017,2018,2019 Jeremie DECOCK (http://www.jdhp.org)
# 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, inclu... | mit | -930,977,634,268,075,000 | 28.453284 | 209 | 0.565847 | false |
gavein/sleeping-god | SleepingGodObjects/Vessel.py | 1 | 2849 | #!/usr/bin/python2
# -*- coding: utf-8 -*-
from Constants import WEAR_AT_TURN, OXYGEN_AT_TURN, CARGO_WATER, CARGO_MINERALS
from SleepingGodObjects.GameObjects import GameObject
class Vessel(GameObject):
def __init__(
self,
pos_x,
pos_y,
char,
... | gpl-3.0 | -8,537,353,593,604,741,000 | 25.259259 | 79 | 0.420663 | false |
ENCODE-DCC/dxencode | scrub.py | 1 | 34431 | #!/usr/bin/env python2.7
# scrub.py 1.0.0
#
# Scrub.py will remove all files for an experiment [replicate] and genome/annotation
#
# 1) Lookup experiment type from encoded, based on accession
# 2) Locate the experiment accession named folder
# 3) Given the experiment type, determine the expected results
# 4) Given expe... | mit | -6,581,317,744,336,403,000 | 51.168182 | 177 | 0.500247 | false |
ipfire/collecty | src/collecty/plugins/processor.py | 1 | 7032 | #!/usr/bin/python3
###############################################################################
# #
# collecty - A system statistics collection daemon for IPFire #
# Copyright (C) 2012 IPFire development team ... | gpl-3.0 | -3,983,568,614,264,902,000 | 29.441558 | 83 | 0.558447 | false |
SWRG/ESWC2015-paper-evaluation | tests/yen_algorithms_test.py | 1 | 1681 | import sys,os
sys.path.insert(0,os.path.abspath(__file__+"/../.."))
import yenalgo2,corefunctions
import networkx as nx
import unittest
class KnownValues(unittest.TestCase):
g = nx.Graph()
g.add_edge(1,2,{'weight':1})
g.add_edge(1,3,{'weight':2})
g.add_edge(1,4,{'weight':3})
g.add_edge(2,5,{'weight... | gpl-3.0 | -3,794,693,297,594,283,000 | 35.543478 | 86 | 0.572278 | false |
cloudify-cosmo/cloudify-nsx-plugin | cloudify_nsx/network/dhcp_bind.py | 1 | 5021 | ########
# Copyright (c) 2016 GigaSpaces Technologies Ltd. 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... | apache-2.0 | 6,749,471,616,254,207,000 | 33.390411 | 79 | 0.468632 | false |
cajone/pychess | lib/pychess/widgets/pydock/PyDockTop.py | 1 | 9627 | from __future__ import absolute_import
from __future__ import print_function
import os
from xml.dom import minidom
from collections import defaultdict
from pychess.System.prefix import addDataPrefix
from .PyDockLeaf import PyDockLeaf
from .PyDockComposite import PyDockComposite
from .ArrowButton import ArrowButton
... | gpl-3.0 | 4,931,489,659,849,762,000 | 36.901575 | 112 | 0.52976 | false |
xju2/hzzws | scripts/low_mass.py | 1 | 2906 | #!/usr/bin/env python
import common
import glob
name = "Low"
binning = "60, 110, 140"
branch = "m4l_constrained, "+binning
###in workspace
obs_binning = binning
# key: category name
# value: TCut on mini-tree
categories = {
"ggF_4mu_13TeV" : "(event_type==0)",
"ggF_2mu2e_13TeV" : "(event_type==2)",
"ggF... | mit | -8,342,612,487,512,922,000 | 32.790698 | 174 | 0.652787 | false |
Lothiraldan/OneTask | onetask/tests.py | 1 | 4351 | # -*- coding: utf-8 -*-
import os
import json
import tempfile
import unittest
from .collection import TaskCollection
from subprocess import check_output, CalledProcessError
class TaskCollectionTest(unittest.TestCase):
def _create_db(self, **kwargs):
temp = tempfile.NamedTemporaryFile(prefix='onetasktest... | mit | -1,090,320,991,968,640,100 | 38.198198 | 80 | 0.580326 | false |
conejoninja/xbmc-seriesly | library_service.py | 1 | 4954 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# seriesly - XBMC Plugin
# http://blog.tvalacarta.info/plugin-xbmc/seriesly/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os
import sys
import xbmc,time
from core im... | gpl-3.0 | -8,410,030,053,769,435,000 | 43.018182 | 286 | 0.528675 | false |
looooo/pivy | scons/scons-local-1.2.0.d20090919/SCons/Tool/ifort.py | 1 | 3365 | """SCons.Tool.ifort
Tool-specific initialization for newer versions of the Intel Fortran Compiler
for Linux/Windows (and possibly Mac OS X).
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) ... | isc | -7,407,020,927,223,222,000 | 36.388889 | 89 | 0.685587 | false |
bitglue/shinysdr | shinysdr/plugins/vor/__init__.py | 1 | 9491 | # Copyright 2013, 2014, 2015, 2016, 2017 Kevin Reid <kpreid@switchb.org>
#
# This file is part of ShinySDR.
#
# ShinySDR 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
# (... | gpl-3.0 | 5,031,653,032,306,906,000 | 37.738776 | 203 | 0.611632 | false |
zhexiao/ezhost | docs_en/conf.py | 1 | 9557 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# ezhost documentation build configuration file, created by
# sphinx-quickstart on Wed May 25 11:10:25 2016.
#
# 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
# aut... | mit | 8,173,505,382,048,362,000 | 31.729452 | 80 | 0.705556 | false |
ctgriffiths/twister | installer/installer_client.py | 1 | 8553 |
# version: 3.005
# File: installer.py ; This file is part of Twister.
# Copyright (C) 2012-2013 , Luxoft
# Authors:
# Andrei Costachi <acostachi@luxoft.com>
# Cristi Constantin <crconstantin@luxoft.com>
# Mihai Dobre <mihdobre@luxoft.com>
# Licensed under the Apache License, Version 2.0 (the "License");
#... | apache-2.0 | -6,713,722,362,416,530,000 | 32.410156 | 128 | 0.584707 | false |
yafeunteun/wikipedia-spam-classifier | revscoring/revscoring/utilities/fit.py | 1 | 2484 | """
``revscoring fit -h``
::
Fits a dependent (an extractable value like a Datasource or Feature) to
observed data. These are often used along with bag-of-words
methods to reduce the feature space prior to training and testing a model
or to train a sub-model.
Usage:
fit -h | --help
... | mit | -7,085,234,002,436,981,000 | 30.846154 | 77 | 0.593398 | false |
stensonowen/spim-grader | spim-grader.py | 2 | 3172 | #!/usr/bin/python
'''
SPIM Auto-grader
Owen Stenson
Grades every file in the 'submissions' folder using every test in the 'samples' folder.
Writes to 'results' folder.
'''
import os, time, re
from subprocess import Popen, PIPE, STDOUT
def run(fn, sample_input='\n'):
#start process and write input
p... | gpl-2.0 | 1,135,793,950,941,566,300 | 34.45977 | 116 | 0.57913 | false |
FCP-INDI/C-PAC | CPAC/utils/tests/test_datasource.py | 1 | 2537 |
import os
import json
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.utility as util
from CPAC.utils.test_resources import setup_test_wf
from CPAC.utils.datasource import match_epi_fmaps
def test_match_epi_fmaps():
# good data to use
s3_prefix = "s3://fcp-indi/data/Projects... | bsd-3-clause | -464,176,579,860,499,840 | 37.439394 | 99 | 0.573906 | false |
elishowk/flaskexperiment | commonecouteserver/data/__init__.py | 1 | 6483 | # -*- coding: utf-8 -*-
# Copyright (c) 2011 CommOnEcoute http://commonecoute.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 Free Software Foundation.
#
# This program is distributed in the hope that it... | agpl-3.0 | 1,303,229,853,120,405,800 | 31.742424 | 126 | 0.586303 | false |
alexherns/biotite-scripts | cluster_coverage.py | 1 | 2808 | #!/usr/bin/env python2.7
import sys, operator, argparse
from Bio import SeqIO
parser = argparse.ArgumentParser(description='''Prints out the coverage values for each cluster, by sample and total.
Also lists number of hits in each cluster.''', formatter_class=argparse.ArgumentDefaultsHelpFormatter, add_help=False,
epil... | mit | 7,550,752,532,490,339,000 | 32.428571 | 118 | 0.691595 | false |
mackong/gitql | prettytable/prettytable.py | 1 | 54214 | #!/usr/bin/env python
#
# Copyright (c) 2009-2013, Luke Maurits <luke@maurits.id.au>
# All rights reserved.
# With contributions from:
# * Chris Clark
# * Klein Stephane
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:... | mit | 8,584,577,250,778,788,000 | 35.755254 | 207 | 0.569927 | false |
croxis/SpaceDrive | spacedrive/renderpipeline/rpplugins/vxgi/voxelization_stage.py | 1 | 8394 | """
RenderPipeline
Copyright (c) 2014-2016 tobspr <tobias.springer1@gmail.com>
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 right... | mit | -8,389,214,982,361,238,000 | 40.826531 | 99 | 0.644508 | false |
rameshg87/pyremotevbox | pyremotevbox/ZSI/twisted/WSsecurity.py | 1 | 13760 | ###########################################################################
# Joshua R. Boverhof, LBNL
# See Copyright for copyright notice!
# $Id: WSsecurity.py 1134 2006-02-24 00:23:06Z boverhof $
###########################################################################
import sys, time, warnings
import sha, base6... | apache-2.0 | 5,371,576,649,039,104,000 | 34.372751 | 90 | 0.566061 | false |
o5k/openerp-oemedical-v0.1 | openerp/addons/smsclient/smsclient.py | 1 | 17026 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2011 SYLEAM (<http://syleam.fr/>)
# Copyright (C) 2013 Julius Network Solutions SARL <co... | agpl-3.0 | -7,570,020,406,153,420,000 | 40.730392 | 148 | 0.508458 | false |
snickl/buildroot-iu | support/testing/infra/builder.py | 3 | 2028 | import os
import shutil
import subprocess
import infra
class Builder(object):
def __init__(self, config, builddir, logtofile):
self.config = '\n'.join([line.lstrip() for line in
config.splitlines()]) + '\n'
self.builddir = builddir
self.logfile = infra.ope... | gpl-2.0 | -6,377,800,908,187,158,000 | 33.372881 | 76 | 0.542899 | false |
bderembl/mitgcm_configs | eddy_airsea/analysis/ode_wave.py | 1 | 1112 | #!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
import scipy.integrate as integrate
plt.ion()
f0 = 1e-4
u0 = 1.0
R0 = 40e3 # radius
vmax = -1.0 # m/s
def v1(rr):
v = -vmax*rr/R0*np.exp(-0.5*(rr/R0)**2)
# v = -vmax*np.tanh(rr/R0)/(np.cosh(rr/R0))**2/(np.tanh(1.0)/(np.cosh(1.0))... | mit | -6,112,656,027,416,300,000 | 23.173913 | 133 | 0.579137 | false |
cmc333333/regulations-parser | regparser/tree/paragraph.py | 1 | 6226 | import hashlib
import re
from regparser.tree import struct
from regparser.tree.depth import markers as mtypes
from regparser.search import segments
p_levels = [list(mtypes.lower), list(mtypes.ints), list(mtypes.roman),
list(mtypes.upper), list(mtypes.em_ints), list(mtypes.em_roman)]
def p_level_of(mark... | cc0-1.0 | 749,164,101,625,689,200 | 40.785235 | 79 | 0.596209 | false |
eamars/webserver | site-package/roster/sql.py | 1 | 4194 | import mysql.connector
SQL_CREATE_TABLE = \
"""
CREATE TABLE `{}` (
`date` date NOT NULL UNIQUE,
`chair` char(64) NOT NULL DEFAULT '',
`minute` char(64) NOT NULL DEFAULT '',
PRIMARY KEY (`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
"""
def create_database(cursor, database_name):
try:
curs... | mit | -4,404,401,249,818,260,000 | 27.147651 | 97 | 0.572246 | false |
shear/rppy | rppy/fluid.py | 2 | 5952 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# rppy - a geophysical library for Python
# Copyright (c) 2014, Sean M. Contenti
# 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. Re... | bsd-2-clause | -4,058,591,948,400,436,700 | 36.670886 | 79 | 0.544859 | false |
cmacmackin/ford | ford/graphs.py | 1 | 48315 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# graphs.py
# This file is part of FORD.
#
# Copyright 2015 Christopher MacMackin <cmacmackin@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 Softwa... | gpl-3.0 | 925,564,929,856,560,600 | 39.329716 | 206 | 0.522881 | false |
fedora-desktop-tests/evolution | features/steps/calendar_event_editor.py | 1 | 22024 | # -*- coding: UTF-8 -*-
from behave import step, then
from dogtail.predicate import GenericPredicate
from dogtail.tree import root
from dogtail.rawinput import keyCombo, typeText
from time import sleep
from behave_common_steps import wait_until
import datetime
import os
@step(u'Create new appointment')
def create_new... | gpl-2.0 | -8,544,367,351,086,763,000 | 38.188612 | 98 | 0.65583 | false |
elioth010/lugama | src/model/orm/Model.py | 1 | 1482 | '''
Created on Jan 8, 2016
@author: elioth010
'''
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm.session import sessionmaker
from sqlalchemy.sql.expression import text
from model.orm.DB import DB
class Model(DB):
'''
classdocs
'''
base = None
SessionFactory = No... | gpl-2.0 | -388,907,434,122,378,400 | 22.903226 | 78 | 0.557355 | false |
mushtaqak/edx-platform | lms/envs/devstack.py | 1 | 6327 | """
Specific overrides to the base prod settings to make development easier.
"""
from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import
# Don't use S3 in devstack, fall back to filesystem
del DEFAULT_FILE_STORAGE
MEDIA_ROOT = "/edx/var/edxapp/uploads"
DEBUG = True
USE_I18N = True
TEMPLATE_DEB... | agpl-3.0 | 8,309,838,323,921,532,000 | 32.47619 | 126 | 0.595543 | false |
adbar/htmldate | htmldate/validators.py | 1 | 7114 | # pylint:disable-msg=E0611,I1101
"""
Filters for date parsing and date validators.
"""
## This file is available from https://github.com/adbar/htmldate
## under GNU GPL v3 license
# standard
import datetime
import logging
import time
from collections import Counter
from functools import lru_cache
from .settings imp... | gpl-3.0 | -6,857,535,308,415,212,000 | 36.640212 | 103 | 0.606129 | false |
openqt/algorithms | extras/kaprekar_number.py | 1 | 1328 | # coding=utf-8
"""
卡布列克数
http://group.jobbole.com/26887/
有一种数被称为卡布列克数,其形式如:45 * 45 = 2025 并且 20+25=45,这样 45 就是一个
卡布列克数。
它标准定义如下:
若正整数X在N进制下的平方可以分割为二个数字,而这二个数字相加后恰等于X,那么X就是
N进制下的卡布列克数。
分解后的数字必须是正整数才可以,例如:10*10=100 并且 10+0=10,因为0不是正整数,
所以10不是卡布列克数。
现在题目的要求是给定你一个范围[a,b](b大于等于a,a大于等于0),你需要把这个范围内的
卡布列克数全... | gpl-3.0 | -7,367,578,442,279,746,000 | 17.88 | 55 | 0.595339 | false |
google-research/google-research | simulation_research/signal_processing/spherical/spherical_harmonics.py | 1 | 5602 | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# 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 applicab... | apache-2.0 | -9,107,182,008,301,480,000 | 38.183099 | 88 | 0.687275 | false |
supermurat/hamsi-manager | Bars/ToolsBar.py | 1 | 8838 | # This file is part of HamsiManager.
#
# Copyright (c) 2010 - 2015 Murat Demir <mopened@gmail.com>
#
# Hamsi Manager 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 yo... | gpl-3.0 | 3,117,259,295,621,827,600 | 60.804196 | 119 | 0.669609 | false |
wangyanxing/Judge-at-fgdsb | judge/python/tests/coin_change_2.py | 1 | 1260 | from common import *
from solution import *
import copy
import sys
import datetime
num_test = 303
true, false = True, False
in_0 = []
in_org_0 = []
in_1 = []
in_org_1 = []
out = []
def load_test():
f = open('judge/tests/coin-change-2.txt', 'r')
global in_0, in_org_0
in_0 = read_int_matrix(f)
in_org_0... | mit | 7,145,297,501,625,959,000 | 23.705882 | 60 | 0.520635 | false |
tensorflow/ecosystem | data_service/tf_std_data_server.py | 1 | 2000 | # Copyright 2020 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... | apache-2.0 | 4,136,536,005,482,894,300 | 38.215686 | 130 | 0.688 | false |
abramhindle/slowdraw | slowdraw.py | 1 | 5288 | #!/usr/bin/env python
''' Slowdraw watches an image file and makes animations out of the changes
'''
import sys
import cv2
import cv
import numpy as np
import logging
import time
import argparse
import watchdog
import os.path
import pickle
import math
from watchdog.observers import Observer
parser = argparse.Argument... | gpl-3.0 | 8,090,950,691,469,998,000 | 28.707865 | 114 | 0.628404 | false |
rhelmer/socorro-lib | socorro/unittest/external/postgresql/test_backfill.py | 1 | 12534 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from .unittestbase import PostgreSQLTestCase
from nose.plugins.attrib import attr
from nose.tools import eq_, assert_rai... | mpl-2.0 | 5,271,359,420,006,023,000 | 35.017241 | 79 | 0.390618 | false |
kylewray/nova | python/nova/nova_pomdp.py | 1 | 6240 | """ The MIT License (MIT)
Copyright (c) 2015 Kyle Hollins Wray, University of Massachusetts
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 ... | mit | 2,637,093,861,809,474,000 | 47.372093 | 98 | 0.565705 | false |
RyanDJLee/pyta | tests/test_type_inference/test_listcomp.py | 1 | 2140 | import astroid
import nose
from hypothesis import settings, given, HealthCheck
from typing import List
import tests.custom_hypothesis_support as cs
settings.load_profile("pyta")
@given(cs.homogeneous_iterable)
@settings(suppress_health_check=[HealthCheck.too_slow])
def test_list_comprehension_single_target_name_homog... | gpl-3.0 | 229,308,136,317,296,860 | 45.521739 | 105 | 0.744393 | false |
googleads/googleads-python-lib | examples/ad_manager/v202011/team_service/update_teams.py | 1 | 2271 | #!/usr/bin/env python
#
# Copyright 2015 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 requir... | apache-2.0 | -2,277,132,433,655,368,400 | 32.397059 | 77 | 0.712902 | false |
starius/wt-classes | examples/make-all.py | 1 | 1140 | #!/usr/bin/python
import sys
import re
from optparse import OptionParser
entrypoints = []
anchors = []
parser = OptionParser()
parser.add_option("--cpp", dest="cpp")
parser.add_option("--template", dest="template")
parser.add_option("--wrasterimage", dest="wrasterimage", action="store_true")
(options, args) = parser... | gpl-2.0 | 7,167,563,787,169,136,000 | 31.571429 | 77 | 0.592105 | false |
SMTorg/smt | smt/applications/mfk.py | 1 | 27540 | # -*- coding: utf-8 -*-
"""
Created on Fri May 04 10:26:49 2018
@author: Mostafa Meliani <melimostafa@gmail.com>
Multi-Fidelity co-Kriging: recursive formulation with autoregressive model of
order 1 (AR1)
Adapted on January 2021 by Andres Lopez-Lopera to the new SMT version
"""
from copy import deepcopy
import numpy... | bsd-3-clause | 8,541,336,273,020,419,000 | 35.769025 | 141 | 0.510022 | false |
EricRahm/log-spam-hell | logspam/bisect.py | 1 | 10157 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from collections import Counter
from logspam import WARNING_RE
from logspam.cli import BaseCommandLineArgs
from logspam... | mpl-2.0 | 8,093,395,756,673,294,000 | 37.184211 | 88 | 0.57773 | false |
mrrrgn/build-mozharness | configs/b2g_bumper/v2.1s.py | 1 | 3817 | #!/usr/bin/env python
config = {
"exes": {
# Get around the https warnings
"hg": ['/usr/local/bin/hg', "--config", "web.cacerts=/etc/pki/tls/certs/ca-bundle.crt"],
"hgtool.py": ["/usr/local/bin/hgtool.py"],
"gittool.py": ["/usr/local/bin/gittool.py"],
},
'gecko_pull_url': 'ht... | mpl-2.0 | 9,035,164,040,511,455,000 | 41.411111 | 106 | 0.563008 | false |
KarrLab/obj_model | tests/fixtures/migrate/wc_lang_fixture/wc_lang/transform/split_reversible_reactions.py | 1 | 5346 | """ Transform models.
:Author: Jonathan Karr <karr@mssm.edu>
:Date: 2018-06-19
:Copyright: 2018, Karr Lab
:License: MIT
"""
from .core import Transform
from wc_lang import Model, Reaction, RateLawDirection
from wc_onto import onto
from wc_utils.util.ontology import are_terms_equivalent
import copy
import re
class S... | mit | -2,379,198,555,471,933,400 | 45.894737 | 129 | 0.491957 | false |
guardicore/monkey | monkey/tests/unit_tests/infection_monkey/system_info/windows_cred_collector/test_pypykatz_handler.py | 1 | 5948 | from unittest import TestCase
from infection_monkey.system_info.windows_cred_collector.pypykatz_handler import (
_get_creds_from_pypykatz_session,
)
class TestPypykatzHandler(TestCase):
# Made up credentials, but structure of dict should be roughly the same
PYPYKATZ_SESSION = {
"authentication_id... | gpl-3.0 | -484,856,487,669,444,350 | 36.64557 | 96 | 0.47495 | false |
PaddlePaddle/models | dygraph/mobilenet/imagenet_dataset.py | 1 | 1987 | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | apache-2.0 | 260,625,212,117,591,070 | 33.859649 | 74 | 0.636135 | false |
lillisgary/shiny-shame | theme/admin.py | 1 | 1252 | from django.contrib import admin
from .models import HomePage, Slide, IconBlurb, Portfolio, PortfolioItemImage, PortfolioItem, PortfolioItemCategory, TextSlider, DocumentListItem, DocumentList, DocumentListItemCategory
from mezzanine.core.admin import TabularDynamicInlineAdmin
from mezzanine.pages.admin import PageAdmi... | gpl-2.0 | 8,358,480,571,464,116,000 | 34.771429 | 185 | 0.835463 | false |
sjdv1982/seamless | tests/lowlevel/module-package.py | 1 | 1611 | import seamless
from seamless.core import macro_mode_on
from seamless.core import context, cell, macro
mod_init = """
from .mod3 import testvalue
"""
mod1 = """
from . import testvalue
def func():
return testvalue
"""
mod2 = """
from .mod1 import func
"""
mod3 = """
testvalue = 42
"""
package = {
"__init_... | mit | -7,188,232,584,140,256,000 | 18.409639 | 50 | 0.591558 | false |
twz915/django | django/core/serializers/json.py | 1 | 3709 | """
Serialize data to/from JSON
"""
import datetime
import decimal
import json
import sys
import uuid
from django.core.serializers.base import DeserializationError
from django.core.serializers.python import (
Deserializer as PythonDeserializer, Serializer as PythonSerializer,
)
from django.utils import six
from d... | bsd-3-clause | -3,236,497,983,382,932,500 | 31.535088 | 85 | 0.60151 | false |
hyperized/ansible | lib/ansible/modules/network/ios/ios_lacp.py | 1 | 4046 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#############################################
# WARNING #
#############################################
#
# This file is au... | gpl-3.0 | 3,138,347,326,964,049,400 | 21.353591 | 101 | 0.636678 | false |
ramusus/django-vkontakte-groups-migration | vkontakte_groups_migration/migrations/0002_auto__add_field_groupmigration_hidden.py | 1 | 16399 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'GroupMigration.hidden'
db.add_column('vkontakte_groups_groupstatmembers', 'hidden',
... | bsd-3-clause | 2,832,130,740,180,638,000 | 83.536082 | 198 | 0.565217 | false |
spaceboats/busbus | tests/test_provider_ctran.py | 1 | 1025 | import busbus
from busbus.provider.ctran import CTranProvider
from .conftest import mock_gtfs_zip
import arrow
import pytest
import responses
@pytest.fixture(scope='module')
@responses.activate
def ctran_provider(engine):
responses.add(responses.GET, CTranProvider.gtfs_url,
body=mock_gtfs_zip('... | mit | 6,004,438,207,539,431,000 | 30.060606 | 72 | 0.694634 | false |
nexec/vkcopy2mp3p | vkcopy2mp3p.py | 1 | 4785 | #!/usr/bin/python2
# -*- coding: utf-8 -*-
import sqlite3 as db
import sys
import os
import pycurl
import StringIO
import re
import urllib
import json
from random import shuffle
PROFILE = 'default'
argc = len(sys.argv)
if argc < 3 or argc > 4:
sys.stderr.write('Usage: %s /path/to/dir count_of_songs [PROFILE]\n'... | gpl-2.0 | 6,050,023,060,319,584,000 | 26.819767 | 142 | 0.672727 | false |
veveykocute/Spl | splc.py | 1 | 19239 | import sys
import math
"""A Shakespeare Compiler written in Python, splc.py
This is a compiler that implements the majority of the Shakespeare programming language
invented by Kalle Hasselstrom and Jon Aslund, I take no credit for inventing the language.
This software is free to edit or use, and though I doubt anyone ... | unlicense | 5,124,951,847,631,947,000 | 34.561922 | 158 | 0.565466 | false |
IndyMPO/IndyGeoTools | ConvertGeography/GetAreaConversionMatrix.py | 1 | 3774 | #This script copyright 2017 Indianapolis Metropolitan Planning Organization
from __future__ import division
import arcpy
import os
import pandas as pd
import numpy as np
from subprocess import Popen
import sys
def clear_temp():
'''
Clears the temporary directory that is created when running this tool
'''
... | apache-2.0 | -4,349,660,485,601,096,700 | 34.271028 | 129 | 0.642024 | false |
mission-peace/interview | python/dynamic/weighted_job_scheduling_max_profit.py | 1 | 1192 | """
Problem Statement
=================
Given set of jobs with start and end interval and profit, how to maximize profit such that jobs in subset do not
overlap.
Video
-----
* https://youtu.be/cr6Ip0J9izc
Complexity
----------
* Runtime Complexity: O(n^2)
* Space Complexity: O(n)
Reference Link
--------------
* ht... | apache-2.0 | -7,740,483,645,734,945,000 | 21.490566 | 112 | 0.568792 | false |
nthorne/xmppmote | configuration/test/test_commands.py | 1 | 7152 | #!/usr/bin/env python
#Copyright (C) 2012 Niklas Thorne.
#This file is part of XMPPMote.
#
#XMPPMote 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 la... | gpl-3.0 | -3,692,022,302,636,005,000 | 31.807339 | 80 | 0.657019 | false |
YYWen0o0/python-frame-django | django/forms/fields.py | 1 | 47569 | """
Field classes.
"""
from __future__ import unicode_literals
import copy
import datetime
import os
import re
import sys
import warnings
from decimal import Decimal, DecimalException
from io import BytesIO
from django.core import validators
from django.core.exceptions import ValidationError
from django.forms.utils ... | bsd-3-clause | 3,579,217,377,039,823,400 | 38.087099 | 120 | 0.596712 | false |
evidation-health/ContinuousTimeMarkovModel | examples/small_sample_example_main.py | 1 | 6795 | import numpy as np
from theano.tensor import as_tensor_variable
from ContinuousTimeMarkovModel.distributions import *
from pymc3 import Model, sample, Metropolis, Dirichlet, Potential, Binomial, Beta, Slice, NUTS
import theano.tensor as TT
from ContinuousTimeMarkovModel.samplers.forwardS import *
from ContinuousTimeMar... | mit | -8,107,003,969,611,124,000 | 38.051724 | 186 | 0.652686 | false |
nbeck90/data_structures_2 | test_insert_sort.py | 1 | 1280 | # -*- coding: utf-8 -*-
import pytest
from insert_sort import insert_sort
def test_sorted():
my_list = list(range(100))
insert_sort(my_list)
assert my_list == list(range(100))
def test_reverse():
my_list = list(range(100))[::-1]
insert_sort(my_list)
assert my_list == list(range(100))
def t... | mit | 6,873,774,539,873,573,000 | 19.629032 | 47 | 0.530884 | false |
Wyliodrin/wyliodrin-server | tests/debugging/sim_board.py | 1 | 3409 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Board
"""
import getpass
import logging
import os
import signal
import sleekxmpp
import ssl
import sys
import threading
import time
from sleekxmpp import Message, Presence
from sleekxmpp.xmlstream import ElementBase
from sleekxmpp.xmlstream import register_stanza_p... | lgpl-3.0 | -6,279,385,483,405,430,000 | 21.136364 | 71 | 0.675858 | false |
KirillMysnik/ArcJail | srcds/addons/source-python/plugins/arcjail/modules/games/base_classes/map_game_team_based.py | 1 | 16195 | # This file is part of ArcJail.
#
# ArcJail 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.
#
# ArcJail is distributed in the hope that... | gpl-3.0 | -3,576,265,509,460,147,000 | 32.25462 | 79 | 0.569312 | false |
mooseman/pdteco | test_parser.py | 1 | 1865 |
# test_parser.py
# Try a few things with creating tokens which know the
# kind of token that should follow them.
import string, itertools
class token(object):
def __init__(self):
self.type = self.next = self.stmttype = None
self.attrdict = vars(self)
# Set an attribute
# NOTE! Thi... | unlicense | 6,974,440,820,604,117,000 | 21.46988 | 73 | 0.574263 | false |
jtoppins/beaker | Client/src/bkr/client/task_watcher.py | 1 | 5411 | # -*- coding: utf-8 -*-
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
import sys
import time
__all__ = (
"Task... | gpl-2.0 | -5,898,918,360,989,663,000 | 32.196319 | 140 | 0.56958 | false |
cordmata/mediaampy | mediaamp/services.py | 1 | 10270 | from functools import partial
import re
from .exceptions import ServiceNotAvailable
services = {}
def register(cls):
if issubclass(cls, BaseService):
key = getattr(cls, 'registry_key', None)
if not key:
key = ' '.join(re.findall('[A-Z][^A-Z]*', cls.__name__))
services[key] = cl... | apache-2.0 | 8,157,886,516,609,446,000 | 23.452381 | 86 | 0.701168 | false |
TUM-AERIUS/Aerius | Raspberry/Stereo/photo-client.py | 1 | 1956 | import io
import socket
import struct
import time
import picamera
# Connect a client socket to my_server:8000 (change my_server to the
# hostname of your server)
client_socket = socket.socket()
client_socket.connect(('169.254.251.208', 8000))
# Make a file-like object out of the connection
connection = client_socket.... | mit | -2,041,568,765,425,169,400 | 35.240741 | 81 | 0.622188 | false |
lzkelley/zcode | zcode/math/statistic.py | 1 | 25108 | """General functions for mathematical and numerical operations.
Functions
---------
- confidence_bands - Bin by `xx` to calculate confidence intervals in `yy`.
- confidence_intervals - Compute the values bounding desired confidence intervals.
- cumstats - Calculate a cumulative averag... | mit | -1,670,735,747,756,827,600 | 31.439276 | 98 | 0.57416 | false |
marcok/odoo_modules | hr_employee_time_clock/migrations/11.0.0.0.13/post-migrate.py | 1 | 2402 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2016 - now Bytebrand Outsourcing AG (<http://www.bytebrand.net>).
#
# This program is free software: you can redistribute it and/or modify
# it... | agpl-3.0 | -8,948,538,899,177,939,000 | 37.126984 | 84 | 0.609492 | false |
valesi/electrum | lib/daemon.py | 1 | 6276 | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2015 Thomas Voegtlin
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at y... | gpl-3.0 | 5,581,530,443,373,276,000 | 35.068966 | 105 | 0.597674 | false |
rajalokan/nova | nova/policies/server_groups.py | 1 | 2174 | # Copyright 2016 Cloudbase Solutions Srl
# 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 r... | apache-2.0 | -7,074,195,272,985,386,000 | 26.518987 | 78 | 0.561638 | false |
cmcantalupo/geopm | scripts/test/TestPolicyStoreIntegration.py | 1 | 3364 | #!/usr/bin/env python
#
# Copyright (c) 2015 - 2021, Intel Corporation
#
# 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, thi... | bsd-3-clause | 7,266,879,725,349,241,000 | 43.853333 | 99 | 0.699762 | false |
smvv/trs | src/rules/fractions.py | 1 | 14707 | # This file is part of TRS (http://math.kompiler.org)
#
# TRS 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 version.
#
# TRS is distrib... | agpl-3.0 | -6,291,606,106,984,690,000 | 23.96944 | 79 | 0.540899 | false |
dsysoev/fun-with-algorithms | queue/maxheap.py | 1 | 3185 |
"""
Max heap implementation
https://en.wikipedia.org/wiki/Min-max_heap
Algorithm Average
Build heap O(n)
"""
from __future__ import print_function
from math import log, ceil
class MaxHeap(object):
""" Binary Max heap implementation """
def __init__(self):
self.__data = []
def max_heapify(... | mit | 5,271,140,296,426,704,000 | 29.92233 | 95 | 0.539403 | false |
googleapis/googleapis-gen | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/errors/types/billing_setup_error.py | 1 | 1902 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 2,008,635,368,135,882,800 | 34.886792 | 75 | 0.685594 | false |
ojii/django-nani | hvad/tests/forms.py | 1 | 5295 | # -*- coding: utf-8 -*-
from django.core.exceptions import FieldError
from hvad.forms import TranslatableModelForm, TranslatableModelFormMetaclass
from hvad.test_utils.context_managers import LanguageOverride
from hvad.test_utils.testcase import NaniTestCase
from testproject.app.models import Normal
from django.db impo... | bsd-3-clause | -6,615,196,495,451,526,000 | 36.821429 | 105 | 0.605666 | false |
jdemel/gnuradio | gnuradio-runtime/python/gnuradio/gr/tag_utils.py | 1 | 5013 | from __future__ import unicode_literals
import pmt
from . import gr_python as gr
class PythonTag(object):
" Python container for tags "
def __init__(self):
self.offset = None
self.key = None
self.value = None
self.srcid = False
def tag_to_python(tag):
""" Convert a st... | gpl-3.0 | 2,668,344,318,893,686,300 | 33.8125 | 73 | 0.549172 | false |
Workday/OpenFrame | native_client_sdk/src/build_tools/build_sdk.py | 1 | 36370 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Entry point for both build and try bots.
This script is invoked from XXX, usually without arguments
to package an SDK. It autom... | bsd-3-clause | 1,889,471,415,100,197,600 | 34.797244 | 79 | 0.664889 | false |
tuos/FlowAndCorrelations | mc/step2/src/RECOHI_mc.py | 1 | 4615 | # Auto generated configuration file
# using:
# Revision: 1.19
# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v
# with command line options: step3 --conditions auto:run2_mc_hi -s RAW2DIGI,L1Reco,RECO -n 4 --eventcontent RECODEBUG --runUnscheduled --scenario HeavyIons --datatier G... | mit | -738,442,596,770,843,600 | 46.091837 | 438 | 0.817551 | false |
moodpulse/l2 | refprocessor/processor.py | 1 | 1703 | from typing import Tuple, Union, List
from appconf.manager import SettingManager
from refprocessor.age_parser import AgeRight
from refprocessor.common import ValueRange, RANGE_IN
from refprocessor.result_parser import ResultRight
class RefProcessor:
def __init__(self, ref: dict, age: List[int]):
actual_k... | mit | 6,272,185,253,824,169,000 | 36.777778 | 116 | 0.606471 | false |
TacticalGoat/reddit | AutoContributor/autocontributor.py | 1 | 2306 | #/u/GoldenSights
import praw # simple interface to the reddit API, also handles rate limiting of requests
import time
import sqlite3
'''USER CONFIGURATION'''
APP_ID = ""
APP_SECRET = ""
APP_URI = ""
APP_REFRESH = ""
# https://www.reddit.com/comments/3cm1p8/how_to_make_your_bot_use_oauth2/
USERAGENT = ""
#This is a sho... | mit | -7,222,148,781,160,823,000 | 28.948052 | 104 | 0.652645 | false |
mganeva/mantid | Framework/PythonInterface/test/python/plugins/algorithms/CreateWorkspaceTest.py | 1 | 4168 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
from __future__ import (absolute_import, divi... | gpl-3.0 | 5,580,050,091,464,534,000 | 39.862745 | 115 | 0.606046 | false |
openhatch/oh-greenhouse | greenhouse/migrations/0008_auto__add_field_people_control_group.py | 1 | 9876 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'People.control_group'
db.add_column(u'people', 'control_group',
self.g... | agpl-3.0 | -2,483,690,194,374,190,600 | 72.708955 | 187 | 0.545666 | false |
spectrumone/django-outlook-api | python_tutorial/tutorial/outlookservice.py | 1 | 4799 | import requests
import uuid
import json
outlook_api_endpoint = 'https://outlook.office.com/api/v2.0{0}'
# Generic API Sending
def make_api_call(method, url, token, payload = None, parameters = None):
# Send these headers with all API calls
headers = { 'User-Agent' : 'django-tutorial/1.0',
'Aut... | mit | 156,802,696,262,218,100 | 36.787402 | 106 | 0.574703 | false |
mwiencek/picard | picard/ui/itemviews.py | 1 | 27669 | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
# Copyright (C) 2006 Lukáš Lalinský
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License... | gpl-2.0 | -2,572,298,913,582,180,000 | 38.298295 | 102 | 0.600195 | false |
frankban/UbuntuPaste | ubuntupaste.py | 1 | 6417 | # This software is licensed under the GNU Affero General Public License
# version 3 (see the file LICENSE).
import itertools
import os
import pwd
import threading
import urllib
import urllib2
import webbrowser
import sublime
import sublime_plugin
class UserInterface(object):
"""User interface for this plugin.""... | agpl-3.0 | 5,063,318,384,990,150,000 | 32.773684 | 77 | 0.59171 | false |
MontrealCorpusTools/polyglot-server | iscan/annotator/models.py | 1 | 4133 | from django.db import models
from polyglotdb import CorpusContext
# Create your models here.
class Annotation(models.Model):
ITEM_TYPE_CHOICES = (('U', 'Utterance'),
('W', 'Word'),
('Y', 'Syllable'),
('P', 'Phone'))
corpus = models.Fo... | mit | -4,415,763,708,759,667,700 | 37.990566 | 101 | 0.585289 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.