hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e070366174e8f2cc8f06d7ef450b79dee8cdc990 | 217 | py | Python | Examples/AppKit/TableModel/setup.py | Khan/pyobjc-framework-Cocoa | f8b015ea2a72d8d78be6084fb12925c4785b8f1f | [
"MIT"
] | 132 | 2015-01-01T10:02:42.000Z | 2022-03-09T12:51:01.000Z | mac/pyobjc-framework-Cocoa/Examples/AppKit/TableModel/setup.py | mba811/music-player | 7998986b34cfda2244ef622adefb839331b81a81 | [
"BSD-2-Clause"
] | 6 | 2015-01-06T08:23:19.000Z | 2019-03-14T12:22:06.000Z | mac/pyobjc-framework-Cocoa/Examples/AppKit/TableModel/setup.py | mba811/music-player | 7998986b34cfda2244ef622adefb839331b81a81 | [
"BSD-2-Clause"
] | 27 | 2015-02-23T11:51:43.000Z | 2022-03-07T02:34:18.000Z | """
Script for building the example.
Usage:
python setup.py py2app
"""
from distutils.core import setup
import py2app
setup(
name='TableModel',
app=["TableModel.py"],
data_files=["English.lproj"],
)
| 14.466667 | 33 | 0.677419 |
9007d4b83d3accd47d787ad1b51b103a0bcf6ca6 | 2,628 | py | Python | locations/spiders/rei.py | mfjackson/alltheplaces | 37c90b4041c80a574e6e4c2f886883e97df4b636 | [
"MIT"
] | null | null | null | locations/spiders/rei.py | mfjackson/alltheplaces | 37c90b4041c80a574e6e4c2f886883e97df4b636 | [
"MIT"
] | null | null | null | locations/spiders/rei.py | mfjackson/alltheplaces | 37c90b4041c80a574e6e4c2f886883e97df4b636 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import scrapy
import json
import re
from locations.items import GeojsonPointItem
DAY_MAPPING = {
"Mon": "Mo",
"Tue": "Tu",
"Wed": "We",
"Thu": "Th",
"Fri": "Fr",
"Sat": "Sa",
"Sun": "Su",
}
class ReiSpider(scrapy.Spider):
name = "rei"
allowed_domains = ["ww... | 32.85 | 117 | 0.561263 |
93c8304379086921cf5a5e8b660775b2a5b83a35 | 741 | py | Python | producthunt/products/models.py | muhammad-mamdouh/Django_Projects | 1f31e12aefb36b33474256db40a2c551882f445e | [
"MIT"
] | null | null | null | producthunt/products/models.py | muhammad-mamdouh/Django_Projects | 1f31e12aefb36b33474256db40a2c551882f445e | [
"MIT"
] | 40 | 2020-06-05T22:10:58.000Z | 2022-03-11T23:56:09.000Z | producthunt/products/models.py | muhammad-mamdouh/Django_Projects | 1f31e12aefb36b33474256db40a2c551882f445e | [
"MIT"
] | 1 | 2021-03-31T10:30:03.000Z | 2021-03-31T10:30:03.000Z | from django.db import models
from django.contrib.auth.models import User
from django.utils import timezone
class Product(models.Model):
title = models.CharField(max_length=100)
date_published = models.DateTimeField(default=timezone.now)
total_votes = models.IntegerField(default=1)
image = models.Image... | 30.875 | 63 | 0.699055 |
bb03ee3dce8342946e180b66a15252703ec86e51 | 11,356 | py | Python | linter.py | MicroConsult/CMSIS_5 | 48b8de320d841446f400f94ed6fc7578a3d1525f | [
"Apache-2.0"
] | 2 | 2019-06-28T01:52:10.000Z | 2021-08-09T05:28:04.000Z | linter.py | MicroConsult/CMSIS_5 | 48b8de320d841446f400f94ed6fc7578a3d1525f | [
"Apache-2.0"
] | null | null | null | linter.py | MicroConsult/CMSIS_5 | 48b8de320d841446f400f94ed6fc7578a3d1525f | [
"Apache-2.0"
] | 4 | 2020-08-04T13:48:44.000Z | 2022-02-25T08:29:40.000Z | # -*- coding: utf-8 -*-
import logging
import lxml
import os
import os.path
import re
import requests
from AdvancedHTMLParser import AdvancedHTMLParser
from glob import iglob
from urllib.parse import urlparse
from cmsis.PackLint import PackLinter, VersionParser
from cmsis.Pack import Pack, Api, SemanticVersion
def ... | 39.158621 | 141 | 0.629623 |
cbe2ce8810ad0077ee9c25ded7807c9fe3c9b4e9 | 2,051 | py | Python | project/boundingbox.py | arifBurakDemiray/computer-graphics | acf4781f92e325b12d986974c448b0e3520af431 | [
"MIT"
] | null | null | null | project/boundingbox.py | arifBurakDemiray/computer-graphics | acf4781f92e325b12d986974c448b0e3520af431 | [
"MIT"
] | null | null | null | project/boundingbox.py | arifBurakDemiray/computer-graphics | acf4781f92e325b12d986974c448b0e3520af431 | [
"MIT"
] | null | null | null | # CENG 487 Assignment6 by
# Arif Burak Demiray
# December 2021
from .vector import *
from .matrix import *
class BoundingBox:
def __init__(self):
self.min = Point3f(1000, 1000, 1000)
self.max = Point3f(-1000, -1000, -1000)
def volume(self):
diagonal = self.max - self.min
retu... | 33.080645 | 106 | 0.532911 |
fad47491cdc6bc31ef234b2d40b259ca925f6318 | 15,288 | py | Python | src/noise.py | richtertill/noisy_machine_learning | 731966b1f4d1d392a9fe6dee692e254488f4c569 | [
"MIT"
] | 2 | 2022-01-10T03:54:00.000Z | 2022-03-11T23:19:31.000Z | src/noise.py | richtertill/noisy_machine_learning | 731966b1f4d1d392a9fe6dee692e254488f4c569 | [
"MIT"
] | null | null | null | src/noise.py | richtertill/noisy_machine_learning | 731966b1f4d1d392a9fe6dee692e254488f4c569 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
import os
import sys
import torch
from torch.distributions.poisson import Poisson
import numpy as np
from scipy import stats
def add_data_noise(data_noise, tensor, prob, mean=0, std=1):
"""
adds noise to the image
:param std:
:param mean:
:param p... | 43.68 | 119 | 0.579082 |
f2fd64d98990d4790e0d8888e3863f7c40f919ae | 839 | py | Python | setup.py | davegallant/ickinesis | eca715a8f5c3364dd9249adb59a9ec8bddbb7a5c | [
"Apache-2.0"
] | 1 | 2019-10-03T13:43:14.000Z | 2019-10-03T13:43:14.000Z | setup.py | davegallant/kinesis | eca715a8f5c3364dd9249adb59a9ec8bddbb7a5c | [
"Apache-2.0"
] | null | null | null | setup.py | davegallant/kinesis | eca715a8f5c3364dd9249adb59a9ec8bddbb7a5c | [
"Apache-2.0"
] | null | null | null | import io # for python2
from os import path
from setuptools import setup, find_packages
from kinesis.__version__ import VERSION
WORKING_DIR = path.abspath(path.dirname(__file__))
# Get long description from README.md
with io.open(path.join(WORKING_DIR, "README.md"), encoding="utf-8") as f:
LONG_DESCRIPTION = f.r... | 31.074074 | 73 | 0.716329 |
f67df278a7381ed9533362eb686fec9fdbfc9dc9 | 892 | py | Python | reference/generated/numpy-fft-fftn-1.py | bonn0062/devdocs | 221a9b4a14cc2ba22fb656960d1b55e4ed46e7c7 | [
"BSD-3-Clause"
] | 1 | 2021-07-30T04:40:34.000Z | 2021-07-30T04:40:34.000Z | reference/generated/numpy-fft-fftn-1.py | baby636/devdocs | 406a0989ab7a31f11e0b0da3e50503c0ad6193cd | [
"BSD-3-Clause"
] | null | null | null | reference/generated/numpy-fft-fftn-1.py | baby636/devdocs | 406a0989ab7a31f11e0b0da3e50503c0ad6193cd | [
"BSD-3-Clause"
] | null | null | null | a = np.mgrid[:3, :3, :3][0]
np.fft.fftn(a, axes=(1, 2))
# array([[[ 0.+0.j, 0.+0.j, 0.+0.j], # may vary
# [ 0.+0.j, 0.+0.j, 0.+0.j],
# [ 0.+0.j, 0.+0.j, 0.+0.j]],
# [[ 9.+0.j, 0.+0.j, 0.+0.j],
# [ 0.+0.j, 0.+0.j, 0.+0.j],
# [ 0.+0.j, 0.+0.j, 0.+0.j]],
# [[18.+0.j, 0.+0.j, 0.+0.j],
# [ 0.+0.j... | 34.307692 | 60 | 0.433857 |
cc044459a7111425203a1b4cfb43eacfdd3cb805 | 84 | py | Python | meiduo_mall/meiduo_mall/apps/ouath/constants.py | JianChengBai/Django | a81f71ef431df5e2b0cdb43af11366feb9bfd346 | [
"MIT"
] | null | null | null | meiduo_mall/meiduo_mall/apps/ouath/constants.py | JianChengBai/Django | a81f71ef431df5e2b0cdb43af11366feb9bfd346 | [
"MIT"
] | null | null | null | meiduo_mall/meiduo_mall/apps/ouath/constants.py | JianChengBai/Django | a81f71ef431df5e2b0cdb43af11366feb9bfd346 | [
"MIT"
] | null | null | null |
SAVE_QQ_USER_TOKEN_EXPIRES = 300
VERIFY_EMAIL_TOKEN_EXPIRES = 2 * 24 * 60 * 60
| 10.5 | 45 | 0.738095 |
d77d8ab327963250509b90395ce2b6d79aea36b7 | 1,848 | py | Python | qtim_tools/qtim_dce/tofts_worker.py | QTIM-Lab/qtim_tools | 92bd15ec7a81c5eda70d11a015f74538f3c41e22 | [
"Apache-2.0"
] | 12 | 2017-03-29T18:17:24.000Z | 2020-03-19T05:28:56.000Z | qtim_tools/qtim_dce/tofts_worker.py | QTIM-Lab/qtim_tools | 92bd15ec7a81c5eda70d11a015f74538f3c41e22 | [
"Apache-2.0"
] | 7 | 2017-03-08T21:06:01.000Z | 2017-06-21T19:01:58.000Z | qtim_tools/qtim_dce/tofts_worker.py | QTIM-Lab/qtim_tools | 92bd15ec7a81c5eda70d11a015f74538f3c41e22 | [
"Apache-2.0"
] | 5 | 2017-03-02T09:08:21.000Z | 2019-10-26T05:37:39.000Z | import tofts_parameter_calculator
# from ..qtim_utilities import nifti_util
def test(filepath=[]):
tofts_parameter_calculator.test_method_3d(filepath)
def run_test():
# You must install the packages nibabel and pydicom before running this program.
filepath='C:/Users/abeers/Documents/GitHub/Public_QTIM/qtim_tools... | 28.875 | 553 | 0.808442 |
9347e06faba3b4f815e09631de18f83930a215f0 | 1,979 | py | Python | 2021/d8.py | shubham-goel/advent_of_code | a0df7d692f25489f980caacda9fe17e7ccc56503 | [
"MIT"
] | 1 | 2021-12-10T21:08:56.000Z | 2021-12-10T21:08:56.000Z | 2021/d8.py | shubham-goel/advent_of_code | a0df7d692f25489f980caacda9fe17e7ccc56503 | [
"MIT"
] | null | null | null | 2021/d8.py | shubham-goel/advent_of_code | a0df7d692f25489f980caacda9fe17e7ccc56503 | [
"MIT"
] | null | null | null | import numpy as np
file = '2021/inputs/d8.txt'
# Read the file
with open(file) as f:
lines = [line.strip() for line in f if line.strip()]
lines1 = [line.split(' | ') for line in lines]
inputs = [line[0].split(' ') for line in lines1]
outputs = [line[1].split(' ') for line in lines1]
for i,o in zip(inputs, outpu... | 31.412698 | 70 | 0.608893 |
7ed17379598c9762f2776ccd4684fa78b9904249 | 770 | py | Python | setup.py | ericjaychi/project-tigrex | 6ed033c834e7bdc449ac832788619a184f4a702e | [
"MIT"
] | 16 | 2019-08-01T16:46:47.000Z | 2021-08-19T23:35:33.000Z | setup.py | ericjaychi/project-tigrex | 6ed033c834e7bdc449ac832788619a184f4a702e | [
"MIT"
] | 15 | 2019-08-05T21:12:51.000Z | 2020-07-25T17:15:03.000Z | setup.py | ericjaychi/project-tigrex | 6ed033c834e7bdc449ac832788619a184f4a702e | [
"MIT"
] | 2 | 2019-08-12T08:27:06.000Z | 2020-07-24T00:57:43.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
requirements = ["requests<=2.21.0", "fire<=0.1.3"]
setuptools.setup(
name="tigrex",
version="1.3.0",
author="Eric Chi",
author_email="ericjaychi@gmail.com",
description="A Magic the Gathering CLI Tool",
long... | 29.615385 | 71 | 0.667532 |
d128de27c700567b15226e82a4acc5d5259ba26b | 9,330 | py | Python | storages/views.py | torjean/webvirtcloud | 1f1fb708710e639116624c5c5acd0fbe0c41a20d | [
"Apache-2.0"
] | null | null | null | storages/views.py | torjean/webvirtcloud | 1f1fb708710e639116624c5c5acd0fbe0c41a20d | [
"Apache-2.0"
] | 4 | 2020-02-12T03:16:43.000Z | 2021-06-10T22:08:23.000Z | storages/views.py | torjean/webvirtcloud | 1f1fb708710e639116624c5c5acd0fbe0c41a20d | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render, get_object_or_404
from django.http import HttpResponseRedirect, HttpResponse
from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse
from django.contrib.auth.decorators import login_required
from computes.models import Compute
from storag... | 40.921053 | 118 | 0.53462 |
63c5daabc9e300b468e69ef22d0e34736c6c76c3 | 421 | py | Python | ProgettoLube/WebInspector/venv/Lib/site-packages/tensorflow/_api/v2/compat/v2/xla/experimental/__init__.py | Lube-Project/ProgettoLube | cbf33971e2c2e865783ec1a2302625539186a338 | [
"MIT"
] | 2 | 2020-09-30T00:11:09.000Z | 2021-10-04T13:00:38.000Z | ProgettoLube/WebInspector/venv/Lib/site-packages/tensorflow/_api/v2/compat/v2/xla/experimental/__init__.py | Lube-Project/ProgettoLube | cbf33971e2c2e865783ec1a2302625539186a338 | [
"MIT"
] | null | null | null | ProgettoLube/WebInspector/venv/Lib/site-packages/tensorflow/_api/v2/compat/v2/xla/experimental/__init__.py | Lube-Project/ProgettoLube | cbf33971e2c2e865783ec1a2302625539186a338 | [
"MIT"
] | 1 | 2021-01-28T01:57:41.000Z | 2021-01-28T01:57:41.000Z | # This file is MACHINE GENERATED! Do not edit.
# Generated by: tensorflow/python/tools/api/generator/create_python_api.py script.
"""Public API for tf.xla.experimental namespace.
"""
from __future__ import print_function as _print_function
import sys as _sys
from tensorflow.python.compiler.xla.jit import experimenta... | 30.071429 | 82 | 0.821853 |
e9219ca6263d24a607dd87bfa9f6eb2ec56d7d35 | 575 | py | Python | onmt/__init__.py | philhchen/OpenNMT-evidential-softmax | 87709ce1cf7bda783aed4a64c096fa23282e7aa9 | [
"MIT"
] | null | null | null | onmt/__init__.py | philhchen/OpenNMT-evidential-softmax | 87709ce1cf7bda783aed4a64c096fa23282e7aa9 | [
"MIT"
] | null | null | null | onmt/__init__.py | philhchen/OpenNMT-evidential-softmax | 87709ce1cf7bda783aed4a64c096fa23282e7aa9 | [
"MIT"
] | null | null | null | """ Main entry point of the ONMT library """
from __future__ import division, print_function
import onmt.inputters
import onmt.encoders
import onmt.decoders
import onmt.models
import onmt.utils
import onmt.modules
from onmt.trainer import Trainer
import sys
import onmt.utils.optimizers
onmt.utils.optimizers.Optim = o... | 19.827586 | 61 | 0.747826 |
20c85228f52d8e6181d21a79fa7d0dcc6db7acc3 | 9,470 | py | Python | tests/settings.py | Yuessiah/Othello-Minimax | e7fb043189ef108b639697ae74fd92c0695caac1 | [
"MIT"
] | null | null | null | tests/settings.py | Yuessiah/Othello-Minimax | e7fb043189ef108b639697ae74fd92c0695caac1 | [
"MIT"
] | null | null | null | tests/settings.py | Yuessiah/Othello-Minimax | e7fb043189ef108b639697ae74fd92c0695caac1 | [
"MIT"
] | 1 | 2021-05-05T01:20:40.000Z | 2021-05-05T01:20:40.000Z | from unittest import TestCase
from game.board import Board
from game.settings import *
__author__ = 'bengt'
class TestSettings(TestCase):
def test_outside_top_left(self):
self.assertEqual(outside_board(0, NORTH), True)
self.assertEqual(outside_board(0, NORTHEAST), True)
self.assertEqual(o... | 50.37234 | 61 | 0.697571 |
b2894a8f1731b5599a131d2b052bafa079485660 | 3,681 | py | Python | setup.py | hurwitzlab/viral-learning | 8d7aebc0d58fa32a429f4a47593452ee2722ba82 | [
"MIT"
] | 1 | 2018-02-23T16:49:30.000Z | 2018-02-23T16:49:30.000Z | setup.py | hurwitzlab/viral-learning | 8d7aebc0d58fa32a429f4a47593452ee2722ba82 | [
"MIT"
] | null | null | null | setup.py | hurwitzlab/viral-learning | 8d7aebc0d58fa32a429f4a47593452ee2722ba82 | [
"MIT"
] | null | null | null | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspa... | 32.575221 | 94 | 0.661233 |
8a198565fc594428ace23d59602582f6e3518054 | 440 | py | Python | tests/test_stats.py | Prathamesh-B/chess-stats-readme | fe9bedb049d12edcbac9d824066c6b7a9346d2ab | [
"MIT"
] | 1 | 2021-07-14T11:28:37.000Z | 2021-07-14T11:28:37.000Z | tests/test_stats.py | Prathamesh-B/chess-stats-readme | fe9bedb049d12edcbac9d824066c6b7a9346d2ab | [
"MIT"
] | 1 | 2021-11-30T23:11:11.000Z | 2021-11-30T23:11:11.000Z | tests/test_stats.py | Prathamesh-B/chess-stats-readme | fe9bedb049d12edcbac9d824066c6b7a9346d2ab | [
"MIT"
] | 1 | 2021-11-30T11:19:16.000Z | 2021-11-30T11:19:16.000Z | import unittest
import requests
from main import get_stats
class TestStats(unittest.TestCase):
def test_api(self):
response = requests.get("https://api.chess.com/pub/player/PrathamRex/stats")
self.assertEqual(response.status_code, 200)
def test_best_ratings(self):
self.assertTrue(get_... | 27.5 | 84 | 0.713636 |
6ba6f938df38c3bf82eee2b4e516302ec99c93dd | 5,925 | py | Python | spotify.py | gregahpradana/spotify_downloader_telegram__bot | d2fab0a6111c99bfc2f2ea21131edadf3fce05a0 | [
"MIT"
] | 1 | 2021-09-05T14:33:06.000Z | 2021-09-05T14:33:06.000Z | spotify.py | gregahpradana/spotify_downloader_telegram__bot | d2fab0a6111c99bfc2f2ea21131edadf3fce05a0 | [
"MIT"
] | null | null | null | spotify.py | gregahpradana/spotify_downloader_telegram__bot | d2fab0a6111c99bfc2f2ea21131edadf3fce05a0 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import spotipy
from spotipy.oauth2 import SpotifyClientCredentials
import requests
from youtube_search import YoutubeSearch
import youtube_dl
import eyed3.id3
import eyed3
import lyricsgenius
import telepot
spotifyy = spotipy.Spotify(
client_credentials_manager=SpotifyClien... | 32.554945 | 107 | 0.587004 |
cd6efa04794dc23ee7475fdb830adf2aaf55f904 | 2,128 | py | Python | spikeinterface/toolkit/postprocessing/tests/test_spike_amplitudes.py | marcbue/spikeinterface | d3462eeabcb9f0b9816004dd47355e40f4de1ac5 | [
"MIT"
] | null | null | null | spikeinterface/toolkit/postprocessing/tests/test_spike_amplitudes.py | marcbue/spikeinterface | d3462eeabcb9f0b9816004dd47355e40f4de1ac5 | [
"MIT"
] | null | null | null | spikeinterface/toolkit/postprocessing/tests/test_spike_amplitudes.py | marcbue/spikeinterface | d3462eeabcb9f0b9816004dd47355e40f4de1ac5 | [
"MIT"
] | null | null | null | import numpy as np
from pathlib import Path
import shutil
from spikeinterface import download_dataset, extract_waveforms
import spikeinterface.extractors as se
from spikeinterface.toolkit import get_spike_amplitudes
def test_get_spike_amplitudes():
repo = 'https://gin.g-node.org/NeuralEnsemble/ephy_testing_data'... | 40.150943 | 113 | 0.726974 |
9fa60750afe97a603f2c7ead3a28b1f5d2cc391c | 70,140 | py | Python | test/integration/component/test_projects.py | bvbharatk/cloud-stack | 9acfc0307726204b444cc5e81abecb849eca23d9 | [
"Apache-2.0"
] | 2 | 2016-03-18T09:44:07.000Z | 2019-01-12T06:52:08.000Z | test/integration/component/test_projects.py | bvbharatk/cloud-stack | 9acfc0307726204b444cc5e81abecb849eca23d9 | [
"Apache-2.0"
] | 1 | 2016-03-04T09:58:31.000Z | 2016-03-08T17:31:56.000Z | test/integration/component/test_projects.py | bvbharatk/cloud-stack | 9acfc0307726204b444cc5e81abecb849eca23d9 | [
"Apache-2.0"
] | 1 | 2021-12-23T09:22:28.000Z | 2021-12-23T09:22:28.000Z | # 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
# "License"); you may not u... | 40.731707 | 97 | 0.430824 |
c926bf25e343ad370ac4ef00195a6a0f9c76ed2e | 1,255 | py | Python | venv/lib/python3.8/site-packages/vsts/work_item_tracking/v4_1/models/work_item_query_sort_column.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/vsts/work_item_tracking/v4_1/models/work_item_query_sort_column.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/vsts/work_item_tracking/v4_1/models/work_item_query_sort_column.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------------------------------------... | 41.833333 | 105 | 0.528287 |
9099381727424a7340efee3764970fe25401165b | 2,487 | py | Python | tutorials/03-advanced/image_captioning/build_vocab.py | jax79sg/pytorch-tutorial | dc389b42f6bfdbfd3600044fc840fa5154441dcf | [
"MIT"
] | null | null | null | tutorials/03-advanced/image_captioning/build_vocab.py | jax79sg/pytorch-tutorial | dc389b42f6bfdbfd3600044fc840fa5154441dcf | [
"MIT"
] | null | null | null | tutorials/03-advanced/image_captioning/build_vocab.py | jax79sg/pytorch-tutorial | dc389b42f6bfdbfd3600044fc840fa5154441dcf | [
"MIT"
] | null | null | null | import nltk
import pickle
import argparse
from collections import Counter
from pycocotools.coco import COCO
class Vocabulary(object):
"""Simple vocabulary wrapper."""
def __init__(self):
self.word2idx = {}
self.idx2word = {}
self.idx = 0
def add_word(self, word):
if not wo... | 31.884615 | 81 | 0.61922 |
897d13b9e01e72b96089cca4df0559a1a8706fe1 | 5,515 | py | Python | project/raw2nii.py | MattVUIIS/raw2nii | 8c294f273e3cbb9a4757b38f97834f132b7ab0b7 | [
"MIT"
] | 1 | 2019-01-20T07:55:00.000Z | 2019-01-20T07:55:00.000Z | project/raw2nii.py | MattVUIIS/raw2nii | 8c294f273e3cbb9a4757b38f97834f132b7ab0b7 | [
"MIT"
] | null | null | null | project/raw2nii.py | MattVUIIS/raw2nii | 8c294f273e3cbb9a4757b38f97834f132b7ab0b7 | [
"MIT"
] | null | null | null | #!/bin/env python
from __future__ import division
import argparse
import logging
import numpy as np
import os
import re
import sys
from nii import write_nii_from_par
from write_parrec_from_dicom import write_parrec_from_dicom
from read_dicom import read_dicom
from read_par import read_par
def raw_convert(input_file,... | 36.045752 | 91 | 0.633001 |
66a38400f1b321754c2fa5d0a3669c83393f5130 | 201 | py | Python | dffml/skel/model/setup.py | Patil2099/dffml | 9310c1ad55a7339e5d15786d4b9d890283f52ec2 | [
"MIT"
] | null | null | null | dffml/skel/model/setup.py | Patil2099/dffml | 9310c1ad55a7339e5d15786d4b9d890283f52ec2 | [
"MIT"
] | 1 | 2019-10-17T17:34:14.000Z | 2019-10-17T17:34:14.000Z | dffml/skel/model/setup.py | raghav-ys/dffml | 2a23f55acaac69c7a1840260b0ede694216c2007 | [
"MIT"
] | null | null | null | from setuptools import setup
from dffml_setup_common import SETUP_KWARGS, IMPORT_NAME
SETUP_KWARGS["entry_points"] = {
"dffml.model": [f"misc = {IMPORT_NAME}.misc:Misc"]
}
setup(**SETUP_KWARGS)
| 20.1 | 56 | 0.751244 |
59d7f30a9ec77cebae88e0742e008b070d77a90e | 2,424 | py | Python | snoopy/server/transforms/fetchTweetsByLocation.py | aiddenkeli/Snoopy | dd76180145981b3574b419edce39dbb060bd8c8c | [
"MIT"
] | 432 | 2015-01-07T09:56:32.000Z | 2022-03-28T12:15:42.000Z | snoopy/server/transforms/fetchTweetsByLocation.py | aiddenkeli/Snoopy | dd76180145981b3574b419edce39dbb060bd8c8c | [
"MIT"
] | 9 | 2015-01-31T10:07:28.000Z | 2021-09-10T08:13:47.000Z | snoopy/server/transforms/fetchTweetsByLocation.py | aiddenkeli/Snoopy | dd76180145981b3574b419edce39dbb060bd8c8c | [
"MIT"
] | 135 | 2015-01-07T15:06:35.000Z | 2022-01-24T02:19:55.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# glenn@sensepost.com
# Snoopy // 2012
# By using this code you agree to abide by the supplied LICENSE.txt
from Maltego import *
import logging
import requests
import json
import stawk_db
import re
logging.basicConfig(level=logging.DEBUG,filename='/tmp/maltego_logs.txt',form... | 32.32 | 149 | 0.680693 |
22c4b8c40866b92bfc576a881bba146025752846 | 4,070 | py | Python | flaskbb/utils/widgets.py | konstantin1985/forum | 7d4de24ccc932e9764699d89c8cc9d210b7fac7f | [
"BSD-3-Clause"
] | null | null | null | flaskbb/utils/widgets.py | konstantin1985/forum | 7d4de24ccc932e9764699d89c8cc9d210b7fac7f | [
"BSD-3-Clause"
] | null | null | null | flaskbb/utils/widgets.py | konstantin1985/forum | 7d4de24ccc932e9764699d89c8cc9d210b7fac7f | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
flaskbb.utils.widgets
~~~~~~~~~~~~~~~~~~~~~
Additional widgets for wtforms
:copyright: (c) 2014 by the FlaskBB Team.
:license: BSD, see LICENSE for more details.
"""
import simplejson as json
from datetime import datetime
from wtforms.widgets.core import Select, HTMLStr... | 32.301587 | 80 | 0.51769 |
2dfeb8329f0aa7ab7186075407c7eedaa3bd3242 | 175 | py | Python | ioutracker/inference/__init__.py | jiankaiwang/ioutracker | 8a55925fd5488a340b2ca5095d35105cc34b6cb8 | [
"MIT"
] | 3 | 2020-05-15T02:49:56.000Z | 2022-02-10T15:57:20.000Z | ioutracker/inference/__init__.py | jiankaiwang/ioutracker | 8a55925fd5488a340b2ca5095d35105cc34b6cb8 | [
"MIT"
] | null | null | null | ioutracker/inference/__init__.py | jiankaiwang/ioutracker | 8a55925fd5488a340b2ca5095d35105cc34b6cb8 | [
"MIT"
] | 2 | 2020-06-23T09:28:34.000Z | 2020-08-13T02:38:22.000Z |
import os, sys
filePath = os.path.abspath(__file__)
currentFolder = os.path.dirname(filePath)
sys.path.append(currentFolder)
from .MOTDet17Main import outputAsFramesToVideo | 21.875 | 47 | 0.817143 |
0236e82b2ac6bd777f2bd3b0afc8e5df76f47cc3 | 2,052 | py | Python | docker-images/taigav2/taiga-back/taiga/projects/services/filters.py | mattcongy/itshop | 6be025a9eaa7fe7f495b5777d1f0e5a3184121c9 | [
"MIT"
] | 1 | 2017-05-29T19:01:06.000Z | 2017-05-29T19:01:06.000Z | docker-images/taigav2/taiga-back/taiga/projects/services/filters.py | mattcongy/itshop | 6be025a9eaa7fe7f495b5777d1f0e5a3184121c9 | [
"MIT"
] | null | null | null | docker-images/taigav2/taiga-back/taiga/projects/services/filters.py | mattcongy/itshop | 6be025a9eaa7fe7f495b5777d1f0e5a3184121c9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
# This program is free software: you can r... | 30.176471 | 74 | 0.705166 |
ffa1f33b15f438cbb26e1873ea0863911e2f48cb | 259 | py | Python | supervisor/supervisor/supervisor/doctype/supervisor_settings/supervisor_settings.py | amolash/superviser | 1e7946f815de35ca0ea013c2ecdd9d6d063a0fd9 | [
"MIT"
] | null | null | null | supervisor/supervisor/supervisor/doctype/supervisor_settings/supervisor_settings.py | amolash/superviser | 1e7946f815de35ca0ea013c2ecdd9d6d063a0fd9 | [
"MIT"
] | null | null | null | supervisor/supervisor/supervisor/doctype/supervisor_settings/supervisor_settings.py | amolash/superviser | 1e7946f815de35ca0ea013c2ecdd9d6d063a0fd9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2018, amol and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class SupervisorSettings(Document):
pass
| 23.545455 | 49 | 0.783784 |
9e0e890cd5bef55450ab23567dda00550a1af047 | 5,744 | py | Python | sdk/python/pulumi_azure_native/documentdb/v20200601preview/get_sql_resource_sql_trigger.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/documentdb/v20200601preview/get_sql_resource_sql_trigger.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/documentdb/v20200601preview/get_sql_resource_sql_trigger.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 38.039735 | 505 | 0.646588 |
76209c9882ef2cca098977052418c9cecc804683 | 353 | py | Python | py-if-else.py | FTraian/hackerrank-python | 203bbfd644eb3323f179c6da21fbf569ad528885 | [
"CC0-1.0"
] | null | null | null | py-if-else.py | FTraian/hackerrank-python | 203bbfd644eb3323f179c6da21fbf569ad528885 | [
"CC0-1.0"
] | null | null | null | py-if-else.py | FTraian/hackerrank-python | 203bbfd644eb3323f179c6da21fbf569ad528885 | [
"CC0-1.0"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
if __name__ == '__main__':
n = int(input().strip())
if n % 2 == 1:
print('Weird')
else:
if n in range(2, 5):
print('Not Weird')
elif n in range(6, 21):
print('Weird')
elif n > 20... | 17.65 | 31 | 0.504249 |
94d7f08051a055a7665ad67f385db5bb1f6266b7 | 416 | py | Python | django_git/urls.py | sethtrain/django-git | 5d5b1222c55946b6de9c9db5820438d791cc3b4e | [
"BSD-3-Clause"
] | 35 | 2015-02-07T14:35:45.000Z | 2021-11-16T10:31:50.000Z | django_git/urls.py | sethtrain/django-git | 5d5b1222c55946b6de9c9db5820438d791cc3b4e | [
"BSD-3-Clause"
] | 1 | 2015-11-22T19:34:17.000Z | 2015-11-22T19:34:17.000Z | django_git/urls.py | sethtrain/django-git | 5d5b1222c55946b6de9c9db5820438d791cc3b4e | [
"BSD-3-Clause"
] | 13 | 2015-02-02T14:54:49.000Z | 2020-10-24T10:17:37.000Z | from django.conf.urls.defaults import *
urlpatterns = []
urlpatterns += patterns('django_git.views',
url(r'^(?P<repo>[\w_-]+)/commit/(?P<commit>[\w\d]+)/blob/$', 'blob', name='django-git-blob'),
url(r'^(?P<repo>[\w_-]+)/commit/(?P<commit>[\w\d]+)/$', 'commit', name='django-git-commit'),
url(r'^(?P<repo>[\... | 37.818182 | 97 | 0.572115 |
51a5f0ee62a41fe109de83ade7baf5351c47f2bf | 741 | py | Python | init_sqldb_environment.py | pythononwheels/coronadash | 876258d00f5b8bcccd4746713a15b3de54534fcf | [
"MIT"
] | null | null | null | init_sqldb_environment.py | pythononwheels/coronadash | 876258d00f5b8bcccd4746713a15b3de54534fcf | [
"MIT"
] | null | null | null | init_sqldb_environment.py | pythononwheels/coronadash | 876258d00f5b8bcccd4746713a15b3de54534fcf | [
"MIT"
] | null | null | null | #
# adapts the alembic migrations ini
# to changes in the pow db config
#
from coronadash.database.sqldblib import conn_str
import configparser
from coronadash.conf.config import database
def init_migrations(stdout=False):
#config= configparser.ConfigParser.RawConfigParser()
config= configparser.ConfigParser()... | 28.5 | 65 | 0.695007 |
39709237bcf454930bb87074e99321c0bda1abc4 | 170 | py | Python | ddd_base/value_object.py | sunwei/ddd-base | acf227ab8dba5f110f4dee00aa38966a74dd4011 | [
"MIT"
] | null | null | null | ddd_base/value_object.py | sunwei/ddd-base | acf227ab8dba5f110f4dee00aa38966a74dd4011 | [
"MIT"
] | null | null | null | ddd_base/value_object.py | sunwei/ddd-base | acf227ab8dba5f110f4dee00aa38966a74dd4011 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Domain Driven Design base framework - Value Object."""
class ValueObject(object):
def same_as(self, other):
return self == other
| 21.25 | 57 | 0.635294 |
3a9a3996a64867764b2a49878b508d67fab4324d | 809 | py | Python | torchfm/model/ffm.py | yfreedomliTHU/pytorch-fm | 5983763b4a1659a67831d14edd29392339d6dd0e | [
"MIT"
] | 734 | 2019-06-03T12:55:26.000Z | 2022-03-31T06:56:10.000Z | torchfm/model/ffm.py | yfreedomliTHU/pytorch-fm | 5983763b4a1659a67831d14edd29392339d6dd0e | [
"MIT"
] | 34 | 2019-07-01T09:11:22.000Z | 2022-02-16T12:28:34.000Z | torchfm/model/ffm.py | yfreedomliTHU/pytorch-fm | 5983763b4a1659a67831d14edd29392339d6dd0e | [
"MIT"
] | 191 | 2019-07-08T14:57:14.000Z | 2022-03-18T07:19:06.000Z | import torch
from torchfm.layer import FeaturesLinear, FieldAwareFactorizationMachine
class FieldAwareFactorizationMachineModel(torch.nn.Module):
"""
A pytorch implementation of Field-aware Factorization Machine.
Reference:
Y Juan, et al. Field-aware Factorization Machines for CTR Prediction, 20... | 31.115385 | 83 | 0.673671 |
e1d18a8d7d061c9b96f6157d19f50a0b7a051940 | 8,617 | py | Python | sdk/python/pulumi_azure_nextgen/cdn/v20191231/get_origin.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/cdn/v20191231/get_origin.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/cdn/v20191231/get_origin.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
__a... | 40.07907 | 404 | 0.65835 |
447f46e79417bf658897f875764d0fdfd22ac8a9 | 36,356 | py | Python | angr/analyses/decompiler/clinic.py | fmagin/angr | c41563b0f82a3d031c3aa482ebe2973c87ec4adb | [
"BSD-2-Clause"
] | 6,132 | 2015-08-06T23:24:47.000Z | 2022-03-31T21:49:34.000Z | angr/analyses/decompiler/clinic.py | fmagin/angr | c41563b0f82a3d031c3aa482ebe2973c87ec4adb | [
"BSD-2-Clause"
] | 2,272 | 2015-08-10T08:40:07.000Z | 2022-03-31T23:46:44.000Z | angr/analyses/decompiler/clinic.py | fmagin/angr | c41563b0f82a3d031c3aa482ebe2973c87ec4adb | [
"BSD-2-Clause"
] | 1,155 | 2015-08-06T23:37:39.000Z | 2022-03-31T05:54:11.000Z | from collections import defaultdict
import logging
from typing import Dict, List, Tuple, Set, Optional, Iterable, Union, Type, TYPE_CHECKING
import networkx
import ailment
from ...knowledge_base import KnowledgeBase
from ...codenode import BlockNode
from ...utils import timethis
from ...calling_conventions import Si... | 43.178147 | 179 | 0.609693 |
d87804a405892c3b51049da03736a6dc19bcdcac | 388 | py | Python | src/djapian/utils/__init__.py | xyz666/djapian-2.3.1-patched | 70bb12ec9e8a9dcda33eee37c4a6a0565d63b14a | [
"BSD-3-Clause"
] | null | null | null | src/djapian/utils/__init__.py | xyz666/djapian-2.3.1-patched | 70bb12ec9e8a9dcda33eee37c4a6a0565d63b14a | [
"BSD-3-Clause"
] | null | null | null | src/djapian/utils/__init__.py | xyz666/djapian-2.3.1-patched | 70bb12ec9e8a9dcda33eee37c4a6a0565d63b14a | [
"BSD-3-Clause"
] | null | null | null | from django.conf import settings
DEFAULT_MAX_RESULTS = 100000
DEFAULT_WEIGHT = 1
def model_name(model):
return "%s.%s" % (model._meta.app_label, model._meta.object_name)
def load_indexes():
from djapian.utils import loading
for app in settings.INSTALLED_APPS:
try:
loading.get_module(a... | 24.25 | 69 | 0.685567 |
4f66788bb25b1dc3ba6231696553c39122bb67d6 | 8,921 | py | Python | Validation/HGCalValidation/test/python/protoSimValid_cfg.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | Validation/HGCalValidation/test/python/protoSimValid_cfg.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | Validation/HGCalValidation/test/python/protoSimValid_cfg.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | ###############################################################################
# Way to use this:
# cmsRun protoSimValid_cfg.py geometry=D77 type=hgcalBHValidation
#
# Options for geometry D49, D68, D77, D83, D84, D86
# type hgcalBHValidation, hgcalSiliconValidation
#
################################... | 43.096618 | 141 | 0.71483 |
dfec4dbada9d88d80e3fe5167ec1b43a826e2beb | 626 | py | Python | build/config/ios/ios_sdk.py | domenic/mojo | 53dda76fed90a47c35ed6e06baf833a0d44495b8 | [
"BSD-3-Clause"
] | 231 | 2015-01-08T09:04:44.000Z | 2021-12-30T03:03:10.000Z | build/config/ios/ios_sdk.py | domenic/mojo | 53dda76fed90a47c35ed6e06baf833a0d44495b8 | [
"BSD-3-Clause"
] | 8 | 2015-08-31T06:39:59.000Z | 2021-12-04T14:53:28.000Z | build/config/ios/ios_sdk.py | domenic/mojo | 53dda76fed90a47c35ed6e06baf833a0d44495b8 | [
"BSD-3-Clause"
] | 268 | 2015-01-21T05:53:28.000Z | 2022-03-25T22:09:01.000Z | # 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 subprocess
import sys
# This script returns the path to the SDK of the given type. Pass the type of
# SDK you want, which is typically "iphone" or "i... | 31.3 | 77 | 0.688498 |
4d486c9ceff51da2363d5a81a84ff137bb8abe2a | 400 | py | Python | api/components/text.py | singhprincejeet/in_poster | 1b0e18631ebede94e679eb0aba6c8e7630a02aba | [
"MIT"
] | null | null | null | api/components/text.py | singhprincejeet/in_poster | 1b0e18631ebede94e679eb0aba6c8e7630a02aba | [
"MIT"
] | 4 | 2021-04-30T21:09:19.000Z | 2022-03-12T00:19:12.000Z | api/components/text.py | singhprincejeet/in_poster | 1b0e18631ebede94e679eb0aba6c8e7630a02aba | [
"MIT"
] | null | null | null | class Text:
def __init__(self, value, text_style):
self.value = value
self.text_style = text_style
def get_font(self):
return self.text_style.get_font()
def get_value(self):
return self.value
def get_align(self):
return self.text_style.get_ali... | 19.047619 | 43 | 0.6025 |
d8f781fca20d74d91c400693632a1a7abb6f28a8 | 1,993 | py | Python | rocket_connect/asterisk/migrations/0001_initial.py | diegoromanio/rocket.connect | f161ab020ed64333aa35c0e17816ab48e39062b0 | [
"MIT"
] | 23 | 2021-04-15T23:19:51.000Z | 2022-02-21T19:58:31.000Z | rocket_connect/asterisk/migrations/0001_initial.py | diegoromanio/rocket.connect | f161ab020ed64333aa35c0e17816ab48e39062b0 | [
"MIT"
] | 30 | 2021-04-14T22:04:20.000Z | 2022-03-28T11:22:08.000Z | rocket_connect/asterisk/migrations/0001_initial.py | diegoromanio/rocket.connect | f161ab020ed64333aa35c0e17816ab48e39062b0 | [
"MIT"
] | 5 | 2021-04-16T14:50:32.000Z | 2022-03-11T23:50:59.000Z | # Generated by Django 3.1.10 on 2021-06-11 14:26
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Call',
fields=[
... | 43.326087 | 141 | 0.583041 |
936a1a87158db053089547aba54754ed3c4cd5de | 6,651 | py | Python | src/carts/views.py | Saruni0305/oop-work-2 | 371787017cdd8446220b646c0070c4e53065bff5 | [
"MIT"
] | 24 | 2018-11-17T21:02:06.000Z | 2021-11-18T23:02:00.000Z | src/carts/views.py | Saruni0305/oop-work-2 | 371787017cdd8446220b646c0070c4e53065bff5 | [
"MIT"
] | 9 | 2020-06-05T21:43:20.000Z | 2021-11-15T17:49:01.000Z | src/carts/views.py | SaruniM/oop-work-2 | 371787017cdd8446220b646c0070c4e53065bff5 | [
"MIT"
] | 15 | 2019-03-08T20:19:17.000Z | 2021-12-29T10:16:14.000Z | from django.conf import settings
from django.shortcuts import render, redirect
from django.http import JsonResponse, Http404
from django.contrib import messages
from django.core.urlresolvers import reverse
import stripe
from .models import Cart
from products.models import Product
from orders.models import Order
from ... | 39.589286 | 118 | 0.657796 |
95a798c99f23326a3c068b977cab49add6dd45ac | 14,421 | py | Python | bin/scons-proc.py | fire/scons | f5f5f99d447bd00e0f2202beddb9d86bf0417589 | [
"MIT"
] | null | null | null | bin/scons-proc.py | fire/scons | f5f5f99d447bd00e0f2202beddb9d86bf0417589 | [
"MIT"
] | null | null | null | bin/scons-proc.py | fire/scons | f5f5f99d447bd00e0f2202beddb9d86bf0417589 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Process a list of Python and/or XML files containing SCons documentation.
#
# This script creates formatted lists of the Builders, functions, Tools
# or construction variables documented in the specified XML files.
#
# Depending on the options, the lists are output in either
# DocBook-formatte... | 33.228111 | 114 | 0.535192 |
bca81757c70aee9b7102e5811393bb087ec6a7e9 | 3,344 | py | Python | tests/unit/test_vcs.py | ManjushaManju/pip | 9626d9ccdb03c659fdffb5e2c97bf05effecbc5f | [
"MIT"
] | null | null | null | tests/unit/test_vcs.py | ManjushaManju/pip | 9626d9ccdb03c659fdffb5e2c97bf05effecbc5f | [
"MIT"
] | null | null | null | tests/unit/test_vcs.py | ManjushaManju/pip | 9626d9ccdb03c659fdffb5e2c97bf05effecbc5f | [
"MIT"
] | 1 | 2020-04-12T11:58:21.000Z | 2020-04-12T11:58:21.000Z | import pytest
from tests.lib import pyversion
from pip.vcs import VersionControl
from pip.vcs.bazaar import Bazaar
from pip.vcs.git import Git
from mock import Mock
if pyversion >= '3':
VERBOSE_FALSE = False
else:
VERBOSE_FALSE = 0
@pytest.fixture
def git():
git_url = 'http://github.com/pypa/pip-test-pac... | 29.59292 | 74 | 0.668361 |
0f0d0e3439296ac0bc0f0ca2dad963f569bc6b90 | 5,801 | py | Python | examples/example_11_binary_source.py | pmehta08/MulensModel | 261738c445a8d116d09c90e65f6e847cfc8a7ad8 | [
"MIT"
] | null | null | null | examples/example_11_binary_source.py | pmehta08/MulensModel | 261738c445a8d116d09c90e65f6e847cfc8a7ad8 | [
"MIT"
] | null | null | null | examples/example_11_binary_source.py | pmehta08/MulensModel | 261738c445a8d116d09c90e65f6e847cfc8a7ad8 | [
"MIT"
] | null | null | null | """
Fits binary source model using EMCEE sampler.
The code simulates binary source light curve and fits the model twice:
with source flux ratio found via linear regression and
with source flux ratio as a chain parameter.
"""
import os
import sys
import numpy as np
try:
import emcee
except ImportError as err:
p... | 35.157576 | 79 | 0.675401 |
cb9222592fe0db7f586c712ce569b49d50a05421 | 4,282 | py | Python | FeatureCollection/add_area_column.py | c11/earthengine-py-notebooks | 144b57e4d952da095ba73c3cc8ce2f36291162ff | [
"MIT"
] | 1 | 2020-05-31T14:19:59.000Z | 2020-05-31T14:19:59.000Z | FeatureCollection/add_area_column.py | c11/earthengine-py-notebooks | 144b57e4d952da095ba73c3cc8ce2f36291162ff | [
"MIT"
] | null | null | null | FeatureCollection/add_area_column.py | c11/earthengine-py-notebooks | 144b57e4d952da095ba73c3cc8ce2f36291162ff | [
"MIT"
] | null | null | null | # %%
"""
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/FeatureCollection/add_area_column.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td>
<td><a ta... | 50.376471 | 1,021 | 0.751051 |
8a81be2aba07a38dee4419e1026dac6f1153ec36 | 957 | py | Python | packages/pyre/constraints/Subset.py | BryanRiel/pyre | 179359634a7091979cced427b6133dd0ec4726ea | [
"BSD-3-Clause"
] | null | null | null | packages/pyre/constraints/Subset.py | BryanRiel/pyre | 179359634a7091979cced427b6133dd0ec4726ea | [
"BSD-3-Clause"
] | null | null | null | packages/pyre/constraints/Subset.py | BryanRiel/pyre | 179359634a7091979cced427b6133dd0ec4726ea | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# michael a.g. aïvázis
# orthologue
# (c) 1998-2018 all rights reserved
#
# superclass
from .Constraint import Constraint
# declaration
class Subset(Constraint):
"""
Constraint that is satisfied when the candidate is a subset of a given set
"""
# interface
def validat... | 19.9375 | 78 | 0.585162 |
dcee08fd5d3009b6f952e447fe04196d3a331859 | 4,732 | py | Python | projects/tests/analysis-weibel.py | Krissmedt/imprunko | 94171d0d47171cc4b199cd52f5f29385cbff903e | [
"MIT"
] | 5 | 2018-10-26T07:08:16.000Z | 2019-05-10T06:47:37.000Z | projects/tests/analysis-weibel.py | Krissmedt/imprunko | 94171d0d47171cc4b199cd52f5f29385cbff903e | [
"MIT"
] | 9 | 2018-11-09T08:50:48.000Z | 2019-06-06T20:11:12.000Z | projects/tests/analysis-weibel.py | Krissmedt/imprunko | 94171d0d47171cc4b199cd52f5f29385cbff903e | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import h5py
import sys, os
import matplotlib.ticker as ticker
from scipy.stats import mstats
from scipy.optimize import curve_fit
from combine_files import combine_files, combine_tiles
from configSetup import Configuration
#------------------------------------------... | 25.44086 | 89 | 0.595309 |
18d578f2f59bdd1038e3f9d5c1566a9e84e9233c | 2,033 | py | Python | mlrun/runtimes/sparkjob/spark2job.py | george0st/mlrun | 6467d3a5ceadf6cd35512b84b3ddc3da611cf39a | [
"Apache-2.0"
] | null | null | null | mlrun/runtimes/sparkjob/spark2job.py | george0st/mlrun | 6467d3a5ceadf6cd35512b84b3ddc3da611cf39a | [
"Apache-2.0"
] | null | null | null | mlrun/runtimes/sparkjob/spark2job.py | george0st/mlrun | 6467d3a5ceadf6cd35512b84b3ddc3da611cf39a | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Iguazio
#
# 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... | 33.883333 | 86 | 0.640925 |
7cad1a354e729f3f4c8ba9ba097e46b9dd2b620e | 19,460 | py | Python | vendor/Twisted-10.0.0/twisted/web/test/test_proxy.py | bopopescu/cc-2 | 37444fb16b36743c439b0d6c3cac2347e0cc0a94 | [
"Apache-2.0"
] | null | null | null | vendor/Twisted-10.0.0/twisted/web/test/test_proxy.py | bopopescu/cc-2 | 37444fb16b36743c439b0d6c3cac2347e0cc0a94 | [
"Apache-2.0"
] | 1 | 2020-08-02T15:40:49.000Z | 2020-08-02T15:40:49.000Z | vendor/Twisted-10.0.0/twisted/web/test/test_proxy.py | bopopescu/cc-2 | 37444fb16b36743c439b0d6c3cac2347e0cc0a94 | [
"Apache-2.0"
] | 1 | 2020-07-25T19:36:05.000Z | 2020-07-25T19:36:05.000Z | # Copyright (c) 2007-2010 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Test for L{twisted.web.proxy}.
"""
from twisted.trial.unittest import TestCase
from twisted.test.proto_helpers import StringTransportWithDisconnection
from twisted.test.proto_helpers import MemoryReactor
from twisted.web.resource i... | 35.904059 | 83 | 0.620041 |
044f8e01f9bcead7d4a94836dc44912388272632 | 9,986 | py | Python | Pytorch/convForecastNet.py | khsibr/forecastNet | f3a3d8a7a675dfdd37365e9945c1d02548465c61 | [
"MIT"
] | 81 | 2020-02-18T19:07:28.000Z | 2022-03-22T23:08:09.000Z | Pytorch/convForecastNet.py | khsibr/forecastNet | f3a3d8a7a675dfdd37365e9945c1d02548465c61 | [
"MIT"
] | 12 | 2020-05-02T14:48:10.000Z | 2021-08-16T02:51:21.000Z | Pytorch/convForecastNet.py | khsibr/forecastNet | f3a3d8a7a675dfdd37365e9945c1d02548465c61 | [
"MIT"
] | 23 | 2020-02-20T11:22:21.000Z | 2022-03-26T07:46:58.000Z | """
ForecastNet with cells comprising a convolutional neural network.
ForecastNetConvModel provides the mixture density network outputs.
ForecastNetConvModel2 provides the linear outputs.
Paper:
"ForecastNet: A Time-Variant Deep Feed-Forward Neural Network Architecture for Multi-Step-Ahead Time-Series Forecasting"
by ... | 56.418079 | 161 | 0.676948 |
f1f666c1c27e5dc1c4ce346ace673bf99e4051b6 | 358 | py | Python | src/344-reverse-string.py | sahilrider/LeetCode-Solutions | 9cac844c27b5dbf37a70c2981a09cd92457f7ff1 | [
"MIT"
] | 2 | 2020-03-06T11:44:25.000Z | 2020-03-13T20:07:48.000Z | src/344-reverse-string.py | sahilrider/LeetCode-Solutions | 9cac844c27b5dbf37a70c2981a09cd92457f7ff1 | [
"MIT"
] | null | null | null | src/344-reverse-string.py | sahilrider/LeetCode-Solutions | 9cac844c27b5dbf37a70c2981a09cd92457f7ff1 | [
"MIT"
] | null | null | null | '''https://leetcode.com/problems/reverse-string/'''
class Solution:
def reverseString(self, s: List[str]) -> None:
"""
Do not return anything, modify s in-place instead.
"""
def helper(l, r):
if l<r:
s[l], s[r] = s[r], s[l]
helper(l+1, r-1... | 27.538462 | 58 | 0.46648 |
fd70ec0925eb330593e16636f67c4394b13ecb77 | 197 | py | Python | py-scripts/utf-clean.py | Inverseit/dotfiles | 0a8d6abcc67c0f4db9913b3915635e99c8a0a52c | [
"BSL-1.0"
] | 1 | 2021-12-12T10:07:18.000Z | 2021-12-12T10:07:18.000Z | py-scripts/utf-clean.py | Inverseit/dotfiles | 0a8d6abcc67c0f4db9913b3915635e99c8a0a52c | [
"BSL-1.0"
] | null | null | null | py-scripts/utf-clean.py | Inverseit/dotfiles | 0a8d6abcc67c0f4db9913b3915635e99c8a0a52c | [
"BSL-1.0"
] | null | null | null | #!/usr/bin/python3
import sys
text = ''
for line in sys.stdin:
line = line.replace(r'“', r'"')
line = line.replace(r'”', r'"')
line = line.replace(r'’', r"'")
text += line
print(text.strip())
| 17.909091 | 32 | 0.588832 |
55b72d7954c0b2fba21ac6e80edcf9a4afc6194d | 13,456 | py | Python | inverse_warp.py | WestCityInstitute/DeepSFM | 393ad8f39c5a305f3b351af497dc510697ee931e | [
"BSD-3-Clause"
] | 235 | 2020-08-14T13:30:39.000Z | 2022-03-23T09:56:12.000Z | inverse_warp.py | WestCityInstitute/DeepSFM | 393ad8f39c5a305f3b351af497dc510697ee931e | [
"BSD-3-Clause"
] | 12 | 2020-08-26T13:09:59.000Z | 2022-03-22T04:41:46.000Z | inverse_warp.py | WestCityInstitute/DeepSFM | 393ad8f39c5a305f3b351af497dc510697ee931e | [
"BSD-3-Clause"
] | 40 | 2020-08-24T06:29:41.000Z | 2022-03-13T01:45:40.000Z | from __future__ import division
import torch
from torch.autograd import Variable
import torch.nn.functional as F
pixel_coords = None
def set_id_grid(depth):
global pixel_coords
b, h, w = depth.size()
i_range = Variable(torch.arange(0, h).view(1, h, 1).expand(1, h, w)).type_as(depth) # [1, H, W]
j_range = Variab... | 40.652568 | 116 | 0.627155 |
e299d0de9fb33ed4225d273a57592282ba871f95 | 2,845 | py | Python | recipe_modules/context/examples/full.py | luci/recipes-py | 13b77f0e1dc3e0f15f540679262ce966917c15a3 | [
"Apache-2.0"
] | 23 | 2016-01-20T00:45:26.000Z | 2022-02-26T04:25:30.000Z | recipe_modules/context/examples/full.py | luci/recipes-py | 13b77f0e1dc3e0f15f540679262ce966917c15a3 | [
"Apache-2.0"
] | 8 | 2016-01-15T19:00:38.000Z | 2018-03-06T00:15:24.000Z | recipe_modules/context/examples/full.py | luci/recipes-py | 13b77f0e1dc3e0f15f540679262ce966917c15a3 | [
"Apache-2.0"
] | 13 | 2015-09-05T05:52:43.000Z | 2019-07-08T17:34:27.000Z | # Copyright 2017 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
from recipe_engine import recipe_api, config
from PB.go.chromium.org.luci.lucictx.sections import Deadline
PYTHON_VERSION_COMPATIBILITY = 'PY2+3... | 31.611111 | 83 | 0.642882 |
599237c48584ab10b2506ff1ba3651fcd8d2256c | 2,547 | py | Python | payments/stripe/__init__.py | jonejone/django-payments | 5d595d38ef88b4a26d847f35974926bba4a3fcde | [
"BSD-3-Clause"
] | null | null | null | payments/stripe/__init__.py | jonejone/django-payments | 5d595d38ef88b4a26d847f35974926bba4a3fcde | [
"BSD-3-Clause"
] | null | null | null | payments/stripe/__init__.py | jonejone/django-payments | 5d595d38ef88b4a26d847f35974926bba4a3fcde | [
"BSD-3-Clause"
] | null | null | null | import json
from decimal import Decimal
import stripe
from .. import PaymentError
from .. import PaymentStatus
from .. import RedirectNeeded
from ..core import BasicProvider
from .forms import ModalPaymentForm
from .forms import PaymentForm
class StripeProvider(BasicProvider):
"""Provider backend using `Stripe ... | 32.240506 | 78 | 0.673341 |
ec06c525dc70c70811ab08c4d1c7483c47d62c26 | 1,508 | py | Python | network/unmix/test/configuration/testconfiguration.py | splitstrument/training | 03d1edd68f3079dc1fba890eebf16fa90eb900f0 | [
"MIT"
] | 4 | 2019-04-10T22:20:12.000Z | 2020-01-27T17:43:48.000Z | network/unmix/test/configuration/testconfiguration.py | splitstrument/training | 03d1edd68f3079dc1fba890eebf16fa90eb900f0 | [
"MIT"
] | 3 | 2019-03-09T12:03:58.000Z | 2020-01-27T17:42:21.000Z | unmix/test/configuration/testconfiguration.py | unmix-io/unmix-net | 873d99da42f80574543c096fcd5b7c8748d2cca0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding: utf8
"""
Tests JSON(C) configuration.
"""
__author__ = 'David Flury, Andreas Kaufmann, Raphael Müller'
__email__ = "info@unmix.io"
import os
from unmix.source.configuration import Configuration
def test_configuration_initialize():
current_path = os.path.dirname(__file__)
... | 33.511111 | 76 | 0.720822 |
bf0d8fb2046a9f00ff8746b0c0eb245a80c2a2a2 | 798 | py | Python | zadanie1.2.py | StPluto/Test11 | 5ba48d819fc3b0ca34daff14151810d72d7ad052 | [
"MIT"
] | null | null | null | zadanie1.2.py | StPluto/Test11 | 5ba48d819fc3b0ca34daff14151810d72d7ad052 | [
"MIT"
] | null | null | null | zadanie1.2.py | StPluto/Test11 | 5ba48d819fc3b0ca34daff14151810d72d7ad052 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- config: utf-8 -*-
from functools import lru_cache
import timeit
@lru_cache
def fib(n):
if n == 0 or n == 1:
return n
else:
return fib(n - 2) + fib(n - 1)
@lru_cache
def factorial(n):
if n == 0:
return 1
elif n == 1:
return 1
else:
... | 24.181818 | 108 | 0.642857 |
6a335f63c20e7dbca3e2b20c8d580898808bccaf | 12,997 | py | Python | fast_rnnt/python/tests/mutual_information_test.py | pkufool/fast_rnnt | a283cddfc9864d7d5ada3dea9afffbe53506c1a2 | [
"Apache-2.0"
] | 52 | 2021-12-01T09:33:12.000Z | 2022-03-31T07:55:53.000Z | fast_rnnt/python/tests/mutual_information_test.py | pkufool/fast_rnnt | a283cddfc9864d7d5ada3dea9afffbe53506c1a2 | [
"Apache-2.0"
] | null | null | null | fast_rnnt/python/tests/mutual_information_test.py | pkufool/fast_rnnt | a283cddfc9864d7d5ada3dea9afffbe53506c1a2 | [
"Apache-2.0"
] | 6 | 2021-12-02T08:38:45.000Z | 2022-01-19T02:22:15.000Z | #!/usr/bin/env python3
#
# Copyright 2021 Xiaomi Corporation (authors: Daniel Povey,
# Wei Kang)
#
# See ../../../LICENSE for clarification regarding multiple authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this fi... | 41.790997 | 80 | 0.407171 |
0454e15e84ebd6d2e8a6c5fca70017f2498a3852 | 930 | py | Python | sina/sina/utils/dateTimeUtils.py | judypol/pytonStudy | 11a6982d36e39e9653eccdf5a2ad41cf0fba6c38 | [
"MIT"
] | null | null | null | sina/sina/utils/dateTimeUtils.py | judypol/pytonStudy | 11a6982d36e39e9653eccdf5a2ad41cf0fba6c38 | [
"MIT"
] | null | null | null | sina/sina/utils/dateTimeUtils.py | judypol/pytonStudy | 11a6982d36e39e9653eccdf5a2ad41cf0fba6c38 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import datetime
class DateTimeUtils:
@staticmethod
def getNow():
return datetime.datetime.now()
@staticmethod
def getStartTime():
nowTime = datetime.datetime.now()
return nowTime.strftime('%Y%m%d%H%M') + '00'
@staticmethod
def... | 26.571429 | 70 | 0.550538 |
ce49d5a5990ecff97a3c279866da7abf56bbb1a5 | 725 | py | Python | locale/pot/api/core/pointsets-6.py | tkoyama010/pyvista-doc-translations | 23bb813387b7f8bfe17e86c2244d5dd2243990db | [
"MIT"
] | 4 | 2020-08-07T08:19:19.000Z | 2020-12-04T09:51:11.000Z | locale/pot/api/core/pointsets-6.py | tkoyama010/pyvista-doc-translations | 23bb813387b7f8bfe17e86c2244d5dd2243990db | [
"MIT"
] | 19 | 2020-08-06T00:24:30.000Z | 2022-03-30T19:22:24.000Z | locale/pot/api/core/pointsets-6.py | tkoyama010/pyvista-doc-translations | 23bb813387b7f8bfe17e86c2244d5dd2243990db | [
"MIT"
] | 1 | 2021-03-09T07:50:40.000Z | 2021-03-09T07:50:40.000Z | # Load module and example file
import pyvista as pv
from pyvista import examples
# Load example beam file
grid = pv.UnstructuredGrid(examples.hexbeamfile)
# Create plotting class and add the unstructured grid
plotter = pv.Plotter()
plotter.add_mesh(grid, show_edges=True, color='tan')
# Add labels to points on the yz... | 32.954545 | 76 | 0.718621 |
cc134d24f471e628e8d04282eb4822fa9f1f0dae | 4,712 | py | Python | sorting.py | JustGk/fds | 3ea5017df8f51d7adf4af1ad07dcf5e4ea55fef9 | [
"Apache-2.0"
] | null | null | null | sorting.py | JustGk/fds | 3ea5017df8f51d7adf4af1ad07dcf5e4ea55fef9 | [
"Apache-2.0"
] | null | null | null | sorting.py | JustGk/fds | 3ea5017df8f51d7adf4af1ad07dcf5e4ea55fef9 | [
"Apache-2.0"
] | null | null | null | def bubble(arr):
print("SORTED USING BUBBLE SORT METHOD")
print("ORIGINAL ARRAY :", arr)
for i in range(len(arr)-1):
for j in range(0,len(arr)-1):
if arr[j]<arr[j+1]:
arr[j],arr[j+1]=arr[j+1],arr[j]
print("---------------------------------------------")
pr... | 29.08642 | 66 | 0.467105 |
43a07c00dddda83c4ad6b672555374622ffd9cc8 | 15,688 | py | Python | numericalunits.py | sbyrnes321/numericalunits | b66726f681e519d07dea4babe182ba1d96260524 | [
"MIT"
] | 86 | 2015-02-13T10:50:21.000Z | 2022-03-10T05:56:01.000Z | numericalunits.py | sbyrnes321/numericalunits | b66726f681e519d07dea4babe182ba1d96260524 | [
"MIT"
] | 15 | 2017-06-23T20:01:22.000Z | 2022-01-30T19:23:17.000Z | numericalunits.py | sbyrnes321/numericalunits | b66726f681e519d07dea4babe182ba1d96260524 | [
"MIT"
] | 14 | 2015-02-15T12:51:29.000Z | 2021-12-22T09:15:36.000Z | # -*- coding: utf-8 -*-
"""
For information and usage see README, or http://pypi.python.org/pypi/numericalunits
"""
# Copyright (C) 2012-2020 Steven J. Byrnes
#
# 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... | 33.810345 | 462 | 0.575217 |
a3da33d2e48bf0fe4fc8d31d19bf9d3b3ef19271 | 2,944 | py | Python | python/nano/test/test_models_onnx.py | EmiCareOfCell44/BigDL | 6278ee8eed09b5072da53dab3a99530cf5f69ba2 | [
"Apache-2.0"
] | null | null | null | python/nano/test/test_models_onnx.py | EmiCareOfCell44/BigDL | 6278ee8eed09b5072da53dab3a99530cf5f69ba2 | [
"Apache-2.0"
] | null | null | null | python/nano/test/test_models_onnx.py | EmiCareOfCell44/BigDL | 6278ee8eed09b5072da53dab3a99530cf5f69ba2 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2016 The BigDL 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 to in ... | 37.74359 | 98 | 0.728601 |
8ff046c862c31fca5202813784435c6d2d7f33cc | 805 | py | Python | tests/analyzers/hashers/entropy.py | nflexfo/plaso | 5da7aa51c39b593773687fdf20a93ba35fc492b4 | [
"Apache-2.0"
] | 27 | 2019-04-05T12:01:49.000Z | 2022-02-08T02:26:25.000Z | tests/analyzers/hashers/entropy.py | nflexfo/plaso | 5da7aa51c39b593773687fdf20a93ba35fc492b4 | [
"Apache-2.0"
] | null | null | null | tests/analyzers/hashers/entropy.py | nflexfo/plaso | 5da7aa51c39b593773687fdf20a93ba35fc492b4 | [
"Apache-2.0"
] | 8 | 2019-11-28T08:06:34.000Z | 2020-08-29T13:53:30.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for the Entropy hasher."""
from __future__ import unicode_literals
import unittest
from plaso.analyzers.hashers import entropy
from tests.analyzers.hashers import test_lib
class EntropyHasherTest(test_lib.HasherTestCase):
"""Tests the Entropy hasher."""
... | 26.833333 | 77 | 0.736646 |
09833d517bc092ad254a806bfd6283aeeb3a133b | 929 | py | Python | config.py | gabrielcoder247/News-Highlight-v2 | 595f4ee9739b173142d1012bdda63526818930e4 | [
"Unlicense"
] | null | null | null | config.py | gabrielcoder247/News-Highlight-v2 | 595f4ee9739b173142d1012bdda63526818930e4 | [
"Unlicense"
] | null | null | null | config.py | gabrielcoder247/News-Highlight-v2 | 595f4ee9739b173142d1012bdda63526818930e4 | [
"Unlicense"
] | null | null | null | import os # Module allowing our application to interact with the operating system dependent functionality.
class Config:
'''
General configuration parent class
'''
NEWS_SOURCES_BASE_URL = 'https://newsapi.org/v1/sources?language=en&category={}'
NEWS_ARTICLES_BASE_URL = 'https://newsapi.org/v1/articl... | 29.03125 | 106 | 0.711518 |
8a818629a734752cff130c637a3ecdea24e2d7bb | 7,155 | py | Python | pysteps/cascade/bandpass_filters.py | fox91/pysteps | dce3b8e7acffeffedcdddb7dd3cfaa497f758446 | [
"BSD-3-Clause"
] | 1 | 2021-08-25T03:07:07.000Z | 2021-08-25T03:07:07.000Z | pysteps/cascade/bandpass_filters.py | fox91/pysteps | dce3b8e7acffeffedcdddb7dd3cfaa497f758446 | [
"BSD-3-Clause"
] | null | null | null | pysteps/cascade/bandpass_filters.py | fox91/pysteps | dce3b8e7acffeffedcdddb7dd3cfaa497f758446 | [
"BSD-3-Clause"
] | null | null | null | """
pysteps.cascade.bandpass_filters
================================
Bandpass filters for separating different spatial scales from two-dimensional
images in the frequency domain.
The methods in this module implement the following interface::
filter_xxx(shape, n, optional arguments)
where shape is the shape of ... | 30.708155 | 79 | 0.542138 |
cf26e49f7e9a9e4c485d0a60ab11eeb59eeb1674 | 4,150 | py | Python | convokit/model/utterance.py | rgangela99/Cornell-Conversational-Analysis-Toolkit | db0f839000da777e2485ba9d69f7407123746942 | [
"MIT"
] | null | null | null | convokit/model/utterance.py | rgangela99/Cornell-Conversational-Analysis-Toolkit | db0f839000da777e2485ba9d69f7407123746942 | [
"MIT"
] | null | null | null | convokit/model/utterance.py | rgangela99/Cornell-Conversational-Analysis-Toolkit | db0f839000da777e2485ba9d69f7407123746942 | [
"MIT"
] | null | null | null | from typing import Dict, Optional
from convokit.util import deprecation
from .corpusComponent import CorpusComponent
from .speaker import Speaker
class Utterance(CorpusComponent):
"""Represents a single utterance in the dataset.
:param id: the unique id of the utterance.
:param speaker: the speaker givin... | 43.684211 | 130 | 0.570361 |
c555f1a3932d39a5b7b8fb7832101409dfdc1de2 | 2,913 | py | Python | migrations/versions/65458f3846b3_.py | KIbet1998/Minute-Pitch | e841011330e5e88017b3d422f8812e4e32c910b8 | [
"MIT"
] | null | null | null | migrations/versions/65458f3846b3_.py | KIbet1998/Minute-Pitch | e841011330e5e88017b3d422f8812e4e32c910b8 | [
"MIT"
] | null | null | null | migrations/versions/65458f3846b3_.py | KIbet1998/Minute-Pitch | e841011330e5e88017b3d422f8812e4e32c910b8 | [
"MIT"
] | null | null | null | """empty message
Revision ID: 65458f3846b3
Revises:
Create Date: 2021-06-17 10:20:20.336311
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '65458f3846b3'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gene... | 36.4125 | 87 | 0.661861 |
500e742af64bf6473ad0fbbd33ab4087e53f2250 | 4,018 | py | Python | scan.py | habx/attachment-scanner | 4f7b1f8850272d4a4fea8c83380ddc6c637257e9 | [
"Apache-2.0"
] | null | null | null | scan.py | habx/attachment-scanner | 4f7b1f8850272d4a4fea8c83380ddc6c637257e9 | [
"Apache-2.0"
] | 103 | 2018-06-14T18:14:29.000Z | 2022-03-16T20:53:44.000Z | scan.py | habx/attachment-scanner | 4f7b1f8850272d4a4fea8c83380ddc6c637257e9 | [
"Apache-2.0"
] | null | null | null | # Upside Travel, 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 writing, software
# ... | 35.245614 | 113 | 0.68218 |
b85e606d3a3cc44c8c149452b40f84d80ad7dada | 4,689 | py | Python | SciAnalysis/CurveAnalysis/Protocols.py | zhouzhouxpyf/CFN-softbio | 21e4f4845e7a49c97f4ed2b0aa78a7eb831f6bcc | [
"BSD-3-Clause"
] | 13 | 2018-04-17T06:35:20.000Z | 2021-09-22T08:49:47.000Z | SciAnalysis/CurveAnalysis/Protocols.py | zhouzhouxpyf/CFN-softbio | 21e4f4845e7a49c97f4ed2b0aa78a7eb831f6bcc | [
"BSD-3-Clause"
] | 14 | 2018-04-18T01:05:57.000Z | 2020-11-05T21:57:09.000Z | SciAnalysis/CurveAnalysis/Protocols.py | zhouzhouxpyf/CFN-softbio | 21e4f4845e7a49c97f4ed2b0aa78a7eb831f6bcc | [
"BSD-3-Clause"
] | 9 | 2017-05-26T14:47:38.000Z | 2021-03-24T02:44:59.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# vi: ts=4 sw=4
'''
:mod:`SciAnalysis.CurveAnalysis.Protocols` - 1D curve analysis protocols
================================================
.. module:: SciAnalysis.CurveAnalysis.Protocols
:synopsis: Convenient protocols for data analysis.
.. moduleauthor:: Dr. Kevin G. Yag... | 28.077844 | 80 | 0.487524 |
604b215e12fffa882131fe1c6d327f3da76d23bb | 692 | py | Python | setup.py | roylanmartinez/Numlet | fb7f8ab294dbc4861f9f264d79da054f7c13ac19 | [
"MIT"
] | 28 | 2020-02-07T01:02:40.000Z | 2022-01-25T19:59:33.000Z | setup.py | roylanmartinez/Numeros-naturales-y-cero-a-letras | fb7f8ab294dbc4861f9f264d79da054f7c13ac19 | [
"MIT"
] | null | null | null | setup.py | roylanmartinez/Numeros-naturales-y-cero-a-letras | fb7f8ab294dbc4861f9f264d79da054f7c13ac19 | [
"MIT"
] | 5 | 2020-02-07T05:41:50.000Z | 2021-01-07T00:03:21.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="Paquete-nlt-roylanmartinez",
version="2.0.0",
author="Roylan Martinez Vargas",
author_email="roylanmartinez97@gmail.com",
description="Convierte a letras más de 10^600 números",
long_d... | 30.086957 | 59 | 0.677746 |
0fda70c253628146ffc32b5e386d879cc558d931 | 6,588 | py | Python | dems/setsm/rema_strip_r1.1_2m_rgi.py | subond/ww_tvol_study | 6fbcae251015a7cd49220abbb054914266b3b4a1 | [
"MIT"
] | 20 | 2021-04-28T18:11:43.000Z | 2022-03-09T13:15:56.000Z | dems/setsm/rema_strip_r1.1_2m_rgi.py | subond/ww_tvol_study | 6fbcae251015a7cd49220abbb054914266b3b4a1 | [
"MIT"
] | 4 | 2021-04-28T15:51:43.000Z | 2022-01-02T19:10:25.000Z | dems/setsm/rema_strip_r1.1_2m_rgi.py | rhugonnet/ww_tvol_study | f29fc2fca358aa169f6b7cc790e6b6f9f8b55c6f | [
"MIT"
] | 9 | 2021-04-28T17:58:27.000Z | 2021-12-19T05:51:56.000Z | """
@author: hugonnet
download, extract, reproject and pairwise-coregister all REMA 2m strips intersecting glaciers
"""
import os, sys, shutil
from subprocess import Popen
sys.path.append('/home/echos/hugonnet/code/devel/rh_pygeotools')
import pandas as pd
import multiprocessing as mp
from demstripproducts import REMA... | 38.302326 | 225 | 0.687007 |
7013f081b22a20748d8b78ff2917c84bc6626270 | 14,226 | py | Python | sysinv/sysinv/sysinv/sysinv/api/controllers/v1/dns.py | albailey/config | 40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9 | [
"Apache-2.0"
] | 10 | 2020-02-07T18:57:44.000Z | 2021-09-11T10:29:34.000Z | sysinv/sysinv/sysinv/sysinv/api/controllers/v1/dns.py | albailey/config | 40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9 | [
"Apache-2.0"
] | 1 | 2021-01-14T12:01:55.000Z | 2021-01-14T12:01:55.000Z | sysinv/sysinv/sysinv/sysinv/api/controllers/v1/dns.py | albailey/config | 40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9 | [
"Apache-2.0"
] | 10 | 2020-10-13T08:37:46.000Z | 2022-02-09T00:21:25.000Z | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2013 UnitedStack Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.... | 36.383632 | 79 | 0.557219 |
43e694b5bdd869a05f095be932647618d63248f0 | 5,285 | py | Python | scripts/external_libs/scapy-2.3.1/python3/scapy/arch/unix.py | klement/trex-core | b98e2e6d2b8c6caeb233ce36fcbc131ffc45e35e | [
"Apache-2.0"
] | 7 | 2017-12-30T20:57:43.000Z | 2020-03-22T00:15:26.000Z | scripts/external_libs/scapy-2.3.1/python3/scapy/arch/unix.py | klement/trex-core | b98e2e6d2b8c6caeb233ce36fcbc131ffc45e35e | [
"Apache-2.0"
] | 13 | 2019-10-11T12:33:43.000Z | 2020-02-10T08:28:34.000Z | scripts/external_libs/scapy-2.3.1/python3/scapy/arch/unix.py | klement/trex-core | b98e2e6d2b8c6caeb233ce36fcbc131ffc45e35e | [
"Apache-2.0"
] | 3 | 2017-09-14T13:18:05.000Z | 2020-02-10T15:56:54.000Z | ## This file is part of Scapy
## See http://www.secdev.org/projects/scapy for more informations
## Copyright (C) Philippe Biondi <phil@secdev.org>
## This program is published under a GPLv2 license
"""
Common customizations for all Unix-like operating systems other than Linux
"""
import sys,os,struct,socket,time
from... | 31.272189 | 113 | 0.512772 |
be86dad8e341d45926c1167e867e6296fec7c80c | 7,794 | py | Python | docs/conf.py | andrefarina/mlops-test | 70b9414449e7adddc4de5bb19e901a2b9bc84a3c | [
"FTL"
] | null | null | null | docs/conf.py | andrefarina/mlops-test | 70b9414449e7adddc4de5bb19e901a2b9bc84a3c | [
"FTL"
] | null | null | null | docs/conf.py | andrefarina/mlops-test | 70b9414449e7adddc4de5bb19e901a2b9bc84a3c | [
"FTL"
] | null | null | null | # -*- coding: utf-8 -*-
#
# mlops-deploy documentation build configuration file, created by
# sphinx-quickstart.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values h... | 31.812245 | 80 | 0.706569 |
4fbe1d052a4f90720631b84a181218c247ab2e17 | 4,465 | py | Python | tests/fixtures/results/numpydoc.test1.py | chadrik/doc484 | 597b421a398f5afcc5feb7abae376820fcc25876 | [
"MIT"
] | 22 | 2017-07-24T22:12:01.000Z | 2021-10-17T15:52:48.000Z | tests/fixtures/results/numpydoc.test1.py | chadrik/doc484 | 597b421a398f5afcc5feb7abae376820fcc25876 | [
"MIT"
] | 1 | 2019-11-07T03:55:34.000Z | 2019-11-07T04:08:09.000Z | tests/fixtures/results/numpydoc.test1.py | chadrik/doc484 | 597b421a398f5afcc5feb7abae376820fcc25876 | [
"MIT"
] | 2 | 2018-09-25T22:48:16.000Z | 2020-04-17T11:41:57.000Z | """
Module-level docs
"""
from __future__ import absolute_import, print_function
def basic(one, two, three, four, _five, six_):
# type: (Union[str, int], str, Any, Any, bool, int) -> bool
"""
Parameters
----------
one : Union[str, int]
description of one
two : str
description ... | 16.849057 | 75 | 0.515342 |
9d346471abc8f0ea5632b40efd17e312d3889672 | 278 | py | Python | python/setup_exe.py | netchira/netchira.github.io | bed7b1425fe0ec206887be9cf48a571afbded9e8 | [
"CC0-1.0"
] | 6 | 2019-09-25T06:43:01.000Z | 2022-03-11T02:54:47.000Z | python/setup_exe.py | netchira/netchira.github.io | bed7b1425fe0ec206887be9cf48a571afbded9e8 | [
"CC0-1.0"
] | 6 | 2019-01-06T07:35:10.000Z | 2022-02-26T03:46:28.000Z | python/setup_exe.py | netchira/netchira.github.io | bed7b1425fe0ec206887be9cf48a571afbded9e8 | [
"CC0-1.0"
] | 7 | 2021-05-14T07:04:36.000Z | 2022-03-20T18:23:28.000Z | from distutils.core import setup
import py2exe
script = 'CompareTxt.py'
option = {
'compressed': 1,
'optimize': 2,
'bundle_files': 3,
}
setup(
options = {
'py2exe': option,
},
console = [
{'script': script }
],
zipfile = None,
) | 14.631579 | 32 | 0.543165 |
b2604195d2d10eda311a6fd23b98c8e917ca4245 | 107 | py | Python | lab_assignment/lab_9/linux_mac/os.py | caru1613/introduction_to_python_TEAMLAB_MOOC | e0ac95f7a6b889e7d18b7bdaaab49820e73d5477 | [
"MIT"
] | null | null | null | lab_assignment/lab_9/linux_mac/os.py | caru1613/introduction_to_python_TEAMLAB_MOOC | e0ac95f7a6b889e7d18b7bdaaab49820e73d5477 | [
"MIT"
] | null | null | null | lab_assignment/lab_9/linux_mac/os.py | caru1613/introduction_to_python_TEAMLAB_MOOC | e0ac95f7a6b889e7d18b7bdaaab49820e73d5477 | [
"MIT"
] | null | null | null | import os
os.mkdir("log")
if not os.path.isdir("log"):
print("there isn't ", dir)
os.mkdir("log")
| 15.285714 | 30 | 0.598131 |
a3dbfa15b57c59cc10a4134ab441212e02f7e728 | 799 | py | Python | src/core/sly/docparse.py | mehanalavimajd/hascal | 5ad81bb673ab40ae2b27540e56eae496582b4b2b | [
"BSL-1.0"
] | 1 | 2021-05-12T09:33:24.000Z | 2021-05-12T09:33:24.000Z | src/core/sly/docparse.py | mehanalavimajd/hascal | 5ad81bb673ab40ae2b27540e56eae496582b4b2b | [
"BSL-1.0"
] | null | null | null | src/core/sly/docparse.py | mehanalavimajd/hascal | 5ad81bb673ab40ae2b27540e56eae496582b4b2b | [
"BSL-1.0"
] | null | null | null | __all__ = [ 'DocParseMeta' ]
class DocParseMeta(type):
@staticmethod
def __new__(meta, clsname, bases, clsdict):
if '__doc__' in clsdict:
lexer = meta.lexer()
parser = meta.parser()
lexer.cls_name = parser.cls_name = clsname
lexer.cls_qualname = parser.cl... | 39.95 | 81 | 0.637046 |
fa3d4abaab581f30fe9ebb0e5cf3e3a2db5d985d | 57,300 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/community/general/plugins/modules/one_vm.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 22 | 2021-07-16T08:11:22.000Z | 2022-03-31T07:15:34.000Z | venv/lib/python3.6/site-packages/ansible_collections/community/general/plugins/modules/one_vm.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/community/general/plugins/modules/one_vm.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 39 | 2021-07-05T02:31:42.000Z | 2022-03-31T02:46:03.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
"""
(c) 2017, Milan Ilic <milani@nordeus.com>
(c) 2019, Jan Meerkamp <meerkamp@dvv.de>
This file is part of Ansible
Ansible is free software: you can redis... | 35.501859 | 158 | 0.610401 |
f1e1aec6684082d56cbe4f0de3a166b3b290cfb6 | 547 | py | Python | tests/test_translate.py | wasdee/pythainlp | 9e97321aebc104cb260f801e3b983c937f31ae01 | [
"Apache-2.0"
] | 1 | 2021-01-13T17:59:55.000Z | 2021-01-13T17:59:55.000Z | tests/test_translate.py | prrssr/pythainlp | 19ff3510a73dd93515fcc1b4485326a8b7172026 | [
"Apache-2.0"
] | null | null | null | tests/test_translate.py | prrssr/pythainlp | 19ff3510a73dd93515fcc1b4485326a8b7172026 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import unittest
from pythainlp.translate import EnThTranslator, ThEnTranslator
class TestTranslatePackage(unittest.TestCase):
def test_translate(self):
self.th_en_translator = ThEnTranslator()
self.assertIsNotNone(
self.th_en_translator.translate(
... | 24.863636 | 62 | 0.599634 |
569879f9fe2ea4ec1eb1e5ca87ad697765effedc | 8,825 | py | Python | BatchExport.py | mitchelldmccollum/Blender2.8BatchExport | 09d99833d1c436e3e004966080ed31117cca039a | [
"MIT"
] | null | null | null | BatchExport.py | mitchelldmccollum/Blender2.8BatchExport | 09d99833d1c436e3e004966080ed31117cca039a | [
"MIT"
] | null | null | null | BatchExport.py | mitchelldmccollum/Blender2.8BatchExport | 09d99833d1c436e3e004966080ed31117cca039a | [
"MIT"
] | 1 | 2019-09-05T05:37:20.000Z | 2019-09-05T05:37:20.000Z | bl_info = {
"name": "Batch Exporter",
"description": "",
"author": "Mitch McCollum",
"version": (1, 8, 17),
"blender": (2, 80, 0),
"location": "3D View > Tools",
"warning": "", # used for warning icon and text in addons panel
"wiki_url": "",
"tracker_url": "",
"category": "Develo... | 31.630824 | 142 | 0.511955 |
1e0a1b7b1609a4ab97a16fcbe91e0c04cfcf3972 | 7,496 | py | Python | tods/tests/common/test_train_score_split.py | ZhuangweiKang/tods | fe3f55f8ccb306dd292c668e0f1154f1afdfa556 | [
"Apache-2.0"
] | 544 | 2020-09-21T06:02:33.000Z | 2022-03-27T07:16:32.000Z | tods/tests/common/test_train_score_split.py | ZhuangweiKang/tods | fe3f55f8ccb306dd292c668e0f1154f1afdfa556 | [
"Apache-2.0"
] | 35 | 2020-09-21T06:33:13.000Z | 2022-03-11T14:20:21.000Z | tods/tests/common/test_train_score_split.py | ZhuangweiKang/tods | fe3f55f8ccb306dd292c668e0f1154f1afdfa556 | [
"Apache-2.0"
] | 86 | 2020-09-21T16:44:33.000Z | 2022-03-11T18:20:22.000Z | import os
import pickle
import unittest
from d3m import container
from d3m.metadata import base as metadata_base
from tods.common import TrainScoreSplit
class TrainScoreDatasetSplitPrimitiveTestCase(unittest.TestCase):
def _get_yahoo_dataset(self):
dataset_doc_path = os.path.abspath(os.path.join(os.pat... | 59.023622 | 180 | 0.709312 |
ab299fe5ed93c0ee5bebc3da5c18f17c3b452bea | 14,991 | py | Python | Experiments/BostonHousing/utils.py | Neronjust2017/Bayesian-neural-networks | 9d7f781f5c2dfa8fadf26300b4b5b64366c939cd | [
"MIT"
] | 4 | 2020-07-07T12:29:03.000Z | 2021-11-17T07:20:17.000Z | Experiments/BostonHousing/utils.py | Neronjust2017/Bayesian-neural-networks | 9d7f781f5c2dfa8fadf26300b4b5b64366c939cd | [
"MIT"
] | null | null | null | Experiments/BostonHousing/utils.py | Neronjust2017/Bayesian-neural-networks | 9d7f781f5c2dfa8fadf26300b4b5b64366c939cd | [
"MIT"
] | 1 | 2020-05-29T08:07:48.000Z | 2020-05-29T08:07:48.000Z | from sklearn.datasets import load_boston
from pandas import Series,DataFrame
import torch
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
def _get_index_train_test_path(split_num, train = True):
_DATA_DIRECTORY_PATH = './data/'
"""
Method to generate the path... | 47.439873 | 167 | 0.581416 |
62bbde4bcad67ddadc2ae4832cf4d041bb113f87 | 2,469 | py | Python | vtam/utils/SequenceClusterer.py | RaphaelHebert/vtam | 6cbc7e241f9aa4245f5fd000769b9765333d41c2 | [
"MIT"
] | null | null | null | vtam/utils/SequenceClusterer.py | RaphaelHebert/vtam | 6cbc7e241f9aa4245f5fd000769b9765333d41c2 | [
"MIT"
] | null | null | null | vtam/utils/SequenceClusterer.py | RaphaelHebert/vtam | 6cbc7e241f9aa4245f5fd000769b9765333d41c2 | [
"MIT"
] | null | null | null | import os
import shlex
import subprocess
import sys
import pandas
from vtam.utils.PathManager import PathManager
class SequenceClusterer(object):
def __init__(self, variant_info_df, cluster_identity):
"""Takes as input df with at least these columns: variant_id, read_cout, sequence"""
self.var... | 39.190476 | 136 | 0.597003 |
e6c868a0ae2a61a7e54e88d1e73daf3803c1d68a | 1,589 | py | Python | redisbox/unittest.py | ziadsawalha/redisbox | 5dda344a67e2f9e5fba66f1150ec4a8556e22262 | [
"Apache-2.0"
] | 1 | 2016-12-28T09:47:16.000Z | 2016-12-28T09:47:16.000Z | redisbox/unittest.py | ziadsawalha/redisbox | 5dda344a67e2f9e5fba66f1150ec4a8556e22262 | [
"Apache-2.0"
] | null | null | null | redisbox/unittest.py | ziadsawalha/redisbox | 5dda344a67e2f9e5fba66f1150ec4a8556e22262 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from unittest import TestCase
import os
try:
import redis
except ImportError:
raise ImportError('`redis` is required for RedisTestCase')
class RedisTestCase(TestCase):
"""A base for Redis DB driven test cases. Provides
:class:`redis.Stric... | 30.557692 | 79 | 0.630585 |
10b613c89a5adbfdf73b8f171ba5791d8a1e6519 | 12,126 | py | Python | visualdl/server/lib.py | ziyuli/VisualDL | a58477fdbaa47ac1c76793ebdfc0c700e87c3f09 | [
"Apache-2.0"
] | null | null | null | visualdl/server/lib.py | ziyuli/VisualDL | a58477fdbaa47ac1c76793ebdfc0c700e87c3f09 | [
"Apache-2.0"
] | null | null | null | visualdl/server/lib.py | ziyuli/VisualDL | a58477fdbaa47ac1c76793ebdfc0c700e87c3f09 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017 VisualDL Authors. All Rights Reserve.
#
# 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... | 28.871429 | 78 | 0.549975 |
1aebf9a308c1541d3d48e307dcb5a0559b36534f | 687 | py | Python | froide/campaign/migrations/0002_auto_20190309_1241.py | manonthemat/froide | 698c49935eaf2e922f3c9f6a46af0fd545ccbbbb | [
"MIT"
] | null | null | null | froide/campaign/migrations/0002_auto_20190309_1241.py | manonthemat/froide | 698c49935eaf2e922f3c9f6a46af0fd545ccbbbb | [
"MIT"
] | null | null | null | froide/campaign/migrations/0002_auto_20190309_1241.py | manonthemat/froide | 698c49935eaf2e922f3c9f6a46af0fd545ccbbbb | [
"MIT"
] | null | null | null | # Generated by Django 2.1.7 on 2019-03-09 11:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('campaign', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='campaign',
name='description',
... | 23.689655 | 50 | 0.556041 |
556d24cd1e65b4c1a2dcac5ca9bc2aed220bce59 | 1,275 | py | Python | pipeline/defects_generator.py | junronglau/product-defects-extraction | 98358100ee2efd5907dd8ae7c42d7f217410ce4f | [
"Apache-2.0"
] | null | null | null | pipeline/defects_generator.py | junronglau/product-defects-extraction | 98358100ee2efd5907dd8ae7c42d7f217410ce4f | [
"Apache-2.0"
] | 1 | 2021-04-14T06:49:51.000Z | 2021-04-21T18:30:38.000Z | pipeline/defects_generator.py | junronglau/product-defects-extraction | 98358100ee2efd5907dd8ae7c42d7f217410ce4f | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
import sys
path = str(Path(Path(__file__).parent.absolute()).parent.absolute())
sys.path.insert(0, path)
from dataloader.dc_data_loader import DataLoader
from preprocess.twostep_preprocessor import TwoStepPreprocessor
from models.svm_model import SvmModel
from trainers.svm_trainer import SvmT... | 30.357143 | 106 | 0.74902 |
978498db28e9dbf427c684970b329c4706261052 | 12,123 | py | Python | services/group.py | wenruiq/amqp-msg-service | 7bf89815b8650282af45508ef36e895a4781a63a | [
"MIT"
] | null | null | null | services/group.py | wenruiq/amqp-msg-service | 7bf89815b8650282af45508ef36e895a4781a63a | [
"MIT"
] | null | null | null | services/group.py | wenruiq/amqp-msg-service | 7bf89815b8650282af45508ef36e895a4781a63a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from flask import Flask, request
from flask_sqlalchemy import SQLAlchemy
from flask_cors import CORS
from datetime import datetime
import json
import pika
import requests
# This version of order.py uses a mysql DB via flask-sqlalchemy, instead of JSON files, as the data store.
app = Flask(__n... | 40.818182 | 281 | 0.644725 |
472a4f173066e48f170c11023572ebe7028b27c2 | 1,292 | py | Python | setup.py | marchcui/pythUDS | 3012c716299730c23f58d7e545d5bb22f301d1c7 | [
"MIT"
] | null | null | null | setup.py | marchcui/pythUDS | 3012c716299730c23f58d7e545d5bb22f301d1c7 | [
"MIT"
] | null | null | null | setup.py | marchcui/pythUDS | 3012c716299730c23f58d7e545d5bb22f301d1c7 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name = 'udsoncan',
packages = find_packages(exclude=['test']),
... | 35.888889 | 128 | 0.642415 |
eff04eca6dce680e8b23f7c8daf98965893d93d4 | 7,766 | py | Python | prelim_data_gen13_v2.py | dhbesson/ION2017_NN_Jammers | 8768987a7ec63ccfb9d24747cc36c554c3da749a | [
"MIT"
] | 5 | 2018-10-05T10:01:04.000Z | 2022-01-02T22:11:51.000Z | prelim_data_gen13_v2.py | LINMEIYAN/ION2017_NN_Jammers | 8768987a7ec63ccfb9d24747cc36c554c3da749a | [
"MIT"
] | null | null | null | prelim_data_gen13_v2.py | LINMEIYAN/ION2017_NN_Jammers | 8768987a7ec63ccfb9d24747cc36c554c3da749a | [
"MIT"
] | 9 | 2018-01-15T04:34:36.000Z | 2022-02-20T03:53:19.000Z | import numpy as np
from scipy.spatial import distance
from operator import add
import matplotlib.pyplot as plt
import itertools
import sys
import math
import random
import pandas
# todo combine data gen and neural network into one script
size_training_set = 1000
nx_sensor = 5.
ny_sensor = 5.
nz_sensor = 1.
nx_quadran... | 34.981982 | 120 | 0.711692 |
ecd9b0497104e49e71c9eb79e97c844635021c03 | 7,807 | py | Python | okama/macro.py | nenkoru/okama | 1e202bc801aea8adaf4c2ad033cd51af0c957df5 | [
"MIT"
] | null | null | null | okama/macro.py | nenkoru/okama | 1e202bc801aea8adaf4c2ad033cd51af0c957df5 | [
"MIT"
] | null | null | null | okama/macro.py | nenkoru/okama | 1e202bc801aea8adaf4c2ad033cd51af0c957df5 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from typing import Union, Tuple
import numpy as np
import pandas as pd
from .api.data_queries import QueryData
from .api.namespaces import get_macro_namespaces
from .common.helpers.helpers import Float, Frame, Date
from .settings import default_macro, PeriodLength, _MONTHS_PER_YEAR... | 37.17619 | 111 | 0.606379 |
39d0a9ea7eb064ed77fad4eaae9b156c87c6f16c | 805 | py | Python | product/urls.py | leandrocunha526/client-manager | 25e2a7d4b083545176757d0ab9c8355167fe04ed | [
"BSD-3-Clause"
] | 1 | 2022-01-06T09:51:09.000Z | 2022-01-06T09:51:09.000Z | product/urls.py | leandrocunha526/client-manager | 25e2a7d4b083545176757d0ab9c8355167fe04ed | [
"BSD-3-Clause"
] | 4 | 2022-01-07T11:06:00.000Z | 2022-02-21T20:26:05.000Z | product/urls.py | leandrocunha526/client-manager | 25e2a7d4b083545176757d0ab9c8355167fe04ed | [
"BSD-3-Clause"
] | 2 | 2022-01-07T11:01:50.000Z | 2022-01-08T05:44:46.000Z | from django.urls import path
from .views import product_list, product_delete, product_new, product_update, category_new, category_list, \
category_update, category_delete, product_detail
urlpatterns = [
path('list/', product_list, name="product_list"),
path('delete/<int:id>', product_delete, name="product... | 47.352941 | 108 | 0.724224 |
bf30c78421fa5d37d60314d8ccd06608147e5513 | 97,519 | py | Python | lib/python2.7/site-packages/paramiko/transport.py | drpaneas/linuxed.gr | 95676e9f18a234092656c61b73b9e6633f2e39ec | [
"MIT"
] | null | null | null | lib/python2.7/site-packages/paramiko/transport.py | drpaneas/linuxed.gr | 95676e9f18a234092656c61b73b9e6633f2e39ec | [
"MIT"
] | null | null | null | lib/python2.7/site-packages/paramiko/transport.py | drpaneas/linuxed.gr | 95676e9f18a234092656c61b73b9e6633f2e39ec | [
"MIT"
] | null | null | null | # Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko 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.1 of the License, or (a... | 42.307592 | 179 | 0.609615 |
5ba79afefa650df446b9345d9504901375ad3669 | 3,914 | py | Python | autogen.py | klondikemarlen/PythonSQLAlchemyAutoGen | 1e23a386cdc918afc9528d2e7769285b4de7702c | [
"MIT"
] | null | null | null | autogen.py | klondikemarlen/PythonSQLAlchemyAutoGen | 1e23a386cdc918afc9528d2e7769285b4de7702c | [
"MIT"
] | 1 | 2017-04-16T05:03:52.000Z | 2017-04-16T05:03:52.000Z | autogen.py | klondikemarlen/PythonSQLAlchemyAutoGen | 1e23a386cdc918afc9528d2e7769285b4de7702c | [
"MIT"
] | null | null | null | ##testing##
# from sqlalchemy import Table, MetaData, Column, Integer, String, Float, Boolean
# from sqlalchemy import ForeignKey
# from sqlalchemy.orm import relationship
# from sqlalchemy.ext.hybrid import hybrid_property
# from sqlalchemy.exc import ArgumentError
# from sqlalchemy import inspect
# from sq... | 31.312 | 104 | 0.583291 |
b6bf922758a0fae48468fa09018e32a27e02bb9a | 4,344 | py | Python | st2tests/integration/orquesta/test_wiring_inquiry.py | muyouming/st2 | a80fa2b6b0f7ff3281ed8dee8ca6e97910fbd00e | [
"Apache-2.0"
] | 4,920 | 2015-01-01T15:12:17.000Z | 2022-03-31T19:31:15.000Z | st2tests/integration/orquesta/test_wiring_inquiry.py | muyouming/st2 | a80fa2b6b0f7ff3281ed8dee8ca6e97910fbd00e | [
"Apache-2.0"
] | 3,563 | 2015-01-05T19:02:19.000Z | 2022-03-31T19:23:09.000Z | st2tests/integration/orquesta/test_wiring_inquiry.py | muyouming/st2 | a80fa2b6b0f7ff3281ed8dee8ca6e97910fbd00e | [
"Apache-2.0"
] | 774 | 2015-01-01T20:41:24.000Z | 2022-03-31T13:25:29.000Z | # Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, 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 ... | 39.135135 | 80 | 0.69314 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.