hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dafffccb6e4c45e3c5623d3939c94292570c3fad | 2,645 | py | Python | parsl/tests/site_tests/site_config_selector.py | cylondata/parsl | 00ff9372bd841dafef8a0b3566c79ffe68f0e367 | [
"Apache-2.0"
] | 323 | 2017-07-28T21:31:27.000Z | 2022-03-05T13:06:05.000Z | parsl/tests/site_tests/site_config_selector.py | cylondata/parsl | 00ff9372bd841dafef8a0b3566c79ffe68f0e367 | [
"Apache-2.0"
] | 1,286 | 2017-06-01T16:50:00.000Z | 2022-03-31T16:45:14.000Z | parsl/tests/site_tests/site_config_selector.py | cylondata/parsl | 00ff9372bd841dafef8a0b3566c79ffe68f0e367 | [
"Apache-2.0"
] | 113 | 2017-06-03T11:38:40.000Z | 2022-03-26T16:43:05.000Z | import os
import platform
import socket
def fresh_config():
hostname = os.getenv('PARSL_HOSTNAME', platform.uname().node)
print("Loading config for {}".format(hostname))
if 'thetalogin' in hostname:
from parsl.tests.configs.theta import fresh_config
config = fresh_config()
print("... | 31.488095 | 67 | 0.665406 |
6b66cb6f7861b262ed976d420ad1b9f985e25c3c | 791 | py | Python | working-with-data/Exercises/inserting_file_data_into_a_database.py | WebucatorTraining/classfiles-actionable-python | 930c154a6dbfa6c54768557a998b4dbafb43df38 | [
"MIT"
] | 2 | 2022-01-04T22:25:01.000Z | 2022-01-16T16:50:23.000Z | working-with-data/Exercises/inserting_file_data_into_a_database.py | WebucatorTraining/classfiles-actionable-python | 930c154a6dbfa6c54768557a998b4dbafb43df38 | [
"MIT"
] | null | null | null | working-with-data/Exercises/inserting_file_data_into_a_database.py | WebucatorTraining/classfiles-actionable-python | 930c154a6dbfa6c54768557a998b4dbafb43df38 | [
"MIT"
] | null | null | null | import sqlite3
connection = sqlite3.connect(':memory:')
connection.row_factory = sqlite3.Row
# Create the cursor.
create = """CREATE TABLE states (
'state' text,
'pop2020' integer,
'pop2000' integer
)"""
# Execute the create statement.
insert = 'INSERT INT... | 22.6 | 71 | 0.640961 |
0b0b5f1400a244624a232e96255a81483f842bdc | 183 | py | Python | coinbase/constants.py | jpradass/CoinbaseBot | 18adbda9e545f786ba9356eb156d99ea24f93f05 | [
"Apache-2.0"
] | null | null | null | coinbase/constants.py | jpradass/CoinbaseBot | 18adbda9e545f786ba9356eb156d99ea24f93f05 | [
"Apache-2.0"
] | null | null | null | coinbase/constants.py | jpradass/CoinbaseBot | 18adbda9e545f786ba9356eb156d99ea24f93f05 | [
"Apache-2.0"
] | null | null | null | import os
COINBASE_API_URL = 'https://api.coinbase.com/v2/'
API_KEY = os.environ.get('COINBASE_API_KEY')
API_SECRET = os.environ.get('COINBASE_API_SECRET')
API_VERSION = '2021-02-09' | 30.5 | 50 | 0.765027 |
28d0a7edfcf7a1dcaef97726550e517c9ec7c263 | 19,480 | py | Python | webapp/ENV/lib/python3.6/site-packages/dask/array/tests/test_rechunk.py | linkehub/linkehub_api | b5579a6156d6ae01f0cbd8526c8ed8264b5deeb5 | [
"MIT"
] | 1 | 2021-06-06T10:39:50.000Z | 2021-06-06T10:39:50.000Z | dask/array/tests/test_rechunk.py | semyont/dask | 1fd5f14af228d3f9b90b9f96213a55a014178a05 | [
"BSD-3-Clause"
] | 1 | 2021-04-30T20:41:53.000Z | 2021-04-30T20:41:53.000Z | dask/array/tests/test_rechunk.py | semyont/dask | 1fd5f14af228d3f9b90b9f96213a55a014178a05 | [
"BSD-3-Clause"
] | 1 | 2018-07-06T03:48:08.000Z | 2018-07-06T03:48:08.000Z | from itertools import product
import warnings
import pytest
np = pytest.importorskip('numpy')
import dask
from dask.utils import funcname
from dask.array.utils import assert_eq
from dask.array.rechunk import intersect_chunks, rechunk, normalize_chunks
from dask.array.rechunk import cumdims_label, _breakpoints, _inter... | 32.466667 | 92 | 0.533881 |
b96a55756a26ce7127d596744bf574837d290f3d | 10,714 | py | Python | orttraining/orttraining/test/python/orttraining_run_glue.py | dennyac/onnxruntime | d5175795d2b7f2db18b0390f394a49238f814668 | [
"MIT"
] | 5 | 2021-02-20T04:53:48.000Z | 2021-03-09T19:29:27.000Z | orttraining/orttraining/test/python/orttraining_run_glue.py | dennyac/onnxruntime | d5175795d2b7f2db18b0390f394a49238f814668 | [
"MIT"
] | 5 | 2021-03-01T21:35:50.000Z | 2022-03-09T05:38:38.000Z | orttraining/orttraining/test/python/orttraining_run_glue.py | dennyac/onnxruntime | d5175795d2b7f2db18b0390f394a49238f814668 | [
"MIT"
] | 2 | 2021-01-29T09:36:51.000Z | 2021-02-01T13:42:40.000Z | # adapted from run_glue.py of huggingface transformers
import dataclasses
import logging
import os
from dataclasses import dataclass, field
from typing import Dict, Optional
import unittest
import numpy as np
from numpy.testing import assert_allclose
from transformers import (
AutoConfig,
AutoModelForSequence... | 36.195946 | 121 | 0.633097 |
831738beb0d2d33acd3c978fb096d780f5d99e16 | 828 | py | Python | Kontranto/urls.py | zd-mioc/Kontranto | 928f8e6ca1c8c136878d0dd036321053ab461049 | [
"MIT"
] | 1 | 2020-07-19T11:11:08.000Z | 2020-07-19T11:11:08.000Z | Kontranto/urls.py | zd-mioc/Kontranto | 928f8e6ca1c8c136878d0dd036321053ab461049 | [
"MIT"
] | null | null | null | Kontranto/urls.py | zd-mioc/Kontranto | 928f8e6ca1c8c136878d0dd036321053ab461049 | [
"MIT"
] | 1 | 2021-03-01T08:39:41.000Z | 2021-03-01T08:39:41.000Z | """Kontranto URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/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')
C... | 36 | 78 | 0.687198 |
c3fab2ea1fbae732854c10a0a70892c701429ad4 | 30,827 | py | Python | electroncash_gui/qt/contact_list.py | fyookball/electrum | 33f3ded201fe07bf0a3d6cd2c08280647b04e2c7 | [
"MIT"
] | 208 | 2017-07-25T19:52:15.000Z | 2018-09-21T13:44:58.000Z | electroncash_gui/qt/contact_list.py | fyookball/electrum | 33f3ded201fe07bf0a3d6cd2c08280647b04e2c7 | [
"MIT"
] | 749 | 2017-07-31T19:04:59.000Z | 2018-09-22T15:18:36.000Z | electroncash_gui/qt/contact_list.py | fyookball/electrum | 33f3ded201fe07bf0a3d6cd2c08280647b04e2c7 | [
"MIT"
] | 103 | 2017-07-27T18:55:31.000Z | 2018-09-23T02:57:06.000Z | #!/usr/bin/env python3
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including withou... | 49.165869 | 166 | 0.610147 |
1f06d20ec1aee0d755b41d9d49871c48ca5675aa | 10,153 | py | Python | my_drawing.py | yudy4431/SC-projects | 7cb9f4a06e5be72b634835501dd1b3d9a9e78dad | [
"MIT"
] | null | null | null | my_drawing.py | yudy4431/SC-projects | 7cb9f4a06e5be72b634835501dd1b3d9a9e78dad | [
"MIT"
] | null | null | null | my_drawing.py | yudy4431/SC-projects | 7cb9f4a06e5be72b634835501dd1b3d9a9e78dad | [
"MIT"
] | null | null | null | """
File: Peace and Love.
Name:Yudy
----------------------
When I was a child, I loved to draw. The highest frequency I drew was dinosaur.
Also, The first toy my uncle gave me was Ultra-man. The emotion I had that time was impressed.
According to the memories, I decide to combine them.
But I don't want ultra-man or din... | 22.462389 | 94 | 0.618339 |
5c60a757187e5caf24e601ad65ff6ac09edfc3bf | 4,150 | py | Python | test/e2e/tests/test_endpoint_config.py | komish/sagemaker-controller | d1bfe3f59244a0bff98bd775814b94927c827d13 | [
"Apache-2.0"
] | null | null | null | test/e2e/tests/test_endpoint_config.py | komish/sagemaker-controller | d1bfe3f59244a0bff98bd775814b94927c827d13 | [
"Apache-2.0"
] | null | null | null | test/e2e/tests/test_endpoint_config.py | komish/sagemaker-controller | d1bfe3f59244a0bff98bd775814b94927c827d13 | [
"Apache-2.0"
] | null | null | null | # Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may
# not use this file except in compliance with the License. A copy of the
# License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanyin... | 35.775862 | 85 | 0.725783 |
7a39d907e32a7dd8020772621ab6d428cf179e77 | 25,209 | py | Python | sympy/integrals/tests/test_integrals.py | pernici/sympy | 5e6e3b71da777f5b85b8ca2d16f33ed020cf8a41 | [
"BSD-3-Clause"
] | null | null | null | sympy/integrals/tests/test_integrals.py | pernici/sympy | 5e6e3b71da777f5b85b8ca2d16f33ed020cf8a41 | [
"BSD-3-Clause"
] | null | null | null | sympy/integrals/tests/test_integrals.py | pernici/sympy | 5e6e3b71da777f5b85b8ca2d16f33ed020cf8a41 | [
"BSD-3-Clause"
] | null | null | null | from sympy import (S, symbols, integrate, Integral, Derivative, exp, erf, oo, Symbol,
Function, Rational, log, sin, cos, pi, E, I, Poly, LambertW, diff,
Matrix, sympify, sqrt, atan, asin, acos, asinh, acosh, DiracDelta, Heaviside,
Lambda, sstr, Add, Tuple, Eq, Interval, Sum)
from sympy.utilities... | 42.654822 | 120 | 0.546868 |
f8db53a59d90665f34ebe6b0c6fdfb4f1dfc677f | 427 | py | Python | python_modules/dagster-graphql/dagster_graphql_tests/graphql/snapshots/snap_test_compute_logs.py | shahvineet98/dagster | 2471d39c52f660e23e8c0d8e8ded873ddc3df036 | [
"Apache-2.0"
] | 3 | 2020-09-09T04:10:23.000Z | 2021-11-08T02:10:42.000Z | python_modules/dagster-graphql/dagster_graphql_tests/graphql/snapshots/snap_test_compute_logs.py | shahvineet98/dagster | 2471d39c52f660e23e8c0d8e8ded873ddc3df036 | [
"Apache-2.0"
] | 2 | 2021-05-11T13:36:27.000Z | 2021-09-03T01:53:11.000Z | python_modules/dagster-graphql/dagster_graphql_tests/graphql/snapshots/snap_test_compute_logs.py | shahvineet98/dagster | 2471d39c52f660e23e8c0d8e8ded873ddc3df036 | [
"Apache-2.0"
] | 1 | 2021-02-21T12:16:47.000Z | 2021-02-21T12:16:47.000Z | # -*- coding: utf-8 -*-
# snapshottest: v1 - https://goo.gl/zC4yUc
from __future__ import unicode_literals
from snapshottest import Snapshot
snapshots = Snapshot()
snapshots['test_get_compute_logs_over_graphql 1'] = {
'stdout': {
'data': '''HELLO WORLD
'''
}
}
snapshots['test_compute_logs_subscripti... | 17.791667 | 57 | 0.608899 |
67af251d1fc299ffe34661b1d2bea718ecc1fc48 | 14,862 | py | Python | committees/models.py | uri-yanover/Open-Knesset | 93f68f28080d5fba4ff5230bce842e9480925325 | [
"BSD-3-Clause"
] | null | null | null | committees/models.py | uri-yanover/Open-Knesset | 93f68f28080d5fba4ff5230bce842e9480925325 | [
"BSD-3-Clause"
] | null | null | null | committees/models.py | uri-yanover/Open-Knesset | 93f68f28080d5fba4ff5230bce842e9480925325 | [
"BSD-3-Clause"
] | null | null | null | # encoding: utf-8
import re
import logging
from datetime import datetime
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils.text import truncate_words
from django.contrib.contenttypes import generic
from django.contrib.auth.models import User
from django.core.cache im... | 39.951613 | 155 | 0.608666 |
f6de9adca810a06a31f5fe6818661924f29d05ba | 1,862 | py | Python | setup.py | jloranzo/bme | 87e54ce6036b183506a31401749a876aabca7879 | [
"MIT"
] | null | null | null | setup.py | jloranzo/bme | 87e54ce6036b183506a31401749a876aabca7879 | [
"MIT"
] | null | null | null | setup.py | jloranzo/bme | 87e54ce6036b183506a31401749a876aabca7879 | [
"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.abs... | 35.132075 | 99 | 0.705693 |
ce14a2cebd0ca831b622d95f03ebd531269d5825 | 808 | py | Python | 2019/day03/python/main.py | nathiss/AdventOfCode2019 | e3f8aca1ec160534a2d09f7ee39ebdb2b3fcaddd | [
"MIT"
] | null | null | null | 2019/day03/python/main.py | nathiss/AdventOfCode2019 | e3f8aca1ec160534a2d09f7ee39ebdb2b3fcaddd | [
"MIT"
] | null | null | null | 2019/day03/python/main.py | nathiss/AdventOfCode2019 | e3f8aca1ec160534a2d09f7ee39ebdb2b3fcaddd | [
"MIT"
] | null | null | null | #!/usr/bin/python3
with open('input.txt', 'r') as f:
wire1, wire2 = f.read().splitlines()
wire1, wire2 = [x.split(',') for x in [wire1, wire2]]
dx = {
'U': 0,
'R': 1,
'D': 0,
'L': -1,
}
dy = {
'U': 1,
'R': 0,
'D': -1,
'L': 0,
}
def parse_wire(wire):
res = {}
x = 0
y = 0
length = 0
for turn... | 19.238095 | 96 | 0.528465 |
eda3d96774114170e8bf352ad3dc4b55f71ae221 | 7,873 | py | Python | astromodels/core/tree.py | rwiller/astromodels | 0d222fe88f2b72fbc23675ee5309dde649d1b4b9 | [
"BSD-3-Clause"
] | 12 | 2019-03-07T09:45:35.000Z | 2022-02-13T14:05:07.000Z | astromodels/core/tree.py | rwiller/astromodels | 0d222fe88f2b72fbc23675ee5309dde649d1b4b9 | [
"BSD-3-Clause"
] | 83 | 2019-01-27T18:57:51.000Z | 2022-01-28T12:57:26.000Z | astromodels/core/tree.py | rwiller/astromodels | 0d222fe88f2b72fbc23675ee5309dde649d1b4b9 | [
"BSD-3-Clause"
] | 25 | 2019-01-10T09:02:16.000Z | 2022-03-23T03:52:36.000Z | from future import standard_library
standard_library.install_aliases()
import collections
import os
import uuid
from builtins import object
from astromodels.core.node_ctype import _Node
from astromodels.utils.io import display
from astromodels.utils.valid_variable import is_valid_variable_name
from .cpickle_compatib... | 23.362018 | 118 | 0.601804 |
86f6ea82b8e16916699f7b66ff5a2fb89173a793 | 2,513 | py | Python | tests/bugs/core_1073_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/bugs/core_1073_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/bugs/core_1073_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | #coding:utf-8
#
# id: bugs.core_1073
# title: SINGULAR buggy when nulls present
# decription:
# tracker_id: CORE-1073
# min_versions: []
# versions: 2.1
# qmid: bugs.core_1073
import pytest
from firebird.qa import db_factory, isql_act, Action
# version: 2.1
# resources: None
substit... | 22.4375 | 98 | 0.63271 |
b7bd11d8f1ad6fbb923bf42ec7407ebc2a3bb8de | 877 | py | Python | edi/convert.py | GaloisInc/adapt | 2ccff778d3e77505899266572f8f7caacb5b630f | [
"BSD-3-Clause"
] | 2 | 2020-04-09T13:04:25.000Z | 2021-09-24T14:17:26.000Z | edi/convert.py | GaloisInc/adapt | 2ccff778d3e77505899266572f8f7caacb5b630f | [
"BSD-3-Clause"
] | null | null | null | edi/convert.py | GaloisInc/adapt | 2ccff778d3e77505899266572f8f7caacb5b630f | [
"BSD-3-Clause"
] | 3 | 2019-09-20T20:49:54.000Z | 2021-09-02T17:33:47.000Z | import argparse
import csv
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
import edi.util.context as c
# simple-minded covnersion
# input: context CSV
# output: .dat, possibly other formats
# todo: save auxiliary files to allow mapping .dat / coordinates back ... | 26.575758 | 82 | 0.693273 |
bcbc7a240f9f24786924adb95dceb9cffb5e949b | 2,796 | py | Python | function-images/lr_training_s3/server.py | tom-kuchler/vhive | ae1f2f5920e7607e9902ed1060bda62b56e332ac | [
"MIT"
] | 138 | 2020-12-15T16:40:15.000Z | 2022-03-16T04:17:00.000Z | function-images/lr_training_s3/server.py | tom-kuchler/vhive | ae1f2f5920e7607e9902ed1060bda62b56e332ac | [
"MIT"
] | 325 | 2020-11-30T13:30:38.000Z | 2022-03-30T12:10:33.000Z | function-images/lr_training_s3/server.py | tom-kuchler/vhive | ae1f2f5920e7607e9902ed1060bda62b56e332ac | [
"MIT"
] | 47 | 2021-01-05T08:52:34.000Z | 2022-03-10T17:58:30.000Z | from concurrent import futures
import logging
import os
import grpc
from minio import Minio
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.linear_model import LogisticRegression
import joblib
import pandas as pd
import re
import io
import helloworld_pb2
import helloworld_pb2_grpc
cleanup_re ... | 31.066667 | 73 | 0.637697 |
2dc7820630203fd959700aa6f9c21254f8debcbe | 640 | py | Python | crunch/migrations/0002_auto_20220320_0535.py | rbturnbull/django-crunch | a70e8892f20d5f11ac20a076cf1c7a1011c687a4 | [
"Apache-2.0"
] | null | null | null | crunch/migrations/0002_auto_20220320_0535.py | rbturnbull/django-crunch | a70e8892f20d5f11ac20a076cf1c7a1011c687a4 | [
"Apache-2.0"
] | null | null | null | crunch/migrations/0002_auto_20220320_0535.py | rbturnbull/django-crunch | a70e8892f20d5f11ac20a076cf1c7a1011c687a4 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.12 on 2022-03-20 05:35
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('crunch', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='attribute',
... | 25.6 | 140 | 0.610938 |
2ab2f31e158cb2c8d87a8b864063c0956df228cc | 1,415 | py | Python | analysis/plot_synchrony_index_pyspike.py | anupgp/astron | 5ef1b113b5025f5e0477a1fb2b5202fadbc5335c | [
"MIT"
] | null | null | null | analysis/plot_synchrony_index_pyspike.py | anupgp/astron | 5ef1b113b5025f5e0477a1fb2b5202fadbc5335c | [
"MIT"
] | null | null | null | analysis/plot_synchrony_index_pyspike.py | anupgp/astron | 5ef1b113b5025f5e0477a1fb2b5202fadbc5335c | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.font_manager as font_manager
from matplotlib import pyplot as plt
import os
import pandas as pd
font_path = '/home/anup/.matplotlib/fonts/arial.ttf'
prop = font_manager.FontProperties(fname=font_path,size=20)
print(font_manager.FontProperties())
fpath1 = "/home/anup/astron_data/f... | 33.690476 | 112 | 0.69894 |
ee2ca401308e54fe1bd3aa7aeb30c60f9e38a655 | 10,177 | py | Python | utils.py | digitalknk/Lupin | 7a8dcea0f76186cd209fad1103e7adec0c99b489 | [
"MIT"
] | null | null | null | utils.py | digitalknk/Lupin | 7a8dcea0f76186cd209fad1103e7adec0c99b489 | [
"MIT"
] | null | null | null | utils.py | digitalknk/Lupin | 7a8dcea0f76186cd209fad1103e7adec0c99b489 | [
"MIT"
] | null | null | null | from datetime import datetime
import re
import json
import requests
import hashlib
from os.path import basename
from bs4 import BeautifulSoup
from config import ( hour24, journalsFilesFormat, journalsFilesExtension, journalsFolder, isEntryTimestamped,
journalsPrefix,getFirebaseBucketName, getlastNe... | 29.932353 | 185 | 0.619829 |
10eb6c7214aebf4361a62afbefc0771f2883c795 | 1,869 | bzl | Python | busybox_archives.bzl | jasper-d/distroless | 9729a241f5ebdf1f328057c3e2f8e98845492347 | [
"Apache-2.0"
] | 1 | 2022-02-08T02:22:04.000Z | 2022-02-08T02:22:04.000Z | busybox_archives.bzl | acidburn0zzz/distroless | 3ca233a70a83647db72a43ffbdaa03718f067ae1 | [
"Apache-2.0"
] | null | null | null | busybox_archives.bzl | acidburn0zzz/distroless | 3ca233a70a83647db72a43ffbdaa03718f067ae1 | [
"Apache-2.0"
] | null | null | null | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
# For the debug image
def repositories():
http_file(
name = "busybox_amd64",
executable = True,
sha256 = "51fcb60efbdf3e579550e9ab893730df56b33d0cc928a2a6467bd846cdfef7d8",
urls = ["https://busybox.net/downloads/binar... | 43.465116 | 133 | 0.702515 |
ed67de7eccca996bf7d77dc1ae987c2a0cd488bd | 195 | py | Python | novauniverse/objects/_game_.py | NovaUniverse/NovaUniverse.py | 85e7aea1783ef3e7ca828c86e41fb1d655942656 | [
"MIT"
] | null | null | null | novauniverse/objects/_game_.py | NovaUniverse/NovaUniverse.py | 85e7aea1783ef3e7ca828c86e41fb1d655942656 | [
"MIT"
] | 8 | 2021-12-28T14:45:27.000Z | 2022-02-17T15:38:02.000Z | novauniverse/objects/_game_.py | NovaUniverse/novauniverse.py | 85e7aea1783ef3e7ca828c86e41fb1d655942656 | [
"MIT"
] | null | null | null | class game(object):
def __init__(self, game_dict:dict):
self.name = game_dict["display_name"]
self.code_name = game_dict["name"]
self.display_name = self.name | 32.5 | 45 | 0.625641 |
894087272880bda83440f8b05e57b1287debbfc6 | 1,021 | py | Python | Codes/Day-035/Rain-Alert/main.py | MdGhulamAzadAnsari/100-Days-of-Code | 8ff993b2e3f7aecefde28cb443355e5fb4d6fbc6 | [
"MIT"
] | 3 | 2021-01-15T15:49:20.000Z | 2021-03-17T03:17:41.000Z | codes/Day-035/Rain-Alert/main.py | GhulamAzad/100-Days-of-Code | 9533d80a6bc6ce70123126615f0671f979573a67 | [
"MIT"
] | 2 | 2022-01-16T07:00:38.000Z | 2022-01-16T07:16:57.000Z | codes/Day-035/Rain-Alert/main.py | GhulamAzad/100-Days-of-Code | 9533d80a6bc6ce70123126615f0671f979573a67 | [
"MIT"
] | null | null | null | import requests
import os
from twilio.rest import Client
account_sid = os.environ['TWILIO_ACCOUNT_SID']
auth_token = os.environ['TWILIO_AUTH_TOKEN']
api_key = os.environ['API_KEY']
FROM_NUMBER = os.environ['FROM_NUMBER']
TO_NUMBER = os.environ['TO_NUMBER']
OWM_Endpoint = "https://api.openweathermap.org/data/2.5/oneca... | 26.868421 | 64 | 0.710088 |
a54f1a7069db086f7bac0e7a5dd7971c55a17326 | 9,950 | py | Python | astropy/wcs/setup_package.py | jbkalmbach/astropy | 88ae8c615533efd1e60de4aded204943f66f881c | [
"BSD-3-Clause"
] | null | null | null | astropy/wcs/setup_package.py | jbkalmbach/astropy | 88ae8c615533efd1e60de4aded204943f66f881c | [
"BSD-3-Clause"
] | 1 | 2018-05-08T13:59:56.000Z | 2018-05-08T13:59:56.000Z | astropy/wcs/setup_package.py | jbkalmbach/astropy | 88ae8c615533efd1e60de4aded204943f66f881c | [
"BSD-3-Clause"
] | 1 | 2019-10-09T21:30:57.000Z | 2019-10-09T21:30:57.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
CONTACT = "Michael Droettboom"
EMAIL = "mdroe@stsci.edu"
import io
from os.path import join
import os.path
import shutil
import sys
from distutils.core import Extension
from distutils.dep_util import newer_group
from astropy_helpers import setup_helpe... | 28.674352 | 93 | 0.585327 |
2cb719336f6d1407707790d3b0d18ffa1342f8c7 | 4,036 | py | Python | timesketch/lib/analyzers/yetiindicators_test.py | rushattac/timesketch | 0a6fa301aadb36db450ec993c5cf51452c375de2 | [
"Apache-2.0"
] | 1,810 | 2015-01-03T22:34:45.000Z | 2022-03-30T10:23:18.000Z | timesketch/lib/analyzers/yetiindicators_test.py | rushattac/timesketch | 0a6fa301aadb36db450ec993c5cf51452c375de2 | [
"Apache-2.0"
] | 1,291 | 2015-01-08T00:00:12.000Z | 2022-03-29T03:26:58.000Z | timesketch/lib/analyzers/yetiindicators_test.py | rushattac/timesketch | 0a6fa301aadb36db450ec993c5cf51452c375de2 | [
"Apache-2.0"
] | 519 | 2015-01-20T09:26:06.000Z | 2022-03-29T11:02:10.000Z | """Tests for ThreatintelPlugin."""
from __future__ import unicode_literals
import copy
import re
import mock
from flask import current_app
from timesketch.lib.analyzers import yetiindicators
from timesketch.lib.testlib import BaseTest
from timesketch.lib.testlib import MockDataStore
MOCK_YETI_INTEL = {
'x-regex... | 38.807692 | 78 | 0.687066 |
74d41999410af7070ea6fdbb7e1942823e6a63a5 | 645 | py | Python | src/web_app/WebApp/app.py | drcrook1/AI_Accelerators_Quality | bace0b5a41271885d1e052bdefae1389e8090ed2 | [
"MIT"
] | 2 | 2019-09-13T20:22:57.000Z | 2019-10-18T16:06:54.000Z | src/web_app/WebApp/app.py | drcrook1/AI_Accelerators_Quality | bace0b5a41271885d1e052bdefae1389e8090ed2 | [
"MIT"
] | 7 | 2019-10-10T14:39:29.000Z | 2019-11-07T23:55:15.000Z | src/web_app/WebApp/app.py | drcrook1/AI_Accelerators_Quality | bace0b5a41271885d1e052bdefae1389e8090ed2 | [
"MIT"
] | 2 | 2019-07-03T19:25:31.000Z | 2021-10-13T18:25:18.000Z | """
Author: David Crook
Copyright: Microsoft Corporation 2019
"""
from flask_socketio import SocketIO
from flask import Flask
socketio = SocketIO()
def create_app():
app = Flask(__name__)
from webapp.apis.views import views
app.register_blueprint(views)
from webapp.apis.security import security
... | 20.806452 | 47 | 0.753488 |
1d92bfddda13f58efc8d20e5b0245763f3f28f65 | 1,637 | py | Python | requests_http_config_api.py | SanjeevKumarPandey/requests_llnw_config_api | 73da1c035908790509891e94d9bfc66aca1c6f08 | [
"Apache-2.0"
] | null | null | null | requests_http_config_api.py | SanjeevKumarPandey/requests_llnw_config_api | 73da1c035908790509891e94d9bfc66aca1c6f08 | [
"Apache-2.0"
] | null | null | null | requests_http_config_api.py | SanjeevKumarPandey/requests_llnw_config_api | 73da1c035908790509891e94d9bfc66aca1c6f08 | [
"Apache-2.0"
] | null | null | null | from requests_llnw_auth import LLNWAuth
import datetime
import requests
try:import simplejson as json
except ImportError: import json
class HttpStreamingApi:
def __init__(self, baseUrl, username, apiKey):
self.baseUrl = baseUrl
self.username = username
self.apiKey = apiKey
def Auth(self):
try:
llnw_auth... | 30.314815 | 101 | 0.723274 |
0c6f987d93de43d81a37b2ee057a2e6c3c88a10e | 3,039 | py | Python | tests/manual/check_yaml.py | OlafLee/keras | 323ef8c3351d39eb982472406f42a7f4d0f770c0 | [
"MIT"
] | 250 | 2015-11-03T12:30:02.000Z | 2022-02-28T10:13:56.000Z | keras-master/tests/manual/check_yaml.py | Incenter2016/CAPTCHA-breaking | 46484187057c52d16fa6e85d84150dfc4dfdf744 | [
"MIT"
] | 10 | 2016-03-01T13:09:03.000Z | 2020-02-15T14:44:01.000Z | keras-master/tests/manual/check_yaml.py | Incenter2016/CAPTCHA-breaking | 46484187057c52d16fa6e85d84150dfc4dfdf744 | [
"MIT"
] | 108 | 2015-11-04T02:22:47.000Z | 2022-02-28T10:14:32.000Z | from __future__ import absolute_import
from __future__ import print_function
import numpy as np
from keras.utils.test_utils import get_test_data
from keras.preprocessing import sequence
from keras.optimizers import SGD, RMSprop, Adagrad
from keras.utils import np_utils
from keras.models import Sequential, Graph
from k... | 29.794118 | 99 | 0.712076 |
af85026c2e7a8f2879b4a65ad7bb96b6cda67d85 | 24,111 | py | Python | run_ner.py | quangvo09/BERT-NER | 4683795b57ef7af4756b86748a0b8940578f7fd2 | [
"Apache-2.0"
] | null | null | null | run_ner.py | quangvo09/BERT-NER | 4683795b57ef7af4756b86748a0b8940578f7fd2 | [
"Apache-2.0"
] | null | null | null | run_ner.py | quangvo09/BERT-NER | 4683795b57ef7af4756b86748a0b8940578f7fd2 | [
"Apache-2.0"
] | 1 | 2019-12-27T13:20:56.000Z | 2019-12-27T13:20:56.000Z | from __future__ import absolute_import, division, print_function
import argparse
import csv
import logging
import os
import random
import json
import sys
import numpy as np
import torch
import torch.nn.functional as F
from pytorch_pretrained_bert.file_utils import PYTORCH_PRETRAINED_BERT_CACHE
from pytorch_pretrained... | 44.983209 | 173 | 0.592468 |
9bc6101bea57928c8922af894ea0618533d91a59 | 706 | py | Python | django_dapp/apps.py | phonkee/django-desktopapp | bd89434470c9d80074e8911d24059f962934c52a | [
"MIT"
] | null | null | null | django_dapp/apps.py | phonkee/django-desktopapp | bd89434470c9d80074e8911d24059f962934c52a | [
"MIT"
] | null | null | null | django_dapp/apps.py | phonkee/django-desktopapp | bd89434470c9d80074e8911d24059f962934c52a | [
"MIT"
] | null | null | null | # -*- coding: utf-8
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class DjangoDappConfig(AppConfig):
name = 'django_dapp'
verbose_name = _('Desktop applications')
# configuration
CHECK_VERSION_HEADER = 'X-APP-VERSION'
UPLOAD_TO = '/desktop-apps'
d... | 26.148148 | 102 | 0.675637 |
1ebe5fa9b9891f420e5d463d2b34200741f97626 | 2,364 | py | Python | tools/pulp-debug-bridge/python/bridge/chips/pulpissimo.py | TobiasFaller/pulp-sdk | 6e7d62e701bb27e8398ba23a9c8983e350ff052b | [
"Apache-2.0"
] | 68 | 2018-02-09T08:14:17.000Z | 2022-03-12T00:54:36.000Z | tools/pulp-debug-bridge/python/bridge/chips/pulpissimo.py | TobiasFaller/pulp-sdk | 6e7d62e701bb27e8398ba23a9c8983e350ff052b | [
"Apache-2.0"
] | 78 | 2018-02-12T11:48:49.000Z | 2022-03-02T14:25:25.000Z | tools/pulp-debug-bridge/python/bridge/chips/pulpissimo.py | TobiasFaller/pulp-sdk | 6e7d62e701bb27e8398ba23a9c8983e350ff052b | [
"Apache-2.0"
] | 65 | 2018-02-14T11:02:45.000Z | 2022-03-15T02:50:25.000Z | #
# Copyright (C) 2018 ETH Zurich and University of Bologna
#
# 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 applicabl... | 27.488372 | 104 | 0.659052 |
9c9da18f0747be7a24532a768e99fc9cf817a40d | 1,151 | py | Python | tests_employee/user/test_get_users_me.py | brailovskiy/rest-api-test | 01b099b748d4fd8dc6c380492e71c5d34bb15fdb | [
"MIT"
] | null | null | null | tests_employee/user/test_get_users_me.py | brailovskiy/rest-api-test | 01b099b748d4fd8dc6c380492e71c5d34bb15fdb | [
"MIT"
] | null | null | null | tests_employee/user/test_get_users_me.py | brailovskiy/rest-api-test | 01b099b748d4fd8dc6c380492e71c5d34bb15fdb | [
"MIT"
] | null | null | null | from hamcrest import *
from shared.constants import DefaultValues as DV
from shared.constants import UserAuthData as UAD
from api.users import Users
import allure
class TestGetUsersMeEmployee:
""" Тесты категории User, метод GET /users/me, роль - сотрудник """
def test_get_user_me_by_employee(self, use_sessio... | 47.958333 | 116 | 0.675934 |
e129f61b0d053169bd453a74596bf4e6fb37e98b | 1,092 | py | Python | create_flask_api/assets/file_paths/auth_paths.py | pedro-hgs/create-flask-api | 7933e5a9e974c8d9c7615ce6c7e7551103832d67 | [
"MIT"
] | 1 | 2021-07-15T22:30:51.000Z | 2021-07-15T22:30:51.000Z | create_flask_api/assets/file_paths/auth_paths.py | peedrooh/create-flask-api | 7933e5a9e974c8d9c7615ce6c7e7551103832d67 | [
"MIT"
] | null | null | null | create_flask_api/assets/file_paths/auth_paths.py | peedrooh/create-flask-api | 7933e5a9e974c8d9c7615ce6c7e7551103832d67 | [
"MIT"
] | null | null | null | import sys, os
from os.path import join
def auth_path(project):
return [
{
'template_path': join(os.path.abspath(sys.argv[0][:-12]), 'assets', 'templates', 'authentication', 'user_model'),
'filename': 'user_model.py',
'output_path': join(project.app_path, 'models')
... | 36.4 | 128 | 0.557692 |
911a69f4db044114f972715195def5fb6c72ec9f | 1,073 | py | Python | synchro_shop/sync/models.py | jlfrancisco/Shop-Synchro | c6342fefe5847b706e2b0632c478aa98e5a547db | [
"MIT"
] | null | null | null | synchro_shop/sync/models.py | jlfrancisco/Shop-Synchro | c6342fefe5847b706e2b0632c478aa98e5a547db | [
"MIT"
] | null | null | null | synchro_shop/sync/models.py | jlfrancisco/Shop-Synchro | c6342fefe5847b706e2b0632c478aa98e5a547db | [
"MIT"
] | null | null | null | import uuid
from django.db import models
class Shop(models.Model):
uuid = models.UUIDField(unique=True, default=uuid.uuid4)
name = models.CharField(max_length=255)
created = models.DateTimeField(auto_now_add=True)
modified = models.DateTimeField(auto_now=True)
class ShopReading(models.Model):
s... | 33.53125 | 81 | 0.675676 |
25276e3be236cd9801449763e741109efe5f0aaf | 667 | py | Python | models/sentiment.py | a-wallen/stm-toolkit | 62da0b9fb3af1e2512ececdcb88f02cee66e3475 | [
"MIT"
] | null | null | null | models/sentiment.py | a-wallen/stm-toolkit | 62da0b9fb3af1e2512ececdcb88f02cee66e3475 | [
"MIT"
] | null | null | null | models/sentiment.py | a-wallen/stm-toolkit | 62da0b9fb3af1e2512ececdcb88f02cee66e3475 | [
"MIT"
] | null | null | null | from typing import List
class Sentiment():
"""Contains data for sentiment analysis report"""
def __init__(
self,
# id: str,
symbols: List[str],
source: str,
date: str,
positive: float,
neutral: float,
negative: float,
compound: float,
... | 21.516129 | 53 | 0.551724 |
770bd29de76bc901f53d068427149c089d67ce02 | 25,153 | py | Python | third_party/depot_tools/third_party/cq_client/cq_pb2.py | bopopescu/webrtc-streaming-node | 727a441204344ff596401b0253caac372b714d91 | [
"MIT"
] | 8 | 2016-02-08T11:59:31.000Z | 2020-05-31T15:19:54.000Z | third_party/depot_tools/third_party/cq_client/cq_pb2.py | bopopescu/webrtc-streaming-node | 727a441204344ff596401b0253caac372b714d91 | [
"MIT"
] | 1 | 2021-05-05T11:11:31.000Z | 2021-05-05T11:11:31.000Z | third_party/depot_tools/third_party/cq_client/cq_pb2.py | bopopescu/webrtc-streaming-node | 727a441204344ff596401b0253caac372b714d91 | [
"MIT"
] | 7 | 2016-02-09T09:28:14.000Z | 2020-07-25T19:03:36.000Z | # This file was originally generated by the protocol buffer compiler 2.6.1, but
# was subsequently manually edited to import protobuf26 instead of
# google.protobuf to prevent conflicts with a different version of
# google.protobuf that some users of depot_tools have installed. If you need to
# re-generate this file, p... | 39.24025 | 2,218 | 0.745239 |
7a8a82ac87ff117b7a69af4b5cac51999086beea | 788 | py | Python | modox/run.py | lukpazera/modox | 4ee5a6033e405f9f7f3a7c80a1cb3c558c90fb01 | [
"MIT"
] | 11 | 2021-02-19T17:11:04.000Z | 2021-12-03T17:14:58.000Z | modox/run.py | lukpazera/modox | 4ee5a6033e405f9f7f3a7c80a1cb3c558c90fb01 | [
"MIT"
] | null | null | null | modox/run.py | lukpazera/modox | 4ee5a6033e405f9f7f3a7c80a1cb3c558c90fb01 | [
"MIT"
] | null | null | null |
import lx
from log import Log
def run(cmdString, logErrors=True, log=None):
""" Runs a command via lx.eval.
Parameters
----------
cmdString : str
Command string to run.
log : modox.Log, None
Log to output potential error messages through.
When None is passed ... | 24.625 | 68 | 0.559645 |
2cbf0c67d6a83c53f0d0c1503047749adea69043 | 1,740 | py | Python | alipay/aop/api/domain/AlipayOverseasTaxUserinfoQueryModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayOverseasTaxUserinfoQueryModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayOverseasTaxUserinfoQueryModel.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.constant.ParamConstants import *
class AlipayOverseasTaxUserinfoQueryModel(object):
def __init__(self):
self._identify_account_no = None
self._identify_account_type = None
@property
def identify_... | 31.071429 | 93 | 0.671264 |
d893759c65b095dd652b4589787c7e08902c3ef6 | 1,178 | py | Python | cw_count_the_monkeys.py | yiyinghsieh/python-algorithms-data-structures | 26879343d3d83ca431946f8a92def2bc8672f807 | [
"BSD-2-Clause"
] | null | null | null | cw_count_the_monkeys.py | yiyinghsieh/python-algorithms-data-structures | 26879343d3d83ca431946f8a92def2bc8672f807 | [
"BSD-2-Clause"
] | null | null | null | cw_count_the_monkeys.py | yiyinghsieh/python-algorithms-data-structures | 26879343d3d83ca431946f8a92def2bc8672f807 | [
"BSD-2-Clause"
] | null | null | null | """Codewars: Count the Monkeys!
8 kyu
URL: https://www.codewars.com/kata/56f69d9f9400f508fb000ba7/train/python
You take your son to the forest to see the monkeys. You know that there are a
certain number there (n), but your son is too young to just appreciate the full
number, he has to start counting them from 1.
... | 23.56 | 84 | 0.621392 |
223334c0838994750c26282227c21549042a9f78 | 14,162 | py | Python | dsp/module/zeropark.py | gods-view/AdclickIO | ccb73867e568aac5f40bd5890149626ce0be1897 | [
"BSD-2-Clause"
] | null | null | null | dsp/module/zeropark.py | gods-view/AdclickIO | ccb73867e568aac5f40bd5890149626ce0be1897 | [
"BSD-2-Clause"
] | null | null | null | dsp/module/zeropark.py | gods-view/AdclickIO | ccb73867e568aac5f40bd5890149626ce0be1897 | [
"BSD-2-Clause"
] | null | null | null | # encoding=utf-8
import os, sys
from imp import reload
sys.path.insert(0, os.path.dirname(sys.path[0]))
# print (os.path.dirname(sys.path))
# print (sys.path)
reload(sys)
# sys.path.insert(0, os.path.dirname(sys.path[0]))
# reload(sys)
# BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# sys.path... | 44.816456 | 141 | 0.475639 |
00acd857e9539edb8d9b56dacd18dd5cbf8cd358 | 108 | py | Python | package/wikiwhatsthis/__init__.py | kensho-technologies/wikiwhatsthis | 13028ff72b32b2cb41171ffbb87ab103b42c10b3 | [
"Apache-2.0"
] | 3 | 2020-10-13T17:53:02.000Z | 2020-11-07T20:42:10.000Z | package/wikiwhatsthis/__init__.py | kensho-technologies/wikiwhatsthis | 13028ff72b32b2cb41171ffbb87ab103b42c10b3 | [
"Apache-2.0"
] | 1 | 2021-05-26T22:11:28.000Z | 2021-05-26T22:11:28.000Z | package/wikiwhatsthis/__init__.py | kensho-technologies/wikiwhatsthis | 13028ff72b32b2cb41171ffbb87ab103b42c10b3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020-present Kensho Technologies, LLC.
__package_name__ = "wikiwhatsthis"
__version__ = "0.0.1"
| 27 | 50 | 0.777778 |
6b3a9282070edafe2c6f6c2f838eccd8f46f3797 | 961 | py | Python | tensorD/ex/ml_cp.py | Yousef11111/tensorD | 342e360d348713a18b4e80fcc0f840a136748b66 | [
"MIT"
] | 2 | 2018-11-26T19:33:17.000Z | 2019-03-29T21:02:52.000Z | tensorD/ex/ml_cp.py | Yousef11111/tensorD | 342e360d348713a18b4e80fcc0f840a136748b66 | [
"MIT"
] | null | null | null | tensorD/ex/ml_cp.py | Yousef11111/tensorD | 342e360d348713a18b4e80fcc0f840a136748b66 | [
"MIT"
] | null | null | null | from tensorD.dataproc.reader import TensorReader
import tensorflow as tf
from tensorD.factorization.env import Environment
from tensorD.dataproc.provider import Provider
from tensorD.factorization.cp import CP_ALS
from tensorD.demo.DataGenerator import *
if __name__ == '__main__':
full_shape = [943, 1682, 31]
... | 38.44 | 69 | 0.725286 |
ee98eaf178557ee8dddcdfac0a69f2c7e4c9c4df | 1,640 | py | Python | pytket/tests/add_circuit_test.py | NewGitter2017/tket | 6ff81af26280770bf2ca80bfb2140e8fa98182aa | [
"Apache-2.0"
] | null | null | null | pytket/tests/add_circuit_test.py | NewGitter2017/tket | 6ff81af26280770bf2ca80bfb2140e8fa98182aa | [
"Apache-2.0"
] | null | null | null | pytket/tests/add_circuit_test.py | NewGitter2017/tket | 6ff81af26280770bf2ca80bfb2140e8fa98182aa | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-2021 Cambridge Quantum Computing
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 24.848485 | 74 | 0.656098 |
84f54cb101545d0a45d5d50de3624467902ab7e7 | 987 | py | Python | src/initializeQuota.py | kuipertan/rdbs | fa90a78ac08de09da35d7f30dc4dfb61640d6d3b | [
"Apache-2.0"
] | 1 | 2016-08-16T08:37:46.000Z | 2016-08-16T08:37:46.000Z | src/initializeQuota.py | kuipertan/rdbs | fa90a78ac08de09da35d7f30dc4dfb61640d6d3b | [
"Apache-2.0"
] | null | null | null | src/initializeQuota.py | kuipertan/rdbs | fa90a78ac08de09da35d7f30dc4dfb61640d6d3b | [
"Apache-2.0"
] | null | null | null |
import MySQLdb,getpass,sys
print
print '*' * 80
print """
This script will initialize your MySQL server in order to use quota function,
so you needn\'t to do it by manual.
"""
print '*' * 80
print
sql = "CREATE DATABASE quota; use quota; CREATE TABLE DB_LIMIT (Db VARCHAR(64)\
NOT NULL, Max_size BIGINT NOT NULL... | 21.933333 | 80 | 0.678825 |
cd301ce7e05b96be97ea574c996674206ccf5755 | 6,146 | py | Python | qiskit/_util.py | abhishekabhishek/qiskit-terra | 1de64f95a19ee1ace342328fea5d73e72d8f9e1a | [
"Apache-2.0"
] | 1 | 2018-11-01T01:35:43.000Z | 2018-11-01T01:35:43.000Z | qiskit/_util.py | sulavtimilsina/qiskit-terra | e0f8d9fd61322623fe59a11b4d03cbd3f54d9015 | [
"Apache-2.0"
] | null | null | null | qiskit/_util.py | sulavtimilsina/qiskit-terra | e0f8d9fd61322623fe59a11b4d03cbd3f54d9015 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=too-many-ancestors
"""Common utilities for QISKit."""
import logging
import re
import sys
import warnings... | 33.402174 | 80 | 0.66287 |
1e452bd5a34845c3deaf58a06da3376b237ef767 | 2,590 | py | Python | epitome/commands/ica_fix.py | CANNlab/epitome | ba8b4831c87f008170f4e9e27a8a946e49fcff54 | [
"Apache-2.0"
] | null | null | null | epitome/commands/ica_fix.py | CANNlab/epitome | ba8b4831c87f008170f4e9e27a8a946e49fcff54 | [
"Apache-2.0"
] | null | null | null | epitome/commands/ica_fix.py | CANNlab/epitome | ba8b4831c87f008170f4e9e27a8a946e49fcff54 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import epitome as epi
import os
def run(input_name):
output = 'fix'
print('\nAdding FSL ICA X-Noisifier calculation.')
try:
# set the training data
print('\nCost function: (see AFNI align_EPI_anat.py for help)')
train_data = {'Standard.RData' : '= use on "s... | 52.857143 | 232 | 0.652896 |
0646b14aff6bf5a90dcafc31a1e023932d1b9a68 | 6,772 | py | Python | src/azure-cli/setup.py | Zay2k/azure-cli | 1ef59bace4dfad9cba137f49c8974aca4b0fff90 | [
"MIT"
] | 1 | 2020-08-10T23:50:16.000Z | 2020-08-10T23:50:16.000Z | src/azure-cli/setup.py | Zay2k/azure-cli | 1ef59bace4dfad9cba137f49c8974aca4b0fff90 | [
"MIT"
] | 2 | 2020-09-12T04:31:23.000Z | 2020-09-14T06:31:04.000Z | src/azure-cli/setup.py | mjain2/azure-cli | 1ef59bace4dfad9cba137f49c8974aca4b0fff90 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# ---------------------------------------------... | 33.86 | 103 | 0.606763 |
2e74f8b7f239670005c6e625390f76a61330665d | 25,314 | py | Python | rave_ec/Lib/nexrad_level2.py | DanielMichelson/drqc_article | cd7df2f7290adedb557bbc6ba484d30039a23ce2 | [
"CC-BY-4.0"
] | null | null | null | rave_ec/Lib/nexrad_level2.py | DanielMichelson/drqc_article | cd7df2f7290adedb557bbc6ba484d30039a23ce2 | [
"CC-BY-4.0"
] | null | null | null | rave_ec/Lib/nexrad_level2.py | DanielMichelson/drqc_article | cd7df2f7290adedb557bbc6ba484d30039a23ce2 | [
"CC-BY-4.0"
] | null | null | null | """
pyart.io.nexrad_level2
======================
.. autosummary::
:toctree: generated/
:template: dev_template.rst
NEXRADLevel2File
.. autosummary::
:toctree: generated/
_decompress_records
_get_record_from_buf
_get_msg31_data_block
_structure_size
_unpack_from_buf
_unpack_s... | 32.960938 | 78 | 0.601643 |
ab3b5cc7a5808ff949f415d2dd55c7e4aa2d13be | 211 | py | Python | sample_instance/config.py | olus2000/nptimelapse | 8623a55310b30921a76d1c071df0636869a2a806 | [
"MIT"
] | 1 | 2021-09-22T11:57:17.000Z | 2021-09-22T11:57:17.000Z | sample_instance/config.py | olus2000/nptimelapse | 8623a55310b30921a76d1c071df0636869a2a806 | [
"MIT"
] | 2 | 2021-12-23T09:30:14.000Z | 2021-12-28T09:42:34.000Z | sample_instance/config.py | olus2000/nptimelapse | 8623a55310b30921a76d1c071df0636869a2a806 | [
"MIT"
] | 1 | 2021-12-20T16:24:54.000Z | 2021-12-20T16:24:54.000Z | SECRET_KEY = 'change this value'
SQLALCHEMY_TRACK_MODIFICATIONS = False
SQLALCHEMY_DATABASE_URI = 'sqlite:////{instance}/nptimelapse.sqlite3'
CELERY_BROKER_URL = 'amqp://localhost'
CELERY_IGNORE_RESULT = True
| 26.375 | 69 | 0.800948 |
4b4f4ff77cc439982285e858766e28d4e7e16ea3 | 927 | py | Python | homeassistant/components/volvooncall/binary_sensor.py | alindeman/home-assistant | b274b10f3874c196f0db8f9cfa5f47eb756d1f8e | [
"Apache-2.0"
] | 4 | 2019-07-03T22:36:57.000Z | 2019-08-10T15:33:25.000Z | homeassistant/components/volvooncall/binary_sensor.py | alindeman/home-assistant | b274b10f3874c196f0db8f9cfa5f47eb756d1f8e | [
"Apache-2.0"
] | 7 | 2019-08-23T05:26:02.000Z | 2022-03-11T23:57:18.000Z | homeassistant/components/volvooncall/binary_sensor.py | alindeman/home-assistant | b274b10f3874c196f0db8f9cfa5f47eb756d1f8e | [
"Apache-2.0"
] | 3 | 2016-08-26T12:32:49.000Z | 2020-02-26T21:01:35.000Z | """Support for VOC."""
import logging
from homeassistant.components.binary_sensor import (
DEVICE_CLASSES, BinarySensorDevice)
from . import DATA_KEY, VolvoEntity
_LOGGER = logging.getLogger(__name__)
async def async_setup_platform(
hass, config, async_add_entities, discovery_info=None):
"""Set up ... | 27.264706 | 75 | 0.702265 |
8287721c0b6bd84ef07dab3e542033529475ac8c | 4,738 | py | Python | python/hadoop_read.py | mavlyutovrus/interval_index | 685254999d5af265a9802cc948929cda3b2806e7 | [
"Apache-2.0"
] | null | null | null | python/hadoop_read.py | mavlyutovrus/interval_index | 685254999d5af265a9802cc948929cda3b2806e7 | [
"Apache-2.0"
] | null | null | null | python/hadoop_read.py | mavlyutovrus/interval_index | 685254999d5af265a9802cc948929cda3b2806e7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
import matplotlib
from pylab import *
import numpy
from copy_reg import remove_extension
from heapq import heappush
from mpl_toolkits.axes_grid1 import host_subplot
import mpl_toolkits.axisartist as AA
import random
def draw_scatter(x_values, y):
fig, ax1... | 28.890244 | 106 | 0.615661 |
e789f6500f1c3e46b29b72545104108f040dcfd9 | 2,451 | py | Python | CGC_results/CableGrindLlama/create_corpus_CGC.py | BinaryResearch/CS419-project | f75b6889195330d2348322415cbba044465b2eb3 | [
"MIT"
] | 1 | 2020-03-21T18:40:22.000Z | 2020-03-21T18:40:22.000Z | CGC_results/CableGrindLlama/create_corpus_CGC.py | BinaryResearch/CS419-project | f75b6889195330d2348322415cbba044465b2eb3 | [
"MIT"
] | null | null | null | CGC_results/CableGrindLlama/create_corpus_CGC.py | BinaryResearch/CS419-project | f75b6889195330d2348322415cbba044465b2eb3 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# use radamsa to mutate /run/utmp
import subprocess
import hashlib
import time
import os
import shutil
import time
import sys
#from tqdm import tqdm # not installed on server, don't have permisisons
ITERATIONS = 100 # number of times radamsa is called to mutate the seed file
MAX_FILE_SIZE =... | 30.6375 | 113 | 0.640147 |
1ec7e674b09bb4c881da83161d8552cbff948343 | 21,119 | py | Python | manimlib/scene/scene.py | sswatson/manim-fork | d451f717d6acb36bec342b4721478e812e7219de | [
"MIT"
] | 1 | 2021-01-04T15:10:30.000Z | 2021-01-04T15:10:30.000Z | manimlib/scene/scene.py | sswatson/manim-fork | d451f717d6acb36bec342b4721478e812e7219de | [
"MIT"
] | null | null | null | manimlib/scene/scene.py | sswatson/manim-fork | d451f717d6acb36bec342b4721478e812e7219de | [
"MIT"
] | 1 | 2021-06-17T19:48:37.000Z | 2021-06-17T19:48:37.000Z | import inspect
import random
import warnings
from tqdm import tqdm as ProgressDisplay
import numpy as np
from manimlib.animation.animation import Animation
from manimlib.animation.creation import Write
from manimlib.animation.transform import MoveToTarget, ApplyMethod
from manimlib.camera.camera import Camera
from ma... | 35.613828 | 106 | 0.624035 |
4517dea39fb90defc4eb4a8db871bb360b77487d | 6,254 | py | Python | apps/account/models/custom_user.py | nfeslim/dashboard_nfe | 12f4943257e8029f9d47612fb2458290d3730e4a | [
"MIT"
] | null | null | null | apps/account/models/custom_user.py | nfeslim/dashboard_nfe | 12f4943257e8029f9d47612fb2458290d3730e4a | [
"MIT"
] | 20 | 2019-01-28T15:58:10.000Z | 2022-02-10T08:34:48.000Z | apps/account/models/custom_user.py | nfeslim/dashboard_nfe | 12f4943257e8029f9d47612fb2458290d3730e4a | [
"MIT"
] | 2 | 2019-01-28T13:34:54.000Z | 2019-05-26T17:39:43.000Z | # -*- coding: utf-8 -*-
from django.contrib import auth
from django.db import models
from auditlog.models import AuditlogHistoryField
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import (
Group,
Permission,
BaseUserManager,
AbstractBaseUser,
_user_has_perm,... | 32.743455 | 97 | 0.650464 |
32caf03d8e036b6a89d6e12fbd4ef88095aafe58 | 3,160 | py | Python | MovieLens/Code/data4.py | bcspragu/Machine-Learning-Projects | b6832cbb9bb27d7e8253300f97a3ab84b1a555dc | [
"MIT"
] | null | null | null | MovieLens/Code/data4.py | bcspragu/Machine-Learning-Projects | b6832cbb9bb27d7e8253300f97a3ab84b1a555dc | [
"MIT"
] | null | null | null | MovieLens/Code/data4.py | bcspragu/Machine-Learning-Projects | b6832cbb9bb27d7e8253300f97a3ab84b1a555dc | [
"MIT"
] | 1 | 2018-09-26T13:13:03.000Z | 2018-09-26T13:13:03.000Z | import numpy as np
import matplotlib.pyplot as plt
data = eval("""[[1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1,
0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1,
1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1,
1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0,... | 61.960784 | 79 | 0.362658 |
7d031cf428b09001700267a9532384faad0d7b32 | 680 | py | Python | test/unit/rules/functions/test_base64.py | tomislacker/cfn-python-lint | f209ddfef9bcc1a005adfebcfcc16220b18deddb | [
"MIT-0"
] | 1,134 | 2019-03-02T14:58:34.000Z | 2021-05-15T00:57:16.000Z | test/unit/rules/functions/test_base64.py | tomislacker/cfn-python-lint | f209ddfef9bcc1a005adfebcfcc16220b18deddb | [
"MIT-0"
] | 1,122 | 2019-03-03T04:27:15.000Z | 2021-05-14T20:51:16.000Z | test/unit/rules/functions/test_base64.py | tomislacker/cfn-python-lint | f209ddfef9bcc1a005adfebcfcc16220b18deddb | [
"MIT-0"
] | 297 | 2019-03-11T09:56:57.000Z | 2021-05-14T16:41:19.000Z | """
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""
from test.unit.rules import BaseRuleTestCase
from cfnlint.rules.functions.Base64 import Base64 # pylint: disable=E0401
class TestRulesBase64(BaseRuleTestCase):
"""Test Rules Get Att """
def setUp(self):... | 28.333333 | 89 | 0.689706 |
80c1f196982b966130f0d29057025b050321184a | 825 | py | Python | deep-rl/lib/python2.7/site-packages/OpenGL/EGL/KHR/stream_consumer_gltexture.py | ShujaKhalid/deep-rl | 99c6ba6c3095d1bfdab81bd01395ced96bddd611 | [
"MIT"
] | 210 | 2016-04-09T14:26:00.000Z | 2022-03-25T18:36:19.000Z | deep-rl/lib/python2.7/site-packages/OpenGL/EGL/KHR/stream_consumer_gltexture.py | ShujaKhalid/deep-rl | 99c6ba6c3095d1bfdab81bd01395ced96bddd611 | [
"MIT"
] | 72 | 2016-09-04T09:30:19.000Z | 2022-03-27T17:06:53.000Z | deep-rl/lib/python2.7/site-packages/OpenGL/EGL/KHR/stream_consumer_gltexture.py | ShujaKhalid/deep-rl | 99c6ba6c3095d1bfdab81bd01395ced96bddd611 | [
"MIT"
] | 64 | 2016-04-09T14:26:49.000Z | 2022-03-21T11:19:47.000Z | '''OpenGL extension KHR.stream_consumer_gltexture
This module customises the behaviour of the
OpenGL.raw.EGL.KHR.stream_consumer_gltexture to provide a more
Python-friendly API
The official definition of this extension is available here:
http://www.opengl.org/registry/specs/KHR/stream_consumer_gltexture.txt
'''
fro... | 35.869565 | 72 | 0.821818 |
205c07757df35bd5519990871a361b1e45386bcd | 24,860 | py | Python | supportal/tests/app/views/test_vol_prospect_views.py | Elizabeth-Warren/supportal-backend | e55b0e8fd154730bab1708f27386b2adcb18cfbc | [
"MIT"
] | 34 | 2020-03-27T14:59:04.000Z | 2021-11-15T10:24:12.000Z | supportal/tests/app/views/test_vol_prospect_views.py | Elizabeth-Warren/supportal-backend | e55b0e8fd154730bab1708f27386b2adcb18cfbc | [
"MIT"
] | 5 | 2021-03-18T22:51:05.000Z | 2022-02-10T15:03:33.000Z | supportal/tests/app/views/test_vol_prospect_views.py | Elizabeth-Warren/supportal-backend | e55b0e8fd154730bab1708f27386b2adcb18cfbc | [
"MIT"
] | 14 | 2020-03-27T17:36:39.000Z | 2020-06-18T21:47:43.000Z | import json
import unittest
from datetime import datetime, timezone
import pytest
from model_bakery import baker
from rest_framework import status
from supportal.app.common.enums import CanvassResult, VolProspectAssignmentStatus
from supportal.tests import utils
@pytest.mark.django_db
def test_retrieve_assignment(a... | 36.558824 | 101 | 0.720153 |
449d9ad8301e443afd97b01b5023469fdc6c6123 | 65,817 | py | Python | pandas/core/algorithms.py | monferrand/pandas | a3477c769b3d2ea4950ae69f8867e3b291b743c1 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2020-06-04T21:46:19.000Z | 2020-06-04T21:46:19.000Z | pandas/core/algorithms.py | monferrand/pandas | a3477c769b3d2ea4950ae69f8867e3b291b743c1 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/algorithms.py | monferrand/pandas | a3477c769b3d2ea4950ae69f8867e3b291b743c1 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | """
Generic data algorithms. This module is experimental at the moment and not
intended for public consumption
"""
import operator
from textwrap import dedent
from typing import TYPE_CHECKING, Dict, Optional, Tuple, Union
from warnings import catch_warnings, simplefilter, warn
import numpy as np
from pandas._libs imp... | 31.934498 | 88 | 0.610025 |
51e6d5441d98ba794ba177dc551d1c07b56989db | 7,100 | py | Python | src/models/decoder.py | jinensetpal/panoptic-reproducibility | 78035073d6c1e3214746dbf433312a9d2173b1ce | [
"MIT"
] | null | null | null | src/models/decoder.py | jinensetpal/panoptic-reproducibility | 78035073d6c1e3214746dbf433312a9d2173b1ce | [
"MIT"
] | null | null | null | src/models/decoder.py | jinensetpal/panoptic-reproducibility | 78035073d6c1e3214746dbf433312a9d2173b1ce | [
"MIT"
] | null | null | null | import tensorflow as tf
import utils, aspp, convolutions
def get_decoder(name):
return PanopticDeepLabSingleDecoder(high_level_feature_name='res5',
low_level_feature_names=['res3', 'res2'],
low_level_channels_project=[64, 32],
... | 43.82716 | 81 | 0.674507 |
6f40f732144d0953a0d7a596caeb7ffdd8d19c53 | 14,946 | py | Python | nova/scheduler/manager.py | bopopescu/NovaOrc | db301a82191bed1baed2ae5e9470efe9c43d4729 | [
"Apache-2.0"
] | null | null | null | nova/scheduler/manager.py | bopopescu/NovaOrc | db301a82191bed1baed2ae5e9470efe9c43d4729 | [
"Apache-2.0"
] | null | null | null | nova/scheduler/manager.py | bopopescu/NovaOrc | db301a82191bed1baed2ae5e9470efe9c43d4729 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2010 OpenStack Foundation
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you m... | 45.428571 | 79 | 0.570521 |
e211c6945ca65e0cd50b6937a5d5157d2ec805fd | 1,120 | py | Python | docs/codeExamples/usingamodel.py | econnlpcourse/econnlpcourse.github.io | 425672e53baf8d163b0d175e776857ff89e1738c | [
"MIT"
] | 4 | 2020-10-02T08:01:20.000Z | 2021-09-20T18:34:59.000Z | docs/codeExamples/usingamodel.py | econnlpcourse/econnlpcourse.github.io | 425672e53baf8d163b0d175e776857ff89e1738c | [
"MIT"
] | null | null | null | docs/codeExamples/usingamodel.py | econnlpcourse/econnlpcourse.github.io | 425672e53baf8d163b0d175e776857ff89e1738c | [
"MIT"
] | 3 | 2020-10-14T11:46:21.000Z | 2021-03-04T16:36:30.000Z | from sklearn.feature_extraction import stop_words
import string
from sklearn.externals import joblib
stopwords = stop_words.ENGLISH_STOP_WORDS
def clean(doc): #doc is a string of text
doc = doc.replace("</br>", " ") #This text contains a lot of <br/> tags.
doc = "".join([char for char in doc if char not in st... | 43.076923 | 259 | 0.753571 |
8513063719ef57c665ddf1e0f29d6801768470d5 | 319 | py | Python | Linked_Lists/Find_Merge_Point_of_Two_Lists.py | NikolayVaklinov10/Interview_Preparation_Kit | 517c4c7e83a7bcc99a4f570dff6959b5229b1a29 | [
"MIT"
] | null | null | null | Linked_Lists/Find_Merge_Point_of_Two_Lists.py | NikolayVaklinov10/Interview_Preparation_Kit | 517c4c7e83a7bcc99a4f570dff6959b5229b1a29 | [
"MIT"
] | null | null | null | Linked_Lists/Find_Merge_Point_of_Two_Lists.py | NikolayVaklinov10/Interview_Preparation_Kit | 517c4c7e83a7bcc99a4f570dff6959b5229b1a29 | [
"MIT"
] | null | null | null |
def findMergeNode(headA, headB):
curA = headA
curB = headB
while not curA == curB:
if curA.next is None:
curA = headB
else:
curA = curA.next
if curB.next is None:
curB = headA
else:
curB = curB.next
return curA.data
| 15.190476 | 32 | 0.489028 |
82b05a2844a14e0f517b27039380c5694e9e5be3 | 3,011 | py | Python | huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_post_paid_instance_response.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2021-11-03T07:54:50.000Z | 2021-11-03T07:54:50.000Z | huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_post_paid_instance_response.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/model/create_post_paid_instance_response.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import pprint
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
class CreatePostPaidInstanceResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute... | 27.126126 | 83 | 0.568582 |
bb91c44ad91f9f995b43cb1cf5f08779f109b572 | 6,589 | py | Python | src/noisebridge.pyclass/noisebridge/pyclass/todo/migrations/0004_auto__del_field_todoitem_completed__add_field_todoitem_status.py | noisebridge/pyclass-project | f39b63d5cb86d98bffa1ffdcf97786843a28fbd7 | [
"Apache-2.0"
] | 1 | 2018-04-06T12:36:27.000Z | 2018-04-06T12:36:27.000Z | src/noisebridge.pyclass/noisebridge/pyclass/todo/migrations/0004_auto__del_field_todoitem_completed__add_field_todoitem_status.py | noisebridge/pyclass-project | f39b63d5cb86d98bffa1ffdcf97786843a28fbd7 | [
"Apache-2.0"
] | null | null | null | src/noisebridge.pyclass/noisebridge/pyclass/todo/migrations/0004_auto__del_field_todoitem_completed__add_field_todoitem_status.py | noisebridge/pyclass-project | f39b63d5cb86d98bffa1ffdcf97786843a28fbd7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'ToDoItem.completed'
db.delete_column('todo_todoitem', 'completed')
# Adding field... | 67.927835 | 188 | 0.564426 |
9fc883b31163f7ba8d91e8d880397ed59d677f7b | 16,900 | py | Python | tests/vlads_experiment_4c.py | PNNL-Comp-Mass-Spec/CRNT4SBML | 20406f452863f35f766b504fe2b3f3ab034b62fe | [
"Apache-2.0"
] | null | null | null | tests/vlads_experiment_4c.py | PNNL-Comp-Mass-Spec/CRNT4SBML | 20406f452863f35f766b504fe2b3f3ab034b62fe | [
"Apache-2.0"
] | 1 | 2019-09-26T21:04:31.000Z | 2019-09-26T21:04:31.000Z | tests/vlads_experiment_4c.py | PNNL-Comp-Mass-Spec/CRNT4SBML | 20406f452863f35f766b504fe2b3f3ab034b62fe | [
"Apache-2.0"
] | 1 | 2019-10-29T20:41:34.000Z | 2019-10-29T20:41:34.000Z | import sys
sys.path.insert(0, "..")
import crnt4sbml
import numpy
import sympy
import pandas
import scipy.integrate as itg
import dill
from plotnine import ggplot, aes, geom_line, ylim, scale_color_distiller, facet_wrap, theme_bw, geom_path, geom_point, labs, annotate
from matplotlib import rc
rc('text', usetex=True)
... | 38.063063 | 208 | 0.641538 |
333354eb6e680d5101abd0654a92abff0276a539 | 3,530 | py | Python | tests/testapp/migrate/f3cc/0001_initial.py | feinheit/feincms3-cookiecontrol | 93cb839aebe677246dd5eabf87ca2ab1e4a7740e | [
"BSD-3-Clause"
] | 1 | 2022-01-16T15:32:04.000Z | 2022-01-16T15:32:04.000Z | tests/testapp/migrate/f3cc/0001_initial.py | feinheit/feincms3-cookiecontrol | 93cb839aebe677246dd5eabf87ca2ab1e4a7740e | [
"BSD-3-Clause"
] | 15 | 2021-09-14T11:20:05.000Z | 2022-03-04T09:04:04.000Z | tests/testapp/migrate/f3cc/0001_initial.py | feinheit/feincms3-cookiecontrol | 93cb839aebe677246dd5eabf87ca2ab1e4a7740e | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 4.0rc1 on 2021-12-06 11:15
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name="CookieCategory",
fields=[
... | 32.990654 | 88 | 0.375354 |
042f09ce65fb2d2f21940da56a9de79fb4d6602e | 3,603 | py | Python | bin/gftools-check-vtt-compatibility.py | nyshadhr9/gftools | fe399074994a3d9cada25c37196d13707cdb53e0 | [
"Apache-2.0"
] | null | null | null | bin/gftools-check-vtt-compatibility.py | nyshadhr9/gftools | fe399074994a3d9cada25c37196d13707cdb53e0 | [
"Apache-2.0"
] | null | null | null | bin/gftools-check-vtt-compatibility.py | nyshadhr9/gftools | fe399074994a3d9cada25c37196d13707cdb53e0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2
# Copyright 2013,2016 The Font Bakery Authors.
# Copyright 2017 The Google Fonts Tools 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.... | 30.533898 | 78 | 0.693589 |
45e6c0f048e6752ab7a8a187d8abb16d5744bf96 | 8,566 | py | Python | kubernetes/client/models/v1_service_port.py | L3T/python | b6e4ae81a2afb49f668a142eb7d1c6e2571ef478 | [
"Apache-2.0"
] | 2 | 2020-06-21T08:03:18.000Z | 2020-06-21T09:53:29.000Z | kubernetes/client/models/v1_service_port.py | L3T/python | b6e4ae81a2afb49f668a142eb7d1c6e2571ef478 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_service_port.py | L3T/python | b6e4ae81a2afb49f668a142eb7d1c6e2571ef478 | [
"Apache-2.0"
] | 1 | 2020-12-10T07:28:08.000Z | 2020-12-10T07:28:08.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.16
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1Ser... | 37.570175 | 551 | 0.627948 |
31b6918fba6224a6621055e9033e1c08d258d2da | 1,497 | py | Python | script/preprocess/get_token.py | Yasuo-orphan/SelfKG | 52f71c186ab4ad2db8de6cadf4e498d6e563ee96 | [
"MIT"
] | null | null | null | script/preprocess/get_token.py | Yasuo-orphan/SelfKG | 52f71c186ab4ad2db8de6cadf4e498d6e563ee96 | [
"MIT"
] | null | null | null | script/preprocess/get_token.py | Yasuo-orphan/SelfKG | 52f71c186ab4ad2db8de6cadf4e498d6e563ee96 | [
"MIT"
] | null | null | null | import settings
import pandas as pd
from loader.DBP15k import DBP15kLoader
from settings import *
import numpy as np
class Token(object):
def __init__(self, loader):
self.loader = loader
self.embedding_list = []
def get_token():
id_features_dict = {}
loader_id_feat... | 31.851064 | 81 | 0.54509 |
6a7f4e1072e90835bb819057337d5a1a5aacc110 | 770 | py | Python | src/carbonapp/__init__.py | augustogandia/CarbonHouse | 25aa8d095343f26c1b96552852ec293642beae45 | [
"MIT"
] | null | null | null | src/carbonapp/__init__.py | augustogandia/CarbonHouse | 25aa8d095343f26c1b96552852ec293642beae45 | [
"MIT"
] | null | null | null | src/carbonapp/__init__.py | augustogandia/CarbonHouse | 25aa8d095343f26c1b96552852ec293642beae45 | [
"MIT"
] | null | null | null | """
********************************************************************************
carbonapp
********************************************************************************
.. currentmodule:: carbonapp
.. toctree::
:maxdepth: 1
"""
from __future__ import print_function
import os
__aut... | 21.388889 | 81 | 0.5 |
02c270a9a59d215aacbffc398097607e4dfe6f61 | 3,105 | py | Python | databuilder/setup.py | SpareFoot/amundsen | 002a1c8d574ee258a96efcaf22b518a93788381c | [
"Apache-2.0"
] | 1,169 | 2019-05-30T20:39:25.000Z | 2020-08-15T23:44:46.000Z | databuilder/setup.py | SpareFoot/amundsen | 002a1c8d574ee258a96efcaf22b518a93788381c | [
"Apache-2.0"
] | 331 | 2019-05-30T21:21:27.000Z | 2020-08-11T15:10:48.000Z | databuilder/setup.py | SpareFoot/amundsen | 002a1c8d574ee258a96efcaf22b518a93788381c | [
"Apache-2.0"
] | 260 | 2019-05-31T12:23:08.000Z | 2020-08-11T15:02:34.000Z | # Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0
import os
from setuptools import find_packages, setup
__version__ = '6.8.0'
requirements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'requirements.txt')
with open(requirements_path) as requirements_file:
... | 23 | 119 | 0.625765 |
083c2e23b5cca570120db5e335af3821c74e751b | 7,665 | py | Python | ann_benchmarks/algorithms/diskann.py | sanelisiwentini/ann-benchmarks | e121b309a9d56130a8b016ea925573c16dc04ef4 | [
"MIT"
] | 2,840 | 2015-06-01T12:38:40.000Z | 2022-03-31T11:31:40.000Z | ann_benchmarks/algorithms/diskann.py | sanelisiwentini/ann-benchmarks | e121b309a9d56130a8b016ea925573c16dc04ef4 | [
"MIT"
] | 261 | 2015-06-03T14:11:01.000Z | 2022-03-28T11:35:43.000Z | ann_benchmarks/algorithms/diskann.py | sanelisiwentini/ann-benchmarks | e121b309a9d56130a8b016ea925573c16dc04ef4 | [
"MIT"
] | 504 | 2015-06-03T12:24:27.000Z | 2022-03-28T03:16:45.000Z | import sys
import os
import vamanapy as vp
import numpy as np
import struct
import time
from ann_benchmarks.algorithms.base import BaseANN
class Vamana(BaseANN):
def __init__(self, metric, param):
self.metric = {'angular': 'cosine', 'euclidean': 'l2'}[metric]
self.l_build = int(param["l_build"])
... | 40.13089 | 96 | 0.576647 |
0880b25501d79d071f7f5179097ee1bdecff7a52 | 8,419 | py | Python | tasks/zeroshot_gpt2/evaluate.py | Xianchao-Wu/megatron2 | f793c37223b32051cb61d3b1d5661dddd57634bf | [
"MIT"
] | 1 | 2022-03-24T11:13:41.000Z | 2022-03-24T11:13:41.000Z | tasks/zeroshot_gpt2/evaluate.py | Xianchao-Wu/megatron2 | f793c37223b32051cb61d3b1d5661dddd57634bf | [
"MIT"
] | null | null | null | tasks/zeroshot_gpt2/evaluate.py | Xianchao-Wu/megatron2 | f793c37223b32051cb61d3b1d5661dddd57634bf | [
"MIT"
] | null | null | null | # coding=utf-8
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... | 35.079167 | 106 | 0.63523 |
b70e78768c6000b69746eed244a70cb6a88cf78a | 299 | py | Python | Scripts_Pyhton/Sorted_byvalue.py | gmsantos1988/Work_Pandas | a5f53d4ac416b6b6e2f0acdc899cbf3bdc86f406 | [
"MIT"
] | null | null | null | Scripts_Pyhton/Sorted_byvalue.py | gmsantos1988/Work_Pandas | a5f53d4ac416b6b6e2f0acdc899cbf3bdc86f406 | [
"MIT"
] | null | null | null | Scripts_Pyhton/Sorted_byvalue.py | gmsantos1988/Work_Pandas | a5f53d4ac416b6b6e2f0acdc899cbf3bdc86f406 | [
"MIT"
] | null | null | null | #Trabalhando com aggr no Pandas
import pandas as pd
import numpy as np
df = pd.DataFrame(np.random.randn(10, 4),
index = pd.date_range('10/10/2018', periods=10),
columns = ['A', 'B', 'C', 'D'])
print (df)
r = df.rolling(window=3,min_periods=1)
print( r['A'].aggregate([np.sum,np.mean])) | 29.9 | 54 | 0.648829 |
58c068e529fdd7c41d2c68f4805870da85a1ff40 | 80 | py | Python | conans/model/__init__.py | gmeeker/conan | 2e4863180612b7df4f0be536d81aff735222ce2a | [
"MIT"
] | null | null | null | conans/model/__init__.py | gmeeker/conan | 2e4863180612b7df4f0be536d81aff735222ce2a | [
"MIT"
] | null | null | null | conans/model/__init__.py | gmeeker/conan | 2e4863180612b7df4f0be536d81aff735222ce2a | [
"MIT"
] | null | null | null | from .conan_generator import Generator
from .conan_middleware import Middleware
| 26.666667 | 40 | 0.875 |
a04e554b669eac3c03340b683039073fbbe1376d | 4,512 | py | Python | testscripts/RDKB/component/HAL_Ethsw/TS_ethsw_stub_hal_Get_Port_Status_InvalidPort.py | rdkcmf/rdkb-tools-tdkb | 9f9c3600cd701d5fc90ac86a6394ebd28d49267e | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/HAL_Ethsw/TS_ethsw_stub_hal_Get_Port_Status_InvalidPort.py | rdkcmf/rdkb-tools-tdkb | 9f9c3600cd701d5fc90ac86a6394ebd28d49267e | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/HAL_Ethsw/TS_ethsw_stub_hal_Get_Port_Status_InvalidPort.py | rdkcmf/rdkb-tools-tdkb | 9f9c3600cd701d5fc90ac86a6394ebd28d49267e | [
"Apache-2.0"
] | null | null | null | ##########################################################################
# If not stated otherwise in this file or this component's Licenses.txt
# file the following copyright and licenses apply:
#
# Copyright 2019 RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use th... | 41.018182 | 111 | 0.725177 |
890f8d24c04ac838ffa446b3c773156b72071501 | 1,231 | py | Python | main_board/tests/test_views.py | ralphqq/pse-indices-scoreboard | f11a01915ac5a17b663db604afe996c5ed928fb9 | [
"MIT"
] | 1 | 2019-10-08T16:54:07.000Z | 2019-10-08T16:54:07.000Z | main_board/tests/test_views.py | ralphqq/pse-indices-scoreboard | f11a01915ac5a17b663db604afe996c5ed928fb9 | [
"MIT"
] | 8 | 2020-02-12T01:17:41.000Z | 2021-12-13T20:06:12.000Z | main_board/tests/test_views.py | ralphqq/pse-indices-scoreboard | f11a01915ac5a17b663db604afe996c5ed928fb9 | [
"MIT"
] | null | null | null | from datetime import datetime
from django.test import TestCase
from main_board.models import MarketIndex
class MainBoardViewTest(TestCase):
fixtures = ['value_updates.json']
def setUp(self):
self.response = self.client.get('/')
def test_main_board_view_response(self):
sel... | 32.394737 | 72 | 0.661251 |
f9f315857e9a43551c835b23e09edebaef823a14 | 2,413 | py | Python | tests/util/misc.py | sai-genesis/rc1-test | 56e565952b283450c8589296f87c31b1c67b8502 | [
"Apache-2.0"
] | 12 | 2021-08-18T20:53:31.000Z | 2022-03-15T21:45:13.000Z | tests/util/misc.py | sai-genesis/rc1-test | 56e565952b283450c8589296f87c31b1c67b8502 | [
"Apache-2.0"
] | 34 | 2021-08-18T19:12:11.000Z | 2022-01-06T17:15:34.000Z | tests/util/misc.py | sai-genesis/rc1-test | 56e565952b283450c8589296f87c31b1c67b8502 | [
"Apache-2.0"
] | 7 | 2021-08-18T20:53:34.000Z | 2022-03-15T08:37:40.000Z | import pytest
from mint.util.misc import format_bytes
from mint.util.misc import format_minutes
class TestMisc:
@pytest.mark.asyncio
async def test_format_bytes(self):
assert format_bytes(None) == "Invalid"
assert format_bytes(dict()) == "Invalid"
assert format_bytes("some bytes") == "... | 45.528302 | 64 | 0.621633 |
b9543ee9c49f6fe691eb9364cf9d8901059f6fad | 23,341 | py | Python | official/transformer/transformer_main.py | cristianopris/tf-models | 239e99397ab933a3927de6c45e3c027286d53de3 | [
"Apache-2.0"
] | 5 | 2018-06-12T01:11:21.000Z | 2018-07-16T07:57:42.000Z | models/official/transformer/transformer_main.py | youlingwangzi/TensorFlow | b7dd462d553d868dfe446b3d6d467935333647d3 | [
"Apache-2.0"
] | null | null | null | models/official/transformer/transformer_main.py | youlingwangzi/TensorFlow | b7dd462d553d868dfe446b3d6d467935333647d3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41.165785 | 80 | 0.722206 |
63ef37077251d43200f570f6b521a53ba7d97f62 | 530 | py | Python | setup.py | lexibank/bantubvd | 1df9ff64d64fec16a9b4f9ab6819008f1778f458 | [
"CC-BY-4.0"
] | null | null | null | setup.py | lexibank/bantubvd | 1df9ff64d64fec16a9b4f9ab6819008f1778f458 | [
"CC-BY-4.0"
] | 4 | 2018-04-13T16:17:11.000Z | 2019-11-11T14:16:36.000Z | setup.py | lexibank/bantubvd | 1df9ff64d64fec16a9b4f9ab6819008f1778f458 | [
"CC-BY-4.0"
] | null | null | null | from setuptools import setup
import json
with open('metadata.json', encoding='utf-8') as fp:
metadata = json.load(fp)
setup(
name="lexibank_bantubvd",
description=metadata["title"],
license=metadata.get("license", ""),
url=metadata.get("url", ""),
py_modules=["lexibank_bantubvd"],
includ... | 25.238095 | 78 | 0.679245 |
6b3d6a087eb85d9f529d3abf1d32e12e3a58ad28 | 12,482 | bzl | Python | tools/workspace/mbed/repository.bzl | BBScholar/rules_mbed | 76ef4ad7135a9a41030ea44dfe1bd291f335c895 | [
"Apache-2.0"
] | 17 | 2019-03-23T08:41:19.000Z | 2021-11-17T12:06:39.000Z | tools/workspace/mbed/repository.bzl | BBScholar/rules_mbed | 76ef4ad7135a9a41030ea44dfe1bd291f335c895 | [
"Apache-2.0"
] | 1 | 2019-11-26T21:13:07.000Z | 2019-11-27T02:02:40.000Z | tools/workspace/mbed/repository.bzl | BBScholar/rules_mbed | 76ef4ad7135a9a41030ea44dfe1bd291f335c895 | [
"Apache-2.0"
] | 4 | 2019-11-27T02:55:36.000Z | 2021-01-20T04:28:34.000Z | # -*- python -*-
# Copyright 2018-2019 Josh Pieper, jjp@pobox.com.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | 32.25323 | 99 | 0.595898 |
802b193be60d3fe1237155e6b79dffd7f61d7fd5 | 983 | py | Python | scripts/sort_strings.py | theastropath/turbot | c623cd9af73876efdd315f3d7dd09448a06d3331 | [
"MIT"
] | 10 | 2020-04-11T23:43:42.000Z | 2021-06-18T17:31:09.000Z | scripts/sort_strings.py | theastropath/turbot | c623cd9af73876efdd315f3d7dd09448a06d3331 | [
"MIT"
] | 116 | 2020-04-15T20:37:49.000Z | 2022-03-29T22:21:25.000Z | scripts/sort_strings.py | theastropath/turbot | c623cd9af73876efdd315f3d7dd09448a06d3331 | [
"MIT"
] | 3 | 2020-04-11T23:56:34.000Z | 2020-06-18T17:44:34.000Z | #!/usr/bin/env python3
import sys
from os.path import dirname, realpath
from pathlib import Path
from yaml import dump, load
SRC_ROOT = Path(dirname(realpath(__file__))).parent
ASSETS_DIR = SRC_ROOT / "src" / "turbot" / "assets"
STRINGS_DATA_FILE = ASSETS_DIR / "strings.yaml"
try:
from yaml import CLoader as Lo... | 22.860465 | 62 | 0.707019 |
ab9be0bb79eef7c6f08b8574802e81b06537efc8 | 1,376 | py | Python | quiz/exceptions.py | Huangkai1008/quiz | 3da2f7486d24b6d18a064cf8cfb50cfc0fa4ee6f | [
"MIT"
] | 3 | 2019-08-15T07:27:36.000Z | 2020-12-19T14:26:06.000Z | quiz/exceptions.py | Huangkai1008/quiz | 3da2f7486d24b6d18a064cf8cfb50cfc0fa4ee6f | [
"MIT"
] | null | null | null | quiz/exceptions.py | Huangkai1008/quiz | 3da2f7486d24b6d18a064cf8cfb50cfc0fa4ee6f | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
"""
自定义异常
"""
class QuizException(Exception):
"""
前端参数异常
"""
status_code = 400
def __init__(self, message):
super(QuizException, self).__init__(message)
self.message = message
def __iter__(self):
for k in ['message', 'status_code']:
... | 17.87013 | 56 | 0.583576 |
91f159e38eaede4546063719df482039339ed922 | 8,515 | py | Python | fusion_vae_notebook.py | palakdavda22/FUSION_VAE_DSC | 999676a755ea68dcd6feae685d37bc5fa46c4952 | [
"MIT"
] | null | null | null | fusion_vae_notebook.py | palakdavda22/FUSION_VAE_DSC | 999676a755ea68dcd6feae685d37bc5fa46c4952 | [
"MIT"
] | null | null | null | fusion_vae_notebook.py | palakdavda22/FUSION_VAE_DSC | 999676a755ea68dcd6feae685d37bc5fa46c4952 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Fusion_VAE_notebook.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1TWrb8Ksc6bfBwqOjqc3TgHMBgYy2aCUW
<a href="https://colab.research.google.com/github/Abhinandan-Pal/FUSION_VAE/blob/master/Fusion_VAE_notebook.ipynb" ta... | 31.076642 | 225 | 0.630887 |
b80b76be29825b3e1034a7f13fd8ea9c24d18c1b | 8,080 | py | Python | tests/test_utils/gcp_system_helpers.py | yang040840219/airflow | c73d9e09cc650374e975ba287e9ed8ea59cde51a | [
"Apache-2.0"
] | 2 | 2020-10-23T18:55:03.000Z | 2021-07-13T04:45:49.000Z | tests/test_utils/gcp_system_helpers.py | yang040840219/airflow | c73d9e09cc650374e975ba287e9ed8ea59cde51a | [
"Apache-2.0"
] | 10 | 2021-09-08T21:27:07.000Z | 2022-03-30T17:54:45.000Z | tests/test_utils/gcp_system_helpers.py | yang040840219/airflow | c73d9e09cc650374e975ba287e9ed8ea59cde51a | [
"Apache-2.0"
] | 2 | 2020-10-23T18:55:05.000Z | 2022-02-16T21:53:10.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... | 38.47619 | 107 | 0.668317 |
a4107207a6361a2653c169aca5434832db8952b9 | 33,428 | py | Python | tests/unit/media/test_player.py | AnantTiwari-Naman/pyglet | 4774f2889057da95a78785a69372112931e6a620 | [
"BSD-3-Clause"
] | 1 | 2020-10-27T14:21:19.000Z | 2020-10-27T14:21:19.000Z | tests/unit/media/test_player.py | AnantTiwari-Naman/pyglet | 4774f2889057da95a78785a69372112931e6a620 | [
"BSD-3-Clause"
] | null | null | null | tests/unit/media/test_player.py | AnantTiwari-Naman/pyglet | 4774f2889057da95a78785a69372112931e6a620 | [
"BSD-3-Clause"
] | 1 | 2021-09-16T20:47:07.000Z | 2021-09-16T20:47:07.000Z | from tests import mock
import random
import unittest
from pyglet.gl import GL_TEXTURE_RECTANGLE
from pyglet.media.player import Player, PlayerGroup
from pyglet.media.codecs.base import AudioFormat, VideoFormat, Source
class PlayerTestCase(unittest.TestCase):
# Default values to use
audio_format_1 = AudioForm... | 41.889724 | 122 | 0.702226 |
821fbccf20bebeaadf54c5e89b955505a8b3a9a3 | 1,635 | py | Python | contact/views.py | dksivagis/shpescape | a2c97be4628b012145fd5bda63d79836bc5898a0 | [
"Apache-2.0"
] | 1 | 2018-07-26T07:40:47.000Z | 2018-07-26T07:40:47.000Z | contact/views.py | dksivagis/shpescape | a2c97be4628b012145fd5bda63d79836bc5898a0 | [
"Apache-2.0"
] | 1 | 2016-07-22T19:24:30.000Z | 2016-07-22T19:24:30.000Z | contact/views.py | dksivagis/shpescape | a2c97be4628b012145fd5bda63d79836bc5898a0 | [
"Apache-2.0"
] | null | null | null | #r!/usr/bin/env python
#
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 31.442308 | 76 | 0.726606 |
acbb70c9dbae6e2e64a6a9cdd86c8631372f3aae | 1,002 | py | Python | nff/data/crystals.py | torchmd/mdgrad | 77bd7685b74b41acf54a9483546e1e8cb545eb01 | [
"MIT"
] | 54 | 2021-03-10T18:35:49.000Z | 2022-03-28T13:54:47.000Z | nff/data/crystals.py | wwang2/torchmd | 77bd7685b74b41acf54a9483546e1e8cb545eb01 | [
"MIT"
] | 1 | 2021-03-17T07:01:02.000Z | 2021-03-17T07:01:02.000Z | nff/data/crystals.py | torchmd/mdgrad | 77bd7685b74b41acf54a9483546e1e8cb545eb01 | [
"MIT"
] | 5 | 2021-06-08T02:44:35.000Z | 2021-12-17T11:50:08.000Z | import torch
import numpy as np
from pymatgen.core.structure import Structure
def get_crystal_graph(crystal, cutoff):
"""Creates nxyz and periodic reindexing for a given Structure.
Args:
crystal (Structure)
cutoff (float): cutoff to get neighbors of atoms
Returns:
nxyz (np.array)... | 29.470588 | 107 | 0.646707 |
c9a0ba45e893b97271b4a1e52b5a108f5c759130 | 825 | py | Python | saleor/dashboard/bulk_order/filters.py | FadedCoder/Teeshood | 4d0659ba1ece52ca9579582165fadc095770ad37 | [
"BSD-3-Clause"
] | null | null | null | saleor/dashboard/bulk_order/filters.py | FadedCoder/Teeshood | 4d0659ba1ece52ca9579582165fadc095770ad37 | [
"BSD-3-Clause"
] | null | null | null | saleor/dashboard/bulk_order/filters.py | FadedCoder/Teeshood | 4d0659ba1ece52ca9579582165fadc095770ad37 | [
"BSD-3-Clause"
] | 1 | 2021-12-02T18:49:31.000Z | 2021-12-02T18:49:31.000Z | from django.utils.translation import npgettext, pgettext_lazy
from django_filters import CharFilter
from ...core.filters import SortedFilterSet
from ...core.models import BulkOrder
PRODUCT_SORT_BY_FIELDS = {
'name': pgettext_lazy('Product list sorting option', 'name'),
}
class ProductFilter(SortedFilterSet):
... | 28.448276 | 72 | 0.669091 |
5251b3042b6d95c678a4159a76352cf409feaa05 | 31,462 | py | Python | openstack_dashboard/dashboards/project/firewalls/tests.py | timpricecatalyst/horizon | 8279ae0ed464e62e1c91e78341342160f8a07172 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/project/firewalls/tests.py | timpricecatalyst/horizon | 8279ae0ed464e62e1c91e78341342160f8a07172 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/project/firewalls/tests.py | timpricecatalyst/horizon | 8279ae0ed464e62e1c91e78341342160f8a07172 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013, Big Switch 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 required by applic... | 38.938119 | 79 | 0.588837 |
16fc1269a60c4b3c6a12a598a94dcaef32db103d | 3,360 | py | Python | gui.py | devindra9935/Morse-coder | 619c58a929a8f0c73f1fcded95c6a9112f1b8900 | [
"MIT"
] | null | null | null | gui.py | devindra9935/Morse-coder | 619c58a929a8f0c73f1fcded95c6a9112f1b8900 | [
"MIT"
] | null | null | null | gui.py | devindra9935/Morse-coder | 619c58a929a8f0c73f1fcded95c6a9112f1b8900 | [
"MIT"
] | null | null | null | import tkinter as tk
from tkinter import *
from PIL import ImageTk
from pygame import mixer
from logic import morse_logic
from pydub import audio_segment
class Application(Frame):
def __init__(self, master=None):
Frame.__init__(self, master)
self.grid()
self.master.title("Grid Manager")
... | 36.129032 | 114 | 0.611905 |
8d567a3416f14ffcb325912d911b7b4c53819dba | 6,924 | py | Python | test/functional/wallet_txn_doublespend.py | PictureEX/Picture-ex-core | faaa3ab28a4008fbce414f197156a787d96b5991 | [
"MIT"
] | 1 | 2021-07-30T22:01:21.000Z | 2021-07-30T22:01:21.000Z | test/functional/wallet_txn_doublespend.py | N1ppa69/Picture-ex-core | c2beb62086f6459dc8a8cdaddb5dd677eae027e1 | [
"MIT"
] | null | null | null | test/functional/wallet_txn_doublespend.py | N1ppa69/Picture-ex-core | c2beb62086f6459dc8a8cdaddb5dd677eae027e1 | [
"MIT"
] | 4 | 2019-12-09T07:05:22.000Z | 2020-03-17T12:12:39.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the wallet accounts properly when there is a double-spend conflict."""
from test_framework.test_f... | 46.783784 | 114 | 0.601531 |
cd7f7ccf85790719514bd481df32a0aa27121cde | 445 | py | Python | src/PhrasesGetter.py | Potriashka/NewsHelper | 0a3c7c191d9b41f23d7835064b225d409fe388e7 | [
"MIT"
] | null | null | null | src/PhrasesGetter.py | Potriashka/NewsHelper | 0a3c7c191d9b41f23d7835064b225d409fe388e7 | [
"MIT"
] | null | null | null | src/PhrasesGetter.py | Potriashka/NewsHelper | 0a3c7c191d9b41f23d7835064b225d409fe388e7 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import requests
from main import SearchResults
# for every site in a list we'll do the search
for i in range(len(SearchResults)):
url = SearchResults[i] # take the url of a site
page = requests.get(url)
soup = BeautifulSoup(page.text, "html.parser")
thing = soup.find('h1')... | 26.176471 | 51 | 0.662921 |
7b9437cb8c0dc62e94b9ed2898a8492f007c008d | 15,021 | py | Python | tensorflow/python/estimator/canned/dnn.py | salonirk11/tensorflow | 7fda1bb1177c69fa7bf80d20d5c5e7aaa25816e7 | [
"Apache-2.0"
] | 4 | 2019-04-14T13:33:17.000Z | 2021-09-22T02:33:29.000Z | tensorflow/python/estimator/canned/dnn.py | salonirk11/tensorflow | 7fda1bb1177c69fa7bf80d20d5c5e7aaa25816e7 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/estimator/canned/dnn.py | salonirk11/tensorflow | 7fda1bb1177c69fa7bf80d20d5c5e7aaa25816e7 | [
"Apache-2.0"
] | 2 | 2017-07-16T13:54:08.000Z | 2018-05-21T09:02:34.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41.040984 | 112 | 0.694827 |
ca663b783484200843d0e4fe9b71f8db29f31cd2 | 2,330 | py | Python | ingestion/src/metadata/ingestion/source/bigquery.py | jbuoncri1/OpenMetadata | df1c197e1f2b3016402ca5d32ea8bf7a3f626352 | [
"Apache-2.0"
] | null | null | null | ingestion/src/metadata/ingestion/source/bigquery.py | jbuoncri1/OpenMetadata | df1c197e1f2b3016402ca5d32ea8bf7a3f626352 | [
"Apache-2.0"
] | null | null | null | ingestion/src/metadata/ingestion/source/bigquery.py | jbuoncri1/OpenMetadata | df1c197e1f2b3016402ca5d32ea8bf7a3f626352 | [
"Apache-2.0"
] | null | null | null | # 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 ... | 40.172414 | 89 | 0.725322 |
1e796f7f9762b42bcd5bdee2302db93639b2f614 | 879 | py | Python | features/steps/scheduler_availability_steps.py | infrared5/massroute-pi | c2e16d655058c6c5531ec66f8a82fe41ad4e8427 | [
"MIT"
] | null | null | null | features/steps/scheduler_availability_steps.py | infrared5/massroute-pi | c2e16d655058c6c5531ec66f8a82fe41ad4e8427 | [
"MIT"
] | null | null | null | features/steps/scheduler_availability_steps.py | infrared5/massroute-pi | c2e16d655058c6c5531ec66f8a82fe41ad4e8427 | [
"MIT"
] | null | null | null | from mock import MagicMock
from app.util.scheduler import Scheduler
@given('A Scheduler has a \'live\' timeframe of 6am to 10pm')
def scheduler_timeframe_set_six_to_ten_pm(context):
scheduler = Scheduler(6, 22)
context.scheduler = scheduler
@when('Current time is not within timeframe')
def scheduler_current_hour(... | 35.16 | 61 | 0.794084 |
d9f4ce7730c896c613414aabc16f727fbad339b6 | 15,961 | py | Python | tests/test_pylighthouse.py | djhaskin987/pylighthouse | ee94f67ca6f2dd919d939b501ce9bc9388bdaaaa | [
"Apache-2.0"
] | 4 | 2018-12-27T19:46:42.000Z | 2019-01-04T14:22:07.000Z | tests/test_pylighthouse.py | djhaskin987/pylighthouse | ee94f67ca6f2dd919d939b501ce9bc9388bdaaaa | [
"Apache-2.0"
] | 1 | 2021-11-15T17:48:03.000Z | 2021-11-15T17:48:03.000Z | tests/test_pylighthouse.py | djhaskin987/pylighthouse | ee94f67ca6f2dd919d939b501ce9bc9388bdaaaa | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2018 the pylighthouse authors, see the AUTHORS.rst file.
#
# 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.or... | 24.861371 | 78 | 0.467139 |
3ed97febb18a4fd4ea36004986a7386fece429fa | 7,135 | py | Python | proxy_db/countries.py | fakegit/proxy-db | f67fb267deb443a650d591e3601bb5b5f7288274 | [
"Apache-2.0"
] | 25 | 2018-01-19T18:50:05.000Z | 2022-02-07T12:34:30.000Z | proxy_db/countries.py | fakegit/proxy-db | f67fb267deb443a650d591e3601bb5b5f7288274 | [
"Apache-2.0"
] | 35 | 2018-10-14T00:50:44.000Z | 2022-02-06T02:29:49.000Z | proxy_db/countries.py | fakegit/proxy-db | f67fb267deb443a650d591e3601bb5b5f7288274 | [
"Apache-2.0"
] | 7 | 2020-03-06T17:01:15.000Z | 2022-01-10T15:37:57.000Z | from __future__ import absolute_import
import os
try:
from geoip2.errors import AddressNotFoundError
from geoip2_tools.manager import Geoip2DataBaseManager
except ImportError:
Geoip2DataBaseManager = AddressNotFoundError = None
MAXMIND_LICENSE_KEY_ENVNAME = 'MAXMIND_LICENSE_KEY'
# https://dev.maxmind.... | 24.688581 | 87 | 0.520813 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.