repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | 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 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
partofthething/home-assistant | homeassistant/components/pushsafer/notify.py | 1 | 6128 | """Pushsafer platform for notify component."""
import base64
import logging
import mimetypes
import requests
from requests.auth import HTTPBasicAuth
import voluptuous as vol
from homeassistant.components.notify import (
ATTR_DATA,
ATTR_TARGET,
ATTR_TITLE,
ATTR_TITLE_DEFAULT,
PLATFORM_SCHEMA,
B... | mit | -6,397,761,538,905,725,000 | 35.915663 | 86 | 0.602807 | false | 3.794427 | false | false | false |
thortex/rpi3-webiopi | webiopi_0.7.1/python/webiopi/devices/onewire.py | 1 | 2571 | # Copyright 2012-2013 Eric Ptak - trouch.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 | -53,284,425,979,220,800 | 33.743243 | 107 | 0.558149 | false | 3.709957 | false | false | false |
NumCosmo/NumCosmo | examples/example_ode_spline.py | 1 | 1165 | #!/usr/bin/env python
try:
import gi
gi.require_version('NumCosmo', '1.0')
gi.require_version('NumCosmoMath', '1.0')
except:
pass
import ctypes
from math import *
from gi.repository import NumCosmoMath as Ncm
from gi.repository import NumCosmo as Nc
from gi.repository import GObject
#
# Initializing the lib... | gpl-3.0 | 8,754,895,868,490,639,000 | 19.438596 | 137 | 0.64206 | false | 2.377551 | true | false | false |
Geodan/natuurbandmodel | server-wps/wildfire_makelcp.py | 1 | 1431 | from geoserver.wps import process
from com.ziclix.python.sql import zxJDBC
jdbc_url = "jdbc:postgresql://192.168.40.5:3389/research"
username = "modeluser"
password = "modeluser"
driver = "org.postgresql.Driver"
cgi_url = "http://model.geodan.nl/main/gmi/cgi-bin/"
@process(
title='MakeLcp',
description='... | mit | 4,120,670,946,866,093,600 | 25 | 108 | 0.638714 | false | 2.873494 | false | false | false |
chaowu2009/stereo-vo | tools/capture_TwoCameras_saveImagesOnly.py | 1 | 2289 | import numpy as np
import cv2
import time
import matplotlib.pylab as plt
"""
Make sure that you hold the checkerboard horizontally (more checkers horizontally than vertically).
In order to get a good calibration you will need to move the checkerboard around in the camera frame such that:
the checkerboard is det... | mit | -5,414,921,834,074,587,000 | 25.929412 | 111 | 0.678462 | false | 3.093243 | false | false | false |
dnikulin/jula | scripts/make_classes.py | 1 | 3287 | # Copyright (C) 2011 Dmitri Nikulin
#
# 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 | -7,478,729,938,186,849,000 | 30.912621 | 81 | 0.531488 | false | 3.542026 | false | false | false |
MarkusHackspacher/unknown-horizons | horizons/ai/aiplayer/building/firestation.py | 1 | 3179 | # ###################################################
# Copyright (C) 2008-2017 The Unknown Horizons Team
# team@unknown-horizons.org
# This file is part of Unknown Horizons.
#
# Unknown Horizons is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published ... | gpl-2.0 | -1,032,238,161,009,814,300 | 38.246914 | 159 | 0.754954 | false | 3.563901 | false | false | false |
EDUlib/eTracesX | Scripts/ExtractCours.py | 1 | 2359 | #!/usr/bin/python
import sys
import getopt
import re
import random
def main(argv):
inputfile = ''
outputfile = ''
try:
opts, args = getopt.getopt(argv,"hi:o:",["ifile=","ofile="])
except getopt.GetoptError:
print 'test.py -i <inputfile> -o <outputfile>'
sys.exit(2)
for opt,... | agpl-3.0 | 3,712,799,693,199,665,700 | 34.208955 | 119 | 0.447647 | false | 3.804839 | false | false | false |
imsplitbit/nova | nova/api/openstack/compute/contrib/cells.py | 1 | 15576 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011-2012 OpenStack Foundation
# 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-2.0 | 7,603,201,070,921,146,000 | 34.806897 | 78 | 0.596944 | false | 4.070029 | false | false | false |
inflatus/Python | Weather/weather_email.py | 1 | 2252 | # using JSON and the WeatherUnderground API
# parsing data and emailing it to myself
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import urllib.request
import json
from API_KEYS import EMAIL_ADDRESS, EMAIL_PASSWORD
from API_KEYS import WEATHER_UNDERGROUND_KEY
# g... | mit | -1,424,017,478,444,561,400 | 36.533333 | 137 | 0.709147 | false | 3.273256 | false | false | false |
academic-colab/maslo-server | FTS.py | 1 | 5261 | #!/usr/bin/env python
'''
/******************************************************************************
* FTS.py
*
* Copyright (c) 2011-2012, Academic ADL Co-Lab, University of Wisconsin-Extension
* http://www.academiccolab.org/
*
* This library is free software; you can redistribute it and/or
* modify it under the ... | gpl-3.0 | 3,676,473,972,005,454,000 | 27.437838 | 123 | 0.657099 | false | 3.1731 | false | false | false |
madformuse/server | server/natpacketserver.py | 1 | 1848 | import socket
from server.subscribable import Subscribable
from .decorators import with_logger
@with_logger
class NatPacketServer(Subscribable):
def __init__(self, loop, port):
super().__init__()
self.loop = loop
self.port = port
self._logger.debug("{id} Listening on {port}".forma... | gpl-3.0 | -7,447,576,450,279,924,000 | 31.421053 | 87 | 0.523268 | false | 3.882353 | false | false | false |
rossweinstein/Evolutionary-Computing-Python | src/main/Main.py | 1 | 1131 | from src.ecSystem.ECSystem import ECSystem
from src.ecSystem.ECSystemParameters import ECSystemParameters
# Where we actually run our EC System
params = ECSystemParameters()
# Governs the number of expressions in each generation
params.generation_size = 200
# Governs the length of the expressions in the initial pop... | mit | 5,219,184,992,717,285,000 | 32.264706 | 98 | 0.769231 | false | 3.25 | false | false | false |
tung18tht/ICDAR-2017-Post-OCR-Correction | errors_detection/find_suspicious_eng_words.py | 1 | 1754 | import os, linecache, re, json
work_directory_path = os.path.dirname(os.path.realpath(__file__))
eng_words_file = open(work_directory_path + "/eng_words.txt", "rU")
eng_words = set()
for word in eng_words_file:
eng_words |= {word.rstrip()}
data_directory_path = work_directory_path + "/ICDAR2017_datasetPostOCR_Eval... | mit | 7,360,763,077,504,529,000 | 36.340426 | 108 | 0.622007 | false | 3.137746 | false | false | false |
loli/medpy | doc/numpydoc/numpydoc/comment_eater.py | 1 | 5357 |
import sys
if sys.version_info[0] >= 3:
from io import StringIO
else:
from io import StringIO
import compiler
import inspect
import textwrap
import tokenize
from .compiler_unparse import unparse
class Comment(object):
""" A comment block.
"""
is_comment = True
def __init__(self, start_line... | gpl-3.0 | -5,297,312,438,764,370,000 | 30.698225 | 86 | 0.581296 | false | 3.953506 | false | false | false |
jeremiahyan/odoo | addons/crm_iap_lead/models/crm_iap_lead_mining_request.py | 1 | 15651 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
from odoo import api, fields, models, _
from odoo.addons.iap.tools import iap_tools
from odoo.exceptions import UserError
_logger = logging.getLogger(__name__)
DEFAULT_ENDPOINT = 'https://iap-services.o... | gpl-3.0 | 4,967,390,844,346,431,000 | 45.580357 | 188 | 0.615104 | false | 3.729092 | false | false | false |
Rocamadour7/ml_tutorial | 05. Clustering/titanic-data-example.py | 1 | 1721 | import numpy as np
from sklearn.cluster import KMeans
from sklearn import preprocessing
import pandas as pd
'''
Pclass Passenger Class (1 = 1st; 2 = 2nd; 3 = 3rd)
survival Survival (0 = No; 1 = Yes)
name Name
sex Sex
age Age
sibsp Number of Siblings/Spouses Aboard
parch Number of Parents/Children Aboard
ticket Ticket ... | mit | 7,085,823,906,355,869,000 | 26.31746 | 77 | 0.646717 | false | 3.106498 | false | false | false |
scudre/alarm-central-station-receiver | alarm_central_station_receiver/contact_id/callup.py | 1 | 3225 | """
Copyright (2018) Chris Scuderi
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, softwar... | apache-2.0 | 6,096,464,687,842,636,000 | 26.801724 | 83 | 0.613953 | false | 3.698394 | false | false | false |
google/tangent | tests/test_optimization.py | 1 | 2734 | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | apache-2.0 | 2,331,356,449,715,369,500 | 18.528571 | 79 | 0.517191 | false | 2.968512 | true | false | false |
huytd/dejavu | dejavu/fingerprint.py | 1 | 6020 | import numpy as np
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt
from scipy.ndimage.filters import maximum_filter
from scipy.ndimage.morphology import (generate_binary_structure,
iterate_structure, binary_erosion)
import hashlib
from operator import itemgetter
IDX... | mit | -8,347,237,291,707,981,000 | 36.391304 | 148 | 0.589535 | false | 3.886378 | false | false | false |
chanchett/ds3_python_sdk_ | ds3/ds3.py | 1 | 30418 | # Copyright 2014-2015 Spectra Logic Corporation. 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. A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "lic... | apache-2.0 | 667,016,001,873,500,500 | 42.148041 | 162 | 0.642284 | false | 3.809393 | false | false | false |
batermj/algorithm-challenger | code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Lib/_pyio.py | 1 | 93037 | """
Python implementation of the io module.
"""
import os
import abc
import codecs
import errno
import stat
import sys
# Import _thread instead of threading to reduce startup cost
from _thread import allocate_lock as Lock
if sys.platform in {'win32', 'cygwin'}:
from msvcrt import setmode as _setmode
else:
_set... | apache-2.0 | 3,254,690,779,113,176,000 | 33.70235 | 86 | 0.567581 | false | 4.483711 | false | false | false |
JoEiner/hasheddict | hasheddict/__init__.py | 1 | 10088 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
from zlib import crc32
from hashlib import sha256
from math import log, ceil
import collections
import threading
__all__ = ['HashedDict']
__version__ = "0.1.0"
__author__ = "Johannes Schreiner, johannes@schreiner.io"
__credits__ = ["Johannes Schreiner"]
__url... | gpl-3.0 | 3,286,080,142,900,720,000 | 33.19661 | 95 | 0.54322 | false | 3.56089 | false | false | false |
eriksonJAguiar/TCC-UENP-Codigos | My_codes/tools-sentiment/word_freq.py | 1 | 4759 | import nltk
import pandas as pd
import re
from googletrans import Translator
from unicodedata import normalize
def read_csv(file):
df1 = pd.DataFrame.from_csv('files_extern/%s.csv'%(file),sep=';',index_col=0,encoding ='ISO-8859-1')
df1 = df1.reset_index()
return df1
def write_csv(data,file):
d... | gpl-3.0 | -3,722,365,995,457,834,500 | 26.039773 | 133 | 0.566085 | false | 2.735057 | false | false | false |
evereux/flask_template | application/models.py | 1 | 2773 | import datetime
from application import db
from config import admin_group_name
Base = db.Model
username_maxlength = 24
name_maxlength = 60
email_maxlength = 24
group_maxlength = 64
groups = db.Table('groups',
db.Column('user_id', db.Integer, db.ForeignKey('users.id')),
db.Colum... | mit | 7,453,348,614,232,633,000 | 29.472527 | 80 | 0.547782 | false | 4.030523 | false | false | false |
bringsvor/bc_website_purchase | controllers/main.py | 1 | 11590 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | agpl-3.0 | -1,163,517,802,710,959,900 | 41.925926 | 120 | 0.605091 | false | 3.65846 | false | false | false |
philanthropy-u/edx-platform | openedx/features/partners/admin.py | 1 | 1216 | from django.contrib import admin
from django.urls import reverse
from .models import Partner, PartnerCommunity, PartnerUser
class PartnerAdmin(admin.ModelAdmin):
"""
Django admin customizations for Partner model
"""
list_display = ('id', 'label', 'slug', 'partner_url')
readonly_fields = ('partner... | agpl-3.0 | 6,408,310,665,756,646,000 | 28.658537 | 113 | 0.702303 | false | 4.251748 | false | false | false |
vialectrum/vialectrum | electrum_ltc/gui/qt/seed_dialog.py | 1 | 9848 | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2013 ecdsa@github
#
# 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 li... | mit | 6,886,666,293,626,559,000 | 40.906383 | 128 | 0.60134 | false | 3.9392 | false | false | false |
hahnicity/ace | chapter1/problem3.py | 1 | 1222 | """
Problem 3.
calculate the time series
yt = 5 + .05 * t + Et (Where E is epsilon)
for years 1960, 1961, ..., 2001 assuming Et independently and
identically distributed with mean 0 and sigma 0.2.
"""
from random import uniform
from matplotlib.pyplot import plot, show
from numpy import array, polyfit, poly1d
def ... | unlicense | -3,859,389,947,506,041,300 | 25 | 79 | 0.644845 | false | 3.215789 | false | false | false |
robertsj/poropy | pyqtgraph/ThreadsafeTimer.py | 1 | 1600 | from pyqtgraph.Qt import QtCore, QtGui
class ThreadsafeTimer(QtCore.QObject):
"""
Thread-safe replacement for QTimer.
"""
timeout = QtCore.Signal()
sigTimerStopRequested = QtCore.Signal()
sigTimerStartRequested = QtCore.Signal(object)
def __init__(self):
QtCore... | mit | 4,284,573,127,986,131,500 | 37.073171 | 99 | 0.6225 | false | 4.383562 | false | false | false |
glaserti/LibraryTwitter | Python/1 - CSV from HTMLsource.py | 1 | 7213 | #
# Scraping website for information about libraries
#
# For getting information about the libraries, the database of the German Library Statistics (Deutsche Bibliotheksstatistik/DBS) which is hosted by the HBZ was used:
#
# http://www.bibliotheksstatistik.de/eingabe/dynrep/adrbrowser/bibs.php
#
# For this project, ... | mit | 6,047,267,657,044,713,000 | 43.239264 | 611 | 0.675912 | false | 2.966269 | false | false | false |
mispencer/ycmd | ycmd/completers/typescript/typescript_completer.py | 1 | 22168 | # Copyright (C) 2015 - 2016 Google Inc.
# 2016 ycmd contributors
#
# This file is part of ycmd.
#
# ycmd 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 ... | gpl-3.0 | -6,037,105,945,986,100,000 | 32.844275 | 119 | 0.597483 | false | 4.056359 | false | false | false |
Veil-Framework/Veil | tools/evasion/payloads/python/shellcode_inject/letter_substitution.py | 1 | 9106 | """
Currently, this code takes normal shellcode, and replaces the a hex character
with a random non hex letter. At runtime,
the executables reverses the letter substitution and executes the shellcode
Letter substitution code was adapted from:
http://www.tutorialspoint.com/python/string_maketrans.htm
Module built... | gpl-3.0 | -4,467,505,317,799,974,000 | 64.985507 | 336 | 0.613222 | false | 3.526723 | false | false | false |
dbarsam/python-vsgen | tests/__main__.py | 1 | 2305 | # -*- coding: utf-8 -*-
"""
This module executes vsgen unittests (i.e. all tests in the current folder). It exists as an alernative to the command line interface::
> python -m unittest discover --start-directory . --pattern test*.py
For more testing options see the unittest documentation available at https://doc... | mit | 1,336,034,135,707,171,300 | 51.386364 | 351 | 0.71974 | false | 4.022688 | true | false | false |
pombredanne/https-gitlab.lrde.epita.fr-vcsn-vcsn | tests/python/complete.py | 1 | 1949 | #! /usr/bin/env python
import vcsn
from test import *
# check complete algorithm
# ------------------------
def check(i, o):
if isinstance(i, str):
i = vcsn.automaton(i)
CHECK(not i.is_complete())
o = vcsn.automaton(o)
CHECK(o.is_complete())
CHECK_EQ(o, i.complete())
# Idempotence.
... | gpl-3.0 | 1,662,478,737,304,644,900 | 16.247788 | 55 | 0.50077 | false | 2.527886 | false | false | false |
fireeye/flare-wmi | python-cim/samples/show_CCM_RecentlyUsedApps.py | 1 | 2035 | import logging
from cim import CIM
from cim.objects import Namespace
def main(type_, path):
if type_ not in ("xp", "win7"):
raise RuntimeError("Invalid mapping type: {:s}".format(type_))
Values = ["FolderPath", "ExplorerFileName", "FileSize", "LastUserName", "LastUsedTime", "TimeZoneOffset",
... | apache-2.0 | -777,082,851,250,680,000 | 43.23913 | 115 | 0.519902 | false | 4.339019 | false | false | false |
poldrack/openfmri | openfmri_paper/2.8_make_allmean_file.py | 1 | 1497 | """
make alist of all contrasts/tasks
"""
import pickle
from get_contrasts_to_use import *
c=get_contrasts_to_use()
outdir='/corral-repl/utexas/poldracklab/openfmri/analyses/paper_analysis_Dec2012/data_prep'
infodir='/corral-repl/utexas/poldracklab/openfmri/analyses/paper_analysis_Dec2012/data_prep'
f=open(os.path.... | bsd-2-clause | -8,475,441,843,590,455,000 | 27.245283 | 133 | 0.651971 | false | 2.275076 | false | false | false |
untitaker/vdirsyncer | vdirsyncer/sync/__init__.py | 1 | 11708 | # -*- coding: utf-8 -*-
'''
The `sync` function in `vdirsyncer.sync` can be called on two instances of
`Storage` to synchronize them. Apart from the defined errors, this is the only
public API of this module.
The algorithm is based on the blogpost "How OfflineIMAP works" by Edward Z.
Yang: http://blog.ezyang.com/2012/... | mit | -1,180,072,998,141,565,400 | 34.91411 | 78 | 0.562948 | false | 4.068103 | false | false | false |
automl/SpySMAC | cave/analyzer/base_analyzer.py | 1 | 5492 | import logging
from collections import OrderedDict
from typing import Tuple
from bokeh.io import output_notebook
from bokeh.plotting import show
from cave.html.html_builder import HTMLBuilder
from cave.reader.runs_container import RunsContainer
from cave.utils.exceptions import Deactivated
class BaseAnalyzer(object... | bsd-3-clause | -1,194,562,411,713,696,500 | 44.766667 | 120 | 0.628186 | false | 4.483265 | false | false | false |
lizardsystem/lizard5-apps | lizard_rainapp/views.py | 1 | 5811 | # (c) Nelen & Schuurmans. GPL licensed, see LICENSE.rst.
# -*- coding: utf-8 -*-
"""Views for the RainApp, mostly a page to upload new region shapefiles."""
# Python 3 is coming
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import
from __future__ import... | lgpl-3.0 | 6,633,258,897,341,782,000 | 31.646067 | 79 | 0.601101 | false | 4.153681 | true | false | false |
xigt/freki | freki/text2freki.py | 1 | 6059 | from freki.serialize import FrekiDoc, FrekiBlock, FrekiLine
import codecs
import re
import chardet
import logging
import argparse
def run(args):
frek = read_and_convert(args.infile, args.igtfile, args.encoding, args.detect)
out = open(args.outfile, 'w', encoding='utf8')
out.write(str(frek))
def convert_... | mit | 3,247,367,411,610,069,000 | 41.083333 | 142 | 0.592837 | false | 3.714899 | false | false | false |
deadc0de6/pyircbot | libirc.py | 1 | 18336 | # author: deadc0de6
# contact: https://github.com/deadc0de6
#
# python IRC library
#
# Copyright (C) 2015 deadc0de6
# 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 Lice... | gpl-2.0 | -3,772,198,053,339,212,000 | 31.39576 | 104 | 0.602694 | false | 3.322943 | false | false | false |
endlessm/chromium-browser | third_party/catapult/telemetry/telemetry/timeline/thread.py | 1 | 9786 | # Copyright 2014 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.
import telemetry.timeline.async_slice as async_slice_module
import telemetry.timeline.event_container as event_container
import telemetry.timeline.flow_event ... | bsd-3-clause | -2,363,025,247,585,198,600 | 35.514925 | 80 | 0.647456 | false | 3.912835 | false | false | false |
saguas/jasper_erpnext_report | jasper_erpnext_report/utils/jasper_iter_hooks.py | 1 | 1437 | from __future__ import unicode_literals
__author__ = 'luissaguas'
import frappe
from frappe import _
"""
HOOKS:
jasper_after_sendmail(data, url, file_name, file_path); jasper_before_sendmail(data, file_name, output, url, **kargs);
jasper_after_get_report(file_name, file_output, url, filepath); jasper_before_get_... | mit | 6,848,915,279,601,715,000 | 30.933333 | 125 | 0.712596 | false | 2.932653 | false | false | false |
tbtraltaa/medianshape | medianshape/simplicial/surfgen.py | 1 | 10038 | # encoding: utf-8
'''
2D surface embedded in 3D
-------------------------
'''
from __future__ import absolute_import
import importlib
import os
import numpy as np
from medianshape.simplicial import pointgen3d, mesh, utils
from medianshape.simplicial.meshgen import meshgen2d
import matplotlib.pyplot as plt
from mpl_t... | gpl-3.0 | -5,031,703,206,285,976,000 | 37.1673 | 90 | 0.5789 | false | 2.551601 | false | false | false |
alex/kombu-fernet-serializers | setup.py | 1 | 1648 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import kombu_fernet
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
packages = [
'kombu_fernet',
'kombu... | mit | 423,783,469,457,479,940 | 25.580645 | 78 | 0.633495 | false | 3.419087 | false | false | false |
globaltoken/globaltoken | test/functional/rpc_rawtransaction.py | 1 | 18199 | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the rawtransaction RPCs.
Test the following RPCs:
- createrawtransaction
- signrawtransacti... | mit | 7,541,542,807,572,354,000 | 54.654434 | 233 | 0.658882 | false | 3.66472 | true | false | false |
L337hium/dhquery | dhquery.py | 1 | 7156 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fileencoding=utf-8
# vim:tabstop=2
from random import Random
from optparse import OptionParser
from pydhcplib.dhcp_packet import DhcpPacket
from pydhcplib.dhcp_network import DhcpClient
from pydhcplib.type_hw_addr import hwmac
from pydhcplib.type_ipv4 import ipv4
imp... | gpl-2.0 | -6,692,521,198,314,802,000 | 29.712446 | 157 | 0.670486 | false | 2.9054 | false | false | false |
AHJenin/acm-type-problems | Timus/AC/1197-Lonesome_Knight.py | 1 | 1209 | #!/usr/bin/env python3
#
# FILE: 1197-Lonesome_Knight.py
#
# @author: Arafat Hasan Jenin <opendoor.arafat[at]gmail[dot]com>
#
# LINK:
#
# DATE CREATED: 15-06-18 15:40:41 (+06)
# LAST MODIFIED: 15-06-18 17:29:41 (+06)
#
# VERDICT: Accepted
#
# DEVELOPMENT HISTORY:
# Date Version Description
# ---------------... | mit | 8,361,550,323,378,487,000 | 27.116279 | 78 | 0.322581 | false | 2.503106 | false | false | false |
nikofil/invenio-search-ui | invenio_search_ui/views.py | 1 | 2169 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015, 2016 CERN.
#
# Invenio 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... | gpl-2.0 | 7,984,396,494,800,520,000 | 30.897059 | 76 | 0.68142 | false | 3.894075 | false | false | false |
dmilith/SublimeText3-dmilith | Packages/pyte/all/pyte/screens.py | 1 | 46773 | # -*- coding: utf-8 -*-
"""
pyte.screens
~~~~~~~~~~~~
This module provides classes for terminal screens, currently
it contains three screens with different features:
* :class:`~pyte.screens.Screen` -- base screen implementation,
which handles all the core escape sequences, recognized by
... | mit | 3,143,114,599,980,431,000 | 34.434091 | 79 | 0.564834 | false | 4.160559 | false | false | false |
suraj-jayakumar/lstm-rnn-ad | src/testdata/random_data_time_series/generate_data.py | 1 | 1042 | # -*- coding: utf-8 -*-
"""
Created on Tue Feb 23 11:15:12 2016
@author: suraj
"""
import random
import numpy as np
import pickle
import matplotlib.pyplot as plt
attachRateList = []
for i in range(3360):
attachRateList.append(random.uniform(4,6))
attachRateList = np.array(attachRateList)
encoded_attach_rate... | apache-2.0 | -7,580,691,378,354,332,000 | 23.809524 | 245 | 0.716891 | false | 2.713542 | false | false | false |
kalyptorisk/daversy | src/daversy/difflib_ext.py | 1 | 8527 | import re, difflib
def merge_group(list, func, start=True, end=True):
l, r, s = list[0]
first = ['',' class="first"'][start]
last = ['',' class="last"'][end]
if len(list) == 1:
if start and end:
return LINE_FORMAT % func(' class="first last"', l, r)
else:
retur... | gpl-2.0 | -9,172,895,471,794,657,000 | 26.156051 | 129 | 0.606661 | false | 2.854704 | false | false | false |
sugarlabs/sugar-toolkit-gtk3 | src/sugar3/graphics/radiotoolbutton.py | 1 | 7756 | # Copyright (C) 2007, Red Hat, Inc.
# Copyright (C) 2007-2008, One Laptop Per Child
#
# This library 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 2 of the License, or (at your option... | lgpl-2.1 | 3,167,136,973,559,909,400 | 29.777778 | 76 | 0.618747 | false | 4.010341 | false | false | false |
hackthemarket/pystrat | sim.py | 1 | 10697 | # simple trading strategy simulator
import pandas as pd
from pandas.tools.plotting import autocorrelation_plot
from pandas.tools.plotting import scatter_matrix
import numpy as np
from scipy import stats
import sklearn
from sklearn import preprocessing as pp
import matplotlib as mpl
import matplotlib.pyplot as plt
f... | gpl-3.0 | 3,906,262,475,805,889,000 | 32.015432 | 84 | 0.597177 | false | 3.08894 | false | false | false |
douglaskastle/bootswatch | convert_bootswatch_mutara.py | 1 | 7972 | import re
import os
values = {
# 'uc': 'Grissom',
'lc': 'mutara',
'header': 'Michroma',
'body': 'Play',
'website': 'mavek_org',
# 'cl': '#116BB7',
}
def main():
src = 'cyborg'
cmd = 'cp -r {0}/* {1}'.format(src, values['lc'])
os.system(cmd)
infile = "{0}/bootsw... | mit | -6,429,890,791,821,344,000 | 53.97931 | 159 | 0.49147 | false | 3.551002 | false | false | false |
sony/nnabla | python/src/nnabla/models/imagenet/densenet.py | 1 | 2722 | # Copyright 2019,2020,2021 Sony Corporation.
#
# 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... | apache-2.0 | 6,252,650,887,576,425,000 | 38.449275 | 179 | 0.669361 | false | 3.764869 | false | false | false |
robertostling/efselab | scripts/conll2tab.py | 1 | 1221 | # Script to convert CoNLL files with tag+morphology into the simple two-column
# format assumed by efselab.
#
# If only the tag is required, conversion can more easily be done like this:
#
# cut -f 2,4 file.conll >file.tab
"""
cat /home/corpora/SUC3.0/corpus/conll/blogs.conll /home/corpora/SUC3.0/corpus/conll/suc-trai... | gpl-3.0 | -248,659,985,629,635,300 | 34.911765 | 161 | 0.600328 | false | 2.806897 | false | false | false |
mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/eggs/nose-0.11.1-py2.7.egg/nose/proxy.py | 1 | 5945 | """
Result Proxy
------------
The result proxy wraps the result instance given to each test. It
performs two functions: enabling extended error/failure reporting
and calling plugins.
As each result event is fired, plugins are called with the same event;
however, plugins are called with the nose.case.Test instance tha... | gpl-3.0 | 5,547,417,367,787,775,000 | 34.386905 | 77 | 0.622876 | false | 4.195483 | true | false | false |
meowtec/page-navigator | example.py | 1 | 2364 | # coding:utf-8
html_tpl = '''
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
.nav{
margin: 10px 0;
font-size: 12px;
font-family: "Helvetica", "Arial", sans-serif;
}
.nav a{
text-decoration: none;
color: #000... | mit | -406,984,751,838,615,360 | 24.736264 | 134 | 0.551665 | false | 2.548422 | false | false | false |
ehovind/extensible-ebook-converter | eecon_fetcher.py | 1 | 3151 | #!/usr/bin/env python
"""
This file is part of Extensible eBook Converter (EeCon),
an advanced ebook analysis and conversion tool.
Copyright (C) 2012 Espen Hovind <espehov@ifi.uio.no>
EeCon is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the ... | gpl-3.0 | 6,881,548,638,896,659,000 | 29.009524 | 80 | 0.535386 | false | 4.954403 | false | false | false |
albert12132/templar | templar/cli/templar.py | 1 | 2179 | """Command-line interface for templar."""
from templar.api import config
from templar.api import publish
from templar.exceptions import TemplarError
import templar
import argparse
import logging
import sys
LOGGING_FORMAT = '%(levelname)s %(filename)s:%(lineno)d> %(message)s'
logging.basicConfig(format=LOGGING_FORMAT... | mit | -8,073,542,425,977,757,000 | 33.046875 | 77 | 0.58972 | false | 4.446939 | true | false | false |
hammerlab/immuno | immuno/immunogenicity.py | 1 | 5849 | # Copyright (c) 2014. Mount Sinai School of Medicine
#
# 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... | apache-2.0 | -1,123,639,031,035,863,000 | 35.786164 | 80 | 0.618396 | false | 3.83541 | false | false | false |
Gabriel-p/mcs_rot_angles | aux_modules/validation_set.py | 1 | 10176 |
import os
from astropy.io import ascii
from astropy.table import Table
from astropy.coordinates import Distance, Angle, SkyCoord
from astropy import units as u
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import sys
# Change path so that we can import functions from the '... | gpl-3.0 | -6,003,738,110,879,360,000 | 34.552448 | 79 | 0.564123 | false | 2.680728 | false | false | false |
wxgeo/geophar | wxgeometrie/sympy/polys/tests/test_numberfields.py | 4 | 28618 | """Tests for computational algebraic number field theory. """
from sympy import (S, Rational, Symbol, Poly, sqrt, I, oo, Tuple, expand,
pi, cos, sin, exp)
from sympy.utilities.pytest import raises, slow
from sympy.core.compatibility import range
from sympy.polys.numberfields import (
minimal_polynomial,
... | gpl-2.0 | -7,219,002,142,231,568,000 | 37.005312 | 154 | 0.586379 | false | 2.645895 | true | false | false |
pligor/predicting-future-product-prices | 04_time_series_prediction/gp_opt/price_history_27_gp_opt.py | 1 | 6918 | from models.model_21_price_history_seq2seq_dyn_dec_ins import PriceHistorySeq2SeqDynDecIns
import pickle
import dill
from os import path, remove
import numpy as np
from skopt.space.space import Integer, Real, Categorical
from skopt import gp_minimize
import tensorflow as tf
from mylibs.jupyter_notebook_helper import M... | agpl-3.0 | -3,510,144,819,399,291,400 | 44.81457 | 131 | 0.616941 | false | 3.666137 | false | false | false |
marcomaccio/python-docs-samples | scripts/auto_link_to_docs.py | 1 | 3864 | #!/usr/bin/env python
# Copyright (C) 2013 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | apache-2.0 | 8,503,063,250,779,012,000 | 25.833333 | 77 | 0.627329 | false | 3.503173 | false | false | false |
dominicelse/scipy | benchmarks/benchmarks/sparse.py | 1 | 10059 | """
Simple benchmarks for the sparse module
"""
from __future__ import division, print_function, absolute_import
import warnings
import time
import timeit
import numpy
import numpy as np
from numpy import ones, array, asarray, empty, random, zeros
try:
from scipy import sparse
from scipy.sparse import (csr_m... | bsd-3-clause | 3,352,419,571,991,209,000 | 27.019499 | 77 | 0.532856 | false | 3.363089 | false | false | false |
googleapis/googleapis-gen | google/ads/googleads/v8/googleads-py/tests/unit/gapic/googleads.v8/services/test_custom_audience_service.py | 1 | 35288 | # -*- 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 | -7,432,984,637,234,446,000 | 42.836025 | 217 | 0.682555 | false | 4.066375 | true | false | false |
coronary/RandomEpisode | depends/Lib/site-packages/tmdbsimple/people.py | 1 | 7235 | # -*- coding: utf-8 -*-
"""
tmdbsimple.people
~~~~~~~~~~~~~~~~~
This module implements the People, Credits, and Jobs functionality
of tmdbsimple.
Created by Celia Oakley on 2013-10-31.
:copyright: (c) 2013-2017 by Celia Oakley
:license: GPLv3, see LICENSE for more details
"""
from .base import TMDB
class People(T... | mit | 481,468,421,621,754,600 | 27.710317 | 80 | 0.581617 | false | 4.170029 | false | false | false |
ruslanloman/nova | nova/virt/libvirt/volume/volume.py | 1 | 16814 | # Copyright 2011 OpenStack Foundation
# (c) Copyright 2013 Hewlett-Packard Development Company, L.P.
# 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
#
# ... | apache-2.0 | -3,995,553,806,361,658,000 | 40.210784 | 79 | 0.591352 | false | 4.235264 | true | false | false |
Quihico/repository.spartacus | script.trtv/streaming.py | 1 | 24691 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2014 Sean Poyser and Richard Dean (write2dixie@gmail.com) - With acknowledgement to some original code by twinther (Tommy Winther)
#
import xbmc
from xml.etree import ElementTree
from xml.parsers.expat import ExpatError
import ConfigParser
import os
import re
import xbm... | gpl-2.0 | 8,102,808,333,039,620,000 | 40.849153 | 403 | 0.507108 | false | 4.081832 | false | false | false |
moorecoin/MooreCoinMiningAlgorithm | contrib/devtools/update-translations.py | 1 | 6779 | #!/usr/bin/python
# copyright (c) 2014 wladimir j. van der laan
# distributed under the mit software license, see the accompanying
# file copying or http://www.opensource.org/licenses/mit-license.php.
'''
run this script from the root of the repository to update all translations from
transifex.
it will do the following... | mit | -6,915,173,566,015,647,000 | 35.446237 | 121 | 0.618675 | false | 4.169127 | false | false | false |
kssim/efp | making_decisions/python/bmi_calculator.py | 1 | 1254 | # Pratice 19. BMI Calculator
# Output:
# Your BMI is 19.5.
# You are within the ideal weight range.
# Or
# Your BMI is 32.5.
# You are overweight. You should see your doctor.
# Formula:
# bmi = (weight / (height x height)) x 703
# Standard:
# BMI 18.5 ~ 25 is nomal weight.
# Constraint:
# - Ensure your ... | mit | -8,714,691,810,336,679,000 | 28.162791 | 86 | 0.606858 | false | 3.352941 | false | false | false |
redsolution/django-menu-proxy | menuproxy/utils.py | 1 | 10086 | # -*- coding: utf-8 -*-
from django import conf
from django.core.cache import cache
from importpath import importpath
METHODS = (
'replace', # Указывает, что объект point следует заменить объектом object
'insert', # Указывает, что к списку дочерних элементов inside-правила нужно добавить элемент object
'c... | gpl-3.0 | 7,323,693,844,569,859,000 | 35.032727 | 124 | 0.598345 | false | 3.919699 | false | false | false |
oneraghavan/portcache | setup.py | 1 | 2150 | from setuptools import setup
setup(name='portcache',
version='0.3 ',
description='A simple cache for port from remote service',
url='https://github.com/oneraghavan/portcache',
author='Raghavan',
author_email='oneraghavan@gmail.com',
license='MIT',
packages=['portcache'],... | mit | 51,269,814,623,588,696 | 50.190476 | 156 | 0.596279 | false | 3.758741 | false | false | false |
phil65/KodiDevKit | script.py | 1 | 3245 | # -*- coding: utf8 -*-
# Copyright (C) 2017 - Philipp Temminghoff <phil65@kodi.tv>
# This program is Free Software see LICENSE file for details
import os
import sys
import codecs
import logging
RESULTS_FILE = "results.txt"
settings = {"kodi_path": "C:/Kodi",
"portable_mode": True,
"language_... | gpl-3.0 | -1,780,904,815,994,852,400 | 35.460674 | 111 | 0.572265 | false | 3.747113 | false | false | false |
seecr/meresco-solr | meresco/solr/fields2solrdoc.py | 1 | 2921 | ## begin license ##
#
# "Meresco Solr" is a set of components and tools
# to integrate Solr into "Meresco."
#
# Copyright (C) 2011-2013 Seecr (Seek You Too B.V.) http://seecr.nl
# Copyright (C) 2012 SURF http://www.surf.nl
# Copyright (C) 2012-2013 Stichting Kennisnet http://www.kennisnet.nl
#
# This file is part of "... | gpl-2.0 | 5,766,375,609,882,647,000 | 40.140845 | 121 | 0.6734 | false | 3.808344 | false | false | false |
lasote/conan | conans/client/cmd/new.py | 1 | 9249 | import re
from conans.errors import ConanException
from conans.model.ref import ConanFileReference
from conans.client.cmd.new_ci import ci_get_files
conanfile = """from conans import ConanFile, CMake, tools
class {package_name}Conan(ConanFile):
name = "{name}"
version = "{version}"
license = "<Put the p... | mit | -2,767,009,680,822,622,700 | 32.51087 | 112 | 0.601362 | false | 3.632757 | true | false | false |
grschafer/BejeweledBot | train/agent.py | 1 | 2406 | from pybrain.rl.agents.logging import LoggingAgent
from pybrain.rl.agents.learning import LearningAgent
from scipy import where
from random import choice
class BejeweledAgent(LearningAgent):
def getAction(self):
# get best action for every state observation
# overlay all action values for every st... | mit | 1,512,328,622,695,829,200 | 41.210526 | 88 | 0.618038 | false | 4.311828 | false | false | false |
annahs/atmos_research | LEO_calc_coating_from_meas_scat_amp_and_write_to_db.py | 1 | 3857 | import sys
import os
import datetime
import pickle
import numpy as np
import matplotlib.pyplot as plt
from pprint import pprint
import sqlite3
import calendar
from datetime import datetime
#id INTEGER PRIMARY KEY AUTOINCREMENT,
#sp2b_file TEXT,
#file_index INT,
#instr TEXT,
#instr_locn TEXT,
#particle_type TEXT,
#... | mit | -3,604,193,547,735,604,000 | 29.611111 | 207 | 0.721027 | false | 2.674757 | false | false | false |
LPgenerator/django-cacheops | cacheops/redis.py | 1 | 3494 | from __future__ import absolute_import
import warnings
from contextlib import contextmanager
import six
from funcy import decorator, identity, memoize, LazyObject
import redis
from redis.sentinel import Sentinel
from .conf import settings
if settings.CACHEOPS_DEGRADE_ON_FAILURE:
@decorator
def handle_connect... | bsd-3-clause | -5,793,251,046,439,883,000 | 29.382609 | 93 | 0.591013 | false | 3.886541 | false | false | false |
rhhayward/podcast_generator | podcast_generator/PodcastCreator.py | 1 | 4935 | import urllib.request as urllib
from lxml import etree
import os
from os.path import basename
from urllib.parse import urlparse
### PodcastCreator is the class that
### takes a set of downloaders,
### sets their settings, takes
### their downloaded files and
### makes them into an rss file
### for use with p... | gpl-3.0 | 4,101,729,319,851,635,700 | 34.25 | 102 | 0.61459 | false | 4.122807 | false | false | false |
cefn/firmware-codesign-readinglog | ui/index.py | 1 | 2487 | #!/usr/bin/python
import sys,os,glob,urlparse,urllib,subprocess
def setcwd():
realpath = os.path.realpath(sys.argv[0])
dname = os.path.dirname(realpath)
os.chdir(dname)
# sets working directory based on path to index.py
setcwd()
# loads local python modules, relative to index.py
sys.path.append(os.path.... | mit | -1,832,972,551,694,617,600 | 24.916667 | 112 | 0.657821 | false | 3.522663 | false | false | false |
jason-neal/spectrum_overload | spectrum_overload/differential.py | 1 | 1536 | # -*- coding: utf-8 -*-
"""Differential Class which takes the difference between two spectra."""
from typing import Any, Dict, Optional
from spectrum_overload.spectrum import Spectrum
# TODO: Add in s-profile from
# Ferluga 1997: Separating the spectra of binary stars-I. A simple method: Secondary reconstruction
c... | mit | 1,857,235,720,947,687,000 | 31.680851 | 99 | 0.646484 | false | 3.938462 | false | false | false |
sidrakesh93/grpc-tools | benchmarking/performance_db/performance_db_frontend/app/views.py | 1 | 3289 | #
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the fo... | bsd-3-clause | 2,365,342,280,328,738,000 | 35.544444 | 79 | 0.725753 | false | 4.025704 | false | false | false |
faneshion/MatchZoo | matchzoo/engine/base_preprocessor.py | 1 | 4116 | """:class:`BasePreprocessor` define input and ouutput for processors."""
import abc
import functools
import typing
from pathlib import Path
import dill
import matchzoo as mz
def validate_context(func):
"""Validate context in the preprocessor."""
@functools.wraps(func)
def transform_wrapper(self, *args... | apache-2.0 | -928,447,038,971,826,800 | 28.191489 | 78 | 0.622449 | false | 4.20429 | false | false | false |
hugdiniz/anuarioDjango | yearbook/migrations/0005_auto_20141214_0017.py | 1 | 1444 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('yearbook', '0004_auto_20141212_1558'),
]
operations = [
migrations.RemoveField(
model_name='lotacao',
... | gpl-2.0 | -4,371,260,729,932,835,000 | 31.088889 | 113 | 0.572022 | false | 3.871314 | false | false | false |
MeteorKepler/RICGA | ricga/eval_tools/pycocoevalcap/tokenizer/ptbtokenizer.py | 1 | 2833 | #!/usr/bin/env python
#
# File Name : ptbtokenizer.py
#
# Description : Do the PTB Tokenization and remove punctuations.
#
# Creation Date : 29-12-2014
# Last Modified : Thu Mar 19 09:53:35 2015
# Authors : Hao Fang <hfang@uw.edu> and Tsung-Yi Lin <tl483@cornell.edu>
import os
import subprocess
import tempfile
# pat... | apache-2.0 | 4,010,289,009,320,253,400 | 41.283582 | 114 | 0.484998 | false | 3.907586 | false | false | false |
guoxiaoyong/simple-useful | cxx_learn/cronx/spider/spider_daily_ftse100.py | 2 | 2199 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import urllib2;
import re;
import string;
import sys;
from BeautifulSoup import BeautifulSoup
month_num = {
'Jan' : '01',
'Feb' : '02',
'Mar' : '03',
'Apr' : '04',
'May' : '05',
'Jun' : '06',
'Jul' : '07',
'Aug' : '08',
'Sep' : '09',
'Oct' : '10',
'Nov' : ... | cc0-1.0 | -2,231,879,005,828,900,900 | 29.123288 | 108 | 0.612551 | false | 2.704797 | false | false | false |
YAmikep/django-xmlmapping | setup.py | 1 | 3687 | """
Based entirely on Django's own ``setup.py`` for now.
"""
from distutils.core import setup
from distutils.command.install_data import install_data
from distutils.command.install import INSTALL_SCHEMES
import os
import sys
class osx_install_data(install_data):
# On MacOS, the platform-specific lib di... | bsd-3-clause | 3,709,194,845,001,403,000 | 35.622449 | 106 | 0.652834 | false | 3.694389 | false | false | false |
aewallin/openvoronoi | python_examples/line-segment/lineseg_3.py | 1 | 4439 | import openvoronoi as ovd
import ovdvtk
import time
import vtk
import datetime
import math
import random
import os
def drawLine(myscreen, p1, p2):
myscreen.addActor(ovdvtk.Line(p1=(p1.x, p1.y, 0), p2=(p2.x, p2.y, 0), color=ovdvtk.yellow))
def writeFrame(w2if, lwr, n):
w2if.Modified()
current_dir = os.g... | lgpl-2.1 | 1,067,751,821,632,725,200 | 24.80814 | 95 | 0.573327 | false | 2.741816 | false | false | false |
ebrelsford/django-phillydata | phillydata/opa/migrations/0001_initial.py | 1 | 3517 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('owners', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='AccountOwner',
fields=[
... | bsd-3-clause | -6,894,110,242,630,896,000 | 70.77551 | 220 | 0.637475 | false | 4.123095 | false | false | false |
ncullen93/pyBN | pyBN/inference/marginal_exact/exact_bp.py | 1 | 2676 |
__author__ = """N. Cullen <ncullen.th@dartmouth.edu>"""
from pyBN.classes.factor import Factor
from pyBN.classes.factorization import Factorization
from pyBN.utils.graph import *
from copy import deepcopy, copy
import numpy as np
import json
def exact_bp(bn, target=None, evidence=None, downward_pass=False):
"""
... | mit | -26,576,409,045,976,944 | 26.885417 | 70 | 0.705531 | false | 3.093642 | false | false | false |
clody23/MToolBox | MToolBox/mt-classifier.py | 1 | 13234 | #!/usr/bin/env python
import getopt, sys, re, os, glob, csv
from classifier import tree, NGclassify, consts, datatypes, parse_mhcs
from bioinf.seqs import SeqList
import io_modules.csv
import io_modules.old_table
import io_modules.serialize
import os.path
# folder where to find data for haplogroup classification and... | gpl-3.0 | -3,761,935,509,628,710,000 | 37.58309 | 164 | 0.65241 | false | 2.707447 | false | false | false |
ianrust/coinbase_autotrader | automated_bittrader.py | 1 | 4459 | import json,urllib2,csv,time,smtplib,string,os
os.chdir('/home/ian/Documents')
# Buy and sell urls
sell_url = "https://coinbase.com/api/v1/sells"
buy_url = "https://coinbase.com/api/v1/buys"
sell_price_url = "https://coinbase.com/api/v1/prices/sell"
buy_price_url = "https://coinbase.com/api/v1/prices/buy"
headers = {... | mit | 3,535,470,929,085,376,500 | 35.85124 | 372 | 0.742095 | false | 2.871217 | false | false | false |
drcoms/jlu-drcom-client | jlu-drcom-py3/newclinet-py3.py | 1 | 12355 | #!/usr/bin/env python
# coding: utf-8
# license: AGPL-V3
import re
import socket
import struct
import time
from hashlib import md5
import sys
import os
import random
import platform
# CONFIG
server = '10.100.61.3'
username = b'XXXXX' # 用户名
password = b'XXXXX' ... | agpl-3.0 | -4,541,838,971,522,397,000 | 30.159898 | 175 | 0.531237 | false | 2.943419 | false | false | false |
lizardsystem/lizard-layers | lizard_layers/migrations/0005_auto__add_field_areavalue_flag__add_field_areavalue_comment.py | 1 | 13178 | # encoding: 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 'AreaValue.flag'
db.add_column('lizard_layers_areavalue', 'flag', self.gf('django.db.models... | gpl-3.0 | -7,289,027,439,874,857,000 | 76.976331 | 182 | 0.550159 | false | 3.54057 | false | false | false |
fametrano/BitcoinBlockchainTechnology | btclib/rfc6979.py | 1 | 4053 | #!/usr/bin/env python3
# Copyright (C) 2017-2020 The btclib developers
#
# This file is part of btclib. It is subject to the license terms in the
# LICENSE file found in the top-level directory of this distribution.
#
# No part of btclib including this file, may be copied, modified, propagated,
# or distributed except... | mit | -3,713,050,999,322,462,700 | 37.6 | 77 | 0.668887 | false | 3.26066 | false | false | false |
spaghetti-/rosdep | src/rosdep2/platforms/arch.py | 1 | 3009 | #!/usr/bin/env python
# Copyright (c) 2009, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# n... | bsd-3-clause | 6,367,772,519,631,742,000 | 40.791667 | 99 | 0.730808 | false | 4.012 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.