repo_name
stringlengths
6
61
path
stringlengths
4
230
copies
stringlengths
1
3
size
stringlengths
4
6
text
stringlengths
1.01k
850k
license
stringclasses
15 values
hash
int64
-9,220,477,234,079,998,000
9,219,060,020B
line_mean
float64
11.6
96.6
line_max
int64
32
939
alpha_frac
float64
0.26
0.9
autogenerated
bool
1 class
ratio
float64
1.62
6.1
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
zebpalmer/MongoElector
tests/test_mongoelector.py
1
1505
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_mongoelector ---------------------------------- Tests for `mongoelector` module. """ import unittest from time import sleep from pymongo import MongoClient from mongoelector import MongoElector from random import randint class TestMongoelector(unittest.TestCas...
lgpl-3.0
-8,631,035,411,384,870,000
21.80303
70
0.55814
false
3.716049
true
false
false
mhotwagner/backstage
backstage/settings/base.py
1
3790
""" Django settings for backstage project. Generated by 'django-admin startproject' using Django 1.9.1. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os ...
mit
-8,667,195,020,869,112,000
25.319444
91
0.689182
false
3.522305
false
false
false
draperjames/qtpandas
qtpandas/ui/fallback/easygui/boxes/base_boxes.py
1
39397
""" .. moduleauthor:: Stephen Raymond Ferg and Robert Lugg (active) .. default-domain:: py .. highlight:: python Version |release| """ from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from builtins import zip from bu...
mit
-2,887,402,941,464,055,300
34.333632
166
0.586568
false
4.157117
false
false
false
ODM2/ODM2StreamingDataLoader
src/wizard/controller/frmVirtualList.py
1
1055
import wx class VirtualList(wx.ListCtrl): def __init__(self, parent, **kwargs): super(VirtualList, self).__init__(parent, wx.ID_ANY, style=wx.LC_VIRTUAL | wx.LC_REPORT |\ wx.LC_VRULES | wx.LC_HRULES, **kwargs) self.data = None self.columns = [] def setData(...
bsd-3-clause
-944,229,307,867,308,800
28.305556
60
0.554502
false
4.089147
false
false
false
596acres/django-livinglots-steward
livinglots_steward/models.py
1
2673
from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.translation import ugettext_lazy as _ from livinglots_organize.models import BaseOrganizer class OptedInStewardProjectManager(models.Manager): ...
bsd-3-clause
-1,274,561,160,493,010,000
31.204819
79
0.640853
false
4.2768
false
false
false
filipefigcorreia/TracAdaptiveSoftwareArtifacts
AdaptiveArtifacts/model/pool.py
1
3048
# -*- coding: utf-8 -*- # # This software is licensed as described in the file license.txt, which # you should have received as part of this distribution. from core import * class InstancePool(object): """ Container for instances of Instance and Entity, that provides some utility methods to search through...
bsd-3-clause
-5,987,743,707,636,190,000
40.189189
132
0.608268
false
4.053191
false
false
false
TimBizeps/BachelorAP
V503_Millikan Versuch/matrix2latex/src_python/fixEngineeringNotation.py
3
1220
"""This file is part of matrix2latex. matrix2latex 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. matrix2latex is distributed in the hope ...
gpl-3.0
7,896,424,702,390,345,000
31.105263
68
0.62541
false
3.485714
false
false
false
rohitw1991/frappe
frappe/build.py
28
4438
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals from frappe.utils.minify import JavascriptMinify """ Build the `public` folders and setup languages """ import os, sys, frappe, json, shutil from cssmin import cssmin def bu...
mit
-5,458,223,066,992,664,000
28.390728
127
0.64849
false
2.921659
false
false
false
qitan/icomments
icomments/templatetags/comment.py
2
1218
# -*- coding:utf8 -*- from django import template from django.db.models import Q from icomments.models import Comments from icomments.forms import ComForm register = template.Library() def show_comment(value): ''' 文章评论 ''' comform = ComForm() # 获取已批准或隐藏的评论 comments = Comments.objects.filter(Q...
gpl-3.0
-6,502,655,968,941,639,000
24.565217
89
0.614796
false
2.962217
false
false
false
dharmeshpatel/shoppingcart
shoppingCart/release.py
1
1970
#!/usr/bin/python # -*- encoding: utf-8 -*- ################################################################################ # # Copyright (C) 2010 - 2015 Dharmesh Patel <mr.dlpatel@gmail.com>. # $Id$ # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Ge...
bsd-3-clause
100,771,357,863,046,540
40.041667
128
0.607614
false
4.129979
false
false
false
classam/threepanel
threepanel/tasks.py
1
5979
import os import subprocess import shlex from invoke import task, run from invoke.exceptions import Failure YOUR_APP_NAME = "threepanel" HOME_PATH = os.environ['HOME'] DJANGO_PATH = os.path.join(HOME_PATH, 'vagrant_django', YOUR_APP_NAME) SCRIPTS_PATH = os.path.join(HOME_PATH, 'vagrant_django', 'scripts') UWSGI_LOG_P...
agpl-3.0
6,199,138,148,214,750,000
25.223684
87
0.641913
false
3.468097
false
false
false
Vaelor/python-mattermost-driver
docs/mmDriverTokenAuthExample.py
1
3713
# A simple example to retrieve all users for a team while using a _token_ # from the .netrc file instead of a password (as requests assumes by default) import logging import requests import netrc from mattermostdriver import Driver logging.basicConfig( format='%(levelname)s - %(name)s - %(asctime)s - %(message)s'...
mit
597,084,315,841,375
38.084211
96
0.543496
false
3.916667
false
false
false
MrLoick/python-for-android
python-modules/twisted/twisted/words/protocols/oscar.py
53
43256
# -*- test-case-name: twisted.words.test -*- # Copyright (c) 2001-2008 Twisted Matrix Laboratories. # See LICENSE for details. """ An implementation of the OSCAR protocol, which AIM and ICQ use to communcate. Maintainer: Paul Swartz """ import struct import string import socket import random import types import re ...
apache-2.0
8,640,750,613,813,544,000
34.025101
151
0.53648
false
3.380696
false
false
false
EnergyID/opengrid
library/storetimeseriesdata.py
1
3097
# -*- coding: utf-8 -*- """ Created by Filip Jorissen This function stores sensor measurement data. For each sensor two files are created. Sensor.meta contains metadata about the measurements. Sensor.txt contains the actual measurements: only the measurements. The location of the measurement in the file indicates the ...
gpl-2.0
5,187,222,242,806,256,000
42.027778
375
0.659671
false
4.277624
false
false
false
AndyKrivovjas/notes
setup.py
2
1714
#!/usr/bin/env python from setuptools import setup, find_packages # Shamelessly stolen (then modified) from https://github.com/cburgmer/pdfserver/blob/master/setup.py def parse_requirements(file_name): import re requirements = [] for line in open(file_name, 'r').read().split('\n'): if re.match(r'...
mit
-7,590,833,484,005,609,000
29.070175
100
0.547841
false
3.631356
false
false
false
akhan3674/twitterMapper
project/project/impact.py
2
2804
#code to save tweets in json import sys import tweepy import json import csv from textblob import TextBlob import os import time from datetime import datetime from threading import Timer access_key = "2864513512-1JkMkwIRHMjSBLdNgh1zIGiSX2ZJMnhoZZ3b8uR" access_secret = "vpBlz4E2eSZnw7TVlUAGcmwI4AZ6Hf2Z9CBhin3S7HZSl" c...
mit
2,873,744,741,846,187,000
28.208333
121
0.729315
false
2.838057
false
false
false
ResEnv/chain-api
chain/core/models.py
1
7564
from django.db import models from django.utils import timezone from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.generic import GenericForeignKey class GeoLocation(models.Model): latitude = models.FloatField() longitude = models.FloatField() elevation = models.Floa...
mit
-1,856,304,268,129,593,900
38.395833
79
0.671867
false
3.966439
false
false
false
billy1380/appengine-pipelines
python/test/util_test.py
2
1433
#!/usr/bin/env python """Tests for util.py.""" import datetime import logging import os import sys import unittest # Fix up paths for running tests. sys.path.insert(0, "../src/") from pipeline import util from google.appengine.api import taskqueue class JsonSerializationTest(unittest.TestCase): """Test custom j...
apache-2.0
-4,971,806,801,304,813,000
26.557692
62
0.659456
false
3.444712
true
false
false
ryanmiao/libvirt-test-API
repos/domain/blkstats.py
1
1762
#!/usr/bin/evn python # To test domain block device statistics import os import sys import time import libxml2 import libvirt from libvirt import libvirtError from src import sharedmod required_params = ('guestname',) optional_params = {} def check_guest_status(domobj): """Check guest current status""" sta...
gpl-2.0
4,589,441,104,892,047,000
24.911765
83
0.61748
false
3.603272
false
false
false
keiichishima/FX5204PS
contrib/monitor/monitor.py
1
4417
#!/usr/bin/env python # -*- coding: utf-8 -*- import time import pygame from fx5204ps import FX5204PS GRAPH_WIDTH = 600 GRAPH_HEIGHT = 100 SCREEN_SIZE = (GRAPH_WIDTH + 200, (GRAPH_HEIGHT + 50) * 4 + 50) BLACK = (0,0,0) WHITE = (255,255,255) RED = (255,0,0) GREEN = (0,255,0) BLUE = (0,0,255) class Graph(object): ...
bsd-2-clause
4,841,013,284,531,553,000
31.962687
75
0.518225
false
3.186869
false
false
false
bukson/steampy
steampy/utils.py
1
7402
import decimal import os import copy import struct import urllib.parse as urlparse import re from requests.structures import CaseInsensitiveDict from typing import List from bs4 import BeautifulSoup, Tag from steampy.models import GameOptions def text_between(text: str, begin: str, end: str) -> str: start = te...
mit
232,540,412,038,118,100
39.228261
120
0.644285
false
3.436397
false
false
false
gu471/winChat_Server
test.py
1
5113
import socket import sys from thread import start_new_thread from chatClasses import tcpHandler import time import curses screen = curses.initscr() screen.immedok(True) curses.noecho() curses.curs_set(0) curses.cbreak() screen.keypad(1) listenerPort = 5006 promoterPort = 5005 server_address = "127.0.0.1" chat2Write...
gpl-3.0
-7,801,153,503,613,307,000
18.515267
91
0.672599
false
2.970947
false
false
false
OpenOil-UG/aleph
aleph/views/base_api.py
1
3171
import os import logging from time import time from apikit import jsonify from flask import render_template, current_app, Blueprint, request from jsonschema import ValidationError from elasticsearch import TransportError from aleph.core import get_config from aleph.model.constants import CORE_FACETS, SOURCE_CATEGORIES...
mit
-845,400,836,799,092,400
31.030303
72
0.629454
false
3.691502
false
false
false
PinguinoIDE/pinguino-bootloaders
p8/usb/v5.x/tools/uploader8.py
2
32716
#!/usr/bin/env python #-*- coding: iso-8859-15 -*- """--------------------------------------------------------------------- _____ _____ _ _ _____ _ _ _____ _ _ ____ | __ \_ _| \ | |/ ____| | | |_ _| \ | |/ __ \ | |__) || | | \| | | __| | | | | | | \...
gpl-2.0
-3,979,081,066,942,806,500
36.135074
102
0.447671
false
3.917146
true
false
false
jonwright/ImageD11
ImageD11/tkGui/plot3d.py
1
11957
#!/usr/bin/env python from __future__ import print_function """ from example by Tarn Weisner Burton <twburton@users.sourceforge.net> in pyopengl """ __author__ = 'Jon Wright <jpwright@users.sourceforge.net> from example by Tarn Weisner Burton <twburton@users.sourceforge.net>' import numpy import sys import os from ...
gpl-2.0
4,887,040,685,764,493,000
34.37574
127
0.554738
false
3.042494
false
false
false
dpausp/arguments
src/ekklesia_portal/concepts/proposition_note/proposition_note_contracts.py
1
1147
from colander import Length from deform import Button from deform.widget import HiddenWidget, Select2Widget, TextAreaWidget from ekklesia_common.contract import Form, Schema, enum_property, int_property, string_property from ekklesia_common.translation import _ from ekklesia_portal.enums import VoteByUser class Prop...
agpl-3.0
-2,293,608,169,246,230,800
39.964286
103
0.699215
false
3.688103
false
false
false
PhloxAR/math3
math3/funcs/plane.py
1
4685
# -*- coding: utf-8 -*- """ Provide functions for the creation and manipulation of Planes. Planes are represented using a numpy.array of shape (4,). The values represent the plane equation using the values A,B,C,D. The first three values are the normal vector. The fourth value is the distance of the plane from the or...
bsd-3-clause
8,162,852,061,869,322,000
30.655405
82
0.677268
false
3.709422
false
false
false
m-kostrzewa/FuzzyCarRisk
gui.py
1
16811
#!/usr/bin/env python3 """ author: Kamil Cukrowski, 2016 """ from tkinter import * import tkinter import tkinter.ttk from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg import matplotlib.pyplot as plt from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg import numpy as ...
mit
5,256,334,183,655,911,000
35.63895
136
0.708612
false
2.529687
false
false
false
jorik041/CrackMapExec
cme/modules/bloodhound.py
1
6435
from cme.helpers.powershell import * from cme.helpers.misc import validate_ntlm from cme.helpers.logger import write_log from sys import exit class CMEModule: ''' Executes the BloodHound recon script on the target and retreives the results onto the attackers' machine 2 supported modes : ...
bsd-2-clause
-7,558,939,601,482,193,000
54.482759
196
0.605905
false
3.527961
false
false
false
avanzosc/avanzosc6.1
avanzosc_product_category_ext/product_category_ext.py
1
2095
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (http://tiny.be). All Rights Reserved # # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
7,922,507,221,663,516,000
52.692308
324
0.644222
false
4.335404
false
false
false
anderdl/test3repo
scripts/releaser_hooks.py
5
2587
import subprocess import os import polib import copy import codecs def prereleaser_middle(data): """ 1. Run the unit tests one last time before we make a release. 2. Update the CONTRIBUTORS.txt file. Note: Install polib (https://pypi.python.org/pypi/polib). """ print('Running unit tests.') ...
bsd-3-clause
-3,137,737,663,403,263,500
35.957143
90
0.638964
false
4.004644
false
false
false
lenin/bzr-xmloutput
infoxml.py
1
11232
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright (C) 2007-2009 Guillermo Gonzalez # # The code taken from bzrlib is under: Copyright (C) 2005-2007 Canonical Ltd # # 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 # th...
gpl-2.0
-8,681,474,784,516,593,000
36.069307
80
0.61948
false
3.99431
false
false
false
brampling/infoblox-gcp-poc
delete_subnet.py
1
1501
#!/usr/bin/python import gcloudutils import sys import requests import argparse from infoblox_client import connector from infoblox_client import objects from requests.auth import HTTPBasicAuth from requests.packages.urllib3.exceptions import InsecureRequestWarning from oauth2client.client import GoogleCredentials from...
apache-2.0
3,885,868,715,293,898,000
37.487179
220
0.781479
false
3.458525
false
false
false
aristanetworks/arista-ovs-quantum
quantum/tests/unit/nicira/test_nicira_plugin.py
3
2339
# Copyright (c) 2012 OpenStack, 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 agreed to in wr...
apache-2.0
9,094,450,046,732,250,000
32.898551
77
0.678923
false
3.512012
true
false
false
nexus511/gpd-ubuntu-packages
packages/gpdpocket-power/make.py
1
2841
import shutil import subprocess import os import tarfile class Config(object): build = os.path.abspath("build") files = os.path.abspath("files") output = os.path.abspath("output") manifest = os.path.abspath("build/DEBIAN") temp = os.path.abspath("tmp") templates = os.path.abspath("files/DEBIAN"...
gpl-3.0
1,494,709,160,688,461,800
28.59375
89
0.655403
false
3
true
false
false
heynemann/mememe
engine/models.py
1
2443
# -*- coding: utf-8 -*- # # Copyright (C) 2010 Lincoln de Sousa <lincoln@comum.org> # Copyright (C) 2010 Gabriel Falcão <gabriel@nacaolivre.org> # # 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 Fo...
agpl-3.0
5,188,528,998,554,488,000
32.916667
74
0.604832
false
4.043046
false
false
false
openstack/rally
rally/common/db/migrations/versions/2017_10_9a18c6fe265c_rename_namespace_to_platform.py
1
1124
# 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 agreed to in...
apache-2.0
9,216,170,407,023,605,000
27.1
78
0.732206
false
3.556962
false
false
false
galileo-press/django-lint
django_lint_example/example/models/__init__.py
4
4702
from django.db import models from django.contrib import admin class NullableModel(models.Model): TRUTH_VALUE = True charfield = models.CharField(max_length=100, null=True, blank=True) charfield_2 = models.CharField(max_length=100, null=TRUTH_VALUE) textfield = models.TextField(null=True, blank=True) ...
gpl-3.0
-342,427,899,461,134,600
26.022989
72
0.68439
false
3.941324
false
false
false
saintdragon2/python-3-lecture-2015
gui_practice/tkinter_02.py
1
2021
__author__ = 'saintdragon2' #http://www.tutorialspoint.com/python/tk_menu.htm from tkinter import Tk, Menu, Toplevel, Button from tkinter.filedialog import askopenfilename from tkinter.messagebox import showerror def donothing(): filewin = Toplevel(root) button = Button(filewin, text="Do nothing button") ...
mit
-443,248,091,811,062,340
33.844828
78
0.683325
false
3.324013
false
false
false
idl/Tweet_correlation
additional_modules/map_red_user_mongo.py
1
4060
import simplekml import json import datetime import csv from bson.code import Code from pymongo import MongoClient from math import radians, cos, sin, asin, sqrt from random import choice import operator import csv def haversine(lon1, lat1, lon2, lat2): """ Calculate the great circle distance between two poin...
mit
6,387,345,091,163,661,000
26.066667
145
0.513547
false
3.484979
false
false
false
twosigma/beaker-notebook
beakerx/beakerx_magics/kernel_runner_magic.py
1
1420
# Copyright 2019 TWO SIGMA OPEN SOURCE, 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...
apache-2.0
8,582,777,239,791,569,000
30.555556
74
0.709155
false
3.796791
false
false
false
hsnlab/mapping
generator/networkx_nffg_generator.py
2
4896
#!/usr/bin/python -u # # Copyright (c) 2016 Balazs Nemeth # # This file 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. # # This file i...
apache-2.0
-4,967,591,907,117,210,000
35.81203
78
0.566381
false
3.450317
false
false
false
mlyundin/Machine-Learning
ex3/ex3.py
1
1834
import scipy.io as sio import matplotlib.pyplot as plt import numpy as np from scipy.optimize import minimize from common_functions import add_zero_feature, cf_lr as cost_function, gf_lr as grad_function, \ cf_lr_reg as cost_function_reg, gf_lr_reg as grad_function_reg if __name__ == '__main__': data = s...
mit
-2,395,002,424,882,177,000
34.72
146
0.592694
false
3.06689
false
false
false
proyan/sot-torque-control
python/dynamic_graph/sot/torque_control/identification/identify_motor_static.py
1
5833
# -*- coding: utf-8 -*- """ Created on Tue Sep 12 18:47:50 2017 @author: adelpret """ import numpy as np from scipy import ndimage import matplotlib.pyplot as plt from identification_utils import solve1stOrderLeastSquare from dynamic_graph.sot.torque_control.hrp2.control_manager_conf import IN_OUT_GAIN def identify_...
gpl-3.0
1,240,813,674,669,772,500
39.797203
102
0.572947
false
2.683073
false
false
false
sassoftware/mint
mint/scripts/postgres_auto_update.py
1
7720
# # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
apache-2.0
-2,299,280,373,432,593,200
33.618834
80
0.595337
false
4.15277
true
false
false
wmaier/treetools
trees/transitions.py
1
9924
"""treetools: Tools for transforming treebank trees. This module provides functions and classes for transition extraction. Author: Wolfgang Maier <maierw@hhu.de> """ import argparse import sys from . import trees, treeinput, transform from . import misc, transitionoutput class Transition(): def __init__(self, n...
gpl-3.0
-8,439,954,189,976,804,000
41.410256
113
0.531036
false
4.279431
false
false
false
saukrIppl/seahub
tests/api/test_files.py
1
12451
#coding: UTF-8 """ Test file/dir operations. """ import posixpath import pytest import urllib from urllib import urlencode, quote import urlparse from tests.common.utils import randstring, urljoin from tests.api.apitestbase import ApiTestBase class FilesApiTest(ApiTestBase): def test_rename_file(self): w...
apache-2.0
-1,825,122,253,764,284,400
39.809836
87
0.536515
false
3.702261
true
false
false
editxt/editxt
editxt/test/test_window.py
1
57101
# -*- coding: utf-8 -*- # EditXT # Copyright 2007-2013 Daniel Miller <millerdev@gmail.com> # # This file is part of EditXT, a programmer's text editor for Mac OS X, # which can be found at http://editxt.org/. # # EditXT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publ...
gpl-3.0
5,623,553,323,998,416,000
38.21772
104
0.535104
false
3.486658
true
false
false
mission-liao/pyswagger
pyswagger/getter.py
1
5406
from __future__ import absolute_import from .consts import private from .utils import patch_path import json import yaml import six import os import logging import re logger = logging.getLogger(__name__) class Getter(six.Iterator): """ base of getter object Idealy, to subclass a getter, you just need to ov...
mit
-6,257,545,884,173,601,000
30.248555
108
0.54606
false
4.061608
false
false
false
bkeep/bkeep-manager
get_size.py
1
1389
#cat get_size.py # -*- coding: utf-8 -*- """遍历指定路径下所有节点的大小""" from kazoo.client import KazooClient,KazooState import socket,sys, os, time, atexit class dzk: def __init__(self,hosts,secs): self.hosts = hosts #self.zk = KazooClient(hosts='1.1.1.3:2181,1.1.1.2:2181,1.1.1.1:2181',retry_max_delay=2000)...
apache-2.0
-8,220,321,272,629,685,000
27.957447
99
0.533431
false
3.004415
false
false
false
kevindkeogh/qbootstrapper
examples.py
1
32131
#! /usr/bin/env python # vim: set fileencoding=utf-8 ''' Testing for USD, EUR, and GBP OIS qb. Note that these curves are the same as the NY DVC curves (in terms of instruments). Using the 30 June 2016 data below, we achieved <1bp difference for all points for the EUR and GBP OIS curves to the Numerix curve. There was ...
mit
-2,291,508,215,302,603,800
50.164013
109
0.431826
false
4.223873
false
false
false
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/lib/tool_shed/util/review_util.py
1
6281
import logging import os from galaxy.model.orm import and_ from galaxy.util.odict import odict from tool_shed.util import hg_util import tool_shed.util.shed_util_common as suc log = logging.getLogger( __name__ ) def can_browse_repository_reviews( app, user, repository ): """ Determine if there are any reviews...
gpl-3.0
8,977,158,116,913,160,000
51.781513
141
0.640981
false
4.32278
false
false
false
blorgon9000/pyopus
pyopus/optimizer/grnm.py
1
19001
# -*- coding: UTF-8 -*- """ .. inheritance-diagram:: pyopus.optimizer.grnm :parts: 1 **Unconstrained grid-restrained Nelder-Mead simplex optimizer (PyOPUS subsystem name: GRNMOPT)** A provably convergent version of the Nelder-Mead simplex algorithm. The algorithm performs unconstrained optimization. Convergence...
gpl-3.0
1,669,439,199,081,266,000
29.594203
128
0.646508
false
2.979301
false
false
false
mochrul/zorp
zorpctl/szig.py
1
8178
############################################################################ ## ## Copyright (c) 2000-2015 BalaBit IT Ltd, Budapest, Hungary ## Copyright (c) 2015-2018 BalaSys IT Ltd, Budapest, Hungary ## ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General...
gpl-2.0
-1,081,902,390,154,030,700
32.793388
110
0.627782
false
4.124054
false
false
false
xi-studio/anime
src/gan_midi.py
1
8075
import os, sys sys.path.append(os.getcwd()) import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import sklearn.datasets import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d i...
mit
3,840,381,744,454,263,300
30.29845
88
0.600495
false
3.185404
false
false
false
rishig/zulip
zilencer/management/commands/calculate_first_visible_message_id.py
7
1109
from typing import Any from django.core.management.base import CommandParser from zerver.lib.management import ZulipBaseCommand from zerver.lib.message import maybe_update_first_visible_message_id from zerver.models import Realm class Command(ZulipBaseCommand): help = """Calculate the value of first visible mes...
apache-2.0
-6,301,169,526,633,900,000
32.606061
86
0.64202
false
4.169173
false
false
false
amirnissim/okqa
qa/views.py
1
9701
import json from django.http import HttpResponse, HttpResponseForbidden from django.http import HttpResponseRedirect from django.shortcuts import render, get_object_or_404 from django.views.decorators.http import require_POST from django.template.context import RequestContext from django.contrib.auth.decorators import...
bsd-3-clause
4,962,761,711,069,016,000
34.276364
118
0.633749
false
4.032003
false
false
false
ondrae/1900
filters.py
1
1543
from datetime import datetime import jinja2 import flask blueprint = flask.Blueprint('filters', __name__) # http://flask.pocoo.org/snippets/33/ # and # http://stackoverflow.com/questions/12288454/how-to-import-custom-jinja2-filters-from-another-file-and-using-flask @jinja2.contextfilter @blueprint.app_template_filter...
mit
6,174,330,437,350,917,000
26.087719
115
0.558004
false
3.428889
false
false
false
sbmlteam/deviser
generator/util/generateRNG.py
1
3682
#!/usr/bin/env python # # @file generateRNG.py # @brief function for generating RNG schema # @author Frank Bergmann # @author Sarah Keating # # <!-------------------------------------------------------------------------- # # Copyright (c) 2013-2018 by the California Institute of Technology # (California, USA), t...
lgpl-2.1
-3,363,840,852,102,879,700
35.098039
78
0.67409
false
3.971953
false
false
false
bionet/ted.python
tests/test_signal_io.py
1
1292
#!/usr/bin/env python """ Test classes for writing and reading signals to and from HDF files. """ import unittest import os import numpy as np import bionet.utils.signal_io as s filename = 'test_signal_io_data.h5' block_size = 10000 class SignalIOTestCase(unittest.TestCase): def setUp(self): '''Generat...
bsd-3-clause
-5,436,309,697,830,017,000
22.071429
77
0.573529
false
3.734104
true
false
false
tensorflow/privacy
tensorflow_privacy/privacy/privacy_tests/membership_inference_attack/seq2seq_mia_test.py
1
16296
# Copyright 2020, The TensorFlow 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 applicable law or agreed t...
apache-2.0
8,734,620,172,058,187,000
37.343529
121
0.560506
false
3.476851
true
false
false
tsakim/bicm
src/bicm.py
1
41931
# -*- coding: utf-8 -*- """ Created on Tue Dec 1 08:04:28 2015 Module: bicm - Bipartite Configuration Model Author: Mika Straka Description: Implementation of the Bipartite Configuration Model (BiCM) for binary undirected bipartite networks [Saracco2015]_. Given the biadjacency matrix of a bipar...
mit
1,499,766,940,394,343,700
40.672962
80
0.568733
false
3.909269
false
false
false
gdsglgf/toolkit
Python/maven_cleaner.py
1
2058
import os import sys from threading import Thread try: from queue import Queue # python 3 from urllib.request import urlretrieve except: from Queue import Queue # python 2 from urllib import urlretrieve home = os.path.expanduser("~") maven_home = os.path.join(home, '.m2/repository') print('MAVEN HOME: %s' %...
mit
-4,245,451,182,434,786,000
21.139785
71
0.662293
false
2.784844
false
false
false
pycircle/blog_django
src/blog_cms/settings.py
1
4314
""" Django settings for blog_cms 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 pat...
mit
2,757,774,071,022,925,300
26.83871
104
0.688456
false
3.326137
false
false
false
pyconca/2017-web
pyconca2017/pycon_schedule/services.py
1
3713
import json import requests from django.conf import settings from pyconca2017.pycon_schedule.models import Speaker, Presentation class PapercallInterface(object): BASE_URL = 'https://www.papercall.io/api/v1' EVENT_URL = '/event' SUBMISSIONS_LIST_URL = '/submissions' SUBMISSION_GET_URL = '/submiss...
mit
-8,678,908,933,507,373,000
31.008621
118
0.590358
false
4.084708
false
false
false
Jc2k/libcloud
libcloud/test/compute/test_ssh_client.py
2
7148
# -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one or more§ # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Li...
apache-2.0
-8,181,954,370,134,637,000
34.381188
78
0.564433
false
4.363248
true
false
false
jlgoldman/writetogov
app/app_config.py
1
1372
import logging import sys from config import constants from database import db from util import sendgrid_ class AppConfig(object): SECRET_KEY = constants.FLASK_SECRET_KEY CSRF_ENABLED = True SQLALCHEMY_DATABASE_URI = constants.SQLALCHEMY_DATABASE_URI SQLALCHEMY_TRACK_MODIFICATIONS = False SQLALCH...
bsd-3-clause
8,961,461,953,709,691,000
28.191489
122
0.685131
false
3.517949
false
false
false
86reddawg/PiDataRecorder
pidatarecorder.py
1
2519
#!/usr/bin/python ''' Temp/Humidity Monitor - written by Joshua Hughes, 10/20/14 Must be run as root. Records temperature and percent humidity from Adafruit DHT11/22 or AM2302 sensors once per minute Calculates absolute humidity and dumps data into a database Create an sqlite3 database and setup table with something ...
gpl-2.0
1,882,497,555,781,134,600
28.290698
178
0.681223
false
2.70279
false
false
false
jlettvin/Unicode
py2/Tree.py
1
5174
#!/usr/bin/env python # -*- coding: utf8 -*- """ This module creates word trees, splices, prunes, and queries. """ __module__ = "Tree.py" __author__ = "Jonathan D. Lettvin" __copyright__ = "\ Copyright(C) 2016 Jonathan D. Lettvin, All Rights Reserved" __credits__ = ["Jonathan D. Lettvin"] __license__ =...
gpl-3.0
122,155,553,994,677,650
33.724832
79
0.52242
false
3.733045
false
false
false
houssine78/addons
product_to_scale_bizerba_extended/models/product.py
1
5761
# -*- coding: utf-8 -*- # Copyright (C) 2014 GRAP (http://www.grap.coop) # Copyright © 2017 Coop IT Easy (http://www.coopiteasy.be) # @author: Sylvain LE GAL (https://twitter.com/legalsylvain) # @author: Houssine BAKKALI (https://github.com/houssine78) # @author: Rémy TAYMANS <remy@coopiteasy.be> # License AGPL-3.0 or ...
agpl-3.0
-1,830,335,323,021,932,800
37.393333
78
0.598368
false
3.816435
false
false
false
manuelcortez/socializer
src/wxUI/mainWindow.py
1
6599
# -*- coding: utf-8 -*- import wx import wx.adv import application from pubsub import pub class mainWindow(wx.Frame): def makeMenu(self): mb = wx.MenuBar() app_ = wx.Menu() create = wx.Menu() self.audio_album = create.Append(wx.NewId(), _("Audio album")) self.video_album = create.Append(wx.NewId(), _("Video...
gpl-2.0
-7,536,460,924,683,224,000
39.484663
212
0.68839
false
2.993648
false
false
false
Kiganshee/Flip-Sign
DisplayClasses.py
1
18270
from PIL import Image from PIL import ImageFont from PIL import ImageDraw from TransitionFunctions import * import copy import struct import serial from MessageClasses import * class Display(object): """ This class represents a display -- it has properties that specify its width and number of lines. It al...
cc0-1.0
6,451,781,360,778,824,000
47.850267
120
0.638588
false
4.446337
false
false
false
CSB-IG/miRNAseq_rnw
source_scripts_data/hiveplot/hiveplot_mirna_genes.py
2
4447
from pyveplot import * import networkx as nx import csv import argparse import math import progressbar def coords( radius, angle, origin=(0,0)): """ Returns a tuple of tuples of coordinates given a radius, angle and origin tuple """ return (origin[0] + round((radius * math.cos(math.radians(angle))), 2), ...
gpl-3.0
-6,586,333,391,598,297,000
26.968553
108
0.552732
false
2.954817
false
false
false
sivabalan/libSeek
Crawler4py/Config.py
1
5985
''' @Author: Rohan Achar ra.rohan@gmail.com ''' import sys from abc import * class Config: __metaclass__ = ABCMeta def __init__(self): #Number of Url Data Fetching Threads Allowed self.MaxWorkerThreads = 8 #Timeout(Seconds) for trying to get the next url from the fronti...
mit
-5,894,861,468,316,400,000
42.348148
164
0.643776
false
4.349564
false
false
false
GeoDaCenter/CAST
stars/visualization/DataWidget.py
1
13281
""" """ __author__ = "Xun Li <xunli@asu.edu>" __all__ = ['DataListCtrl','DataTablePanel','DataWidget'] import sys import wx import wx.lib.mixins.listctrl as listmix import wx.grid as gridlib import stars from stars.model import * from stars.visualization.EventHandler import * from stars.visualizati...
gpl-3.0
-3,815,400,464,194,120,700
36.178161
118
0.542354
false
3.947979
false
false
false
nik7273/computational-medical-knowledge
Area 51/TestingWikiAPIProperties.py
2
1571
# -*- coding: utf-8 -*- """ Created on Tue Dec 30 19:08:33 2014 @author: Nik """ import json, requests, sys, codecs, nltk from HTMLParser import HTMLParser #function to strip html tags: taken from http://stackoverflow.com/questions/753052/strip-html-from-strings-in-python """class MLStripper(HTMLParser): def __...
apache-2.0
-4,330,702,046,418,340,400
28.092593
141
0.651178
false
3.259336
false
false
false
mssalvador/WorkflowCleaning
semisupervised/labelpropagation/lp_generate_graph.py
1
2509
import pyspark.ml.linalg as ml_linalg from pyspark.mllib.linalg.distributed import MatrixEntry from pyspark.ml import feature from pyspark.sql.functions import udf import numpy as np def _compute_bfs(vec_1, vec_2, sigma=0.42): return np.exp(-vec_1.squared_distance(vec_2) / sigma ** 2) def _tolerance_cut(value, t...
apache-2.0
-6,512,979,471,076,784,000
32.013158
105
0.637704
false
3.229086
false
false
false
fabien-michel/mosen-recipes
Processors/FlatPkgVersioner.py
1
4455
# !/usr/bin/env python # # 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, softwa...
mit
6,184,062,797,420,564,000
35.52459
100
0.618406
false
4.02439
false
false
false
htygithub/bokeh
bokeh/server/views/doc_handler.py
2
3186
''' Provide a request handler that returns a page displaying a document. ''' from __future__ import absolute_import, print_function import logging log = logging.getLogger(__name__) import hashlib import random import time from tornado.web import RequestHandler from bokeh.embed import server_html_page_for_session f...
bsd-3-clause
2,699,243,066,116,979,700
37.853659
109
0.644696
false
4.159269
false
false
false
zyga/guacamole
guacamole/core.py
1
10843
# encoding: utf-8 # This file is part of Guacamole. # # Copyright 2012-2015 Canonical Ltd. # Written by: # Zygmunt Krynicki <zygmunt.krynicki@canonical.com> # # Guacamole is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3, # as published by ...
gpl-3.0
375,531,552,633,744,500
33.422222
79
0.657936
false
4.309618
false
false
false
Sivigik/Proutpulsor
app/main.py
1
4347
# ------------------------------------------------------------------------------- # Name: main - Proutpulsor # # Author: S.L-prog # # Licence: <GNU GENERAL PUBLIC LICENSE> # ------------------------------------------------------------------------------- import pygame from pygame.locals import * # Set th...
gpl-2.0
-286,329,088,505,806,270
30.737226
120
0.599264
false
3.359351
false
false
false
cardforcoin/chain-bitcoin-python
chain_bitcoin/tests/test_create_webhook.py
2
1730
from __future__ import absolute_import import sure from .. import Chain, NoApiKeyId, NoApiKeySecret, Webhook, create_webhook from .mock_http_adapter import * def test_create_webhook(): create_webhook(webhook_id=webhook_id, webhook_url=webhook_url, api_key_id=api_key_id, api_key_secret=api_key_...
mit
1,479,255,687,255,157,200
26.460317
77
0.660116
false
2.831424
false
false
false
chop-dbhi/serrano
serrano/urls.py
1
1536
from django.conf.urls import patterns, url, include from serrano.conf import dep_supported # Patterns for the data namespace data_patterns = patterns( '', url(r'^export/', include('serrano.resources.exporter')), url(r'^preview/', include('serrano.resources.preview')), ) # Patterns for the serrano names...
bsd-2-clause
7,945,734,449,250,110,000
23.380952
75
0.625651
false
3.737226
false
false
false
sorki/faf
src/pyfaf/opsys/centos.py
2
8825
# Copyright (C) 2013 ABRT Team # Copyright (C) 2013 Red Hat, Inc. # # This file is part of faf. # # faf 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) ...
gpl-3.0
-8,390,464,450,429,315,000
40.238318
83
0.475581
false
4.757412
false
false
false
anthonyalmarza/trex
tests/test_scripting.py
1
6913
import sys import hashlib import trex from trex import redis from twisted.internet import defer from twisted.trial import unittest from twisted.internet import reactor from twisted.python import failure from .mixins import Redis26CheckMixin, REDIS_HOST, REDIS_PORT class TestScripting(unittest.TestCase, Redis26Chec...
mit
-6,848,204,817,567,871,000
36.166667
84
0.54101
false
4.097807
true
false
false
jfterpstra/bluebottle
bluebottle/recurring_donations/serializers.py
1
1038
from bluebottle.recurring_donations.models import (MonthlyDonor, MonthlyDonorProject) from rest_framework import serializers from bluebottle.donations.models import Donation from bluebottle.projects.models import Project class MonthlyDonationProjectSerializer(seriali...
bsd-3-clause
-5,822,631,650,316,790,000
40.52
80
0.636802
false
4.654709
false
false
false
polymorphm/tpl-txt-gen
lib_tpl_txt_gen_2012_09_27/tpl_txt_gen.py
1
4774
# -*- mode: python; coding: utf-8 -*- # # Copyright 2012, 2013 Andrej A Antonov <polymorphm@gmail.com>. # # 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, ...
gpl-3.0
6,140,002,801,200,075,000
29.8
85
0.592585
false
3.726776
false
false
false
kingvuplus/nn-gui
lib/python/Components/Language.py
1
5367
import gettext from Tools.Directories import SCOPE_LANGUAGE, resolveFilename, fileExists import language_cache class Language: def __init__(self): gettext.install('enigma2', resolveFilename(SCOPE_LANGUAGE, ""), unicode=0, codeset="utf-8") self.activeLanguage = 0 self.lang = {} self.langlist = [] # FIXME m...
gpl-2.0
8,769,935,896,946,912,000
35.263514
116
0.642631
false
2.991639
false
false
false
PaloAltoNetworks-BD/SplunkforPaloAltoNetworks
Splunk_TA_paloalto/bin/lib/pan-python/lib/pan/commit.py
2
5068
# # Copyright (c) 2013-2014 Kevin Steves <kevin.steves@pobox.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AN...
isc
-1,830,847,370,469,896,400
25.957447
77
0.555051
false
3.807663
false
false
false
newerthcom/savagerebirth
libs/python-2.72/Stackless/test/test_pickle.py
1
1069
import sys, cPickle, pickle from stackless import * def run_pickled(func, *args): t = tasklet(func)(*args) print "starting tasklet" t.run() print "pickling" # hack for pickle if pickl == pickle: t.tempval = None pi = pickl.dumps(t) t.remove() #print pi file("temp.pickl...
gpl-2.0
5,018,692,409,707,227,000
19.557692
68
0.623012
false
3.239394
true
false
false
Orpheus11/nile
nile/db/models.py
1
4339
from nile.common import log as logging from nile.common import exception from nile.common.i18n import _ from nile.common import models from nile.common import pagination from nile.common import utils from nile.db import db_query from nile.db import get_db_api LOG = logging.getLogger(__name__) class DatabaseModelBase...
apache-2.0
-7,782,729,962,570,167,000
34.276423
126
0.555428
false
3.962557
false
false
false
jayceyxc/hue
desktop/core/ext-py/rsa-3.4.2/setup.py
9
2511
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses...
apache-2.0
8,079,674,007,353,006,000
40.147541
75
0.568924
false
4.114754
false
false
false
CatalystOfNostalgia/hoot
server/hoot/aws_module.py
1
1175
import json, boto, boto.s3.connection, bottlenose, os.path, time from boto.s3.key import Key from urllib.error import HTTPError # Load the AWS key information f = open(os.path.dirname(os.path.realpath(__file__)) + "/keys/aws_keys.json") configs = json.loads(f.read()) s3conn = boto.connect_s3(aws_access_key_id=configs...
mit
3,316,388,972,341,448,000
34.606061
117
0.639149
false
3.357143
true
false
false
mburgess00/brew_controller
brew_gui.py
1
2691
#!/usr/bin/env python3 from guizero import App, Text, Slider, Combo, PushButton, Box, Picture pause = True def readsensors(): return {"hlt" : 160, "rims" : 152, "bk" : 75} def handlepause(): global pause global pauseState print("Pause Button pressed") if pause: print("running") pa...
apache-2.0
-2,969,034,358,908,253,000
37.442857
91
0.668525
false
2.737538
false
false
false
tbpmig/mig-website
bookswap/migrations/0002_faqitem_locationimage.py
1
1308
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import stdimage.models class Migration(migrations.Migration): dependencies = [ ('bookswap', '0001_initial'), ] operations = [ migrations.CreateModel( name='FAQItem', ...
apache-2.0
1,716,465,798,750,666,500
31.7
114
0.529052
false
4.791209
false
false
false
Jpadilla1/notaso
notaso/universities/models.py
1
1258
from django.db import models from ..professors.models import Professor def get_upload_file_name(intance, filename): return "static/uploaded_files/%s" % (filename) class University(models.Model): name = models.CharField(max_length=50) city = models.CharField(max_length=25) emblem = models.FileField(...
mit
2,519,322,818,903,721,500
25.208333
68
0.572337
false
3.755224
false
false
false
JoyTeam/metagam
mg/constructor/library.py
1
23694
#!/usr/bin/python2.6 # This file is a part of Metagam project. # # Metagam 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 # any later version. # # Metagam is distributed ...
gpl-3.0
2,122,445,489,926,149,000
45.826087
404
0.525618
false
4.027537
false
false
false
nbstr/demineur
beautiful.py
1
1191
#=========================================# # BEAUTIFUL # #=========================================# #=========================================# # HEADER # #=========================================# def header(text="DÉMINEUR", vp=1, p=6, m=7, s="#", s2=...
unlicense
-3,643,178,339,065,126,400
26.651163
94
0.355219
false
3.689441
false
false
false
googleapis/python-dataproc-metastore
google/cloud/metastore_v1alpha/services/dataproc_metastore/client.py
1
77386
# -*- 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,842,710,492,423,436,000
42.184152
171
0.611713
false
4.744697
false
false
false
sgallagher/anaconda
pyanaconda/modules/common/structures/validation.py
6
1962
# # DBus structures for validation. # # Copyright (C) 2019 Red Hat, Inc. All rights reserved. # # 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...
gpl-2.0
-5,752,579,340,876,340,000
27.852941
71
0.66106
false
4.139241
false
false
false