hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7983e0349c27d5f98264a48cf60895b6d86a19e0 | 3,285 | py | Python | pykitcommander/picpack/pic24fj128ga705/common/picdevice.py | microchip-pic-avr-tools/pykitcommander | 261fae518b751081d099a8ac8ff1ad64f8808683 | [
"MIT"
] | null | null | null | pykitcommander/picpack/pic24fj128ga705/common/picdevice.py | microchip-pic-avr-tools/pykitcommander | 261fae518b751081d099a8ac8ff1ad64f8808683 | [
"MIT"
] | null | null | null | pykitcommander/picpack/pic24fj128ga705/common/picdevice.py | microchip-pic-avr-tools/pykitcommander | 261fae518b751081d099a8ac8ff1ad64f8808683 | [
"MIT"
] | null | null | null | """
Picdevice
Defines a base class for PIC devices.
"""
import logging
# These debugger models are supported:
# a) all PIC16 devices use native Python scripting
from scriptinginterface import PythonScriptedPic16Debugger
# b) all PIC18 devices use native Python scripting
from scriptinginterface import PythonScriptedPic... | 34.946809 | 121 | 0.716286 |
7983e073f26de6e4d66e60a48ac041753146808f | 1,243 | py | Python | app/core/tests/test_admin.py | gfy777/recipe-app-api | dffe2beda60c4dafe7ee73a5897fbb403dfd5e60 | [
"MIT"
] | null | null | null | app/core/tests/test_admin.py | gfy777/recipe-app-api | dffe2beda60c4dafe7ee73a5897fbb403dfd5e60 | [
"MIT"
] | 8 | 2021-03-19T02:07:38.000Z | 2022-03-12T00:25:18.000Z | app/core/tests/test_admin.py | gfy777/recipe-app-api | dffe2beda60c4dafe7ee73a5897fbb403dfd5e60 | [
"MIT"
] | null | null | null | from django.test import TestCase, Client
from django.contrib.auth import get_user_model
from django.urls import reverse
class AdminSiteTests(TestCase):
def setUp(self):
self.client = Client()
self.admin_user = get_user_model().objects.create_superuser(
email='admin@example.com',
... | 30.317073 | 68 | 0.637168 |
7983e104966bb3348c6c6c42d0ea1dd203c641d5 | 1,069 | py | Python | xlsxwriter/test/comparison/test_hyperlink09.py | eddiechapman/XlsxWriter | c636117ab30e64e4b7b824c9105595c42887c2c9 | [
"BSD-2-Clause-FreeBSD"
] | 2,766 | 2015-01-02T17:36:42.000Z | 2022-03-31T09:23:30.000Z | xlsxwriter/test/comparison/test_hyperlink09.py | xiaolanmeng86/XlsxWriter | 6c3ea23a410e8216eab8f5751e5544ffb444b3da | [
"BSD-2-Clause-FreeBSD"
] | 683 | 2015-01-03T09:55:02.000Z | 2022-03-31T07:18:15.000Z | xlsxwriter/test/comparison/test_hyperlink09.py | xiaolanmeng86/XlsxWriter | 6c3ea23a410e8216eab8f5751e5544ffb444b3da | [
"BSD-2-Clause-FreeBSD"
] | 636 | 2015-01-05T01:57:08.000Z | 2022-03-25T18:42:41.000Z | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2021, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparison_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | 27.410256 | 113 | 0.626754 |
7983e1887845d937db7bce2d2134aa5ae114b569 | 3,652 | py | Python | all_views_completions.py | seecr/SublimeAllAutocomplete | c8f13f8537325d93dac0131ea7d2721159b5549e | [
"WTFPL"
] | 1 | 2015-04-04T17:29:09.000Z | 2015-04-04T17:29:09.000Z | all_views_completions.py | seecr/SublimeAllAutocomplete | c8f13f8537325d93dac0131ea7d2721159b5549e | [
"WTFPL"
] | null | null | null | all_views_completions.py | seecr/SublimeAllAutocomplete | c8f13f8537325d93dac0131ea7d2721159b5549e | [
"WTFPL"
] | null | null | null | # Extends Sublime Text autocompletion to find matches in all open
# files. By default, Sublime only considers words from the current file.
import sublime_plugin
import sublime
import re
import time
from os.path import basename
# limits to prevent bogging down the system
MIN_WORD_SIZE = 3
MAX_WORD_SIZE = 30
MAX_VIEWS... | 35.456311 | 123 | 0.631161 |
7983e29bef468b5b8c8ef45239cdee570478382f | 1,730 | py | Python | tests/integration/factories/daemons/minion/test_event_forwarder_engine.py | ScriptAutomate/pytest-salt-factories | 192e15a7e93eec694f59099021a4d4268a1ab1ea | [
"Apache-2.0"
] | 13 | 2020-04-13T07:41:53.000Z | 2022-02-08T20:48:44.000Z | tests/integration/factories/daemons/minion/test_event_forwarder_engine.py | ScriptAutomate/pytest-salt-factories | 192e15a7e93eec694f59099021a4d4268a1ab1ea | [
"Apache-2.0"
] | 97 | 2020-06-05T19:56:09.000Z | 2022-03-31T06:31:01.000Z | tests/integration/factories/daemons/minion/test_event_forwarder_engine.py | ScriptAutomate/pytest-salt-factories | 192e15a7e93eec694f59099021a4d4268a1ab1ea | [
"Apache-2.0"
] | 12 | 2020-05-13T10:58:55.000Z | 2022-02-08T20:48:55.000Z | import logging
import time
import pytest
import salt.defaults.events
from saltfactories.utils import random_string
log = logging.getLogger(__name__)
@pytest.fixture(scope="module")
def master(salt_factories):
factory = salt_factories.salt_master_daemon(random_string("master-"))
with factory.started():
... | 27.03125 | 93 | 0.694798 |
7983e29e8e31e1e2a9a6b1c9d98fe20bf652ece9 | 2,651 | py | Python | src/pyglottolog/metadata.py | d97hah/pyglottolog | fe4c2a52d54cdcf0804b4f889598dbb9b8698dbd | [
"Apache-2.0"
] | 1 | 2021-06-03T20:16:11.000Z | 2021-06-03T20:16:11.000Z | src/pyglottolog/metadata.py | d97hah/pyglottolog | fe4c2a52d54cdcf0804b4f889598dbb9b8698dbd | [
"Apache-2.0"
] | null | null | null | src/pyglottolog/metadata.py | d97hah/pyglottolog | fe4c2a52d54cdcf0804b4f889598dbb9b8698dbd | [
"Apache-2.0"
] | null | null | null | from html import entities as html_entities
from nameparser import HumanName
from markdown import markdown
from clldutils.jsonlib import dump
def to_html(text, url):
c2n = html_entities.codepoint2name
text = text.replace('&', '&')
text = ''.join('&{0};'.format(
c2n[ord(c)]) if ord(c) > 128 and... | 33.1375 | 93 | 0.567333 |
7983e2a0feb7ff2cc17cd43fdee60c62e57cbd98 | 9,593 | py | Python | cinder/tests/unit/api/contrib/test_volume_encryption_metadata.py | arunvinodqmco/cinder | 62cb72c6890e458427ba0601646b186b7b36dc01 | [
"Apache-2.0"
] | 571 | 2015-01-01T17:47:26.000Z | 2022-03-23T07:46:36.000Z | cinder/tests/unit/api/contrib/test_volume_encryption_metadata.py | arunvinodqmco/cinder | 62cb72c6890e458427ba0601646b186b7b36dc01 | [
"Apache-2.0"
] | 37 | 2015-01-22T23:27:04.000Z | 2021-02-05T16:38:48.000Z | cinder/tests/unit/api/contrib/test_volume_encryption_metadata.py | arunvinodqmco/cinder | 62cb72c6890e458427ba0601646b186b7b36dc01 | [
"Apache-2.0"
] | 841 | 2015-01-04T17:17:11.000Z | 2022-03-31T12:06:51.000Z | # Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/... | 43.211712 | 79 | 0.610341 |
7983e334d16d92264aaead5032d5e71c802a582c | 1,372 | py | Python | Phylogeny Scripts/sequence_combiner.py | chibbargroup/CentralRepository | 0f152cdc207565656e8f6f10622517c5422f18f6 | [
"MIT"
] | null | null | null | Phylogeny Scripts/sequence_combiner.py | chibbargroup/CentralRepository | 0f152cdc207565656e8f6f10622517c5422f18f6 | [
"MIT"
] | null | null | null | Phylogeny Scripts/sequence_combiner.py | chibbargroup/CentralRepository | 0f152cdc207565656e8f6f10622517c5422f18f6 | [
"MIT"
] | null | null | null | '''
Combines fasta files based on a list of accession numbers with formated headers
Usage:
python sequence_combiner.py file_info.csv fasta_directory out_directory
'''
from os import listdir, remove
from os.path import join, isfile
import pandas as pd
import sys
def File_Reader(file_info):
data_dict = {}
df = pd.... | 26.901961 | 98 | 0.683673 |
7983e36b13689b6532ad2ae7bc74add39708b883 | 40,181 | py | Python | venv/lib/python3.6/site-packages/pip-19.0.3-py3.6.egg/pip/_vendor/distlib/metadata.py | nguidjoi/bigData | aef722e77c10b8b0261578277892ebb15764d680 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.6/site-packages/pip-19.0.3-py3.6.egg/pip/_vendor/distlib/metadata.py | nguidjoi/bigData | aef722e77c10b8b0261578277892ebb15764d680 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.6/site-packages/pip-19.0.3-py3.6.egg/pip/_vendor/distlib/metadata.py | nguidjoi/bigData | aef722e77c10b8b0261578277892ebb15764d680 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Implementation of the Metadata for Python packages PEPs.
Supports all metadata formats (1.0, 1.1, 1.2, and 2.0 experimental).
"""
from __future__ import unicode_literals
import codecs
import jso... | 36.561419 | 84 | 0.542645 |
7983e3f2c7d6f847fccee99ae375555a72832b24 | 150 | py | Python | github_analysis/__init__.py | lodrantl/github_analysis | 9e336866164bc4a9a4d4a08fe20c48f651bf8418 | [
"Apache-2.0"
] | 2 | 2018-06-03T07:15:56.000Z | 2021-07-25T07:54:42.000Z | github_analysis/__init__.py | lodrantl/github_analysis | 9e336866164bc4a9a4d4a08fe20c48f651bf8418 | [
"Apache-2.0"
] | 1 | 2018-06-03T07:15:36.000Z | 2018-06-03T07:15:36.000Z | github_analysis/__init__.py | lodrantl/github_analysis | 9e336866164bc4a9a4d4a08fe20c48f651bf8418 | [
"Apache-2.0"
] | 2 | 2018-05-28T16:35:23.000Z | 2019-10-30T09:24:44.000Z | """Statistical analysis of the most starred Github projects for subject Programiranje 1
.. moduleauthor:: Luka Lodrant <luka.lodrant@gmail.com>
"""
| 25 | 87 | 0.766667 |
7983e3f472590d2d478a7c3f9e506a91fbe68b62 | 1,361 | py | Python | Projetos/C-LogicaCombinacional/script/testeLogicaCombinacional.py | brunoartc/GladOS | ba8ccbb6e0e46dbe5f93cb6533d8956cd7ffffae | [
"Unlicense"
] | null | null | null | Projetos/C-LogicaCombinacional/script/testeLogicaCombinacional.py | brunoartc/GladOS | ba8ccbb6e0e46dbe5f93cb6533d8956cd7ffffae | [
"Unlicense"
] | 40 | 2018-03-12T00:40:25.000Z | 2020-02-20T21:58:52.000Z | Projetos/C-LogicaCombinacional/script/testeLogicaCombinacional.py | brunoartc/Z01-GladOS | ba8ccbb6e0e46dbe5f93cb6533d8956cd7ffffae | [
"Unlicense"
] | 1 | 2018-03-02T13:32:33.000Z | 2018-03-02T13:32:33.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Curso de Elementos de Sistemas
# Desenvolvido por: Rafael Corsi <rafael.corsi@insper.edu.br>
#
# Adaptado de : Pedro Cunial <pedrocc4@al.insper.edu.br>
# Luciano Soares <lpsoares@insper.edu.br>
# Data de criação: 07/2017
from os.path import join... | 26.686275 | 70 | 0.644379 |
7983e49dbf11042683b68b5ffddfe72d966e37ba | 12,021 | py | Python | tests/test_fields.py | PirxcyFinal/sanic-openapi | 1d8496fc7ffac2276095cde8093355d3d1fa3988 | [
"MIT"
] | null | null | null | tests/test_fields.py | PirxcyFinal/sanic-openapi | 1d8496fc7ffac2276095cde8093355d3d1fa3988 | [
"MIT"
] | null | null | null | tests/test_fields.py | PirxcyFinal/sanic-openapi | 1d8496fc7ffac2276095cde8093355d3d1fa3988 | [
"MIT"
] | null | null | null | from datetime import date, datetime
import pytest
from sanic.response import HTTPResponse, text
from sanic_openapi import doc
@pytest.mark.parametrize(
"description, required, name, choices, serialized_field, path_parameters",
[
(None, None, None, None, {}, [{"required": True, "in": "body", "name": ... | 27.890951 | 87 | 0.536977 |
7983e4bffc9f5a6f6ec98e44e875c50088c1c7ce | 1,077 | py | Python | AtC_Beg_Con_061-070/ABC064/D.py | yosho-18/AtCoder | 50f6d5c92a01792552c31ac912ce1cd557b06fb0 | [
"MIT"
] | null | null | null | AtC_Beg_Con_061-070/ABC064/D.py | yosho-18/AtCoder | 50f6d5c92a01792552c31ac912ce1cd557b06fb0 | [
"MIT"
] | null | null | null | AtC_Beg_Con_061-070/ABC064/D.py | yosho-18/AtCoder | 50f6d5c92a01792552c31ac912ce1cd557b06fb0 | [
"MIT"
] | null | null | null | n = int(input())
s = input()
c = 0
sl = 0
lli =[]
rli =[]
k = 0
j = 0
for i in range(n):
if i == 0:
if s[i] == "(":
lli.append(1)
j = 1
else:
sl += 1
k = 1
elif s[i] == "(":
k = 0
if c == 1 or j == 1:
lli[-1] += 1
... | 21.54 | 53 | 0.308264 |
7983e5af3e9284cd845b629ccb29fb3390d17766 | 972 | py | Python | docs/jnpr_healthbot_swagger/test/test_device_group_health_tree.py | dmontagner/healthbot-py-client | 0952e0a9e7ed63c9fe84879f40407c3327735252 | [
"Apache-2.0"
] | 10 | 2019-10-23T12:54:37.000Z | 2022-02-07T19:24:30.000Z | docs/jnpr_healthbot_swagger/test/test_device_group_health_tree.py | dmontagner/healthbot-py-client | 0952e0a9e7ed63c9fe84879f40407c3327735252 | [
"Apache-2.0"
] | 5 | 2019-09-30T04:29:25.000Z | 2022-02-16T12:21:06.000Z | docs/jnpr_healthbot_swagger/test/test_device_group_health_tree.py | dmontagner/healthbot-py-client | 0952e0a9e7ed63c9fe84879f40407c3327735252 | [
"Apache-2.0"
] | 4 | 2019-09-30T01:17:48.000Z | 2020-08-25T07:27:54.000Z | # coding: utf-8
"""
Healthbot APIs
API interface for Healthbot application # noqa: E501
OpenAPI spec version: 1.0.0
Contact: healthbot-hackers@juniper.net
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import swagge... | 23.707317 | 102 | 0.728395 |
7983e69ba7fb20406cd722d5f897f8a43e94a2c6 | 422 | py | Python | receiver/urls.py | Khumayun/airstatus | d0b74f047ce155d0fc4127d2b2720f7ceecea214 | [
"MIT"
] | null | null | null | receiver/urls.py | Khumayun/airstatus | d0b74f047ce155d0fc4127d2b2720f7ceecea214 | [
"MIT"
] | null | null | null | receiver/urls.py | Khumayun/airstatus | d0b74f047ce155d0fc4127d2b2720f7ceecea214 | [
"MIT"
] | null | null | null | from django.urls import path
from .views import *
urlpatterns = [
path('getData/', Reader.as_view()),
path('sendData/', writer),
path('getPM1/', PM1View.as_view()),
path('getPM25/', PM25View.as_view()),
path('getPM10/', PM10View.as_view()),
path('getPMs/', PMsView.as_view()),
path('getTemperature/', Temperature... | 30.142857 | 52 | 0.687204 |
7983e6e787d862d32a84e9d6833e04582faebcc5 | 934 | py | Python | find_best.py | qhduan/rl-2048 | 9730d366625ac7ffdd8875586ffbb8615468f110 | [
"MIT"
] | 3 | 2022-02-10T02:19:58.000Z | 2022-03-06T14:39:20.000Z | find_best.py | qhduan/rl-2048 | 9730d366625ac7ffdd8875586ffbb8615468f110 | [
"MIT"
] | null | null | null | find_best.py | qhduan/rl-2048 | 9730d366625ac7ffdd8875586ffbb8615468f110 | [
"MIT"
] | null | null | null | from predict import main as predict
from tqdm import tqdm
from fire import Fire
def main(model_path, start=0, end=1000, out='best.csv'):
"""
python3 -u find_best.py --model_path=./models/23_2300000_19177.zip --out=best.csv --start=0 --end=1000
cat *.csv|awk -F ',' '{print $1"\t"$2}' | grep "0" | sort -n -... | 31.133333 | 106 | 0.551392 |
7983e716ebe63e4c3cb94fa12a2df09f1d2a557d | 2,291 | py | Python | radiobear/Constituents/h2o/h2o_ddb.py | david-deboer/radiobear | aedc716c7acf0c69d278988842407545f1043c17 | [
"BSD-2-Clause"
] | 3 | 2019-05-13T21:03:57.000Z | 2021-04-22T05:33:33.000Z | radiobear/Constituents/h2o/h2o_ddb.py | david-deboer/radiobear | aedc716c7acf0c69d278988842407545f1043c17 | [
"BSD-2-Clause"
] | 1 | 2020-02-11T20:34:49.000Z | 2020-02-11T20:34:49.000Z | radiobear/Constituents/h2o/h2o_ddb.py | david-deboer/radiobear | aedc716c7acf0c69d278988842407545f1043c17 | [
"BSD-2-Clause"
] | null | null | null | import math
import os.path
from radiobear.constituents import parameters
# Some constants
T0 = 300.0 # reference temperature in K
AMU_H2O = 18.015
R = 8.314462E7
# Set data arrays
f0 = []
Ei = []
A = []
GH2 = []
GHe = []
GH2O = []
x_H2 = []
x_He = []
x_H2O = []
def readInputFiles(par)... | 26.333333 | 75 | 0.497163 |
7983e8f004124e980c835f3f858041e04eec37f0 | 14,836 | py | Python | zipline/finance/performance/position_tracker.py | magne-max/zipline | 41172cd3a320806c4116bcfafa6a607fa300acde | [
"Apache-2.0"
] | 1 | 2017-01-03T02:42:29.000Z | 2017-01-03T02:42:29.000Z | zipline/finance/performance/position_tracker.py | magne-max/zipline | 41172cd3a320806c4116bcfafa6a607fa300acde | [
"Apache-2.0"
] | null | null | null | zipline/finance/performance/position_tracker.py | magne-max/zipline | 41172cd3a320806c4116bcfafa6a607fa300acde | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2016 Quantopian, 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 wr... | 33.949657 | 78 | 0.613103 |
7983ea8af5cdb8b953311fbc29cd4e0bdfe13c92 | 5,170 | py | Python | src/robot/model/tagstatistics.py | userzimmermann/robotframework | 7aa16338ce2120cb082605cf548c0794956ec901 | [
"Apache-2.0"
] | 7 | 2015-02-25T10:55:02.000Z | 2015-11-04T03:20:05.000Z | src/robot/model/tagstatistics.py | userzimmermann/robotframework | 7aa16338ce2120cb082605cf548c0794956ec901 | [
"Apache-2.0"
] | 12 | 2015-02-24T17:00:06.000Z | 2015-07-31T08:32:07.000Z | src/robot/model/tagstatistics.py | userzimmermann/robotframework | 7aa16338ce2120cb082605cf548c0794956ec901 | [
"Apache-2.0"
] | 2 | 2015-12-15T11:00:35.000Z | 2018-02-24T18:11:24.000Z | # Copyright 2008-2015 Nokia Solutions and Networks
#
# 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... | 34.697987 | 78 | 0.645648 |
7983eb1677f31988fe563356e0c255575142434a | 1,114 | py | Python | setup.py | zepheira/django-redmine | 78d45770678239d52fe5b6faafff467ce3809e22 | [
"BSD-3-Clause"
] | 2 | 2020-05-23T03:57:27.000Z | 2021-11-08T09:56:42.000Z | setup.py | zepheira/django-redmine | 78d45770678239d52fe5b6faafff467ce3809e22 | [
"BSD-3-Clause"
] | null | null | null | setup.py | zepheira/django-redmine | 78d45770678239d52fe5b6faafff467ce3809e22 | [
"BSD-3-Clause"
] | null | null | null | """
Setup for the Django Redmine app.
"""
from setuptools import setup, find_packages
VERSION = __import__('django_redmine').__version__
from distutils.command.sdist import sdist
from distutils.command.build import build
import os
def write_version_file():
f = open("django_redmine/version.py", "w")
f.write(... | 22.734694 | 63 | 0.674147 |
7983eb4c6aeb0b04360e9ec14eac075fd25c0248 | 622 | py | Python | autogluon/utils/tabular/features/generators/identity.py | NunoEdgarGFlowHub/autogluon | 714894698495ef4352706d3c4250823ad4a43ead | [
"Apache-2.0"
] | null | null | null | autogluon/utils/tabular/features/generators/identity.py | NunoEdgarGFlowHub/autogluon | 714894698495ef4352706d3c4250823ad4a43ead | [
"Apache-2.0"
] | null | null | null | autogluon/utils/tabular/features/generators/identity.py | NunoEdgarGFlowHub/autogluon | 714894698495ef4352706d3c4250823ad4a43ead | [
"Apache-2.0"
] | null | null | null | import logging
from pandas import DataFrame
from .abstract import AbstractFeatureGenerator
logger = logging.getLogger(__name__)
class IdentityFeatureGenerator(AbstractFeatureGenerator):
"""IdentityFeatureGenerator simply passes the data along without alterations."""
def _fit_transform(self, X: DataFrame, *... | 28.272727 | 84 | 0.741158 |
7983ec7be319056433ab43d9ca5006bbde466c71 | 230 | py | Python | Leetcode-Solutions/Strings/344. Reverse String.py | sakshi13-m/StudentCodeSnippets | 25e4f0322b51cad540b6481737976a2f6c4c0382 | [
"MIT"
] | 1 | 2020-09-30T21:46:28.000Z | 2020-09-30T21:46:28.000Z | Leetcode-Solutions/Strings/344. Reverse String.py | sakshi13-m/StudentCodeSnippets | 25e4f0322b51cad540b6481737976a2f6c4c0382 | [
"MIT"
] | 2 | 2020-10-04T08:01:15.000Z | 2020-10-15T12:21:39.000Z | Leetcode-Solutions/Strings/344. Reverse String.py | sakshi13-m/StudentCodeSnippets | 25e4f0322b51cad540b6481737976a2f6c4c0382 | [
"MIT"
] | 6 | 2020-09-30T20:53:24.000Z | 2020-10-09T11:54:35.000Z | # Easy
# https://leetcode.com/problems/reverse-string/
class Solution:
def reverseString(self, s: List[str]) -> None:
"""
Do not return anything, modify s in-place instead.
"""
s[::] = s[::-1] | 23 | 58 | 0.56087 |
7983ecae8bf59baf095797f49ef0983fbdc25aee | 7,219 | py | Python | flytekit/tools/module_loader.py | v01dXYZ/flytekit | dfb89c619c209e6c88ae335bfb7a10892b50808a | [
"Apache-2.0"
] | null | null | null | flytekit/tools/module_loader.py | v01dXYZ/flytekit | dfb89c619c209e6c88ae335bfb7a10892b50808a | [
"Apache-2.0"
] | null | null | null | flytekit/tools/module_loader.py | v01dXYZ/flytekit | dfb89c619c209e6c88ae335bfb7a10892b50808a | [
"Apache-2.0"
] | null | null | null | import contextlib
import importlib
import os
import pkgutil
import sys
from typing import Iterator, List, Union
from flytekit.common.exceptions import user as _user_exceptions
from flytekit.common.local_workflow import SdkRunnableWorkflow as _SdkRunnableWorkflow
from flytekit.common.mixins import registerable as _regi... | 38.195767 | 131 | 0.654107 |
7983ede3aad7a14dd54ba286ab19bd01b5bb8e79 | 1,559 | py | Python | tests/test_tagging.py | Jack2313/WeChatterBot | 377899e8cab4ca5eca9b0136207e2afb97d9acb2 | [
"BSD-3-Clause"
] | 1 | 2020-04-03T02:54:18.000Z | 2020-04-03T02:54:18.000Z | tests/test_tagging.py | Jack2313/WeChatterBot | 377899e8cab4ca5eca9b0136207e2afb97d9acb2 | [
"BSD-3-Clause"
] | 7 | 2020-04-11T13:22:50.000Z | 2020-05-14T00:19:37.000Z | tests/test_tagging.py | Jack2313/WeChatterBot | 377899e8cab4ca5eca9b0136207e2afb97d9acb2 | [
"BSD-3-Clause"
] | 3 | 2020-04-11T12:09:56.000Z | 2020-12-16T13:26:20.000Z | from unittest import TestCase
from app.chatterbot import languages
from app.chatterbot import tagging
class PosLemmaTaggerTests(TestCase):
def setUp(self):
self.tagger = tagging.PosLemmaTagger(language=languages.CHI)
def test_empty_string(self):
tagged_text = self.tagger.get_text_index_strin... | 25.557377 | 73 | 0.658114 |
7983edfdab856d5ecff07bc3b998b62213924127 | 446 | py | Python | makahiki/apps/widgets/hello_world/views.py | justinslee/Wai-Not-Makahiki | 4b7dd685012ec64758affe0ecee3103596d16aa7 | [
"MIT"
] | 1 | 2015-07-22T11:31:20.000Z | 2015-07-22T11:31:20.000Z | makahiki/apps/widgets/hello_world/views.py | justinslee/Wai-Not-Makahiki | 4b7dd685012ec64758affe0ecee3103596d16aa7 | [
"MIT"
] | null | null | null | makahiki/apps/widgets/hello_world/views.py | justinslee/Wai-Not-Makahiki | 4b7dd685012ec64758affe0ecee3103596d16aa7 | [
"MIT"
] | null | null | null | """Provides the view of the widget."""
from apps.managers.score_mgr import score_mgr
def supply(request, page_name):
"""Supply view_objects contents, which are the player name, team and points."""
_ = page_name
profile = request.user.get_profile()
name = profile.name
team = profile.team
points... | 24.777778 | 83 | 0.647982 |
7983f226d25f3600dc8f25f8663e68ce59eb4ec4 | 1,259 | py | Python | epynet/.ipynb_checkpoints/objectcollection-checkpoint.py | AbelHeinsbroek/epynet | 992ce792c6b6427ee0d35325645c8185bc888928 | [
"Apache-2.0"
] | 22 | 2017-04-10T17:56:55.000Z | 2021-12-29T13:15:42.000Z | epynet/.ipynb_checkpoints/objectcollection-checkpoint.py | AbelHeinsbroek/epynet | 992ce792c6b6427ee0d35325645c8185bc888928 | [
"Apache-2.0"
] | 14 | 2017-05-01T12:00:08.000Z | 2021-01-09T08:48:49.000Z | epynet/.ipynb_checkpoints/objectcollection-checkpoint.py | AbelHeinsbroek/epynet | 992ce792c6b6427ee0d35325645c8185bc888928 | [
"Apache-2.0"
] | 20 | 2017-03-21T15:55:29.000Z | 2021-11-02T08:45:10.000Z | import collections
import pandas as pd
class ObjectCollection(dict):
# magic methods to transform collection attributes to Pandas Series or, if we return classes, another list
def __getattr__(self,name):
values = {}
for key, item in self.items():
values[item.uid] = getat... | 29.97619 | 111 | 0.581414 |
7983f41cc23b1ab1ea0ae1ec3d798b0a888b6e16 | 1,084 | py | Python | kombu/syn.py | public/kombu | 8a882232098f82baabbae4cba0c0b9f5b456382e | [
"BSD-3-Clause"
] | null | null | null | kombu/syn.py | public/kombu | 8a882232098f82baabbae4cba0c0b9f5b456382e | [
"BSD-3-Clause"
] | null | null | null | kombu/syn.py | public/kombu | 8a882232098f82baabbae4cba0c0b9f5b456382e | [
"BSD-3-Clause"
] | null | null | null | """
kombu.syn
=========
:copyright: (c) 2009 - 2012 by Ask Solem.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import sys
__all__ = ['detect_environment']
_environment = None
def blocking(fun, *args, **kwargs):
return fun(*args, **kwargs)
def select_blocking_metho... | 19.017544 | 73 | 0.612546 |
7983f447d9f330f4189de4823cf8c9454d118f5e | 323 | py | Python | mysite/polls/api/serializers.py | allentv/pycon-django-workshop | 931c3b672882616355053f1d84432ecaacddfbfc | [
"MIT"
] | null | null | null | mysite/polls/api/serializers.py | allentv/pycon-django-workshop | 931c3b672882616355053f1d84432ecaacddfbfc | [
"MIT"
] | null | null | null | mysite/polls/api/serializers.py | allentv/pycon-django-workshop | 931c3b672882616355053f1d84432ecaacddfbfc | [
"MIT"
] | null | null | null | from rest_framework import serializers
from ..models import Choice, Question
class ChoiceSerializer(serializers.ModelSerializer):
class Meta:
model = Choice
fields = '__all__'
class QuestionSerializer(serializers.ModelSerializer):
class Meta:
model = Question
fields = '__all_... | 21.533333 | 54 | 0.708978 |
7983f44b9b7dce883aaeea0b5d7dd52b542954e4 | 6,652 | py | Python | qa/rpc-tests/txn_doublespend.py | ctwiz/stardust | 0d237784267413e4076ec872e34393d26ad9aa03 | [
"MIT"
] | null | null | null | qa/rpc-tests/txn_doublespend.py | ctwiz/stardust | 0d237784267413e4076ec872e34393d26ad9aa03 | [
"MIT"
] | null | null | null | qa/rpc-tests/txn_doublespend.py | ctwiz/stardust | 0d237784267413e4076ec872e34393d26ad9aa03 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Stardust Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test proper accounting with a double-spend conflict
#
from test_framework.test_framework import Sta... | 44.945946 | 111 | 0.605833 |
7983f471d4ad9329fef9bbe4b9abed2982975587 | 1,363 | py | Python | utils.py | fandulu/IHDA | a859729cbb639a3233f3c8c7fce894bac27b19ee | [
"MIT"
] | 4 | 2020-07-11T09:21:43.000Z | 2021-09-08T08:31:09.000Z | utils.py | fandulu/IHDA | a859729cbb639a3233f3c8c7fce894bac27b19ee | [
"MIT"
] | 1 | 2021-09-08T08:29:36.000Z | 2021-09-08T08:29:36.000Z | utils.py | fandulu/IHDA | a859729cbb639a3233f3c8c7fce894bac27b19ee | [
"MIT"
] | 1 | 2021-09-08T08:31:09.000Z | 2021-09-08T08:31:09.000Z | import os
from collections import defaultdict
import numbers
import numpy as np
import sys
import os.path as osp
import scipy.io as scio
import random
class AverageMeter(object):
"""Computes and stores the average and current value"""
def __init__(self):
self.reset()
def re... | 23.912281 | 84 | 0.613353 |
7983f5096aca99efd98f534a22bfef06765fb281 | 5,484 | py | Python | yahoo_panoptes/framework/plugins/manager.py | mdrbh/panoptes | 63a27ab60ce4315ccd6ee2f6d3aed3cdb74d888c | [
"Apache-2.0"
] | 86 | 2018-10-01T18:13:24.000Z | 2021-07-29T00:04:56.000Z | yahoo_panoptes/framework/plugins/manager.py | mdrbh/panoptes | 63a27ab60ce4315ccd6ee2f6d3aed3cdb74d888c | [
"Apache-2.0"
] | 164 | 2018-10-03T02:01:15.000Z | 2021-04-26T16:07:14.000Z | yahoo_panoptes/framework/plugins/manager.py | mdrbh/panoptes | 63a27ab60ce4315ccd6ee2f6d3aed3cdb74d888c | [
"Apache-2.0"
] | 27 | 2018-10-03T22:43:06.000Z | 2021-06-17T23:41:51.000Z | """
Copyright 2018, Yahoo.
Licensed under the terms of the Apache 2.0 license. See LICENSE file in project root for terms.
This module implements the Panoptes Plugin Manager - a class that can locate and load the plugins specified by plugin
type and plugin class
"""
import imp
import sys
from yapsy.PluginManager impo... | 48.105263 | 117 | 0.683443 |
7983f56eea93961f9c0a70fd423f832389ff4cae | 1,548 | py | Python | dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/tests/complex_usecases.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 1,738 | 2017-09-21T10:59:12.000Z | 2022-03-31T21:05:46.000Z | dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/tests/complex_usecases.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 427 | 2017-09-29T22:54:36.000Z | 2022-02-15T19:26:50.000Z | dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/tests/complex_usecases.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 671 | 2017-09-21T08:04:01.000Z | 2022-03-29T14:30:07.000Z | from __future__ import division
import cmath
def div_usecase(x, y):
return x / y
def real_usecase(x):
return x.real
def imag_usecase(x):
return x.imag
def conjugate_usecase(x):
return x.conjugate()
def acos_usecase(x):
return cmath.acos(x)
def cos_usecase(x):
return cmath.cos(x)
def a... | 16.125 | 56 | 0.686693 |
7983f5dc553b576a8df8d62ccb2868819d6b1052 | 2,470 | py | Python | tfserving_manager/prediction/grpc.py | ismailuddin/tfserving_manager | cbddbe050567ad6d89c61cfd0d25f7dcc48419ed | [
"MIT"
] | null | null | null | tfserving_manager/prediction/grpc.py | ismailuddin/tfserving_manager | cbddbe050567ad6d89c61cfd0d25f7dcc48419ed | [
"MIT"
] | null | null | null | tfserving_manager/prediction/grpc.py | ismailuddin/tfserving_manager | cbddbe050567ad6d89c61cfd0d25f7dcc48419ed | [
"MIT"
] | null | null | null | """Class for getting predictions from the TensorFlow Serving server
using the gRPC API"""
import numpy as np
import grpc
from typing import List, Tuple
from tensorflow_serving.apis.predict_pb2 import PredictRequest
from tensorflow_serving.apis.prediction_service_pb2_grpc import (
PredictionServiceStub,
)
import t... | 37.424242 | 90 | 0.641296 |
7983f67bc184c996edc00332efc6800e2848cad3 | 21,003 | py | Python | framework/SupervisedLearning/SupervisedLearning.py | mattdon/raven | b5b4a9fc96cec37ca5fb3757c45653eec66522f1 | [
"Apache-2.0"
] | null | null | null | framework/SupervisedLearning/SupervisedLearning.py | mattdon/raven | b5b4a9fc96cec37ca5fb3757c45653eec66522f1 | [
"Apache-2.0"
] | null | null | null | framework/SupervisedLearning/SupervisedLearning.py | mattdon/raven | b5b4a9fc96cec37ca5fb3757c45653eec66522f1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Battelle Energy Alliance, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 46.262115 | 181 | 0.679855 |
7983f7dce1fef20c2235698b2ce34f2562f16a39 | 1,640 | py | Python | demo.py | DR08/pytorch_RFCN | 3baed2001fe2ed47cb80ea4193ec945bbc162c06 | [
"MIT"
] | 19 | 2018-02-25T12:27:46.000Z | 2019-11-22T10:24:40.000Z | demo.py | DR08/pytorch_RFCN | 3baed2001fe2ed47cb80ea4193ec945bbc162c06 | [
"MIT"
] | 6 | 2018-02-25T12:38:53.000Z | 2019-02-15T01:01:53.000Z | demo.py | DR08/pytorch_RFCN | 3baed2001fe2ed47cb80ea4193ec945bbc162c06 | [
"MIT"
] | 9 | 2018-02-25T12:43:49.000Z | 2020-02-17T04:43:25.000Z | import cv2
import numpy as np
import torch
from faster_rcnn import network
from faster_rcnn.faster_rcnn import FasterRCNN
from faster_rcnn.utils.timer import Timer
def test():
import os
im_file = 'demo/004545.jpg'
# im_file = 'data/VOCdevkit2007/VOC2007/JPEGImages/009036.jpg'
# im_file = '/media/longc... | 34.166667 | 113 | 0.668293 |
7983f80e743543d914b78cdb0bf33f27e8e8848c | 5,672 | py | Python | adaptation_layer/tasks.py | aitorzabala/mso-lo | 3d71ee0603e651f781df2d7d1616f292fc76bcf0 | [
"Apache-2.0"
] | null | null | null | adaptation_layer/tasks.py | aitorzabala/mso-lo | 3d71ee0603e651f781df2d7d1616f292fc76bcf0 | [
"Apache-2.0"
] | null | null | null | adaptation_layer/tasks.py | aitorzabala/mso-lo | 3d71ee0603e651f781df2d7d1616f292fc76bcf0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 CNIT, Francesco Lombardo, Matteo Pergolesi
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 37.315789 | 79 | 0.591855 |
7983f93989f21fcf29ae80233f37719d3a81bec3 | 8,662 | py | Python | shop/tests/cart.py | bmihelac/django-shop | 1bf58d013c8cb14090a8d0278878e279699c84aa | [
"BSD-3-Clause"
] | 1 | 2022-03-08T13:39:09.000Z | 2022-03-08T13:39:09.000Z | shop/tests/cart.py | bmihelac/django-shop | 1bf58d013c8cb14090a8d0278878e279699c84aa | [
"BSD-3-Clause"
] | null | null | null | shop/tests/cart.py | bmihelac/django-shop | 1bf58d013c8cb14090a8d0278878e279699c84aa | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import with_statement
from decimal import Decimal
from django.contrib.auth.models import User
from django.test.testcases import TestCase
from shop.cart.modifiers_pool import cart_modifiers_pool
from shop.models.cartmodel import Cart, CartItem
from shop.models.productmodel import ... | 40.666667 | 101 | 0.658162 |
7983fa09bc72a0873c3ac335b8d1d9e312d602c4 | 11,122 | py | Python | Lib/fontTools/afmLib.py | tomarcher101/fonttools | 0b9348080853ab637c4826a4aa293a2b4d60449c | [
"Apache-2.0",
"MIT"
] | null | null | null | Lib/fontTools/afmLib.py | tomarcher101/fonttools | 0b9348080853ab637c4826a4aa293a2b4d60449c | [
"Apache-2.0",
"MIT"
] | 1 | 2020-05-22T09:01:31.000Z | 2020-05-22T09:47:18.000Z | Lib/fontTools/afmLib.py | tomarcher101/fonttools | 0b9348080853ab637c4826a4aa293a2b4d60449c | [
"Apache-2.0",
"MIT"
] | null | null | null | """Module for reading and writing AFM (Adobe Font Metrics) files.
Note that this has been designed to read in AFM files generated by Fontographer
and has not been tested on many other files. In particular, it does not
implement the whole Adobe AFM specification [#f1]_ but, it should read most
"common" AFM files.
Here... | 25.74537 | 111 | 0.639723 |
7983fa75fb97843e2ef9e7e86e4cadaa3ba636ef | 13,633 | py | Python | imgproc.py | petersackettferguson/xCurling | b7b59263bfbdf70811870c522caacff46a5b55df | [
"MIT"
] | null | null | null | imgproc.py | petersackettferguson/xCurling | b7b59263bfbdf70811870c522caacff46a5b55df | [
"MIT"
] | null | null | null | imgproc.py | petersackettferguson/xCurling | b7b59263bfbdf70811870c522caacff46a5b55df | [
"MIT"
] | null | null | null | import constants
import gen
import vis
import math
import cv2
from cv2 import xphoto
import numpy as np
from glob import glob
# makes output match image, but internal processing is mirrored
FLIP = True
RES = 1080
# Options: None, ROTATE_TEE, ROTATE_BASE, TEE, BASE
# Warping beyond rotation (TEE, BASE) is currently b... | 33.414216 | 130 | 0.537373 |
7983fa809b7d3417079c74174c205941da18232a | 7,130 | py | Python | src/dispatch/plugins/dispatch_jira/plugin.py | jeffreynn/dispatch | 22a541a833cea5a1e25b6fa4fa8920a2638a8dbb | [
"Apache-2.0"
] | null | null | null | src/dispatch/plugins/dispatch_jira/plugin.py | jeffreynn/dispatch | 22a541a833cea5a1e25b6fa4fa8920a2638a8dbb | [
"Apache-2.0"
] | null | null | null | src/dispatch/plugins/dispatch_jira/plugin.py | jeffreynn/dispatch | 22a541a833cea5a1e25b6fa4fa8920a2638a8dbb | [
"Apache-2.0"
] | null | null | null | """
.. module: dispatch.plugins.dispatch_jira.plugin
:platform: Unix
:copyright: (c) 2019 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details.
"""
from typing import Any
from jinja2 import Template
from jira import JIRA, User
from dispatch.decorators import apply, counter,... | 29.585062 | 90 | 0.642216 |
7983fc4c2c6b94becee1c4c241111cb56f962fce | 2,811 | py | Python | setup.py | linuxfood/pyobjc-framework-Cocoa-test | 3475890f165ab26a740f13d5afe4c62b4423a140 | [
"MIT"
] | null | null | null | setup.py | linuxfood/pyobjc-framework-Cocoa-test | 3475890f165ab26a740f13d5afe4c62b4423a140 | [
"MIT"
] | null | null | null | setup.py | linuxfood/pyobjc-framework-Cocoa-test | 3475890f165ab26a740f13d5afe4c62b4423a140 | [
"MIT"
] | null | null | null | """
Wrappers for the core Cocoa frameworks: CoreFoundation, Foundation and
AppKit.
These wrappers don't include documentation, please check Apple's documention
for information on how to use these frameworks and PyObjC's documentation
for general tips and tricks regarding the translation between Python
and (Objective-)... | 31.233333 | 80 | 0.552117 |
7983fd5a2176e4979db537b3d400846a505b9c5c | 958 | py | Python | venv/Lib/site-packages/praw/models/listing/mixins/rising.py | Dartok-SD/Dartok-SD-s-reddit-bot | dc7a3215c062ed95b9f44bc207383e776c1692ea | [
"MIT"
] | null | null | null | venv/Lib/site-packages/praw/models/listing/mixins/rising.py | Dartok-SD/Dartok-SD-s-reddit-bot | dc7a3215c062ed95b9f44bc207383e776c1692ea | [
"MIT"
] | null | null | null | venv/Lib/site-packages/praw/models/listing/mixins/rising.py | Dartok-SD/Dartok-SD-s-reddit-bot | dc7a3215c062ed95b9f44bc207383e776c1692ea | [
"MIT"
] | null | null | null | """Provide the RisingListingMixin class."""
from ....compat import urljoin
from ...base import PRAWBase
from ..generator import ListingGenerator
class RisingListingMixin(PRAWBase):
"""Mixes in the rising methods."""
def random_rising(self, **generator_kwargs):
"""Return a ListingGenerator for random ... | 29.030303 | 75 | 0.653445 |
7983fd80ac4f8d3ac6bb34461ded42b7fcd43543 | 4,324 | py | Python | src/sasctl/_services/concepts.py | brtieu/python-sasctl | 1eed427c39faaddda78dec4806f12f3f8964890e | [
"Apache-2.0"
] | 30 | 2019-07-12T00:18:21.000Z | 2022-03-18T08:36:35.000Z | src/sasctl/_services/concepts.py | brtieu/python-sasctl | 1eed427c39faaddda78dec4806f12f3f8964890e | [
"Apache-2.0"
] | 89 | 2019-07-12T20:46:46.000Z | 2022-03-29T16:16:46.000Z | src/sasctl/_services/concepts.py | brtieu/python-sasctl | 1eed427c39faaddda78dec4806f12f3f8964890e | [
"Apache-2.0"
] | 41 | 2019-07-11T15:08:55.000Z | 2022-01-10T05:30:50.000Z | #!/usr/bin/env python
# encoding: utf-8
#
# Copyright © 2019, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
from .service import Service
from ..core import uri_as_str
class Concepts(Service):
"""Assigns concepts to natural language text documents according to a
... | 33.78125 | 95 | 0.570074 |
7983fdedf40f6ca82eb314b12ec0806f2229e4ec | 7,667 | py | Python | lab1/myImpl.py | yzj2019/ustc_ai | 6f5c671edb7509a91228d700aa049956f79ecfe5 | [
"MIT"
] | 1 | 2021-07-17T12:06:54.000Z | 2021-07-17T12:06:54.000Z | lab1/myImpl.py | yzj2019/ustc_ai | 6f5c671edb7509a91228d700aa049956f79ecfe5 | [
"MIT"
] | null | null | null | lab1/myImpl.py | yzj2019/ustc_ai | 6f5c671edb7509a91228d700aa049956f79ecfe5 | [
"MIT"
] | null | null | null | import util
"""
Data sturctures we will use are stack, queue and priority queue.
Stack: first in last out
Queue: first in first out
collection.push(element): insert element
element = collection.pop() get and remove element from collection
Priority queue:
pq.update('eat', 2)
pq.update('study', 1)
... | 32.487288 | 159 | 0.597626 |
7983fe3edf980f9470ca7d250156c3a7c576ea0d | 2,477 | py | Python | pymilvus/__init__.py | haojunyu/pymilvus | 247dd7a9dc238ddd9e366e613b50b5b1d46c0e35 | [
"Apache-2.0"
] | null | null | null | pymilvus/__init__.py | haojunyu/pymilvus | 247dd7a9dc238ddd9e366e613b50b5b1d46c0e35 | [
"Apache-2.0"
] | null | null | null | pymilvus/__init__.py | haojunyu/pymilvus | 247dd7a9dc238ddd9e366e613b50b5b1d46c0e35 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2019-2021 Zilliz. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 33.472973 | 218 | 0.75979 |
7983fe40ed15838a7b1f9ef89f8b2677b9927e6f | 1,470 | py | Python | day003/list2.py | marcosvbras/60-days-of-python | b6966192a8e9113dd13491ab8707c2b547397eea | [
"Apache-2.0"
] | 5 | 2018-04-07T02:45:04.000Z | 2022-03-29T02:52:03.000Z | day003/list2.py | marcosvbras/60-days-of-python | b6966192a8e9113dd13491ab8707c2b547397eea | [
"Apache-2.0"
] | null | null | null | day003/list2.py | marcosvbras/60-days-of-python | b6966192a8e9113dd13491ab8707c2b547397eea | [
"Apache-2.0"
] | 5 | 2019-05-10T03:12:17.000Z | 2021-01-16T10:54:41.000Z | # coding=utf-8
"""List II - In-place functions: Reverse, Sort and Extend.
Examples with in-place list functions. In-place functions changes
the original object and return None after calling it.
"""
def do_something_magical(animes, tvshows):
"""Use some list methods."""
animes.reverse()
print("Inv... | 45.9375 | 168 | 0.670068 |
7983fe41a9bb3b48e488037b6706b7fc69d4927f | 818 | py | Python | 12/12.py | pak21/aoc2017 | 622ca0df32cbe22f147c3aeb0dc07a8edfc17095 | [
"MIT"
] | null | null | null | 12/12.py | pak21/aoc2017 | 622ca0df32cbe22f147c3aeb0dc07a8edfc17095 | [
"MIT"
] | null | null | null | 12/12.py | pak21/aoc2017 | 622ca0df32cbe22f147c3aeb0dc07a8edfc17095 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import collections
import sys
connections = collections.defaultdict(lambda: [])
with open(sys.argv[1]) as input_file:
for line in [l.rstrip() for l in input_file]:
words = line.split();
left = int(words[0])
right = [int(w.rstrip(',')) for w in words[2:]]
for r ... | 21.526316 | 55 | 0.56846 |
7983fec415dc60621fa8e95107c6b8b87cdcbdb6 | 3,029 | py | Python | configs/tutorial/simple_ruby.py | YenHaoChen/HeteroGarnet-early | 1055de6ab1b47a90c09756feb989e92127f456fe | [
"BSD-3-Clause"
] | 3 | 2021-05-21T07:13:45.000Z | 2021-11-30T08:30:12.000Z | configs/tutorial/simple_ruby.py | YenHaoChen/HeteroGarnet-early | 1055de6ab1b47a90c09756feb989e92127f456fe | [
"BSD-3-Clause"
] | null | null | null | configs/tutorial/simple_ruby.py | YenHaoChen/HeteroGarnet-early | 1055de6ab1b47a90c09756feb989e92127f456fe | [
"BSD-3-Clause"
] | 1 | 2021-11-11T07:29:49.000Z | 2021-11-11T07:29:49.000Z | '''
Configuring a simple Ruby system - gem5 Tutorial 0.1 documentation
http://learning.gem5.org/book/part3/MSI/configuration.html
First, createa new configuration directory in configs/. Just like all gem5
confguration files, we will have a configuration run script. For the run
script, we can start with simple.py from ... | 40.932432 | 78 | 0.774843 |
7983fefa7719aae36e6bc9002a2c8e9d73cdee0a | 6,779 | py | Python | python/atmospheric.py | octo-willy/mapping-wetlands | a9acab6a55e25bb4ef2c70106389006fc5462fb7 | [
"MIT"
] | null | null | null | python/atmospheric.py | octo-willy/mapping-wetlands | a9acab6a55e25bb4ef2c70106389006fc5462fb7 | [
"MIT"
] | null | null | null | python/atmospheric.py | octo-willy/mapping-wetlands | a9acab6a55e25bb4ef2c70106389006fc5462fb7 | [
"MIT"
] | 1 | 2021-04-20T01:53:21.000Z | 2021-04-20T01:53:21.000Z | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import ee
class Atmospheric():
"""
atmospheric.py, Sam Murphy (2016-10-26) (https://github.com/samsammurphy/gee-atmcorr-S2/blob/master/bin/atmospheric.py)
Atmospheric water vapour, ozone and AOT from GEE
Usage
H2O = Atmospheric.water(geom,date)
... | 33.230392 | 226 | 0.555097 |
7983ff09017ad72ea73cd124f5e19dc3dc4546c7 | 17,754 | py | Python | tests/template/test_kedro_cli.py | LTHODAVDOPL/kedro | d2c9648794cdda5ad28ea99cfc2661c076876932 | [
"Apache-2.0"
] | 1 | 2019-09-28T22:38:00.000Z | 2019-09-28T22:38:00.000Z | tests/template/test_kedro_cli.py | LTHODAVDOPL/kedro | d2c9648794cdda5ad28ea99cfc2661c076876932 | [
"Apache-2.0"
] | null | null | null | tests/template/test_kedro_cli.py | LTHODAVDOPL/kedro | d2c9648794cdda5ad28ea99cfc2661c076876932 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2019 QuantumBlack Visual Analytics Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# THE SOFTWARE IS PROVIDED "AS IS"... | 36.530864 | 88 | 0.641151 |
7983ff981a058e7a918aded73aabdb7bbc75a2d8 | 9,096 | py | Python | examples/work_with_agronomics.py | calekochenour/awhere-fire-risk | 04cc426dfc49337bbbefd97f11af82b171f995ef | [
"BSD-3-Clause"
] | 3 | 2020-06-27T21:15:43.000Z | 2021-03-16T07:02:05.000Z | examples/work_with_agronomics.py | calekochenour/awhere-fire-risk | 04cc426dfc49337bbbefd97f11af82b171f995ef | [
"BSD-3-Clause"
] | 230 | 2020-05-19T12:26:28.000Z | 2022-03-31T16:04:18.000Z | examples/work_with_agronomics.py | calekochenour/awhere-fire-risk | 04cc426dfc49337bbbefd97f11af82b171f995ef | [
"BSD-3-Clause"
] | null | null | null | """
Work with Agronomics in aWherePy
================================
Learn how to get agronomic norms and observed values with aWherePy.
"""
###############################################################################
# Get Agronomic Norms and Observed Agronomic Data with aWherePy
# -----------------------------... | 34.195489 | 79 | 0.632476 |
798400153e70daed5b932c1ee37af03a5e60c399 | 385 | py | Python | qcelemental/physical_constants/__init__.py | laurennk/QCElemental | fd6e008da0f2885109f99eb518ee165f9dd7d82e | [
"BSD-3-Clause"
] | null | null | null | qcelemental/physical_constants/__init__.py | laurennk/QCElemental | fd6e008da0f2885109f99eb518ee165f9dd7d82e | [
"BSD-3-Clause"
] | null | null | null | qcelemental/physical_constants/__init__.py | laurennk/QCElemental | fd6e008da0f2885109f99eb518ee165f9dd7d82e | [
"BSD-3-Clause"
] | 1 | 2020-01-05T07:57:14.000Z | 2020-01-05T07:57:14.000Z | """
Units handlers
"""
# Ensure pint exists
from importlib.util import find_spec
spec = find_spec('pint')
if spec is None:
raise ModuleNotFoundError(
"""Python module pint not found. Solve by installing it: `conda install pint -c conda-forge` or `pip install pint`"""
) # pragma: no cover
del spec, fin... | 25.666667 | 125 | 0.724675 |
7984004da9243c4207098136f7ceb910b5fe7b3b | 3,192 | py | Python | auto texture addon/myAddo/__init__.py | mirkan1/blender-finished-projects | 96a4514a4d2bc1d84c67f874bef73f0f592eaf52 | [
"MIT"
] | null | null | null | auto texture addon/myAddo/__init__.py | mirkan1/blender-finished-projects | 96a4514a4d2bc1d84c67f874bef73f0f592eaf52 | [
"MIT"
] | null | null | null | auto texture addon/myAddo/__init__.py | mirkan1/blender-finished-projects | 96a4514a4d2bc1d84c67f874bef73f0f592eaf52 | [
"MIT"
] | null | null | null |
#material_output = material.node_tree.nodes.get('Material Output')
#emission = material.node_tree.nodes.new('ShaderNodeTexImage') #new('ShaderNodeBsdfDiffuse')
#import pdb;pdb.set_trace()#emission.inputs['Color'].default_value = (randint(0,100) / 100, randint(0,100) / 100, randint(0,400) / 100, 1)
#material.node_tree... | 30.990291 | 138 | 0.671366 |
798402c2290a50ca37bc2b88b6c64bec5fa0dac0 | 35,017 | py | Python | tests/test_auth.py | tsukaeru/RDM-osf.io | 2dc3e539322b6110e51772f8bd25ebdeb8e12d0e | [
"Apache-2.0"
] | 11 | 2018-12-11T16:39:40.000Z | 2022-02-26T09:51:32.000Z | tests/test_auth.py | tsukaeru/RDM-osf.io | 2dc3e539322b6110e51772f8bd25ebdeb8e12d0e | [
"Apache-2.0"
] | 52 | 2018-04-13T05:03:21.000Z | 2022-03-22T02:56:19.000Z | tests/test_auth.py | tsukaeru/RDM-osf.io | 2dc3e539322b6110e51772f8bd25ebdeb8e12d0e | [
"Apache-2.0"
] | 16 | 2018-07-09T01:44:51.000Z | 2021-06-30T01:57:16.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import unittest
from nose.tools import * # noqa; PEP8 asserts
from webtest_plus import TestApp as WebtestApp # py.test tries to collect `TestApp`
import mock
from future.moves.urllib.parse import urlparse, urljoin, quote
from rest_framework import status as http_status
... | 41.148061 | 162 | 0.695605 |
79840318bbf6f203922fd03d1dea69cfa7ddf3ab | 149 | py | Python | kanbanApp/taskmanager/admin.py | Pedroglp/kanban | 7087db6972d3b128a7af8a6b6c7b461492b6cec0 | [
"MIT"
] | 1 | 2018-03-05T16:21:54.000Z | 2018-03-05T16:21:54.000Z | kanbanApp/taskmanager/admin.py | Pedroglp/kanban | 7087db6972d3b128a7af8a6b6c7b461492b6cec0 | [
"MIT"
] | null | null | null | kanbanApp/taskmanager/admin.py | Pedroglp/kanban | 7087db6972d3b128a7af8a6b6c7b461492b6cec0 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Task, Status
# Register your models here.
admin.site.register(Task)
admin.site.register(Status) | 24.833333 | 32 | 0.805369 |
7984047d7ac9bb7c5ded63995eaaaac9793caa77 | 1,290 | py | Python | setup.py | justinabrahms/imhotep | d50833977a4ea18d4d21176e1437899d890e89ff | [
"MIT"
] | 76 | 2015-01-09T23:07:26.000Z | 2021-10-01T21:55:20.000Z | setup.py | justinabrahms/imhotep | d50833977a4ea18d4d21176e1437899d890e89ff | [
"MIT"
] | 39 | 2015-03-16T14:22:09.000Z | 2022-03-26T01:04:37.000Z | setup.py | justinabrahms/imhotep | d50833977a4ea18d4d21176e1437899d890e89ff | [
"MIT"
] | 20 | 2015-03-17T20:22:07.000Z | 2022-03-10T22:57:28.000Z | from setuptools import setup, find_packages
setup(
name='imhotep',
version='1.1.1',
packages=find_packages(),
url='https://github.com/justinabrahms/imhotep',
license='MIT',
author='Justin Abrahms',
author_email='justin@abrah.ms',
description='A tool to pipe linters into code review',
... | 33.076923 | 70 | 0.573643 |
7984053d0e6a01a76a3e34459052804b6178692e | 1,670 | py | Python | pipelines_webinar/pipelines_webinar_stack.py | edjwhho/cdk-pipelines-demo-python | 0355f3c90f044052ceeacbe6c5e38d6fa31950e8 | [
"MIT-0"
] | null | null | null | pipelines_webinar/pipelines_webinar_stack.py | edjwhho/cdk-pipelines-demo-python | 0355f3c90f044052ceeacbe6c5e38d6fa31950e8 | [
"MIT-0"
] | null | null | null | pipelines_webinar/pipelines_webinar_stack.py | edjwhho/cdk-pipelines-demo-python | 0355f3c90f044052ceeacbe6c5e38d6fa31950e8 | [
"MIT-0"
] | null | null | null | from os import path
from aws_cdk import core
import aws_cdk.aws_lambda as lmb
import aws_cdk.aws_apigateway as apigw
import aws_cdk.aws_codedeploy as codedeploy
import aws_cdk.aws_cloudwatch as cloudwatch
class PipelinesWebinarStack(core.Stack):
def __init__(self, scope: core.Construct, id: str, **kwargs) -> Non... | 33.4 | 93 | 0.620359 |
7984053da22613f1d0b2cb1d6e1f603cb7a0be08 | 114,704 | py | Python | pycqed/measurement/pulse_sequences/multi_qubit_tek_seq_elts.py | sergimasot/PycQED_py3 | 54ad1b14929ffe5cc87cf59423a970e4b9baa3e1 | [
"MIT"
] | null | null | null | pycqed/measurement/pulse_sequences/multi_qubit_tek_seq_elts.py | sergimasot/PycQED_py3 | 54ad1b14929ffe5cc87cf59423a970e4b9baa3e1 | [
"MIT"
] | null | null | null | pycqed/measurement/pulse_sequences/multi_qubit_tek_seq_elts.py | sergimasot/PycQED_py3 | 54ad1b14929ffe5cc87cf59423a970e4b9baa3e1 | [
"MIT"
] | null | null | null | import logging
log = logging.getLogger(__name__)
import itertools
import numpy as np
from copy import deepcopy
import pycqed.measurement.waveform_control.sequence as sequence
from pycqed.utilities.general import add_suffix_to_dict_keys
import pycqed.measurement.randomized_benchmarking.randomized_benchmarking as rb
impo... | 42.435812 | 104 | 0.569117 |
79840652f2789a3e9fc972370d9b1a9610c2f71e | 3,246 | py | Python | astroML_fig_tests/test.py | aragilar/astroML | d3f6279eb632957662338761cb559a1dcd541fb0 | [
"BSD-2-Clause"
] | null | null | null | astroML_fig_tests/test.py | aragilar/astroML | d3f6279eb632957662338761cb559a1dcd541fb0 | [
"BSD-2-Clause"
] | null | null | null | astroML_fig_tests/test.py | aragilar/astroML | d3f6279eb632957662338761cb559a1dcd541fb0 | [
"BSD-2-Clause"
] | null | null | null | import os
import fnmatch
from contextlib import contextmanager
from nose import SkipTest
import matplotlib
from matplotlib import colors
matplotlib.use('Agg')
# set some font properties
matplotlib.rc('text', usetex=True)
matplotlib.rc('font', family='serif', style='normal', variant='normal',
stretch='no... | 32.138614 | 79 | 0.643869 |
7984067ed386115e68d37394b13d9f8afa5fe9a2 | 8,582 | py | Python | 2016/arizona-pp/pima_county_polling_location.py | democracyworks/hand-collection-to-vip | 0b6e90f6055c1325930b53905bba2d1bfc111457 | [
"BSD-3-Clause"
] | null | null | null | 2016/arizona-pp/pima_county_polling_location.py | democracyworks/hand-collection-to-vip | 0b6e90f6055c1325930b53905bba2d1bfc111457 | [
"BSD-3-Clause"
] | 2 | 2016-08-12T20:52:24.000Z | 2021-02-08T20:24:27.000Z | 2016/arizona-pp/pima_county_polling_location.py | democracyworks/hand-collection-to-vip | 0b6e90f6055c1325930b53905bba2d1bfc111457 | [
"BSD-3-Clause"
] | 1 | 2018-08-17T21:16:30.000Z | 2018-08-17T21:16:30.000Z | import pandas as pd
import config
import hashlib
import datetime
import re
class PollingLocationTxt(object):
"""Creates VIP 5.1 polling_location.txt document.
"""
def __init__(self, base_df, early_voting_true='false', drop_box_true='false'):
self.base_df = base_df
self.drop_box_true = dro... | 40.102804 | 134 | 0.626777 |
7984076fe2036d9911660b4038dca548e107e9d3 | 2,545 | py | Python | Task3/ds_movie_recommender/play_file.py | acivgin1/M1-DS-internship | 093e64632f61a3b9b980d6258edd3c248141b19c | [
"MIT"
] | null | null | null | Task3/ds_movie_recommender/play_file.py | acivgin1/M1-DS-internship | 093e64632f61a3b9b980d6258edd3c248141b19c | [
"MIT"
] | null | null | null | Task3/ds_movie_recommender/play_file.py | acivgin1/M1-DS-internship | 093e64632f61a3b9b980d6258edd3c248141b19c | [
"MIT"
] | null | null | null | import os
import numpy as np
from ratings import load_train_validation_test
import pyximport; pyximport.install()
from svd_clustering import SvdCluster
from movie_recommender import SmartQi
GAMMA_LIST = [0.006, 0.005]
BETA_LIST = [0.06, 0.05, 0.04]
def cross_validation(sA_train, sA_validation, sA_test, svd_path):
... | 35.84507 | 87 | 0.658153 |
79840786153f2064949a822112ead698b6f2b6fd | 110 | py | Python | demo.py | 4dc5/casio_graph | 755e865de5c89569efa03dbe73b46b0dfc5d49e1 | [
"MIT"
] | 4 | 2020-05-26T22:54:32.000Z | 2021-01-06T13:02:55.000Z | demo.py | 4dc5/casio_graph | 755e865de5c89569efa03dbe73b46b0dfc5d49e1 | [
"MIT"
] | null | null | null | demo.py | 4dc5/casio_graph | 755e865de5c89569efa03dbe73b46b0dfc5d49e1 | [
"MIT"
] | null | null | null | from graph import *
def func(x):
return sin(x)+sin(3*x)/3
g=Graph()
g.graph(func,xmin=-20,xmax=20)
| 13.75 | 31 | 0.609091 |
798408bbaeca8b21c8fc62916276e21e5c12c7c3 | 6,475 | py | Python | muffnn/mlp/mlp_regressor.py | civisanalytics/muffnn | 0ec92ddb5a0158a3e46e68974ff958101e3b874d | [
"BSD-3-Clause"
] | 53 | 2016-08-26T18:28:03.000Z | 2021-09-26T08:44:58.000Z | muffnn/mlp/mlp_regressor.py | civisanalytics/muffnn | 0ec92ddb5a0158a3e46e68974ff958101e3b874d | [
"BSD-3-Clause"
] | 80 | 2016-08-29T19:08:41.000Z | 2020-12-01T16:14:11.000Z | muffnn/mlp/mlp_regressor.py | civisanalytics/muffnn | 0ec92ddb5a0158a3e46e68974ff958101e3b874d | [
"BSD-3-Clause"
] | 25 | 2016-08-29T18:48:43.000Z | 2021-09-26T08:45:18.000Z | """
A Deep Neural Network (multilayer Perceptron) sklearn-style regressor.
Similar to sklearn.neural_network.MLPRegressor, but using TensorFlow.
"""
import logging
from warnings import warn
import numpy as np
from sklearn.base import RegressorMixin
import tensorflow as tf
from tensorflow.python.ops import nn
from m... | 36.581921 | 84 | 0.651892 |
79840a1b964a28ac979677f482a379e9159f7a22 | 38,843 | py | Python | tests/integration/container_test.py | caputomarcos/docker-py | 59f569a2469434488f71442195ba61ce3eb63a7b | [
"Apache-2.0"
] | null | null | null | tests/integration/container_test.py | caputomarcos/docker-py | 59f569a2469434488f71442195ba61ce3eb63a7b | [
"Apache-2.0"
] | null | null | null | tests/integration/container_test.py | caputomarcos/docker-py | 59f569a2469434488f71442195ba61ce3eb63a7b | [
"Apache-2.0"
] | null | null | null | import os
import shutil
import signal
import tempfile
import docker
import pytest
import six
from ..base import requires_api_version
from .. import helpers
BUSYBOX = helpers.BUSYBOX
class ListContainersTest(helpers.BaseTestCase):
def test_list_containers(self):
res0 = self.client.containers(all=True)
... | 37.277351 | 78 | 0.607239 |
79840a8bc8b3920cf2e87213c85ea215cf441ed0 | 6,432 | py | Python | pdb2pqr/na.py | stefdoerr/pdb2pqr | c48a97a17f75d6c97a81bfb9e138ab165c563841 | [
"BSD-3-Clause"
] | null | null | null | pdb2pqr/na.py | stefdoerr/pdb2pqr | c48a97a17f75d6c97a81bfb9e138ab165c563841 | [
"BSD-3-Clause"
] | null | null | null | pdb2pqr/na.py | stefdoerr/pdb2pqr | c48a97a17f75d6c97a81bfb9e138ab165c563841 | [
"BSD-3-Clause"
] | null | null | null | """Nucleic Acid Structures for PDB2PQR
This module contains the base nucleic acid structures for pdb2pqr.
.. codeauthor:: Todd Dolinsky
.. codeauthor:: Nathan Baker
"""
from . import residue
from . import structures as struct
class Nucleic(residue.Residue):
"""This class provides standard features of the nucl... | 24.738462 | 74 | 0.561723 |
79840b53e30affb4ddcefe1f79f16072c148496c | 842 | py | Python | setup.py | ethankruse/tess-point | f57b8f1d9c59dfdc33b642ca0802fe522f4e6e42 | [
"MIT"
] | null | null | null | setup.py | ethankruse/tess-point | f57b8f1d9c59dfdc33b642ca0802fe522f4e6e42 | [
"MIT"
] | null | null | null | setup.py | ethankruse/tess-point | f57b8f1d9c59dfdc33b642ca0802fe522f4e6e42 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="tess-point",
version="0.7.0",
author="Christopher J. Burke",
author_email="cjburke@mit.edu",
description="Determine pixel coordinates for TESS targets",
long_description=long_descripti... | 28.066667 | 63 | 0.635392 |
79840c0d464439f8eeda05d96af48f4677f41e7d | 3,200 | py | Python | tests/test_importer.py | tony612/thumbor | 2efec9fc1bc67c9d029904870fa624a81966f3a1 | [
"MIT"
] | 1 | 2021-02-25T18:41:01.000Z | 2021-02-25T18:41:01.000Z | tests/test_importer.py | tony612/thumbor | 2efec9fc1bc67c9d029904870fa624a81966f3a1 | [
"MIT"
] | null | null | null | tests/test_importer.py | tony612/thumbor | 2efec9fc1bc67c9d029904870fa624a81966f3a1 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/thumbor/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com thumbor@googlegroups.com
from preggy import expect
from tests.base import TestCase
from thum... | 35.555556 | 79 | 0.651563 |
79840ce839f545b9cf1ef0a268b9a906e5e10fe1 | 339 | py | Python | django-diary/source_code_step_6/entries/models.py | syberflea/materials | 54f44725b40edf00c1b523d7a85b34a85014d7eb | [
"MIT"
] | 3,682 | 2018-05-07T19:45:24.000Z | 2022-03-31T15:19:10.000Z | django-diary/source_code_step_6/entries/models.py | sribarrow/materials | c17c4a4d6f8487e59eac1df8c88ca92b73d6d2a5 | [
"MIT"
] | 148 | 2018-05-15T21:18:49.000Z | 2022-03-21T11:25:39.000Z | django-diary/source_code_step_6/entries/models.py | sribarrow/materials | c17c4a4d6f8487e59eac1df8c88ca92b73d6d2a5 | [
"MIT"
] | 5,535 | 2018-05-25T23:36:08.000Z | 2022-03-31T16:55:52.000Z | from django.db import models
from django.utils import timezone
class Entry(models.Model):
title = models.CharField(max_length=200)
content = models.TextField()
date_created = models.DateTimeField(default=timezone.now)
def __str__(self):
return self.title
class Meta:
verbose_name_... | 22.6 | 61 | 0.713864 |
79840e70bfc91cf948425c0b30be364dffa1aef5 | 6,999 | py | Python | examples/pwr_run/checkpointing/socket_short/true_random/job20.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | examples/pwr_run/checkpointing/socket_short/true_random/job20.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | examples/pwr_run/checkpointing/socket_short/true_random/job20.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | """
#Trains a ResNet on the CIFAR10 dataset.
"""
from __future__ import print_function
import keras
from keras.layers import Dense, Conv2D, BatchNormalization, Activation
from keras.layers import AveragePooling2D, Input, Flatten
from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint, LearningRa... | 30.832599 | 118 | 0.703672 |
79840ed944740e4cf2602b7d012528b8bdd1d5b1 | 1,942 | py | Python | test/aqua/test_deutsch_jozsa.py | chunfuchen/aqua | fde435203a2799433a4e50897554fa226c8ff1dc | [
"Apache-2.0"
] | null | null | null | test/aqua/test_deutsch_jozsa.py | chunfuchen/aqua | fde435203a2799433a4e50897554fa226c8ff1dc | [
"Apache-2.0"
] | null | null | null | test/aqua/test_deutsch_jozsa.py | chunfuchen/aqua | fde435203a2799433a4e50897554fa226c8ff1dc | [
"Apache-2.0"
] | 2 | 2020-02-13T02:17:58.000Z | 2020-08-09T07:56:25.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | 36.641509 | 89 | 0.719361 |
79840efbbe786e8faae5ec726fcb911bf9e80769 | 1,395 | py | Python | deprecated/recipes/numpy_from_csv_data.py | Vibrant-Planet/aorist | 067e119ef4d0d40802ce74a8e47d882e557ce195 | [
"MIT"
] | 16 | 2021-08-14T10:20:16.000Z | 2022-03-31T04:19:26.000Z | deprecated/recipes/numpy_from_csv_data.py | scie-nz/aorist | ac1e31251af7d851c4491a310b417de880b79d09 | [
"MIT"
] | 5 | 2021-08-15T23:19:10.000Z | 2021-09-26T20:50:41.000Z | deprecated/recipes/numpy_from_csv_data.py | Vibrant-Planet/aorist | 067e119ef4d0d40802ce74a8e47d882e557ce195 | [
"MIT"
] | 1 | 2022-01-06T01:26:24.000Z | 2022-01-06T01:26:24.000Z | from aorist import aorist, NumpyFromCSVData
programs = {}
@aorist(
programs,
NumpyFromCSVData,
entrypoint="read_csv_into_numpy",
args={
"dataset_name": lambda lng: lng.data_set.name,
"static_data_table_name": lambda lng: lng.static_data_table.name,
"columns": lambda lng: lng.se... | 31 | 101 | 0.61147 |
79840f72480cb08b4fac519fdca950c57f31a427 | 4,642 | py | Python | python/hongong/ch07/07_3.py | gangserver/py_test | 869bdfa5c94c3b6a15b87e0c3de6b2cdaca821f4 | [
"Apache-2.0"
] | null | null | null | python/hongong/ch07/07_3.py | gangserver/py_test | 869bdfa5c94c3b6a15b87e0c3de6b2cdaca821f4 | [
"Apache-2.0"
] | null | null | null | python/hongong/ch07/07_3.py | gangserver/py_test | 869bdfa5c94c3b6a15b87e0c3de6b2cdaca821f4 | [
"Apache-2.0"
] | null | null | null | from tensorflow import keras
from sklearn.model_selection import train_test_split
import matplotlib.pyplot as plt
import numpy as np
(train_input, train_target), (test_input, test_target) =\
keras.datasets.fashion_mnist.load_data()
print(train_input.shape, train_target.shape)
print(test_input.shape, test_target.sh... | 34.641791 | 111 | 0.765403 |
79840fa837046a923051099dc35e13f42b013528 | 3,325 | py | Python | huaweicloud-sdk-gaussdbforopengauss/huaweicloudsdkgaussdbforopengauss/v3/model/list_volume.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-gaussdbforopengauss/huaweicloudsdkgaussdbforopengauss/v3/model/list_volume.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-gaussdbforopengauss/huaweicloudsdkgaussdbforopengauss/v3/model/list_volume.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ListVolume:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attr... | 23.75 | 79 | 0.516992 |
79840fd36902d403556727b4c7e66d7bc3b07239 | 4,290 | py | Python | modules/routers/service/router.py | IT-COMMUNITY-ICT-RUSSIA/itmo-chart-backend | 808d55ea8c45d8b199824df702ba688adbb283b5 | [
"Apache-2.0"
] | null | null | null | modules/routers/service/router.py | IT-COMMUNITY-ICT-RUSSIA/itmo-chart-backend | 808d55ea8c45d8b199824df702ba688adbb283b5 | [
"Apache-2.0"
] | null | null | null | modules/routers/service/router.py | IT-COMMUNITY-ICT-RUSSIA/itmo-chart-backend | 808d55ea8c45d8b199824df702ba688adbb283b5 | [
"Apache-2.0"
] | null | null | null | import math
import typing as tp
from fastapi import APIRouter, Depends, status
from .dependencies import get_achievement_template, get_user_by_id
from .models import AchievementEvent, AchievementTemplate, AchievementTemplateList, RewardEvent, RewardList
from ..user.models import User
from ...database import MongoDbWr... | 33 | 119 | 0.681352 |
79841024524c3374dae07a0d4d578759345a0e9f | 2,187 | py | Python | src/python/route_guide_pb2_grpc.py | wihl/grpc-msgs | 772b104a86efe11b9ffb940c9273a9f0fd695e77 | [
"Apache-2.0"
] | null | null | null | src/python/route_guide_pb2_grpc.py | wihl/grpc-msgs | 772b104a86efe11b9ffb940c9273a9f0fd695e77 | [
"Apache-2.0"
] | null | null | null | src/python/route_guide_pb2_grpc.py | wihl/grpc-msgs | 772b104a86efe11b9ffb940c9273a9f0fd695e77 | [
"Apache-2.0"
] | null | null | null | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import route_guide_pb2 as route__guide__pb2
class RouteGuideStub(object):
"""Interface exported by the server.
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GenRe... | 34.171875 | 81 | 0.746685 |
79841029ee8380e0f742950215ff11658505e28f | 6,127 | py | Python | northstar_cloud/api/proto/northstar_pb2_grpc.py | hiteshwadekar/northstar-cloud | 0bdf829989c339e0c8a13638fa38024af2ef1a56 | [
"Apache-2.0"
] | 1 | 2022-03-14T00:13:24.000Z | 2022-03-14T00:13:24.000Z | northstar_cloud/api/proto/northstar_pb2_grpc.py | hiteshwadekar/northstar-cloud | 0bdf829989c339e0c8a13638fa38024af2ef1a56 | [
"Apache-2.0"
] | 2 | 2020-03-31T04:10:57.000Z | 2021-02-02T22:04:33.000Z | northstar_cloud/api/proto/northstar_pb2_grpc.py | hiteshwadekar/northstar-cloud | 0bdf829989c339e0c8a13638fa38024af2ef1a56 | [
"Apache-2.0"
] | 2 | 2019-07-03T00:27:11.000Z | 2019-07-27T01:26:54.000Z | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import northstar_pb2 as northstar__pb2
class NorthStarServiceStub(object):
"""The `NorthStar` provides APIs.
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetUse... | 40.576159 | 88 | 0.750938 |
798410b7a74a90d3ddeee3534b2cc778c55d8110 | 866 | py | Python | sesion30/people/people/urls.py | joelibaceta/backend-codigo-10 | 75256580ce9975bcfa831fde884362787d82b71f | [
"MIT"
] | 1 | 2021-11-23T03:05:23.000Z | 2021-11-23T03:05:23.000Z | sesion30/people/people/urls.py | joelibaceta/backend-codigo-10 | 75256580ce9975bcfa831fde884362787d82b71f | [
"MIT"
] | 1 | 2021-11-23T02:49:01.000Z | 2021-11-23T02:55:14.000Z | sesion30/people/people/urls.py | joelibaceta/backend-codigo-10 | 75256580ce9975bcfa831fde884362787d82b71f | [
"MIT"
] | 1 | 2022-01-26T19:54:33.000Z | 2022-01-26T19:54:33.000Z | """people URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... | 32.074074 | 77 | 0.698614 |
798410d8bdaade301809d8989d90fc908a0f69ec | 5,869 | py | Python | huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_background_tasks_request.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_background_tasks_request.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/list_background_tasks_request.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ListBackgroundTasksRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict):... | 26.436937 | 97 | 0.578974 |
7984113e716ebec1bc3dd396e5d624413ce0f94e | 11,441 | py | Python | fairseq/search.py | steventan0110/multiDDS | 9ca17bd6a8f546f4ed26716397c2d0dd2df3358f | [
"MIT"
] | 3 | 2021-01-03T19:44:43.000Z | 2022-03-02T06:30:12.000Z | fairseq/search.py | steventan0110/NMT_RL_Filter | b77d0ad7b8f38d5b3b1b0e63e2671e0de0e3da00 | [
"MIT"
] | null | null | null | fairseq/search.py | steventan0110/NMT_RL_Filter | b77d0ad7b8f38d5b3b1b0e63e2671e0de0e3da00 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import math
import torch
class Search(object):
def __init__(self, tgt_dict):
self.pad = tgt_dict.pad()
self.unk = tgt_... | 37.884106 | 104 | 0.606416 |
7984114d2d780a200b3130d643489735692131ba | 3,910 | py | Python | instascrape/commands/__init__.py | tnychn/instascrape | 7aaf3c1a1786bbe80059ed6e0d93442a19a6f475 | [
"MIT"
] | 80 | 2020-05-28T17:22:14.000Z | 2022-03-25T07:15:51.000Z | instascrape/commands/__init__.py | AlphaXenon/InstaScrape | 7aaf3c1a1786bbe80059ed6e0d93442a19a6f475 | [
"MIT"
] | 23 | 2020-05-25T12:45:40.000Z | 2022-03-06T05:44:41.000Z | instascrape/commands/__init__.py | AlphaXenon/InstaScrape | 7aaf3c1a1786bbe80059ed6e0d93442a19a6f475 | [
"MIT"
] | 14 | 2020-06-28T05:52:28.000Z | 2022-03-28T04:27:50.000Z | import os
import sys
import pickle
import logging
import traceback
from getpass import getpass
from datetime import datetime
from contextlib import contextmanager
from colorama import Fore
from requests import RequestException
from instascrape.utils import set_mtime
from instascrape.exceptions import InstascrapeError... | 29.621212 | 95 | 0.596931 |
798411997cb6bb653b45faef12b48d800ffb227f | 1,958 | py | Python | vcs_pipeline.py | telegraphic/pft-bifrost | 80ef521ea96481fee57a4246f709fcfe7d3b3244 | [
"MIT"
] | null | null | null | vcs_pipeline.py | telegraphic/pft-bifrost | 80ef521ea96481fee57a4246f709fcfe7d3b3244 | [
"MIT"
] | null | null | null | vcs_pipeline.py | telegraphic/pft-bifrost | 80ef521ea96481fee57a4246f709fcfe7d3b3244 | [
"MIT"
] | null | null | null | """
# vcs_pipeline.py
A pipeline to convert MWA VCS data into filterbank files.
"""
import bifrost as bf
from blocks.read_vcs import read_vcs_block
from blocks.print_stuff import print_stuff_block
from blocks.h5write import h5write_block
from logger import setup_logger
setup_logger(filter="blocks.read_vcs", level="... | 39.959184 | 113 | 0.674668 |
798411f118ad8a5bf659a0f85d1280737e253704 | 2,928 | py | Python | pytorch_quik/tensor.py | donchesworth/pytorch-quik | e59ea3393bf017a17ab92991f14fe3bd6c5b2d0c | [
"BSD-3-Clause"
] | 1 | 2021-06-03T21:53:17.000Z | 2021-06-03T21:53:17.000Z | pytorch_quik/tensor.py | donchesworth/pytorch-quik | e59ea3393bf017a17ab92991f14fe3bd6c5b2d0c | [
"BSD-3-Clause"
] | null | null | null | pytorch_quik/tensor.py | donchesworth/pytorch-quik | e59ea3393bf017a17ab92991f14fe3bd6c5b2d0c | [
"BSD-3-Clause"
] | null | null | null | import torch
import torch.utils.data as td
from typing import Optional, Dict, Union
from transformers import BatchEncoding
from argparse import Namespace
import numpy as np
import pandas as pd
from pytorch_quik import io
Tensor_Target = Union[str, np.ndarray]
Tensor_Data = Union[pd.DataFrame, torch.Tensor, BatchEncodi... | 35.277108 | 79 | 0.659836 |
7984125f5036ff7ff677626a5b9338bc76c697c6 | 1,176 | py | Python | aminos/src/headers.py | Hanamixp/Amino-Socket | 77ebff22c81fa330997bcb15841fc5001ee7b5db | [
"Apache-2.0"
] | 2 | 2021-11-28T14:52:18.000Z | 2021-11-29T19:03:40.000Z | build/lib/aminos/src/headers.py | Hanamixp/Amino-Socket | 77ebff22c81fa330997bcb15841fc5001ee7b5db | [
"Apache-2.0"
] | null | null | null | build/lib/aminos/src/headers.py | Hanamixp/Amino-Socket | 77ebff22c81fa330997bcb15841fc5001ee7b5db | [
"Apache-2.0"
] | 3 | 2021-11-28T14:52:26.000Z | 2022-01-08T08:00:36.000Z | headers = None
class Headers:
def __init__(self, sid: str = None):
self.headers = {
"Content-Type": "application/json; charset=utf-8",
"User-Agent": "Dalvik/2.1.0 (Linux; U; Android 9; Redmi Note 8 Build/PKQ1.190616.001; com.narvii.amino.master/3.4.33578)",
"AUI... | 43.555556 | 148 | 0.511054 |
7984131c85e64cdbbaf1c6dc7fba9cceb3886172 | 8,759 | py | Python | load_data_live.py | cclauss/statarb | a59366f70122c355fc93a2391362a3e8818a290e | [
"Apache-2.0"
] | 51 | 2019-02-01T19:43:37.000Z | 2022-03-16T09:07:03.000Z | load_data_live.py | cclauss/statarb | a59366f70122c355fc93a2391362a3e8818a290e | [
"Apache-2.0"
] | 2 | 2019-02-23T18:54:22.000Z | 2019-11-09T01:30:32.000Z | load_data_live.py | cclauss/statarb | a59366f70122c355fc93a2391362a3e8818a290e | [
"Apache-2.0"
] | 35 | 2019-02-08T02:00:31.000Z | 2022-03-01T23:17:00.000Z | #!/usr/bin/env python
import sys
import os
import glob
import re
import math
from dateutil import parser as dateparser
import time
from datetime import datetime
from datetime import timedelta
import numpy as np
import pandas as pd
import pandas.io.sql as psql
import sqlite3 as lite
from util import *
from calc impo... | 42.31401 | 453 | 0.595273 |
798413628bc4cbb115663e2da9cf62782f6f971c | 5,404 | py | Python | laikaboss/postgres_adapter.py | sandialabs/laikaboss | 3064ac1176911651d61c5176e9bd83eacec36b16 | [
"Apache-2.0"
] | 2 | 2019-11-02T23:40:23.000Z | 2019-12-01T22:24:57.000Z | laikaboss/postgres_adapter.py | sandialabs/laikaboss | 3064ac1176911651d61c5176e9bd83eacec36b16 | [
"Apache-2.0"
] | null | null | null | laikaboss/postgres_adapter.py | sandialabs/laikaboss | 3064ac1176911651d61c5176e9bd83eacec36b16 | [
"Apache-2.0"
] | 3 | 2017-08-09T23:58:40.000Z | 2019-12-01T22:25:06.000Z | # Copyright 2020 National Technology & Engineering Solutions of Sandia, LLC
# (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S.
# Government retains certain rights in this software.
#
# Copyright 2020 National Technology & Engineering Solutions of Sandia, LLC
# (NTESS). Under the terms of Contract ... | 28.442105 | 84 | 0.594745 |
7984141708ce069836734341729a3ba3198f78fe | 1,403 | py | Python | tests/__init__.py | Nothing4You/eveparser | f327a9609b91f1ac7afd2a8392f2d62e3d81b422 | [
"MIT"
] | null | null | null | tests/__init__.py | Nothing4You/eveparser | f327a9609b91f1ac7afd2a8392f2d62e3d81b422 | [
"MIT"
] | 1 | 2015-10-09T18:30:26.000Z | 2015-10-09T18:31:37.000Z | tests/__init__.py | Nothing4You/eveparser | f327a9609b91f1ac7afd2a8392f2d62e3d81b422 | [
"MIT"
] | 1 | 2021-08-28T01:15:15.000Z | 2021-08-28T01:15:15.000Z | """
tests
~~~~~
Tests and test helpers for eveparser
"""
import inspect
import unittest
class TableChecker(unittest.TestCase):
""" This actually runs one named table test """
def __init__(self, funct, name):
unittest.TestCase.__init__(self, 'run')
self.funct = funct
self.description =... | 27.509804 | 75 | 0.612259 |
7984142817d54ec8068d37593748fb74dfe1a80d | 6,213 | py | Python | Configuration/DataProcessing/test/RunExpressProcessing.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 1 | 2020-02-07T11:20:02.000Z | 2020-02-07T11:20:02.000Z | Configuration/DataProcessing/test/RunExpressProcessing.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 7 | 2016-07-17T02:34:54.000Z | 2019-08-13T07:58:37.000Z | Configuration/DataProcessing/test/RunExpressProcessing.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 2 | 2019-09-27T08:33:22.000Z | 2019-11-14T10:52:30.000Z | #!/usr/bin/env python
"""
_RunExpressProcessing_
Test wrapper to generate an express processing config and actually push
it into cmsRun for testing with a few input files etc from the command line
"""
from __future__ import print_function
import sys
import getopt
import traceback
import pickle
from Configuration.Da... | 31.538071 | 154 | 0.577982 |
798414c11e48656997636e78299aca034423b489 | 1,869 | py | Python | azure/mgmt/network/v2017_08_01/models/virtual_network_usage.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | azure/mgmt/network/v2017_08_01/models/virtual_network_usage.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | azure/mgmt/network/v2017_08_01/models/virtual_network_usage.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 33.375 | 76 | 0.581594 |
798414ec88bba41155b6f58a0faae8bc03a2f7a4 | 13,495 | py | Python | drheader/core.py | emilejq/DrHeader | cf2308662c3403d2fadca7ed1aebbabcdd8cc001 | [
"MIT"
] | null | null | null | drheader/core.py | emilejq/DrHeader | cf2308662c3403d2fadca7ed1aebbabcdd8cc001 | [
"MIT"
] | 38 | 2021-08-24T12:55:59.000Z | 2022-03-31T20:28:21.000Z | drheader/core.py | emilejq/DrHeader | cf2308662c3403d2fadca7ed1aebbabcdd8cc001 | [
"MIT"
] | null | null | null | import json
import requests
import validators
from drheader.utils import load_rules, _to_dict
class Drheader:
"""
Core functionality for DrHeader. This is where the magic happens
"""
error_types = {
1: 'Header not included in response',
2: 'Header should not be returned',
3: ... | 38.121469 | 120 | 0.549833 |
798415445611c508ea97d31e2d2feb68a93568e4 | 8,337 | py | Python | sdk/python/pulumi_azure_nextgen/kusto/v20200918/database_principal_assignment.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/kusto/v20200918/database_principal_assignment.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/kusto/v20200918/database_principal_assignment.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
from... | 43.878947 | 445 | 0.649994 |
798415f0aebe6b64e2f592c94e2725b0acd4d407 | 3,336 | py | Python | mordred/_graph_matrix.py | ademidun/mordred | c9de906f0d7829a9abe80658b19f4f9f9aef6648 | [
"BSD-3-Clause"
] | 199 | 2017-04-26T07:40:32.000Z | 2022-03-29T10:52:19.000Z | mordred/_graph_matrix.py | mkrompiec/mordred | 8337a088b96e35fda86235ebf37f9c72d35cf72f | [
"BSD-3-Clause"
] | 87 | 2016-01-15T09:02:20.000Z | 2022-03-21T23:18:08.000Z | mordred/_graph_matrix.py | mkrompiec/mordred | 8337a088b96e35fda86235ebf37f9c72d35cf72f | [
"BSD-3-Clause"
] | 64 | 2018-03-07T13:21:47.000Z | 2022-03-16T00:56:11.000Z | import numpy as np
from rdkit import Chem
from ._base import Descriptor
class DistanceMatrix(Descriptor):
__slots__ = ("explicit_hydrogens", "useBO", "useAtomWts")
hermitian = True
def parameters(self):
return self.explicit_hydrogens, self.useBO, self.useAtomWts
def __init__(self, explicit... | 24.350365 | 88 | 0.642086 |
79841640ce459ec943c4d58d9abd1306427b37eb | 17,996 | py | Python | cricket/model.py | parzingis/cricket | 126cc8c7b02f6efa19f369fd7c6decf75ac0f0ee | [
"BSD-3-Clause"
] | null | null | null | cricket/model.py | parzingis/cricket | 126cc8c7b02f6efa19f369fd7c6decf75ac0f0ee | [
"BSD-3-Clause"
] | null | null | null | cricket/model.py | parzingis/cricket | 126cc8c7b02f6efa19f369fd7c6decf75ac0f0ee | [
"BSD-3-Clause"
] | null | null | null | """A module containing a data representation for the test suite.
This is the "Model" of the MVC world.
Each object in the model is an event source; views/controllers
can bind to events on the model to be notified of changes.
"""
import subprocess
import sys
from datetime import datetime
import toga
from toga.sources... | 33.325926 | 100 | 0.551289 |
798416a918a8d4262065345e051da8de9eab6534 | 3,423 | py | Python | secondary.py | jenrinaldo/projectSKT | 8375b2bfa88560a88cd385be6f325d45ad883fe8 | [
"MIT"
] | null | null | null | secondary.py | jenrinaldo/projectSKT | 8375b2bfa88560a88cd385be6f325d45ad883fe8 | [
"MIT"
] | null | null | null | secondary.py | jenrinaldo/projectSKT | 8375b2bfa88560a88cd385be6f325d45ad883fe8 | [
"MIT"
] | null | null | null | import os
import socket
import sys
import time
from func import upload, download, generate_file_md5
root = 'server1/'
BUFSIZE = 4096
list_hash = []
newListHash = []
def list_local(directory):
temp_list = os.listdir(directory)
return temp_list
def updateList(a,b):
return (list(set(b)- set(a)))
def main... | 32.292453 | 69 | 0.458662 |
798416aabf0a83e503e9a95b2e27dcf85d2779de | 2,368 | py | Python | tools/generate_taint_models/tests/inspect_parser_test.py | ekmixon/pyre-check | bd2475cc0cf4bef941f0aea6df10d674e6c907ab | [
"MIT"
] | 5,975 | 2018-05-11T15:54:32.000Z | 2022-03-31T14:38:00.000Z | tools/generate_taint_models/tests/inspect_parser_test.py | ekmixon/pyre-check | bd2475cc0cf4bef941f0aea6df10d674e6c907ab | [
"MIT"
] | 524 | 2018-05-11T16:47:20.000Z | 2022-03-22T17:43:06.000Z | tools/generate_taint_models/tests/inspect_parser_test.py | ekmixon/pyre-check | bd2475cc0cf4bef941f0aea6df10d674e6c907ab | [
"MIT"
] | 501 | 2018-05-11T16:46:29.000Z | 2022-03-19T04:41:57.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import unittest
from testing.types import File
from ..inspect_parser import extract_parameters, extract_qualified_name
from ..parameter impo... | 31.157895 | 87 | 0.654561 |
7984174ce13ed4ef3f2d1c8639b98df407a2c6ec | 2,600 | py | Python | pymcuprog/deviceinfo/devices/avr64dd28.py | KrystianD-contribution/pymcuprog | a9411a8e4a5db8b54517c51da0bae96bf8385a65 | [
"MIT"
] | 28 | 2021-05-08T19:28:33.000Z | 2022-03-23T06:23:13.000Z | pymcuprog/deviceinfo/devices/avr64dd28.py | KrystianD-contribution/pymcuprog | a9411a8e4a5db8b54517c51da0bae96bf8385a65 | [
"MIT"
] | 20 | 2021-05-24T19:20:39.000Z | 2022-03-12T20:10:30.000Z | pymcuprog/deviceinfo/devices/avr64dd28.py | KrystianD-contribution/pymcuprog | a9411a8e4a5db8b54517c51da0bae96bf8385a65 | [
"MIT"
] | 11 | 2021-06-24T20:59:16.000Z | 2022-03-23T23:59:38.000Z |
"""
Required device info for the avr64dd28 devices
The following data was collected from device pack Microchip.AVR-Dx_DFP 1.9.119
"""
from pymcuprog.deviceinfo.eraseflags import ChiperaseEffect
DEVICE_INFO = {
'interface': 'UPDI',
'name': 'avr64dd28',
'architecture': 'avr8x',
# eeprom
'eeprom_ad... | 30.232558 | 78 | 0.726923 |
79841758be5b18e91f748ef6d65390d9564aa0c7 | 567 | py | Python | src/crypto/crypto_ops_builder/ref10CommentedCombined/d2.py | simplixcurrency/simplix | dd313f6fe5a42cf508b19aea3f49cb8ba6b5dbf1 | [
"BSD-3-Clause"
] | 7,521 | 2016-09-03T10:52:39.000Z | 2022-03-31T23:27:34.000Z | src/crypto/crypto_ops_builder/ref10CommentedCombined/d2.py | simplixcurrency/simplix | dd313f6fe5a42cf508b19aea3f49cb8ba6b5dbf1 | [
"BSD-3-Clause"
] | 4,486 | 2016-09-03T10:53:24.000Z | 2022-03-31T17:57:13.000Z | src/crypto/crypto_ops_builder/ref10CommentedCombined/d2.py | simplixcurrency/simplix | dd313f6fe5a42cf508b19aea3f49cb8ba6b5dbf1 | [
"BSD-3-Clause"
] | 3,851 | 2016-09-03T15:44:54.000Z | 2022-03-31T00:53:22.000Z | q = 2**255 - 19
def expmod(b,e,m):
if e == 0: return 1
t = expmod(b,e/2,m)**2 % m
if e & 1: t = (t*b) % m
return t
def inv(x):
return expmod(x,q-2,q)
def radix255(x):
x = x % q
if x + x > q: x -= q
x = [x,0,0,0,0,0,0,0,0,0]
bits = [26,25,26,25,26,25,26,25,26,25]
for i in range(9):
carry = (x[... | 19.551724 | 48 | 0.504409 |
798417967157ac307087dc2b28fb8a77f2e278db | 1,610 | py | Python | src/gitfame/gitstats.py | vaiski/git-fame | ce41873ede373642bf000e69823e25cbf29758ef | [
"MIT"
] | null | null | null | src/gitfame/gitstats.py | vaiski/git-fame | ce41873ede373642bf000e69823e25cbf29758ef | [
"MIT"
] | null | null | null | src/gitfame/gitstats.py | vaiski/git-fame | ce41873ede373642bf000e69823e25cbf29758ef | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import re
import numpy as np
import pandas as pd
from gitfame.utils import git_log
def commitcount(**kwargs):
print kwargs
output = git_log('sn', logcmd='shortlog', **kwargs)
values = []
for line in output:
commits, name = [term.strip() for term in line.split('\t')]
... | 28.245614 | 99 | 0.554037 |
798417ffdc6962aa2fa30d72ab47da52a52f2e7e | 768 | py | Python | alipay/aop/api/response/AlipayDataDataserviceAntdataassetsFixdataCreateResponse.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayDataDataserviceAntdataassetsFixdataCreateResponse.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayDataDataserviceAntdataassetsFixdataCreateResponse.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayDataDataserviceAntdataassetsFixdataCreateResponse(AlipayResponse):
def __init__(self):
super(AlipayDataDataserviceAntdataassetsFixdataCreateResponse, self... | 29.538462 | 128 | 0.731771 |
79841954083bdd83ceaf50dbc23e99b430d317c5 | 2,761 | py | Python | appengine/monorail/sitewide/grouplist.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/monorail/sitewide/grouplist.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/monorail/sitewide/grouplist.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 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 or at
# https://developers.google.com/open-source/licenses/bsd
"""Classes to list user groups."""
from __future__ import print_function
from __future__ import... | 34.949367 | 78 | 0.718218 |
79841a66e714c2ea370ddae37237b66db3a5d5b0 | 17,507 | py | Python | ujt/transformers.py | googleinterns/userjourneytool | 0e70a7e8c66dd1d69faeccfb18ad02832bf561da | [
"Apache-2.0"
] | 3 | 2020-09-14T17:55:38.000Z | 2020-11-29T18:49:39.000Z | ujt/transformers.py | googleinterns/userjourneytool | 0e70a7e8c66dd1d69faeccfb18ad02832bf561da | [
"Apache-2.0"
] | 50 | 2020-09-10T19:43:45.000Z | 2020-11-11T21:33:57.000Z | ujt/transformers.py | googleinterns/userjourneytool | 0e70a7e8c66dd1d69faeccfb18ad02832bf561da | [
"Apache-2.0"
] | null | null | null | """ Module holding transformer functions.
Transformer functions take an input data structure, make a change, and return an output of the same type.
They are commonly used to perform operations on cytoscape graph elements.
"""
import copy
import datetime as dt
import uuid
from collections import defaultdict, deque
fro... | 37.091102 | 113 | 0.648883 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.