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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cd41dc6c15abc396f48b5d70714d787d543ad746 | 3,910 | py | Python | options/train_options.py | icon-lab/ResViT | 8f22273a37b3c6b221034eb344b50c52a67df943 | [
"MIT"
] | 16 | 2021-11-11T15:31:09.000Z | 2022-03-18T09:08:19.000Z | options/train_options.py | 2805413893/ResViT | 699e7e900078263f6033751862146105fbceb73e | [
"MIT"
] | 5 | 2022-01-24T11:22:52.000Z | 2022-03-27T07:01:02.000Z | options/train_options.py | 2805413893/ResViT | 699e7e900078263f6033751862146105fbceb73e | [
"MIT"
] | 3 | 2021-12-28T12:02:15.000Z | 2022-02-10T09:22:44.000Z | from .base_options import BaseOptions
class TrainOptions(BaseOptions):
def initialize(self):
BaseOptions.initialize(self)
self.parser.add_argument('--display_freq', type=int, default=100, help='frequency of showing training results on screen')
self.parser.add_argument('--display_single_pan... | 102.894737 | 192 | 0.703581 |
af39f7f05a9caec87aa6561c64dc817819b45efd | 44 | py | Python | bsose/_version.py | gmacgilchrist/bsose | b4e8549f6e94537ded0909d268ffac1bcaf3e7af | [
"MIT"
] | null | null | null | bsose/_version.py | gmacgilchrist/bsose | b4e8549f6e94537ded0909d268ffac1bcaf3e7af | [
"MIT"
] | 3 | 2021-07-28T21:40:53.000Z | 2021-12-12T18:58:52.000Z | bsose/_version.py | gmacgilchrist/bsose | b4e8549f6e94537ded0909d268ffac1bcaf3e7af | [
"MIT"
] | null | null | null | __version__ = "0.1.dev13+g965e313.d20211108" | 44 | 44 | 0.795455 |
f80acde1739d498e5767d124fee05f4c3b519aef | 2,211 | py | Python | backend/damp_fog_30007/urls.py | crowdbotics-apps/damp-fog-30007 | 69fec9467e05d1a7d909c41b7e3f8f35cd9558d7 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/damp_fog_30007/urls.py | crowdbotics-apps/damp-fog-30007 | 69fec9467e05d1a7d909c41b7e3f8f35cd9558d7 | [
"FTL",
"AML",
"RSA-MD"
] | 33 | 2021-08-21T11:42:48.000Z | 2022-03-20T14:11:59.000Z | backend/damp_fog_30007/urls.py | crowdbotics-apps/damp-fog-30007 | 69fec9467e05d1a7d909c41b7e3f8f35cd9558d7 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """damp_fog_30007 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.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')
Clas... | 35.095238 | 87 | 0.710086 |
c1ac17aa853b8853f8273853a534d4f93c89aaac | 34,245 | py | Python | slak-matrix-migration/slak-matrix-migration/migrate.py | sapianco/slack-matrix-migration-orig | 26a8b80b0764c5b132308c6f683ff7e251304edd | [
"Apache-2.0"
] | null | null | null | slak-matrix-migration/slak-matrix-migration/migrate.py | sapianco/slack-matrix-migration-orig | 26a8b80b0764c5b132308c6f683ff7e251304edd | [
"Apache-2.0"
] | 1 | 2021-12-21T13:57:17.000Z | 2021-12-21T13:57:17.000Z | slak-matrix-migration/slak-matrix-migration/migrate.py | sapianco/slack-matrix-migration-orig | 26a8b80b0764c5b132308c6f683ff7e251304edd | [
"Apache-2.0"
] | null | null | null | #!/bin/python3
# -*- coding: utf-8 -*-
# Copyright 2019, 2020 Awesome Technologies Innovationslabor GmbH
#
# 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/license... | 35.971639 | 267 | 0.569105 |
9f9d27691f3e9870e23d0cc1b52403185cadeaba | 3,388 | py | Python | setup.py | PyUtilib/PyUtilib | d99406f2af1fb62268c34453a2fbe6bd4a7348f0 | [
"BSD-3-Clause"
] | 24 | 2016-04-02T10:00:02.000Z | 2021-03-02T16:40:18.000Z | setup.py | PyUtilib/PyUtilib | d99406f2af1fb62268c34453a2fbe6bd4a7348f0 | [
"BSD-3-Clause"
] | 105 | 2015-10-29T03:29:58.000Z | 2021-12-30T22:00:45.000Z | setup.py | PyUtilib/PyUtilib | d99406f2af1fb62268c34453a2fbe6bd4a7348f0 | [
"BSD-3-Clause"
] | 22 | 2016-01-21T15:35:25.000Z | 2021-05-15T20:17:44.000Z | # _________________________________________________________________________
#
# PyUtilib: A Python utility library.
# Copyright (c) 2008 Sandia Corporation.
# This software is distributed under the BSD License.
# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
# the U.S. Government retains ... | 39.858824 | 76 | 0.645514 |
cce3ac8194087917625821b84302b29b6337c46a | 419 | py | Python | web/src/schemas/database.py | disteLLL/saltyboy | d1c777c31d82f3b6e2126d8170446d9b028c37ab | [
"MIT"
] | null | null | null | web/src/schemas/database.py | disteLLL/saltyboy | d1c777c31d82f3b6e2126d8170446d9b028c37ab | [
"MIT"
] | null | null | null | web/src/schemas/database.py | disteLLL/saltyboy | d1c777c31d82f3b6e2126d8170446d9b028c37ab | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from typing import Dict
from dataclasses_jsonschema import JsonSchemaMixin
@dataclass
class DatabaseStatsBreakdown(JsonSchemaMixin):
"""Database stats broken down by tier"""
breakdown: Dict[str, int]
total: int
@dataclass
class DatabaseStatsSchema(JsonSchemaMixin):
... | 22.052632 | 50 | 0.78043 |
acd45a3b3b8102583502e830e5fb0b561dc0ad00 | 33 | py | Python | vnpy_uf/gateway/__init__.py | noranhe/vnpy_ufx | f1073ee7eaa3ad54688e9914ba7400fa0740de8b | [
"MIT"
] | null | null | null | vnpy_uf/gateway/__init__.py | noranhe/vnpy_ufx | f1073ee7eaa3ad54688e9914ba7400fa0740de8b | [
"MIT"
] | null | null | null | vnpy_uf/gateway/__init__.py | noranhe/vnpy_ufx | f1073ee7eaa3ad54688e9914ba7400fa0740de8b | [
"MIT"
] | 2 | 2021-12-09T08:29:47.000Z | 2022-03-30T02:48:05.000Z | from .uf_gateway import UfGateway | 33 | 33 | 0.878788 |
afde46c967149b3df1c8af1a38f438e66d659643 | 96 | py | Python | venv/lib/python3.8/site-packages/numpy/ma/tests/test_subclassing.py | GiulianaPola/select_repeats | 17a0d053d4f874e42cf654dd142168c2ec8fbd11 | [
"MIT"
] | 2 | 2022-03-13T01:58:52.000Z | 2022-03-31T06:07:54.000Z | venv/lib/python3.8/site-packages/numpy/ma/tests/test_subclassing.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | 19 | 2021-11-20T04:09:18.000Z | 2022-03-23T15:05:55.000Z | venv/lib/python3.8/site-packages/numpy/ma/tests/test_subclassing.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | null | null | null | /home/runner/.cache/pip/pool/43/c6/e2/4a12ac069cc9a585b45a973e38be6fb20b591e7c0d02cafd16e181e67e | 96 | 96 | 0.895833 |
44f247eff2c9daa7d69aa66ab04d10f87f7a431f | 865 | py | Python | extract_region.py | sontung/photorealistic-blocksworld | 38fd21a1ed756a752c4b0be56e25ca820be0ef17 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2021-05-19T10:58:54.000Z | 2021-05-19T10:58:54.000Z | extract_region.py | sontung/photorealistic-blocksworld | 38fd21a1ed756a752c4b0be56e25ca820be0ef17 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | extract_region.py | sontung/photorealistic-blocksworld | 38fd21a1ed756a752c4b0be56e25ca820be0ef17 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2020-07-30T09:45:09.000Z | 2020-07-30T09:45:09.000Z | #!/usr/bin/env python3
"Extract the regions from a scene json file"
import numpy as np
import json
import imageio
import os
def main(scenefile):
with open(scenefile, 'r') as f:
scene = json.load(f)
base, nameext = os.path.split(scenefile)
name, ext = os.path.splitext(nameext)
# print(bas... | 24.027778 | 70 | 0.6 |
eb9caaf92a7754dd7c22440ad54ab00eda3f75ef | 599 | pyde | Python | sketches/readLines/readLines.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/readLines/readLines.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/readLines/readLines.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | # Font-Test auf UTF-8; aus der Dokumentation:
# Starting with Processing release 0134,
# all files loaded and saved by the Processing API
# use UTF-8 encoding.
font = None
def setup():
size(500, 500)
# fontList = PFont.list()
# printArray(fontList)
font = createFont("Palatino-Roman", 32)
textFont(... | 21.392857 | 50 | 0.607679 |
f7d7f8f74b7b93c56d06ef5cf5bb112089c1b9f3 | 7,972 | py | Python | tests/test_binning.py | NicolasHug/pygbm | 7891113aa074a0c33705b2d454b6609b3544eaf2 | [
"MIT"
] | 2 | 2019-07-12T23:57:16.000Z | 2020-03-13T20:49:46.000Z | tests/test_binning.py | NicolasHug/pygbm | 7891113aa074a0c33705b2d454b6609b3544eaf2 | [
"MIT"
] | null | null | null | tests/test_binning.py | NicolasHug/pygbm | 7891113aa074a0c33705b2d454b6609b3544eaf2 | [
"MIT"
] | null | null | null | import numpy as np
from numpy.testing import assert_array_equal, assert_allclose
import pytest
from pygbm.binning import BinMapper, _find_binning_thresholds, _map_to_bins
DATA = np.random.RandomState(42).normal(
loc=[0, 10], scale=[1, 0.01], size=(int(1e6), 2)
).astype(np.float32)
def test_find_binning_thresho... | 36.072398 | 79 | 0.692549 |
00c64840e24b69d569122218d780b59810e266ad | 10,516 | py | Python | examples/research_projects/wav2vec2/run_asr.py | Sara-X/transformers | 6773fb5dccf88a2d6d250da2cdaaa1fa78a4f5c3 | [
"Apache-2.0"
] | 1 | 2020-08-09T15:59:41.000Z | 2020-08-09T15:59:41.000Z | examples/research_projects/wav2vec2/run_asr.py | Sara-X/transformers | 6773fb5dccf88a2d6d250da2cdaaa1fa78a4f5c3 | [
"Apache-2.0"
] | 25 | 2021-04-20T14:29:15.000Z | 2021-04-20T14:30:01.000Z | examples/research_projects/wav2vec2/run_asr.py | Sara-X/transformers | 6773fb5dccf88a2d6d250da2cdaaa1fa78a4f5c3 | [
"Apache-2.0"
] | 1 | 2021-04-20T14:09:17.000Z | 2021-04-20T14:09:17.000Z | #!/usr/bin/env python3
from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Union
import datasets
import numpy as np
import torch
import torch.nn as nn
from packaging import version
import soundfile as sf
from transformers import (
HfArgumentParser,
Trainer,
TrainingArgum... | 37.29078 | 145 | 0.662895 |
44e336cd23811825cfa1cc68aea466c63154bed9 | 34,609 | py | Python | tensorflow/python/ops/gen_sparse_ops.py | shishaochen/TensorFlow-0.8-Win | 63221dfc4f1a1d064308e632ba12e6a54afe1fd8 | [
"Apache-2.0"
] | 1 | 2017-09-14T23:59:05.000Z | 2017-09-14T23:59:05.000Z | tensorflow/python/ops/gen_sparse_ops.py | shishaochen/TensorFlow-0.8-Win | 63221dfc4f1a1d064308e632ba12e6a54afe1fd8 | [
"Apache-2.0"
] | 1 | 2016-10-19T02:43:04.000Z | 2016-10-31T14:53:06.000Z | tensorflow/python/ops/gen_sparse_ops.py | shishaochen/TensorFlow-0.8-Win | 63221dfc4f1a1d064308e632ba12e6a54afe1fd8 | [
"Apache-2.0"
] | 8 | 2016-10-23T00:50:02.000Z | 2019-04-21T11:11:57.000Z | """Python wrappers around Brain.
This file is MACHINE GENERATED! Do not edit.
"""
from google.protobuf import text_format
from tensorflow.core.framework import op_def_pb2
from tensorflow.python.framework import op_def_registry
from tensorflow.python.framework import ops
from tensorflow.python.ops import op_def_libra... | 29.379457 | 210 | 0.628247 |
ae20f7a42f03b4e1d3a639e4df2b7844e14f92cc | 3,777 | py | Python | src/configurationparser.py | sajtizsolt/dumas | 4b7e307535bcc93a75784449bc44055d6dd0730b | [
"MIT"
] | 3 | 2021-08-17T08:14:40.000Z | 2021-09-05T10:21:11.000Z | src/configurationparser.py | sajtizsolt/dumas | 4b7e307535bcc93a75784449bc44055d6dd0730b | [
"MIT"
] | null | null | null | src/configurationparser.py | sajtizsolt/dumas | 4b7e307535bcc93a75784449bc44055d6dd0730b | [
"MIT"
] | null | null | null | from argumentparser import ArgumentParser
from configuration import Configuration
from util import print_exception_and_exit, print_message_and_exit
import json, os
CONFIGURATION_JSON = """
{{
"bot": {{
"app": {},
"token": "{}"
}},
"channel": {{
"sources": {},
"target": {}
}},
"message": {{
... | 35.299065 | 99 | 0.703998 |
4cb746e2c1ba1454d68056183ad7eca597aea5b8 | 1,729 | py | Python | python/batch-predictor/merlinpyspark/sink.py | ashwinath/merlin | 087a7fa6fb21e4c771d64418bd58873175226ca1 | [
"Apache-2.0"
] | 97 | 2020-10-15T08:03:56.000Z | 2022-03-31T22:30:59.000Z | python/batch-predictor/merlinpyspark/sink.py | ibnummuhammad/merlin | acf10a350bcacfdfe67f7020d535467b71ff1d89 | [
"Apache-2.0"
] | 91 | 2020-10-26T03:15:27.000Z | 2022-03-31T10:19:55.000Z | python/batch-predictor/merlinpyspark/sink.py | ibnummuhammad/merlin | acf10a350bcacfdfe67f7020d535467b71ff1d89 | [
"Apache-2.0"
] | 26 | 2020-10-21T03:53:36.000Z | 2022-03-16T06:43:15.000Z | # Copyright 2020 The Merlin Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 32.018519 | 80 | 0.70214 |
b1f86d5a5a59afce7357a0d6a9963ff8115fec02 | 859 | py | Python | cassiopeia/core/gameapi.py | BubblegumDiscord/LoLTrivia | 70070dc2e8c59d7210d8b30ad2525bafaee4bba7 | [
"MIT"
] | null | null | null | cassiopeia/core/gameapi.py | BubblegumDiscord/LoLTrivia | 70070dc2e8c59d7210d8b30ad2525bafaee4bba7 | [
"MIT"
] | null | null | null | cassiopeia/core/gameapi.py | BubblegumDiscord/LoLTrivia | 70070dc2e8c59d7210d8b30ad2525bafaee4bba7 | [
"MIT"
] | 1 | 2018-05-06T15:49:33.000Z | 2018-05-06T15:49:33.000Z | import cassiopeia.dto.gameapi
import cassiopeia.core.requests
import cassiopeia.type.core.game
def get_recent_games(summoner):
"""
Gets the most recent games a summoner played
Args:
summoner (Summoner): the summoner to get recent games for
Returns:
list<Game>: the summoner's recent g... | 34.36 | 92 | 0.746217 |
c4725fcf76ac15e29c7c6cd26e0d3fd2ac0b0451 | 1,289 | py | Python | condor/catalog/views.py | icky-baker/condor | a0719eb4bfade0acd08134e1cca0d8217f5bd981 | [
"MIT"
] | null | null | null | condor/catalog/views.py | icky-baker/condor | a0719eb4bfade0acd08134e1cca0d8217f5bd981 | [
"MIT"
] | 1 | 2020-12-20T11:10:36.000Z | 2020-12-20T12:48:28.000Z | condor/catalog/views.py | icky-baker/condor | a0719eb4bfade0acd08134e1cca0d8217f5bd981 | [
"MIT"
] | null | null | null | # import socket
import os
from catalog.models import Author, Book, BookInstance, Genre
from django.shortcuts import render
from django.views import generic
from django.views.generic import ListView
def index(request):
"""View function for home page of site."""
# Generate counts of some of the main objects
... | 25.78 | 91 | 0.704422 |
dfd82fcf7dbd301a65e122727823da220adf8ea2 | 3,793 | py | Python | app/models.py | elkwal/One-Minute-Pitch | 4b8df025beb7c8d5d395a8afe2f56f53401d9004 | [
"Unlicense"
] | null | null | null | app/models.py | elkwal/One-Minute-Pitch | 4b8df025beb7c8d5d395a8afe2f56f53401d9004 | [
"Unlicense"
] | null | null | null | app/models.py | elkwal/One-Minute-Pitch | 4b8df025beb7c8d5d395a8afe2f56f53401d9004 | [
"Unlicense"
] | null | null | null |
from . import db
from werkzeug.security import generate_password_hash,check_password_hash
from flask_login import UserMixin
from . import login_manager
from datetime import datetime
@login_manager.user_loader
def load_user(user_id):
return User.query.get(int(user_id))
class User(UserMixin, db.Model):
__tab... | 26.158621 | 74 | 0.657 |
0b4c28dd21d3d4c1bcc033fc1ccfea15934ea8f3 | 14,413 | py | Python | Welcomer 6.0/rockutils.py | TheRockettek/Welcomer | 60706b4d6eec7d4f2500b3acc37530e42d846532 | [
"MIT"
] | 12 | 2019-09-10T21:31:51.000Z | 2022-01-21T14:31:05.000Z | Welcomer 6.0/rockutils.py | TheRockettek/Welcomer | 60706b4d6eec7d4f2500b3acc37530e42d846532 | [
"MIT"
] | null | null | null | Welcomer 6.0/rockutils.py | TheRockettek/Welcomer | 60706b4d6eec7d4f2500b3acc37530e42d846532 | [
"MIT"
] | 1 | 2021-09-17T09:03:54.000Z | 2021-09-17T09:03:54.000Z | import asyncio
import aiohttp
import base64
import discord
import gettext
import os
import re
import math
import string
import time
import random
import unicodedata
import rethinkdb as r
from discord.ext import commands
from urllib.parse import urlparse
from datetime import datetime
if "nt" in os.name:
try:
... | 33.992925 | 168 | 0.544439 |
3e90887b07e76dbff061b069257f72c3719f5510 | 8,102 | py | Python | rdflib/plugins/sparql/parserutils.py | ROZBEH/rdflib | 5b9da927714a92a8888407f42b46249002964e8e | [
"BSD-3-Clause"
] | 1 | 2021-01-29T07:05:22.000Z | 2021-01-29T07:05:22.000Z | rdflib/plugins/sparql/parserutils.py | ROZBEH/rdflib | 5b9da927714a92a8888407f42b46249002964e8e | [
"BSD-3-Clause"
] | 14 | 2021-07-12T19:07:42.000Z | 2022-01-31T19:10:37.000Z | rdflib/plugins/sparql/parserutils.py | ROZBEH/rdflib | 5b9da927714a92a8888407f42b46249002964e8e | [
"BSD-3-Clause"
] | 1 | 2021-11-26T10:04:33.000Z | 2021-11-26T10:04:33.000Z | from types import MethodType
from collections import OrderedDict
from pyparsing import TokenConverter, ParseResults, originalTextFor
from rdflib import BNode, Variable
DEBUG = True
DEBUG = False
if DEBUG:
import traceback
"""
NOTE: PyParsing setResultName/__call__ provides a very similar solution to this
I di... | 27.651877 | 79 | 0.603308 |
8c95dd3d4c7037c5d0adc7221ac9e209f1bd8184 | 2,660 | py | Python | gae/client/auth_helper.py | jlapenna/bikebuds | 6e2b54fa2e4fa03e5ff250ca779c269ccc49a2d8 | [
"Apache-2.0"
] | 9 | 2018-11-17T00:53:47.000Z | 2021-03-16T05:18:01.000Z | gae/client/auth_helper.py | jlapenna/bikebuds | 6e2b54fa2e4fa03e5ff250ca779c269ccc49a2d8 | [
"Apache-2.0"
] | 8 | 2018-11-28T17:19:07.000Z | 2022-02-26T17:46:09.000Z | gae/client/auth_helper.py | jlapenna/bikebuds | 6e2b54fa2e4fa03e5ff250ca779c269ccc49a2d8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright 2019 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 31.666667 | 83 | 0.707519 |
d634869be72900103bd989a5214307001fd27b8c | 2,009 | py | Python | setup.py | mshvartsman/hydra | 65057c36c05187fdadd07db4f4b4e086a22fc030 | [
"MIT"
] | 1 | 2020-09-25T07:12:14.000Z | 2020-09-25T07:12:14.000Z | setup.py | mshvartsman/hydra | 65057c36c05187fdadd07db4f4b4e086a22fc030 | [
"MIT"
] | 7 | 2021-06-28T20:30:25.000Z | 2022-02-27T10:27:47.000Z | setup.py | mshvartsman/hydra | 65057c36c05187fdadd07db4f4b4e086a22fc030 | [
"MIT"
] | 1 | 2020-10-10T21:40:08.000Z | 2020-10-10T21:40:08.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
# type: ignore
import pathlib
import pkg_resources
from setuptools import find_packages, setup
from build_helpers.build_helpers import (
ANTLRCommand,
BuildPyCommand,
CleanCommand,
Develop,
SDistCommand,
find_version,
)
wi... | 33.483333 | 81 | 0.625684 |
8df49e4312cc1fe9502e3c18ba45f03084c93e1a | 39 | py | Python | frontend/infra/provision/route53.py | jim-hill-r/BlueSteel | fa3ac479096679146b99bf5b12792fad25d9d0f1 | [
"MIT"
] | 2 | 2020-04-03T12:19:00.000Z | 2020-04-03T13:32:11.000Z | frontend/infra/provision/route53.py | jim-hill-r/BlueSteel | fa3ac479096679146b99bf5b12792fad25d9d0f1 | [
"MIT"
] | 25 | 2020-04-23T23:17:20.000Z | 2020-05-29T21:00:44.000Z | frontend/infra/provision/route53.py | jim-hill-r/BlueSteel | fa3ac479096679146b99bf5b12792fad25d9d0f1 | [
"MIT"
] | null | null | null | #TODO: Create automation around route53 | 39 | 39 | 0.846154 |
0d1de869f6ef91791a235cfe545b3b3a9b734e72 | 14,300 | py | Python | tensorflow/contrib/model_pruning/examples/cifar10/cifar10_pruning.py | ryorda/tensorflow-viennacl | 054b515feec0a3fca4cfb1f29adbf423c9027c3a | [
"Apache-2.0"
] | 22 | 2018-01-13T14:52:47.000Z | 2018-07-05T01:00:28.000Z | tensorflow/contrib/model_pruning/examples/cifar10/cifar10_pruning.py | ryorda/tensorflow-viennacl | 054b515feec0a3fca4cfb1f29adbf423c9027c3a | [
"Apache-2.0"
] | 3 | 2018-05-09T11:31:58.000Z | 2021-01-27T12:26:21.000Z | tensorflow/contrib/model_pruning/examples/cifar10/cifar10_pruning.py | ryorda/tensorflow-viennacl | 054b515feec0a3fca4cfb1f29adbf423c9027c3a | [
"Apache-2.0"
] | 13 | 2018-02-22T21:04:13.000Z | 2020-11-17T11:38:36.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... | 36.111111 | 81 | 0.691958 |
2c790e60119a2f55cc998a4bb02e21df48e1967f | 778 | py | Python | alien_project/settings.py | yiyidhuang/PythonCrashCrouse2nd | 3512f9ab8fcf32c6145604a37e2a62feddf174d1 | [
"MIT"
] | null | null | null | alien_project/settings.py | yiyidhuang/PythonCrashCrouse2nd | 3512f9ab8fcf32c6145604a37e2a62feddf174d1 | [
"MIT"
] | null | null | null | alien_project/settings.py | yiyidhuang/PythonCrashCrouse2nd | 3512f9ab8fcf32c6145604a37e2a62feddf174d1 | [
"MIT"
] | null | null | null | class Settings:
"""Class that stores all settings in the game alien invasion"""
def __init__(self):
"""Initialize the setting of the game"""
# Set the screen
self.screen_width = 1200
self.screen_height = 800
self.bg_color = (230, 230, 230)
# Setup ship
s... | 28.814815 | 94 | 0.588689 |
04d72465250fbe52ca8383678df3302bd89cceb4 | 546 | py | Python | samples/KleinWebAppSample/templates.py | spotware/cTraderFixPy | d146aabc4306c81a65e9257c1984a5e8120d66c5 | [
"MIT"
] | 15 | 2021-11-22T14:48:05.000Z | 2022-03-29T12:11:48.000Z | samples/KleinWebAppSample/templates.py | azurite-r/cTraderFixPy | 4c7e32ca7fbffbfe5f007f3926f48f7ac8e0fbe4 | [
"MIT"
] | 2 | 2021-11-21T18:31:40.000Z | 2022-03-30T04:54:24.000Z | samples/KleinWebAppSample/templates.py | azurite-r/cTraderFixPy | 4c7e32ca7fbffbfe5f007f3926f48f7ac8e0fbe4 | [
"MIT"
] | 2 | 2021-12-22T19:48:01.000Z | 2022-01-17T00:12:53.000Z | from twisted.web.template import Element, renderer, XMLFile
from twisted.python.filepath import FilePath
class AddAccountsElement(Element):
loader = XMLFile(FilePath('./markup/add_accounts.xml'))
def __init__(self, addAccountLink):
self.addAccountLink = addAccountLink
super().__init__()
@... | 30.333333 | 59 | 0.730769 |
545a5109332538595d79019977ebc32cec3e5e89 | 577 | py | Python | plotly/validators/scatterternary/line/_smoothing.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/scatterternary/line/_smoothing.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/scatterternary/line/_smoothing.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self,
plotly_name='smoothing',
parent_name='scatterternary.line',
**kwargs
):
super(SmoothingValidator, self).__init__(
plotly_name=plo... | 27.47619 | 71 | 0.587522 |
1abffe9afade5d7829a9788a77d9ddeb56e4e52e | 456 | py | Python | nickstagram/posts/urls.py | NickKirilov/Nickstagram | 872025b082b01d8e607e675b8138b9dffa2e2e85 | [
"Unlicense"
] | 1 | 2022-03-19T17:24:54.000Z | 2022-03-19T17:24:54.000Z | nickstagram/posts/urls.py | NickKirilov/Nickstagram | 872025b082b01d8e607e675b8138b9dffa2e2e85 | [
"Unlicense"
] | null | null | null | nickstagram/posts/urls.py | NickKirilov/Nickstagram | 872025b082b01d8e607e675b8138b9dffa2e2e85 | [
"Unlicense"
] | null | null | null | from django.urls import path
from nickstagram.posts.views import CreatePostView, PostDetailsView, EditPostView, DeletePostView
urlpatterns = [
path('create/', CreatePostView.as_view(), name='create post page'),
path('details/<int:pk>/', PostDetailsView.as_view(), name='post details page'),
path('edit/<int:... | 50.666667 | 97 | 0.721491 |
ca21d6e4d020687eef9b77e6b0cb63866a8a27e8 | 3,684 | py | Python | torchelie/nn/adain.py | maxferrari/Torchelie | d133f227bebc3c4cbbb6167bd1fae815d2b5fa81 | [
"MIT"
] | null | null | null | torchelie/nn/adain.py | maxferrari/Torchelie | d133f227bebc3c4cbbb6167bd1fae815d2b5fa81 | [
"MIT"
] | null | null | null | torchelie/nn/adain.py | maxferrari/Torchelie | d133f227bebc3c4cbbb6167bd1fae815d2b5fa81 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torchelie.utils as tu
from typing import Optional
class AdaIN2d(nn.Module):
"""
Adaptive InstanceNormalization from *Arbitrary Style Transfer in Real-time
with Adaptive Instance Normalization* (Huang et al, 2017)
Args:
channels (int): number of input... | 30.7 | 78 | 0.593105 |
14ade0389fada302c1600dd7f85563bea2fc3bdb | 9,527 | py | Python | ghostnet.py | QFaceblue/Driving-Behavior-Recognition | 98c8fab51c7074852598ea9119f472ed7b1bda13 | [
"Apache-2.0"
] | 1 | 2022-03-13T14:37:17.000Z | 2022-03-13T14:37:17.000Z | ghostnet.py | QFaceblue/Driving-Behavior-Recognition | 98c8fab51c7074852598ea9119f472ed7b1bda13 | [
"Apache-2.0"
] | null | null | null | ghostnet.py | QFaceblue/Driving-Behavior-Recognition | 98c8fab51c7074852598ea9119f472ed7b1bda13 | [
"Apache-2.0"
] | null | null | null | # 2020.06.09-Changed for building GhostNet
# Huawei Technologies Co., Ltd. <foss@huawei.com>
"""
Creates a GhostNet Model as defined in:
GhostNet: More Features from Cheap Operations By Kai Han, Yunhe Wang, Qi Tian, Jianyuan Guo, Chunjing Xu, Chang Xu.
https://arxiv.org/abs/1911.11907
Modified from https://g... | 33.545775 | 115 | 0.573528 |
a442cc6fabda9c9574bc83d759619be72bd85f5a | 7,677 | py | Python | tfx/examples/chicago_taxi_pipeline/taxi_pipeline_simple.py | Anon-Artist/tfx | 2692c9ab437d76b5d9517996bfe2596862e0791d | [
"Apache-2.0"
] | 2 | 2021-05-10T21:39:48.000Z | 2021-11-17T11:24:29.000Z | tfx/examples/chicago_taxi_pipeline/taxi_pipeline_simple.py | Anon-Artist/tfx | 2692c9ab437d76b5d9517996bfe2596862e0791d | [
"Apache-2.0"
] | 1 | 2021-01-28T13:44:51.000Z | 2021-04-28T16:15:47.000Z | tfx/examples/chicago_taxi_pipeline/taxi_pipeline_simple.py | Anon-Artist/tfx | 2692c9ab437d76b5d9517996bfe2596862e0791d | [
"Apache-2.0"
] | 1 | 2021-01-28T13:41:51.000Z | 2021-01-28T13:41:51.000Z | # Lint as: python2, python3
# Copyright 2019 Google LLC. 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 req... | 41.497297 | 80 | 0.736225 |
9ae3791e3126427f81b53f648526a53955c24d6e | 20,984 | py | Python | dev/breeze/src/airflow_breeze/commands/production_image_commands.py | MoBagel/airflow | 0905e386f17e34d96f6ee575404c62b13242c75d | [
"Apache-2.0"
] | null | null | null | dev/breeze/src/airflow_breeze/commands/production_image_commands.py | MoBagel/airflow | 0905e386f17e34d96f6ee575404c62b13242c75d | [
"Apache-2.0"
] | null | null | null | dev/breeze/src/airflow_breeze/commands/production_image_commands.py | MoBagel/airflow | 0905e386f17e34d96f6ee575404c62b13242c75d | [
"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 u... | 35.208054 | 110 | 0.657978 |
86f14b68a94753b24dda4d7f4d8d991c6f745a45 | 4,203 | py | Python | saleor/dashboard/product/urls.py | fcopantoja/saleor-ecommerce | d8745de423e1afc7aa60a59dbe05fec43b67ba80 | [
"BSD-3-Clause"
] | null | null | null | saleor/dashboard/product/urls.py | fcopantoja/saleor-ecommerce | d8745de423e1afc7aa60a59dbe05fec43b67ba80 | [
"BSD-3-Clause"
] | 1 | 2022-02-13T22:52:38.000Z | 2022-02-13T22:52:38.000Z | saleor/dashboard/product/urls.py | fcopantoja/saleor-ecommerce | d8745de423e1afc7aa60a59dbe05fec43b67ba80 | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$',
views.product_list, name='product-list'),
url(r'^(?P<pk>[0-9]+)/$',
views.product_details, name='product-details'),
url(r'^(?P<pk>[0-9]+)/publish/$',
views.product_toggle_is_published, name='product-pub... | 46.186813 | 91 | 0.627171 |
ccc2e54600aa7414465ca4249b5db8a63a0948af | 693 | py | Python | pygluu/kubernetes/gui/forms/license.py | WaqasAhmedLatif/cloud-native-edition | 1e6002f27ea971c153df59373e30d4506e9932dc | [
"Apache-2.0"
] | 23 | 2020-04-18T14:51:41.000Z | 2022-03-31T19:59:40.000Z | pygluu/kubernetes/gui/forms/license.py | WaqasAhmedLatif/cloud-native-edition | 1e6002f27ea971c153df59373e30d4506e9932dc | [
"Apache-2.0"
] | 236 | 2020-04-22T08:59:27.000Z | 2022-03-31T07:21:12.000Z | pygluu/kubernetes/gui/forms/license.py | WaqasAhmedLatif/cloud-native-edition | 1e6002f27ea971c153df59373e30d4506e9932dc | [
"Apache-2.0"
] | 23 | 2020-04-19T15:25:59.000Z | 2022-03-16T17:17:36.000Z | """
pygluu.kubernetes.gui.license
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module contains helpers to interact with user's input for gui license form
License terms and conditions for Gluu Cloud Native Edition:
https://www.apache.org/licenses/LICENSE-2.0
"""
from flask_wtf import FlaskForm
from wtforms import BooleanField
f... | 26.653846 | 79 | 0.708514 |
0fb550c2eb372d2375da5aa510687ddf63136aa0 | 1,398 | py | Python | examples/bayes_2afc.py | esc/Psignifit-3.x | 2a2a8a40f39d94f8fee99cb0ba4b9595ae216f88 | [
"MIT"
] | 6 | 2015-07-14T23:38:52.000Z | 2018-10-12T08:15:36.000Z | examples/bayes_2afc.py | esc/Psignifit-3.x | 2a2a8a40f39d94f8fee99cb0ba4b9595ae216f88 | [
"MIT"
] | null | null | null | examples/bayes_2afc.py | esc/Psignifit-3.x | 2a2a8a40f39d94f8fee99cb0ba4b9595ae216f88 | [
"MIT"
] | 5 | 2015-11-25T10:11:04.000Z | 2018-10-12T08:17:48.000Z | #!/usr/bin/env python
# This file illustrates the analysis of 2afc data using bayesian
# inference and markov chain monte carlo sampling.
#
# The analysis is explained in more detail in the "Quick start to psignifit"
# that can be found at http://psignifit.sourceforge.net/TUTORIAL.html
from pypsignifit import *
from ... | 29.744681 | 86 | 0.745351 |
cd4f909ca4723c6d6109be81fb746149d501c1bc | 3,009 | py | Python | migrations/env.py | vissssa/ai_replay | f695a58cdd6cd68d163c575da986b4f2275217de | [
"MIT"
] | null | null | null | migrations/env.py | vissssa/ai_replay | f695a58cdd6cd68d163c575da986b4f2275217de | [
"MIT"
] | null | null | null | migrations/env.py | vissssa/ai_replay | f695a58cdd6cd68d163c575da986b4f2275217de | [
"MIT"
] | null | null | null | from __future__ import with_statement
import logging
from logging.config import fileConfig
from sqlalchemy import engine_from_config
from sqlalchemy import pool
from alembic import context
# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config... | 30.393939 | 77 | 0.708541 |
cf627c83cd5101fc2412aa57e6f8731dc4aa65e8 | 274 | py | Python | stream/elastic/elastic/__init__.py | aakloul/connectors | 171bdc3441b9196ee7aef3f1f9524d8594da6425 | [
"Apache-2.0"
] | null | null | null | stream/elastic/elastic/__init__.py | aakloul/connectors | 171bdc3441b9196ee7aef3f1f9524d8594da6425 | [
"Apache-2.0"
] | null | null | null | stream/elastic/elastic/__init__.py | aakloul/connectors | 171bdc3441b9196ee7aef3f1f9524d8594da6425 | [
"Apache-2.0"
] | null | null | null | import os
__version__ = "5.2.1"
LOGGER_NAME = "elastic"
RE_DATEMATH = (
r"\{(?P<modulo>.*now[^{]*)(?:\{(?P<format>[^|]*)(?:\|(?P<offset>[^}]+))?\})?\}"
)
DM_DEFAULT_FMT = "YYYY.MM.DD"
__DATA_DIR__: str = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data")
| 27.4 | 84 | 0.587591 |
f23a78d1140918a573a2b022ead4b2f0573b83f9 | 4,147 | py | Python | olive/util/config.py | Jsewill/Olive-blockchain | ba0169a56d7e67cefd95dc1f1f60e9a19d5cd2c5 | [
"Apache-2.0"
] | 10 | 2021-08-01T17:15:15.000Z | 2021-09-16T08:04:46.000Z | olive/util/config.py | Jsewill/Olive-blockchain | ba0169a56d7e67cefd95dc1f1f60e9a19d5cd2c5 | [
"Apache-2.0"
] | 8 | 2021-08-06T08:11:13.000Z | 2021-11-03T20:49:37.000Z | olive/util/config.py | Jsewill/Olive-blockchain | ba0169a56d7e67cefd95dc1f1f60e9a19d5cd2c5 | [
"Apache-2.0"
] | 7 | 2021-08-07T06:45:36.000Z | 2022-03-15T08:43:24.000Z | import argparse
import os
import shutil
import sys
from pathlib import Path
from typing import Any, Callable, Dict, Optional, Union
import pkg_resources
import yaml
from olive.util.path import mkdir
def initial_config_file(filename: Union[str, Path]) -> str:
return pkg_resources.resource_string(__name__, f"init... | 32.653543 | 99 | 0.657102 |
2cd788b063e9520a4e0256efcc1dd47544f968a3 | 9,282 | py | Python | Platforms/OnePlus6TPkg/PlatformCI/PlatformBuild.py | longjunyu2/mu_platform_oneplus6t | 1ab93dc8638ea0d316cd7323fd9026c52ae6ad56 | [
"BSD-2-Clause"
] | 2 | 2021-06-25T15:41:14.000Z | 2021-06-30T03:38:54.000Z | Platforms/OnePlus6TPkg/PlatformCI/PlatformBuild.py | longjunyu2/mu_platform_oneplus6t | 1ab93dc8638ea0d316cd7323fd9026c52ae6ad56 | [
"BSD-2-Clause"
] | null | null | null | Platforms/OnePlus6TPkg/PlatformCI/PlatformBuild.py | longjunyu2/mu_platform_oneplus6t | 1ab93dc8638ea0d316cd7323fd9026c52ae6ad56 | [
"BSD-2-Clause"
] | 1 | 2021-09-19T18:35:36.000Z | 2021-09-19T18:35:36.000Z | # @file
# Script to Build Mu OnePlus6T UEFI firmware
#
# Copyright (c) 2021, Junyu Long <ljy122@qq.com>.
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import logging
import io
from edk2toolext.environment import shell_environment
from edk2toolext.environment.uefi_b... | 44.411483 | 154 | 0.625404 |
3db64023c11e59cfae6dd8a5d27325fc3d6836e7 | 430 | py | Python | xTool/utils/threads.py | luciferliu/xTools | 324ef1388be13ece0d952e3929eb685212d573f1 | [
"Apache-2.0"
] | 2 | 2020-09-02T13:46:06.000Z | 2020-10-11T16:11:02.000Z | xTool/utils/threads.py | luciferliu/xTools | 324ef1388be13ece0d952e3929eb685212d573f1 | [
"Apache-2.0"
] | null | null | null | xTool/utils/threads.py | luciferliu/xTools | 324ef1388be13ece0d952e3929eb685212d573f1 | [
"Apache-2.0"
] | 4 | 2018-10-15T07:08:34.000Z | 2019-11-26T01:52:47.000Z | # coding: utf-8
import threading
class defaultlocal(threading.local):
"""
Thread local storage with default values for each field in each thread
>>>
>>> l = defaultlocal( foo=42 )
>>> def f(): print(l.foo)
>>> t = threading.Thread(target=f)
>>> t.start() ; t.join()
42
"""
de... | 20.47619 | 74 | 0.595349 |
577429218ca8534d7ce95dcc7baac8200e53e976 | 5,015 | py | Python | tests/test_tokenizers.py | NC0DER/sumy | ee1bf6d4836c4065f27168ef5cc9137a91836615 | [
"Apache-2.0"
] | null | null | null | tests/test_tokenizers.py | NC0DER/sumy | ee1bf6d4836c4065f27168ef5cc9137a91836615 | [
"Apache-2.0"
] | null | null | null | tests/test_tokenizers.py | NC0DER/sumy | ee1bf6d4836c4065f27168ef5cc9137a91836615 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import sys
import pytest
from sumy.nlp.tokenizers import Tokenizer
def test_missing_language():
with pytest.raises(LookupError):
Tokenizer("klingon")
def test_ensure_czech_tokenizer_available()... | 29.327485 | 130 | 0.615753 |
f5896b51376ca5aae91fca32278582c9dd37a682 | 1,808 | py | Python | test/python/test_yml.py | plandes/grsync | bdedb6f298ba444afe016d9a70f04d4772ff19e1 | [
"MIT"
] | 1 | 2019-06-23T15:34:05.000Z | 2019-06-23T15:34:05.000Z | test/python/test_yml.py | plandes/grsync | bdedb6f298ba444afe016d9a70f04d4772ff19e1 | [
"MIT"
] | null | null | null | test/python/test_yml.py | plandes/grsync | bdedb6f298ba444afe016d9a70f04d4772ff19e1 | [
"MIT"
] | 1 | 2020-09-07T09:20:11.000Z | 2020-09-07T09:20:11.000Z | import unittest
from pathlib import Path
from zensols.config import YamlConfig
from zensols.grsync import AppConfig
class TestConfig(unittest.TestCase):
def test_yaml(self):
correct = {'discover.bootstrap.inst_dir': '${HOME}/grsync',
'discover.bootstrap.python_dir': '${HOME}/opt/lib/pyt... | 47.578947 | 78 | 0.450221 |
3aabb7c5b25e2872c474b85b9cdb8341a330ddf5 | 807 | py | Python | django_project/test_mode/manage.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | 1 | 2018-12-30T14:07:42.000Z | 2018-12-30T14:07:42.000Z | django_project/test_mode/manage.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | django_project/test_mode/manage.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_mode.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that th... | 35.086957 | 77 | 0.643123 |
61d38c67bdb9d150de3ae523416ea5ca60c51801 | 543 | py | Python | utils/set_bot_commands.py | AleksZavg/Admin-telegram-bot | c671419ba9fd5e93df742ebe9443d72afa4c99aa | [
"MIT"
] | null | null | null | utils/set_bot_commands.py | AleksZavg/Admin-telegram-bot | c671419ba9fd5e93df742ebe9443d72afa4c99aa | [
"MIT"
] | null | null | null | utils/set_bot_commands.py | AleksZavg/Admin-telegram-bot | c671419ba9fd5e93df742ebe9443d72afa4c99aa | [
"MIT"
] | null | null | null | from aiogram import types
async def set_default_commands(dp):
await dp.bot.set_my_commands(
[
types.BotCommand("start", "Запустить бота"),
types.BotCommand("admin", "Панель управления администратора"),
types.BotCommand("private", "Доступ к приватным возможностям"),
... | 36.2 | 83 | 0.631676 |
114f2c802089c09ce99502add30eabfb9f350571 | 19,474 | py | Python | modules/QQqt4/mycopymsglist.py | earlybackhome/You-cannot-guess | 8674b9c089321835205c75cbc2b36ca4fd9a5b80 | [
"MIT"
] | 21 | 2017-05-25T09:03:23.000Z | 2021-12-27T13:02:52.000Z | modules/QQqt4/mycopymsglist.py | earlybackhome/You-cannot-guess | 8674b9c089321835205c75cbc2b36ca4fd9a5b80 | [
"MIT"
] | null | null | null | modules/QQqt4/mycopymsglist.py | earlybackhome/You-cannot-guess | 8674b9c089321835205c75cbc2b36ca4fd9a5b80 | [
"MIT"
] | 4 | 2017-06-19T13:50:54.000Z | 2020-12-12T15:51:37.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2016-12-08 10:56:55
# @Author : He Liang (helianghit@foxmail.com)
# @Link : https://github.com/HeLiangHIT
import os, sys, time, re
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from math import *
from exptable import Window
import imghdr
from bestex... | 36.743396 | 135 | 0.620571 |
a570df30920a23f214ce4d73fae8a936216fb3c9 | 9,249 | py | Python | result_one_test_fold_from_test_prediction_da_whole_image.py | ooooverflow/DigestPath2019 | db7b6a0a86bffbe8f44b5d6aa72b4c76e982c0b8 | [
"Apache-2.0"
] | 1 | 2021-04-22T02:38:38.000Z | 2021-04-22T02:38:38.000Z | result_one_test_fold_from_test_prediction_da_whole_image.py | ooooverflow/DigestPath2019 | db7b6a0a86bffbe8f44b5d6aa72b4c76e982c0b8 | [
"Apache-2.0"
] | 1 | 2020-02-18T12:09:10.000Z | 2021-04-24T16:28:53.000Z | result_one_test_fold_from_test_prediction_da_whole_image.py | ooooverflow/DigestPath2019 | db7b6a0a86bffbe8f44b5d6aa72b4c76e982c0b8 | [
"Apache-2.0"
] | null | null | null | from retinanet.dataset import Ring_Cell_all_dataset
import torch
from torch.utils.data import Dataset, DataLoader
import model_all_dataset_weight_loss as model
import os
from tensorboardX import SummaryWriter
import numpy as np
from tqdm import tqdm
import cv2
import shutil
# from lib.nms.pth_nms import pth_n... | 33.51087 | 233 | 0.657476 |
3c6a17279de709eaa7701fa9dfea4b8185075f3b | 4,075 | py | Python | scrape_20180304.py | ScrapeOpen/elezionistorico.interno.gov.it | ab0c627b644eb504baf3acc7732c586d0a6ec45c | [
"MIT"
] | null | null | null | scrape_20180304.py | ScrapeOpen/elezionistorico.interno.gov.it | ab0c627b644eb504baf3acc7732c586d0a6ec45c | [
"MIT"
] | 1 | 2018-06-02T22:04:46.000Z | 2019-02-22T21:49:23.000Z | scrape_20180304.py | ScrapeOpen/elezionistorico.interno.gov.it | ab0c627b644eb504baf3acc7732c586d0a6ec45c | [
"MIT"
] | null | null | null | from selenium import webdriver
from selenium.webdriver.firefox.options import Options
import glob
import os
import re
# Set dirs and paths
download_dir = '/Users/francesco/Downloads' # EDIT THIS
exec_file = '/Users/francesco/Downloads/geckodriver' # EDIT THIS
# Paste `Elezione` + `Data` URL
base_urls = ["http://elez... | 33.401639 | 160 | 0.706012 |
9581f0989b807c6fdd604c730c117440d97482fa | 1,269 | py | Python | tests/test_remove_comments.py | PoWWoP/wiki-dump-reader | a7c195f132753a1f411ba2615410910fbf8c6888 | [
"MIT"
] | 18 | 2019-03-05T13:09:07.000Z | 2022-01-27T20:45:11.000Z | tests/test_remove_comments.py | PoWWoP/wiki-dump-reader | a7c195f132753a1f411ba2615410910fbf8c6888 | [
"MIT"
] | 2 | 2019-03-21T17:59:38.000Z | 2019-09-20T22:16:11.000Z | tests/test_remove_comments.py | PoWWoP/wiki-dump-reader | a7c195f132753a1f411ba2615410910fbf8c6888 | [
"MIT"
] | 5 | 2019-10-06T13:47:33.000Z | 2022-02-25T15:11:04.000Z | import unittest
from wiki_dump_reader import Cleaner
class TestRemoveComments(unittest.TestCase):
def setUp(self):
self.maxDiff = None
self.cleaner = Cleaner()
def test_remove_comments_normal(self):
text = "[[面包]]是德国饮食的重要组成部分。德国出产近600种面包和1,200种糕点和[[圆面包]]。德国[[奶酪]]的生产数量占到全欧" \
... | 52.875 | 114 | 0.627266 |
c69a6da9bb084c6703d0401bfd3982dac873703f | 45,949 | py | Python | django/db/models/fields/__init__.py | egenerat/gae-django | f12379483cf3917ed3cb46ca5ff0b94daf89fc50 | [
"MIT"
] | 3 | 2016-07-08T23:49:32.000Z | 2018-04-15T22:55:01.000Z | django/db/models/fields/__init__.py | egenerat/gae-django | f12379483cf3917ed3cb46ca5ff0b94daf89fc50 | [
"MIT"
] | 27 | 2017-02-05T15:57:04.000Z | 2018-04-15T22:57:26.000Z | django/db/models/fields/__init__.py | egenerat/gae-django | f12379483cf3917ed3cb46ca5ff0b94daf89fc50 | [
"MIT"
] | null | null | null | import datetime
import decimal
import re
import time
import math
from itertools import tee
import django.utils.copycompat as copy
from django.db import connection
from django.db.models.fields.subclassing import LegacyConnection
from django.db.models.query_utils import QueryWrapper
from django.conf import ... | 39.27265 | 167 | 0.615661 |
7e27bf1834f10ea5991650db004e2b807f23ce53 | 13,291 | py | Python | tools/math/svgmath/tables.py | heycam/svgwg | bde951fcca4c7a4c117921219b3fcaa2245aa9a1 | [
"RSA-MD"
] | 1 | 2018-12-15T03:34:53.000Z | 2018-12-15T03:34:53.000Z | tools/math/svgmath/tables.py | heycam/svgwg | bde951fcca4c7a4c117921219b3fcaa2245aa9a1 | [
"RSA-MD"
] | null | null | null | tools/math/svgmath/tables.py | heycam/svgwg | bde951fcca4c7a4c117921219b3fcaa2245aa9a1 | [
"RSA-MD"
] | null | null | null | """Table-related formatting functions.
This module contains functions called from measurers.py to format tables."""
import sys, mathnode
def getByIndexOrLast(lst, idx):
if idx < len(lst): return lst[idx]
else: return lst[-1]
class CellDescriptor:
"""Descriptor of a single cell in a table"""
def __ini... | 41.664577 | 156 | 0.564517 |
04e426c62da194d8fb3e6f92257a5ab48db31355 | 1,136 | py | Python | src3/compute_ars.py | WiktorJ/node2vec | f2b003a4fb394106c4acc0df0e3de8095473dc0a | [
"MIT"
] | null | null | null | src3/compute_ars.py | WiktorJ/node2vec | f2b003a4fb394106c4acc0df0e3de8095473dc0a | [
"MIT"
] | null | null | null | src3/compute_ars.py | WiktorJ/node2vec | f2b003a4fb394106c4acc0df0e3de8095473dc0a | [
"MIT"
] | null | null | null | from sklearn import cluster
from distance import calc_ars, get_gmm_clusters, principal_angle_distance
import click
from plot_utils import get_nx_graph
from utils import get_as_numpy_array, map_embeddings_to_consecutive
@click.command()
@click.option("-e1", "--embeddings_1", type=str, required=True)
@click.option(... | 36.645161 | 91 | 0.732394 |
69a80438a4f25e5333691d431ef2268c9d360201 | 3,677 | py | Python | argo/workflows/client/models/v1alpha1_node_synchronization_status.py | argentumcode/argo-client-python | 31c1519056379d3f046d4b522f37af87243fdbb4 | [
"Apache-2.0"
] | null | null | null | argo/workflows/client/models/v1alpha1_node_synchronization_status.py | argentumcode/argo-client-python | 31c1519056379d3f046d4b522f37af87243fdbb4 | [
"Apache-2.0"
] | null | null | null | argo/workflows/client/models/v1alpha1_node_synchronization_status.py | argentumcode/argo-client-python | 31c1519056379d3f046d4b522f37af87243fdbb4 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Argo Server API
You can get examples of requests and responses by using the CLI with `--gloglevel=9`, e.g. `argo list --gloglevel=9` # noqa: E501
The version of the OpenAPI document: v3.0.4
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
... | 29.894309 | 134 | 0.596954 |
adbccaafa10f602d409545c4b11772171eaf469a | 89 | py | Python | collective/talkflow/__init__.py | upiq/collective.talkflow | 18241b3750c1ceb55cc5b97cdd2cd272823534ce | [
"BSD-4-Clause-UC"
] | null | null | null | collective/talkflow/__init__.py | upiq/collective.talkflow | 18241b3750c1ceb55cc5b97cdd2cd272823534ce | [
"BSD-4-Clause-UC"
] | null | null | null | collective/talkflow/__init__.py | upiq/collective.talkflow | 18241b3750c1ceb55cc5b97cdd2cd272823534ce | [
"BSD-4-Clause-UC"
] | null | null | null | from zope.i18nmessageid import MessageFactory
_ = MessageFactory('collective.talkflow')
| 22.25 | 45 | 0.831461 |
0919c5a5d62f4bd16838619114b70dab2f7074b2 | 10,902 | py | Python | Scheduler+Agent/server.py | erichilarysmithsr/daytona | c5dc829066fb4cfdb5f3271bcbe68f2f4b265c41 | [
"Apache-2.0"
] | 85 | 2017-01-12T20:47:58.000Z | 2018-10-22T18:43:08.000Z | Scheduler+Agent/server.py | YahooArchive/daytona | be9d2cbea047cbbcb7a7c5f9e027dc1443b39a40 | [
"Apache-2.0"
] | 11 | 2017-04-11T01:21:35.000Z | 2018-01-05T18:27:04.000Z | Scheduler+Agent/server.py | YahooArchive/daytona | be9d2cbea047cbbcb7a7c5f9e027dc1443b39a40 | [
"Apache-2.0"
] | 18 | 2017-03-14T06:54:26.000Z | 2018-10-25T19:05:22.000Z | #!/usr/bin/env python
# -*- coding:cp949 -*-
import socket
import SocketServer
import os
import threading
import time
import common
import action
import config
import testobj
from logger import LOG
from action import activeTest
global serverInstance
global actc
class ActionCaller:
async_actions = []
lock =... | 41.930769 | 145 | 0.517336 |
0729a3d028c4f9e9fb45e2d00662d4f5087eb045 | 230 | py | Python | notebook/numpy_count_inf.py | vhn0912/python-snippets | 80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038 | [
"MIT"
] | 174 | 2018-05-30T21:14:50.000Z | 2022-03-25T07:59:37.000Z | notebook/numpy_count_inf.py | vhn0912/python-snippets | 80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038 | [
"MIT"
] | 5 | 2019-08-10T03:22:02.000Z | 2021-07-12T20:31:17.000Z | notebook/numpy_count_inf.py | vhn0912/python-snippets | 80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038 | [
"MIT"
] | 53 | 2018-04-27T05:26:35.000Z | 2022-03-25T07:59:37.000Z | import numpy as np
a_inf = np.array([-np.inf, 0, np.inf])
print(a_inf)
# [-inf 0. inf]
print(np.isinf(a_inf))
# [ True False True]
print(a_inf == np.inf)
# [False False True]
print(a_inf == -np.inf)
# [ True False False]
| 15.333333 | 38 | 0.621739 |
bde33b667b47bf988ea6f574ff0a64b8ee592229 | 3,284 | py | Python | tests/pandas/df_merge_datetime.py | marcinz/legate.pandas | 94c21c436f59c06cfba454c6569e9f5d7109d839 | [
"Apache-2.0"
] | 67 | 2021-04-12T18:06:55.000Z | 2022-03-28T06:51:05.000Z | tests/pandas/df_merge_datetime.py | marcinz/legate.pandas | 94c21c436f59c06cfba454c6569e9f5d7109d839 | [
"Apache-2.0"
] | 2 | 2021-06-22T00:30:36.000Z | 2021-07-01T22:12:43.000Z | tests/pandas/df_merge_datetime.py | marcinz/legate.pandas | 94c21c436f59c06cfba454c6569e9f5d7109d839 | [
"Apache-2.0"
] | 6 | 2021-04-14T21:28:00.000Z | 2022-03-22T09:45:25.000Z | # Copyright 2021 NVIDIA Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 30.407407 | 78 | 0.629415 |
6f94488a0fde48cca550440c116f5403e66da8ae | 812 | py | Python | docassemble_base/docassemble/base/pdfa.py | eeeschwartz/docassemble | d74473de274e94ce754d2ec4bba0ac786fb77293 | [
"MIT"
] | 1 | 2019-01-29T15:45:56.000Z | 2019-01-29T15:45:56.000Z | docassemble_base/docassemble/base/pdfa.py | toolness/docassemble | 8273ae257daa2e318ad58f36829d1c83880b0961 | [
"MIT"
] | 1 | 2019-04-04T11:03:13.000Z | 2019-04-04T11:03:13.000Z | docassemble_base/docassemble/base/pdfa.py | toolness/docassemble | 8273ae257daa2e318ad58f36829d1c83880b0961 | [
"MIT"
] | 2 | 2019-01-26T14:20:35.000Z | 2021-01-15T06:48:26.000Z | import tempfile
import subprocess
import shutil
from docassemble.base.error import DAError
from docassemble.base.logger import logmessage
def pdf_to_pdfa(filename):
logmessage("pdf_to_pdfa: running")
outfile = tempfile.NamedTemporaryFile(suffix=".pdf", delete=False)
directory = tempfile.mkdtemp()
comma... | 42.736842 | 183 | 0.736453 |
3e84d7bce80223431d2bb90cf6654c4bf2c215fe | 27,803 | py | Python | contrib/runners/orquesta_runner/tests/unit/test_inquiries.py | kkkanil/st2 | 07cd195d7a6e177a37dd019e5c9ab8329259d0fa | [
"Apache-2.0"
] | null | null | null | contrib/runners/orquesta_runner/tests/unit/test_inquiries.py | kkkanil/st2 | 07cd195d7a6e177a37dd019e5c9ab8329259d0fa | [
"Apache-2.0"
] | 15 | 2021-02-11T22:58:54.000Z | 2021-08-06T18:03:47.000Z | contrib/runners/orquesta_runner/tests/unit/test_inquiries.py | kkkanil/st2 | 07cd195d7a6e177a37dd019e5c9ab8329259d0fa | [
"Apache-2.0"
] | 1 | 2021-07-10T15:02:29.000Z | 2021-07-10T15:02:29.000Z | # Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | 57.563147 | 99 | 0.752365 |
3d444d0b24113aa65f25436dcead76ced37094ea | 3,398 | py | Python | tenkit/lib/python/tenkit/vcf_utils.py | qiangli/cellranger | 046e24c3275cfbd4516a6ebc064594513a5c45b7 | [
"MIT"
] | 1 | 2019-03-29T04:05:58.000Z | 2019-03-29T04:05:58.000Z | tenkit/lib/python/tenkit/vcf_utils.py | qiangli/cellranger | 046e24c3275cfbd4516a6ebc064594513a5c45b7 | [
"MIT"
] | null | null | null | tenkit/lib/python/tenkit/vcf_utils.py | qiangli/cellranger | 046e24c3275cfbd4516a6ebc064594513a5c45b7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2014 10X Genomics, Inc. All rights reserved.
#
import log_subprocess
import json
import tenkit.bam as tk_bam
from tenkit.constants import FASTA_LOCATION
def count_vars_vcf(vcf_path):
""" Counts the number of variants in a VCF file.
"""
in_file = open(vcf_path)
n... | 36.148936 | 114 | 0.668334 |
40600155417903532818ad3879313e3e5270a205 | 26,045 | py | Python | builds/runtimes/python-2.7.6/lib/python2.7/test/test_ftplib.py | Orange-OpenSource/php-buildpack | d9a9864192d3ac3906daa9386fee952bfe8a80f3 | [
"MIT"
] | 2 | 2015-07-06T17:17:00.000Z | 2016-05-05T18:35:40.000Z | builds/runtimes/python-2.7.6/lib/python2.7/test/test_ftplib.py | Orange-OpenSource/php-buildpack | d9a9864192d3ac3906daa9386fee952bfe8a80f3 | [
"MIT"
] | 1 | 2018-06-28T16:16:37.000Z | 2018-06-28T16:16:37.000Z | builds/runtimes/python-2.7.6/lib/python2.7/test/test_ftplib.py | Orange-OpenSource/php-buildpack | d9a9864192d3ac3906daa9386fee952bfe8a80f3 | [
"MIT"
] | 9 | 2015-03-13T18:27:27.000Z | 2018-12-03T15:38:51.000Z | """Test script for ftplib module."""
# Modified by Giampaolo Rodola' to test FTP class, IPv6 and TLS
# environment
import ftplib
import asyncore
import asynchat
import socket
import StringIO
import errno
import os
try:
import ssl
except ImportError:
ssl = None
from unittest import TestCase
from test import t... | 32.273854 | 85 | 0.59355 |
a2ce5d1362d3520f793c776dff7df34fe3e727d9 | 202 | py | Python | django_two/django_two/settings/production.py | itsnamgyu/django-two | 02e61dc20750d6bb000b58b62c1cd0a120a5a15d | [
"MIT"
] | 6 | 2018-01-19T13:20:12.000Z | 2019-02-02T12:44:41.000Z | django_two/django_two/settings/production.py | itsnamgyu/django-two | 02e61dc20750d6bb000b58b62c1cd0a120a5a15d | [
"MIT"
] | 14 | 2018-01-19T13:12:47.000Z | 2018-02-15T07:55:46.000Z | django_two/django_two/settings/production.py | itsnamgyu/django-two | 02e61dc20750d6bb000b58b62c1cd0a120a5a15d | [
"MIT"
] | null | null | null | STATIC_ROOT = '/var/www/django-two/static/'
DEBUG = False
ALLOWED_HOSTS = [
"ec2-13-125-167-5.ap-northeast-2.compute.amazonaws.com"
]
print("Loaded settings for deployment using Apache and WSGI")
| 22.444444 | 61 | 0.732673 |
8c689bcd895255d8e0f32372f942f8f73618cbb2 | 15,311 | py | Python | demo_app/app/models.py | guocdfeifei/xadmin | 2413da625582a53e5453c08cabd1f07d3f48639e | [
"BSD-3-Clause"
] | null | null | null | demo_app/app/models.py | guocdfeifei/xadmin | 2413da625582a53e5453c08cabd1f07d3f48639e | [
"BSD-3-Clause"
] | null | null | null | demo_app/app/models.py | guocdfeifei/xadmin | 2413da625582a53e5453c08cabd1f07d3f48639e | [
"BSD-3-Clause"
] | 2 | 2018-12-07T03:01:44.000Z | 2020-08-25T08:49:10.000Z | from django.db import models
# from viewflow.models import Process
from django.contrib.auth.models import Group
from django.conf import settings
from django.utils.encoding import python_2_unicode_compatible
import sys
default_encoding = 'utf-8'
if sys.getdefaultencoding() != default_encoding:
reload(sys)
sys.se... | 38.087065 | 147 | 0.694141 |
7c92b325d5836f25e2791e663ceff9805ec905ae | 549 | py | Python | Labs/Term3/Lesson 3 - 16/python/CarND-GNB classifier-Driver Behaviours/prediction.py | mlandry1/CarND | bfa8a1af634017cc35eedff8974d299a58006554 | [
"MIT"
] | 1 | 2018-05-13T08:43:59.000Z | 2018-05-13T08:43:59.000Z | Labs/Term3/Lesson 3 - 16/python/CarND-GNB classifier-Driver Behaviours/prediction.py | mlandry1/CarND | bfa8a1af634017cc35eedff8974d299a58006554 | [
"MIT"
] | null | null | null | Labs/Term3/Lesson 3 - 16/python/CarND-GNB classifier-Driver Behaviours/prediction.py | mlandry1/CarND | bfa8a1af634017cc35eedff8974d299a58006554 | [
"MIT"
] | 3 | 2018-05-13T08:44:05.000Z | 2021-01-12T08:04:16.000Z | #!/usr/bin/env python
from classifier_solution import GNB
import json
def main():
gnb = GNB()
j = json.loads(open('train.json').read())
print(j.keys())
X = j['states']
Y = j['labels']
gnb.train(X, Y)
j = json.loads(open('test.json').read())
X = j['states']
Y = j['labels']
score = 0
for coords, label in ... | 18.931034 | 67 | 0.639344 |
2cd927ebd14e72fb4f8c4666833681f6402753a1 | 1,641 | py | Python | examples/undocumented/python/transfer_multitask_clustered_logistic_regression.py | gf712/shogun | ca2afb8f092288455701539aa58952dbf6743378 | [
"BSD-3-Clause"
] | 1 | 2020-05-12T10:37:30.000Z | 2020-05-12T10:37:30.000Z | examples/undocumented/python/transfer_multitask_clustered_logistic_regression.py | gf712/shogun | ca2afb8f092288455701539aa58952dbf6743378 | [
"BSD-3-Clause"
] | null | null | null | examples/undocumented/python/transfer_multitask_clustered_logistic_regression.py | gf712/shogun | ca2afb8f092288455701539aa58952dbf6743378 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from numpy import array,hstack,sin,cos
from numpy.random import seed, rand
from tools.load import LoadMatrix
lm=LoadMatrix()
traindat = lm.load_numbers('../data/fm_train_real.dat')
testdat = lm.load_numbers('../data/fm_test_real.dat')
label_traindat = lm.load_labels('../data/label_train_twoclass.... | 34.1875 | 116 | 0.800122 |
daac62d7f2d39941d2277bd4e0dd7ac3234b58b7 | 331 | py | Python | Geolocation/geolocation.py | SaidRem/weather_API | 9ce43ac58ca530c101c7f98a0ecc67f597be9f0d | [
"MIT"
] | null | null | null | Geolocation/geolocation.py | SaidRem/weather_API | 9ce43ac58ca530c101c7f98a0ecc67f597be9f0d | [
"MIT"
] | null | null | null | Geolocation/geolocation.py | SaidRem/weather_API | 9ce43ac58ca530c101c7f98a0ecc67f597be9f0d | [
"MIT"
] | null | null | null | import requests
from pprint import pprint
def geoloc():
r = requests.get("http://freegeoip.app/json/").json()
return r
def coordinates():
r = geoloc()
return dict(latitude=r["latitude"], longitude=r["longitude"])
if __name__ == "__main__":
pprint(geoloc())
print(f'Your coordinates:\n{coordi... | 19.470588 | 65 | 0.65861 |
9ecd4503c9ee4738d828647f1aa2e88966f4840c | 11,549 | py | Python | google/ads/googleads/v6/services/services/custom_interest_service/transports/grpc.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v6/services/services/custom_interest_service/transports/grpc.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v6/services/services/custom_interest_service/transports/grpc.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 41.693141 | 104 | 0.628539 |
749286c25d4fff2a13aabc4d270b3c650766d68a | 690 | py | Python | ebl/dictionary/web/words.py | ElectronicBabylonianLiterature/dictionary | 5977a57314cf57f94f75cd12520f178b1d6a6555 | [
"MIT"
] | 4 | 2020-04-12T14:24:51.000Z | 2020-10-15T15:48:15.000Z | ebl/dictionary/web/words.py | ElectronicBabylonianLiterature/dictionary | 5977a57314cf57f94f75cd12520f178b1d6a6555 | [
"MIT"
] | 200 | 2019-12-04T09:53:20.000Z | 2022-03-30T20:11:31.000Z | ebl/dictionary/web/words.py | ElectronicBabylonianLiterature/dictionary | 5977a57314cf57f94f75cd12520f178b1d6a6555 | [
"MIT"
] | 1 | 2021-09-06T16:22:39.000Z | 2021-09-06T16:22:39.000Z | import falcon
from ebl.dictionary.application.word_schema import WordSchema
from ebl.marshmallowschema import validate
from ebl.users.web.require_scope import require_scope
class WordsResource:
def __init__(self, dictionary):
self._dictionary = dictionary
@falcon.before(require_scope, "read:words")
... | 31.363636 | 61 | 0.721739 |
1b9ef55734dca4d43ff1786870ea09eaec860fe0 | 14,465 | py | Python | python/ccxt/__init__.py | MoreChickenDelivered/ccxt | a8996798d08a1cedc30bfb3db72d14bc8919930f | [
"MIT"
] | null | null | null | python/ccxt/__init__.py | MoreChickenDelivered/ccxt | a8996798d08a1cedc30bfb3db72d14bc8919930f | [
"MIT"
] | null | null | null | python/ccxt/__init__.py | MoreChickenDelivered/ccxt | a8996798d08a1cedc30bfb3db72d14bc8919930f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""CCXT: CryptoCurrency eXchange Trading Library"""
# MIT License
# Copyright (c) 2017 Igor Kroitor
# 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 restricti... | 45.344828 | 80 | 0.529623 |
aec100dc4b23fc25fcd53f10cf96523e6efce923 | 3,292 | py | Python | caffe2/python/modeling/compute_histogram_for_blobs_test.py | shigengtian/caffe2 | e19489d6acd17fea8ca98cd8e4b5b680e23a93c5 | [
"Apache-2.0"
] | 1 | 2018-03-26T13:25:03.000Z | 2018-03-26T13:25:03.000Z | caffe2/python/modeling/compute_histogram_for_blobs_test.py | shigengtian/caffe2 | e19489d6acd17fea8ca98cd8e4b5b680e23a93c5 | [
"Apache-2.0"
] | null | null | null | caffe2/python/modeling/compute_histogram_for_blobs_test.py | shigengtian/caffe2 | e19489d6acd17fea8ca98cd8e4b5b680e23a93c5 | [
"Apache-2.0"
] | 1 | 2018-12-20T09:14:48.000Z | 2018-12-20T09:14:48.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import unittest
from caffe2.python import workspace, brew, model_helper
from caffe2.python.modeling.compute_histogram_for_blobs import (
ComputeHistogramForBlobs
)
i... | 40.641975 | 86 | 0.582625 |
123e54aa36a52e7895cb5f2875e25a785c5c8373 | 7,268 | py | Python | utils/metrics.py | aimagelab/MCMR | eb3556bffebc734c19e7f3e39dcf018ba28c63b3 | [
"MIT"
] | 11 | 2021-10-11T12:48:47.000Z | 2022-03-01T02:00:00.000Z | utils/metrics.py | aimagelab/MCMR | eb3556bffebc734c19e7f3e39dcf018ba28c63b3 | [
"MIT"
] | 1 | 2022-01-19T00:47:58.000Z | 2022-01-23T14:52:45.000Z | utils/metrics.py | aimagelab/MCMR | eb3556bffebc734c19e7f3e39dcf018ba28c63b3 | [
"MIT"
] | 1 | 2022-02-08T14:53:54.000Z | 2022-02-08T14:53:54.000Z | from math import exp
import numpy as np
import torch
import torch.nn.functional as F
from scipy import linalg
from torch.autograd import Variable
def gaussian(window_size, sigma):
gauss = torch.Tensor([exp(-(x - window_size // 2) ** 2 / float(2 * sigma ** 2)) for x in range(window_size)])
return gauss / gaus... | 34.283019 | 114 | 0.647771 |
ce7c0ca1962445b9d8a3deba6c033d8f15e46807 | 6,584 | py | Python | Phylogeny Scripts/Genbanker.py | chibbargroup/CentralRepository | 0f152cdc207565656e8f6f10622517c5422f18f6 | [
"MIT"
] | null | null | null | Phylogeny Scripts/Genbanker.py | chibbargroup/CentralRepository | 0f152cdc207565656e8f6f10622517c5422f18f6 | [
"MIT"
] | null | null | null | Phylogeny Scripts/Genbanker.py | chibbargroup/CentralRepository | 0f152cdc207565656e8f6f10622517c5422f18f6 | [
"MIT"
] | null | null | null | '''
Genbanker.py
Written by J. Hayes, last edit 1/10/17
Purpose: Reads through lists of accession numbers generated through similarity comparisons,
blast searches, and general NCBI searches and fetches the corresponding Genbank file
Input: Blast search (.csv; file must have 'blast' or 'Blast' in the file name)
Ac... | 41.408805 | 121 | 0.744532 |
3aecc73480c3f0cbc49bb7e74cde901c47e48b1d | 164 | py | Python | NetLSD/netlsd/__init__.py | Abdumaleek/infinity-mirror | b493c5602d9e4bcf374b748e9b80e7c85be54a88 | [
"MIT"
] | 49 | 2018-06-05T08:20:41.000Z | 2022-02-25T11:06:04.000Z | NetLSD/netlsd/__init__.py | Abdumaleek/infinity-mirror | b493c5602d9e4bcf374b748e9b80e7c85be54a88 | [
"MIT"
] | 2 | 2021-11-10T19:47:00.000Z | 2022-02-10T01:24:59.000Z | NetLSD/netlsd/__init__.py | Abdumaleek/infinity-mirror | b493c5602d9e4bcf374b748e9b80e7c85be54a88 | [
"MIT"
] | 4 | 2019-02-12T16:26:48.000Z | 2019-11-21T00:26:44.000Z | # -*- coding: utf-8 -*-
__author__ = 'Anton Tsitsulin'
__email__ = 'anton.tsitsulin@hpi.de'
__version__ = '0.0.1'
from .kernels import heat, wave, netlsd, compare | 23.428571 | 48 | 0.695122 |
4e9edeb8cfe54326f8431f051b52f19911496292 | 18,775 | bzl | Python | bazel/repository_locations.bzl | toliu/pixie | 2547cf9ccfece6079323194110cf92d1371a28be | [
"Apache-2.0"
] | null | null | null | bazel/repository_locations.bzl | toliu/pixie | 2547cf9ccfece6079323194110cf92d1371a28be | [
"Apache-2.0"
] | null | null | null | bazel/repository_locations.bzl | toliu/pixie | 2547cf9ccfece6079323194110cf92d1371a28be | [
"Apache-2.0"
] | null | null | null | # Copyright 2018- The Pixie Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 54.106628 | 132 | 0.717603 |
65a465cfec24f498e82ffbfa0ca0cb46e648c2f6 | 467 | py | Python | src/sentry/web/frontend/debug/debug_note_email.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | 1 | 2019-10-17T17:46:16.000Z | 2019-10-17T17:46:16.000Z | src/sentry/web/frontend/debug/debug_note_email.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/web/frontend/debug/debug_note_email.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from sentry.models import Activity
from .mail import ActivityMailDebugView, get_random, make_message
class DebugNoteEmailView(ActivityMailDebugView):
def get_activity(self, request, event):
random = get_random(request)
return {
"type": Activity.... | 29.1875 | 96 | 0.672377 |
f7cc26e803be8a25bf0c6da550b983ec00c7ca18 | 1,395 | py | Python | serpent/analytics_client.py | nanpuhaha/SerpentAI | 6af1105fc0a970227a0d7c11e6a0da1bd0bacec6 | [
"MIT"
] | 6,762 | 2017-09-17T20:28:40.000Z | 2022-03-31T12:35:47.000Z | serpent/analytics_client.py | nanpuhaha/SerpentAI | 6af1105fc0a970227a0d7c11e6a0da1bd0bacec6 | [
"MIT"
] | 159 | 2017-09-19T21:54:58.000Z | 2021-03-26T18:15:58.000Z | serpent/analytics_client.py | nanpuhaha/SerpentAI | 6af1105fc0a970227a0d7c11e6a0da1bd0bacec6 | [
"MIT"
] | 880 | 2017-09-23T01:16:50.000Z | 2022-03-27T18:58:30.000Z | from redis import StrictRedis
from datetime import datetime
from pprint import pprint
from serpent.config import config
import json
class AnalyticsClientError(BaseException):
pass
class AnalyticsClient:
def __init__(self, project_key=None):
if project_key is None:
raise AnalyticsClien... | 29.680851 | 99 | 0.637993 |
7e4c7eaf745a4d9438664d046efbb37a85962a0d | 7,697 | py | Python | codetest/_codetest.py | anuragpatil94/codetest | 03768957f98fb9fb4bc5a19a3c0c875e3c33e0f6 | [
"MIT"
] | null | null | null | codetest/_codetest.py | anuragpatil94/codetest | 03768957f98fb9fb4bc5a19a3c0c875e3c33e0f6 | [
"MIT"
] | null | null | null | codetest/_codetest.py | anuragpatil94/codetest | 03768957f98fb9fb4bc5a19a3c0c875e3c33e0f6 | [
"MIT"
] | 1 | 2021-12-07T01:29:32.000Z | 2021-12-07T01:29:32.000Z | from timeit import default_timer as timer
if __package__:
from ._utils import _LinkedList, _BinaryTree, _ListNode, _BinaryTreeNode
else:
from _utils import _LinkedList, _BinaryTree, _ListNode, _BinaryTreeNode
####################################################
# I/O OBJECT
###############... | 31.03629 | 96 | 0.516825 |
9eb65b71624210fafca63027ff073335b56d0cdf | 15,231 | py | Python | src/read_data.py | BII-wushuang/Lie-Group-Motion-Prediction | 2ce6ca6d798de99d1d0777c418cdc79596a4471d | [
"MIT"
] | 79 | 2019-07-05T04:16:04.000Z | 2022-02-24T06:07:09.000Z | src/read_data.py | BII-wushuang/Lie-Group-Motion-Prediction | 2ce6ca6d798de99d1d0777c418cdc79596a4471d | [
"MIT"
] | 8 | 2019-07-30T08:59:30.000Z | 2022-02-28T08:55:39.000Z | src/read_data.py | BII-wushuang/Lie-Group-Motion-Prediction | 2ce6ca6d798de99d1d0777c418cdc79596a4471d | [
"MIT"
] | 19 | 2019-07-11T12:18:30.000Z | 2022-01-13T13:53:28.000Z | import numpy as np
import tensorflow as tf
import scipy.io as sio
import general_utils as data_utils
import copy
def read_data(config, training=False):
if config.dataset == 'Human':
train_set, test_set, x_test, y_test, dec_in_test, config = read_human(config, training)
elif config.dataset == 'Mouse':
... | 39.053846 | 177 | 0.614077 |
c2ab68ba5978aeb9f024a292527c58f092284131 | 4,928 | py | Python | setup.py | chaowentao/mmpose | b528c60ef4fab56d35d1ed7e187023794639be26 | [
"Apache-2.0"
] | 367 | 2022-01-14T03:32:25.000Z | 2022-03-31T04:48:20.000Z | setup.py | chaowentao/mmpose | b528c60ef4fab56d35d1ed7e187023794639be26 | [
"Apache-2.0"
] | 27 | 2022-01-27T07:12:49.000Z | 2022-03-31T04:31:13.000Z | setup.py | chaowentao/mmpose | b528c60ef4fab56d35d1ed7e187023794639be26 | [
"Apache-2.0"
] | 53 | 2022-01-18T11:21:43.000Z | 2022-03-31T06:42:41.000Z | from setuptools import find_packages, setup
def readme():
with open('README.md', encoding='utf-8') as f:
content = f.read()
return content
version_file = 'mmpose/version.py'
def get_version():
with open(version_file, 'r') as f:
exec(compile(f.read(), version_file, 'exec'))
import s... | 37.052632 | 125 | 0.550528 |
8f38ab4df308814bf78bdf78a7729c10193bbd98 | 56 | py | Python | shand/__init__.py | ryneches/Shand | ec7f8c914d7099b96e755c75b5313cbae1cab3c5 | [
"BSD-3-Clause"
] | null | null | null | shand/__init__.py | ryneches/Shand | ec7f8c914d7099b96e755c75b5313cbae1cab3c5 | [
"BSD-3-Clause"
] | 2 | 2016-02-17T03:16:00.000Z | 2016-02-17T03:16:42.000Z | shand/__init__.py | ryneches/Shand | ec7f8c914d7099b96e755c75b5313cbae1cab3c5 | [
"BSD-3-Clause"
] | null | null | null | from shand import Problem
import stats
import quicktree
| 14 | 25 | 0.857143 |
462dd5be854bf4ff79dc7b002e2cb8a7e7c35a9c | 781 | py | Python | app/Alumno/models.py | diexmoh/professionalnotes | 87fcda7c142ce65ef4e7acacc6a0bad1e1bd98d0 | [
"MIT"
] | null | null | null | app/Alumno/models.py | diexmoh/professionalnotes | 87fcda7c142ce65ef4e7acacc6a0bad1e1bd98d0 | [
"MIT"
] | null | null | null | app/Alumno/models.py | diexmoh/professionalnotes | 87fcda7c142ce65ef4e7acacc6a0bad1e1bd98d0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import smart_str, smart_unicode
# Create your models here.
class Alumno(models.Model):
idAlumno = models.PositiveSmallIntegerField(primary_key = True, null = False, blank = False,)
nombre =... | 41.105263 | 97 | 0.722151 |
260dcd8eaa6d5b412aeca338fe48a9f1aac17877 | 104 | py | Python | device_manager/serializers/device_encoder.py | VladX09/clickpecker-device-manager | 5636dd990ab0ddb359255998536ecd390394799f | [
"MIT"
] | null | null | null | device_manager/serializers/device_encoder.py | VladX09/clickpecker-device-manager | 5636dd990ab0ddb359255998536ecd390394799f | [
"MIT"
] | null | null | null | device_manager/serializers/device_encoder.py | VladX09/clickpecker-device-manager | 5636dd990ab0ddb359255998536ecd390394799f | [
"MIT"
] | null | null | null | import json
class DeviceEncoder(json.JSONEncoder):
def default(self,o):
return o.to_dict()
| 17.333333 | 38 | 0.692308 |
0265178effa190f526b1f966acbb97d98520d266 | 5,434 | py | Python | tests/test_app_routers_accounts_POST.py | BoostryJP/ibet-Prime | 924e7f8da4f8feea0a572e8b5532e09bcdf2dc99 | [
"Apache-2.0"
] | 2 | 2021-08-19T12:35:25.000Z | 2022-02-16T04:13:38.000Z | tests/test_app_routers_accounts_POST.py | BoostryJP/ibet-Prime | 924e7f8da4f8feea0a572e8b5532e09bcdf2dc99 | [
"Apache-2.0"
] | 46 | 2021-09-02T03:22:05.000Z | 2022-03-31T09:20:00.000Z | tests/test_app_routers_accounts_POST.py | BoostryJP/ibet-Prime | 924e7f8da4f8feea0a572e8b5532e09bcdf2dc99 | [
"Apache-2.0"
] | 1 | 2021-11-17T23:18:27.000Z | 2021-11-17T23:18:27.000Z | """
Copyright BOOSTRY Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distr... | 33.337423 | 132 | 0.589253 |
507cce4f26b31c772fa520a3715f5aaca505b118 | 1,137 | py | Python | tests/test_audio_server.py | rotdrop/rhasspy-hermes | ab822ad954da6da90368b65d72ed7e53694f085f | [
"MIT"
] | 1 | 2020-07-11T19:25:32.000Z | 2020-07-11T19:25:32.000Z | tests/test_audio_server.py | rotdrop/rhasspy-hermes | ab822ad954da6da90368b65d72ed7e53694f085f | [
"MIT"
] | 15 | 2019-12-31T13:19:25.000Z | 2022-01-17T17:40:13.000Z | tests/test_audio_server.py | rotdrop/rhasspy-hermes | ab822ad954da6da90368b65d72ed7e53694f085f | [
"MIT"
] | 8 | 2019-12-31T10:40:53.000Z | 2020-12-04T18:48:08.000Z | """Tests for rhasspyhermes.audioserver"""
from rhasspyhermes.audioserver import AudioFrame, AudioPlayBytes, AudioPlayFinished
site_id = "testSiteId"
request_id = "testRequestId"
def test_audio_frame():
"""Test AudioFrame."""
assert AudioFrame.is_topic(AudioFrame.topic(site_id=site_id))
assert AudioFrame.... | 28.425 | 83 | 0.702726 |
6286acf23701f037558a7c25571efe6337246ec8 | 401 | py | Python | TIPE/rename images/sanstitre0.py | clementlagneau/TIPE-2018 | 5f6570377da8e18463d774a5872096991c9126fb | [
"MIT"
] | null | null | null | TIPE/rename images/sanstitre0.py | clementlagneau/TIPE-2018 | 5f6570377da8e18463d774a5872096991c9126fb | [
"MIT"
] | null | null | null | TIPE/rename images/sanstitre0.py | clementlagneau/TIPE-2018 | 5f6570377da8e18463d774a5872096991c9126fb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Jun 18 10:50:21 2018
@author: Clement LAGNEAU
"""
indice = 0
import os
monRepertoire='D:/Cours/MP/TIPE/Banque_image/ville'
os.chdir(monRepertoire)
fichiers = [f for f in os.listdir(monRepertoire) if os.path.isfile(os.path.join(monRepertoire, f))]
for x in fichier... | 25.0625 | 100 | 0.670823 |
3a373e54a35dbc5c8b9e75b6cdf03ac5bebafefa | 56,247 | py | Python | costar_dataset/hypertree_pose_metrics_tf.py | priyankahubli/costar_dataset | 559ffb16e758817f40abd07c26a573eeb8db3e97 | [
"Apache-2.0"
] | 1 | 2018-12-03T05:39:59.000Z | 2018-12-03T05:39:59.000Z | costar_dataset/hypertree_pose_metrics_tf.py | priyankahubli/costar_dataset | 559ffb16e758817f40abd07c26a573eeb8db3e97 | [
"Apache-2.0"
] | 5 | 2018-11-15T22:51:48.000Z | 2019-07-12T19:57:37.000Z | costar_dataset/hypertree_pose_metrics_tf.py | priyankahubli/costar_dataset | 559ffb16e758817f40abd07c26a573eeb8db3e97 | [
"Apache-2.0"
] | 4 | 2018-11-13T16:05:49.000Z | 2021-01-18T21:00:25.000Z |
import os
import copy
import math
import numpy as np
from tqdm import tqdm
import keras
import tensorflow as tf
from tensorflow.python.platform import flags
from shapely.geometry import Polygon
from pyquaternion import Quaternion
import sklearn
import costar_dataset.hypertree_utilities
# class Vector:
# # http:... | 41.146306 | 129 | 0.688446 |
db4a1fbfe14e0c4ace931edc0107c35d48b3002f | 4,390 | py | Python | pytools/codegen.py | alexfikl/pytools | 8ac46ed6564f8ef0dbf0306e348099ada8c9230a | [
"MIT"
] | null | null | null | pytools/codegen.py | alexfikl/pytools | 8ac46ed6564f8ef0dbf0306e348099ada8c9230a | [
"MIT"
] | null | null | null | pytools/codegen.py | alexfikl/pytools | 8ac46ed6564f8ef0dbf0306e348099ada8c9230a | [
"MIT"
] | null | null | null | __copyright__ = "Copyright (C) 2009-2013 Andreas Kloeckner"
__license__ = """
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, c... | 29.863946 | 80 | 0.650114 |
d583b0d3707d7f93c0abb7fb1d9175211e28781d | 5,938 | py | Python | lambda/py/app.py | Leopold-007/Google-Alexa-Smart_home_Skill | f48cf8760b82b3412220fe9a4d5994b4b415340f | [
"Apache-2.0"
] | 9 | 2018-11-24T18:08:26.000Z | 2021-03-18T18:51:10.000Z | lambda/py/app.py | Leopold-007/Google-Alexa-Smart_home_Skill | f48cf8760b82b3412220fe9a4d5994b4b415340f | [
"Apache-2.0"
] | 2 | 2018-11-28T17:14:26.000Z | 2019-06-06T21:19:02.000Z | lambda/py/app.py | Leopold-007/Google-Alexa-Smart_home_Skill | f48cf8760b82b3412220fe9a4d5994b4b415340f | [
"Apache-2.0"
] | 3 | 2018-11-28T17:11:29.000Z | 2022-01-30T20:11:40.000Z | # -*- coding: utf-8 -*-
# Copyright 2018 Francesco Circhetta
#
# 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 applicab... | 39.065789 | 108 | 0.743516 |
2834c8f56de53380f17ddfd8db783058834ad664 | 719 | py | Python | contrib/meta_converter.py | sungwoncho/tru | d4013b6c604fe688dd3f8afb8e18cbbffa4112de | [
"Apache-2.0"
] | 2 | 2020-08-09T08:38:00.000Z | 2020-08-17T07:03:52.000Z | contrib/meta_converter.py | sungwoncho/tru | d4013b6c604fe688dd3f8afb8e18cbbffa4112de | [
"Apache-2.0"
] | null | null | null | contrib/meta_converter.py | sungwoncho/tru | d4013b6c604fe688dd3f8afb8e18cbbffa4112de | [
"Apache-2.0"
] | null | null | null | import os
import sys
code = {
"<": "60",
">": "62",
"(": "40",
")": "41",
"[": "91",
"]": "93",
}
cur = ""
if __name__ == '__main__':
abspath = os.path.abspath(sys.argv[1])
with open(abspath) as src:
content = src.read()
out = []
for ... | 18.435897 | 52 | 0.350487 |
553ed6aa90cf56c57f50e52c7d368ff382f3db19 | 1,103 | py | Python | tests/test_reaction.py | ModelEngineering/Kinetics-Validator | 9350da492fd9c1482b50332f386632e6db0e7ed2 | [
"MIT"
] | null | null | null | tests/test_reaction.py | ModelEngineering/Kinetics-Validator | 9350da492fd9c1482b50332f386632e6db0e7ed2 | [
"MIT"
] | null | null | null | tests/test_reaction.py | ModelEngineering/Kinetics-Validator | 9350da492fd9c1482b50332f386632e6db0e7ed2 | [
"MIT"
] | null | null | null | """
Tests for Reactions
"""
from SBMLKinetics.common import constants as cn
from SBMLKinetics.common.simple_sbml import SimpleSBML
from SBMLKinetics.common.reaction import Reaction
from tests.common import helpers
import copy
import libsbml
import numpy as np
import unittest
IGNORE_TEST = True
IS_PLOT = True
#####... | 22.06 | 54 | 0.668178 |
ba924e36b5e70b7b75a253d7b0058b00c7fcdcd6 | 1,979 | py | Python | mars/tensor/special/hypergeometric_funcs.py | Alfa-Shashank/mars | a75499185d0e533dd532a34515adefb3065f33cc | [
"Apache-2.0"
] | null | null | null | mars/tensor/special/hypergeometric_funcs.py | Alfa-Shashank/mars | a75499185d0e533dd532a34515adefb3065f33cc | [
"Apache-2.0"
] | null | null | null | mars/tensor/special/hypergeometric_funcs.py | Alfa-Shashank/mars | a75499185d0e533dd532a34515adefb3065f33cc | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# 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... | 27.486111 | 74 | 0.763012 |
01c6c0383d6b33719938a3e382c44a7283dad19f | 2,241 | py | Python | code/other-sims/case3_mp.py | filecoin-project/consensus | 8824ad5fb8948706995805692d594f6ccf199176 | [
"Apache-2.0",
"MIT"
] | 43 | 2019-02-14T21:02:53.000Z | 2021-12-10T22:53:02.000Z | code/other-sims/case3_mp.py | filecoin-project/consensus | 8824ad5fb8948706995805692d594f6ccf199176 | [
"Apache-2.0",
"MIT"
] | 41 | 2019-02-23T02:16:42.000Z | 2020-06-18T20:17:52.000Z | code/other-sims/case3_mp.py | filecoin-project/consensus | 8824ad5fb8948706995805692d594f6ccf199176 | [
"Apache-2.0",
"MIT"
] | 4 | 2019-03-27T09:15:53.000Z | 2022-03-25T07:54:18.000Z | import numpy as np
import time
from math import floor
import multiprocessing as mp
#sim=10000
ec =[]
num=1
e=5
print "e = ", e
Num_of_sim_per_proc = 100
start_time = time.time()
# This script simulates the worst length of n consecutive "small headstart" attacks (case 3)
def simu(sim):
na = 33
nh = 67
ntot=na... | 30.69863 | 101 | 0.715752 |
77fa8d438267ea2375a344a2638d16bae9573cf0 | 3,000 | py | Python | pynq/lib/pmod/tests/test_pmod_oled.py | michalkouril/PYNQ | c72febc2decc83816f40b91a7f60e11fe707c248 | [
"BSD-3-Clause"
] | 1,537 | 2016-09-26T22:51:50.000Z | 2022-03-31T13:33:54.000Z | pynq/lib/pmod/tests/test_pmod_oled.py | michalkouril/PYNQ | c72febc2decc83816f40b91a7f60e11fe707c248 | [
"BSD-3-Clause"
] | 414 | 2016-10-03T21:12:10.000Z | 2022-03-21T14:55:02.000Z | pynq/lib/pmod/tests/test_pmod_oled.py | michalkouril/PYNQ | c72febc2decc83816f40b91a7f60e11fe707c248 | [
"BSD-3-Clause"
] | 826 | 2016-09-23T22:29:43.000Z | 2022-03-29T11:02:09.000Z | # Copyright (c) 2016, Xilinx, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of ... | 37.5 | 79 | 0.719667 |
22c8c94b5fd890494eab94d8b2f1f342d54fe956 | 106,038 | py | Python | sympy/solvers/tests/test_solveset.py | jsmolic/sympy | 4c8422b989a46baf7ad3b1d26c0e9dbb72e07aee | [
"BSD-3-Clause"
] | 1 | 2021-12-15T11:34:16.000Z | 2021-12-15T11:34:16.000Z | sympy/solvers/tests/test_solveset.py | jsmolic/sympy | 4c8422b989a46baf7ad3b1d26c0e9dbb72e07aee | [
"BSD-3-Clause"
] | null | null | null | sympy/solvers/tests/test_solveset.py | jsmolic/sympy | 4c8422b989a46baf7ad3b1d26c0e9dbb72e07aee | [
"BSD-3-Clause"
] | null | null | null | from sympy.core.containers import Tuple
from sympy.core.function import (Function, Lambda, nfloat, diff)
from sympy.core.mod import Mod
from sympy.core.numbers import (E, I, Rational, oo, pi)
from sympy.core.relational import (Eq, Gt,
Ne)
from sympy.core.singleton import S
from sympy.core.symbol import (Dummy, Symb... | 40.303307 | 126 | 0.557253 |
d07d3ece37b8bdc7d5a8b94ec42d0087cf0152ab | 571 | py | Python | app/main/controller/auth_controller.py | leandroudala/StoreApi | fd4cda5b741badcb8d8b294436848c1504ad00ba | [
"MIT"
] | null | null | null | app/main/controller/auth_controller.py | leandroudala/StoreApi | fd4cda5b741badcb8d8b294436848c1504ad00ba | [
"MIT"
] | null | null | null | app/main/controller/auth_controller.py | leandroudala/StoreApi | fd4cda5b741badcb8d8b294436848c1504ad00ba | [
"MIT"
] | null | null | null | from flask import request
from flask_restplus import Resource
from app.main.service.auth_helper import Auth
from ..util.dto import AuthDto
api = AuthDto.api
user_auth = AuthDto.user_auth
@api.route('/login')
class UserLogin(Resource):
@api.doc('Log in user and get a token')
@api.expect(user_auth, validate=Tr... | 25.954545 | 74 | 0.723292 |
f846d5abe0b14a18263eefeef5f5f1439fc6f1f6 | 1,215 | py | Python | web/handlers/ProcessedVideoWS.py | AmarMaksumic/ML-CV | 730a6f543aa6d5b019f09e4481c3188964ecbe2c | [
"MIT"
] | null | null | null | web/handlers/ProcessedVideoWS.py | AmarMaksumic/ML-CV | 730a6f543aa6d5b019f09e4481c3188964ecbe2c | [
"MIT"
] | 5 | 2021-08-25T16:17:12.000Z | 2022-03-12T00:59:43.000Z | web/handlers/ProcessedVideoWS.py | AmarMaksumic/ML-CV | 730a6f543aa6d5b019f09e4481c3188964ecbe2c | [
"MIT"
] | null | null | null | from os.path import abspath, dirname, join
import uuid
from tornado.websocket import WebSocketHandler, WebSocketClosedError
import logging
logger = logging.getLogger(__name__)
class ProcessedVideoWS(WebSocketHandler):
"""
"""
watchers = set()
def open(self):
self.uid = str(uuid.uuid4())
... | 27.613636 | 70 | 0.636214 |
21f3cafc3cd9dc33e4228cb175e4756af3530773 | 3,158 | py | Python | orlando/test_meu_ETL.py | orlandosaraivajr/pds-api-client | eae931d37ef3f58c77bcd99a474ffc3a11686b13 | [
"MIT"
] | 4 | 2022-02-04T00:18:20.000Z | 2022-02-12T03:26:49.000Z | orlando/test_meu_ETL.py | orlandosaraivajr/pds-api-client | eae931d37ef3f58c77bcd99a474ffc3a11686b13 | [
"MIT"
] | 1 | 2022-02-23T02:23:39.000Z | 2022-02-23T02:23:39.000Z | orlando/test_meu_ETL.py | orlandosaraivajr/pds-api-client | eae931d37ef3f58c77bcd99a474ffc3a11686b13 | [
"MIT"
] | 6 | 2022-02-04T03:44:19.000Z | 2022-02-23T22:01:33.000Z | from meu_ETL import Extract, Extract_1, Loader
from meu_ETL import Extract_2
from meu_ETL import MeuETL
from meu_ETL import Loader_2
import pytest
class TestExtract_1:
def test_metodo_get_lista_fiis(self):
objeto = Extract_1()
lista = objeto.get_lista_fiis()
assert isinstance(lista, list)
... | 31.267327 | 77 | 0.633946 |
f42f84ce2264d12900c8630fde57d959b9f8aec8 | 63,446 | py | Python | napari/layers/base/base.py | jojoelfe/napari | b52a136dad392c091b0008c0b8d7fcc5ef460f66 | [
"BSD-3-Clause"
] | 7 | 2018-07-03T17:35:46.000Z | 2018-11-07T15:48:58.000Z | napari/layers/base/base.py | jojoelfe/napari | b52a136dad392c091b0008c0b8d7fcc5ef460f66 | [
"BSD-3-Clause"
] | 23 | 2018-06-03T17:17:03.000Z | 2019-01-23T18:45:05.000Z | napari/layers/base/base.py | jojoelfe/napari | b52a136dad392c091b0008c0b8d7fcc5ef460f66 | [
"BSD-3-Clause"
] | 4 | 2018-06-03T15:04:32.000Z | 2018-10-09T19:11:18.000Z | from __future__ import annotations
import itertools
import warnings
from abc import ABC, abstractmethod
from collections import defaultdict, namedtuple
from contextlib import contextmanager
from functools import cached_property
from typing import List, Optional, Tuple, Union
import magicgui as mgui
import numpy as np... | 35.543978 | 202 | 0.60557 |
9cc921c9cec5133b98a89ff6f73e767b697c0883 | 2,930 | py | Python | drivers/agilent_lightwave.py | jtambasco/photonic-coupling-drivers | 9f8e422b1b6e2e5ff783c9146130ed71ee01241d | [
"MIT"
] | 4 | 2018-11-15T06:58:40.000Z | 2021-06-10T12:02:14.000Z | drivers/agilent_lightwave.py | jtambasco/photonic-coupling-drivers | 9f8e422b1b6e2e5ff783c9146130ed71ee01241d | [
"MIT"
] | null | null | null | drivers/agilent_lightwave.py | jtambasco/photonic-coupling-drivers | 9f8e422b1b6e2e5ff783c9146130ed71ee01241d | [
"MIT"
] | 3 | 2019-05-24T16:26:10.000Z | 2021-06-07T16:03:46.000Z | from .agilent_lightwave_connection import AgilentLightWaveConnection
from .lasers.agilent_8164B_laser import LaserAgilent8164B
from .power_meters.agilent_8164B_power_meter import PowerMeterAgilent8164B
class AgilentLightWaveSystem(AgilentLightWaveConnection):
'''
Driver for the Agilent Lightwave.
Args:
... | 39.594595 | 75 | 0.596246 |
bbd08f90345294a3b4b1d5e7bed3d35d73c3277a | 10,648 | py | Python | airflow/providers/amazon/aws/hooks/athena.py | npodewitz/airflow | 511ea702d5f732582d018dad79754b54d5e53f9d | [
"Apache-2.0"
] | 8,092 | 2016-04-27T20:32:29.000Z | 2019-01-05T07:39:33.000Z | airflow/providers/amazon/aws/hooks/athena.py | npodewitz/airflow | 511ea702d5f732582d018dad79754b54d5e53f9d | [
"Apache-2.0"
] | 2,961 | 2016-05-05T07:16:16.000Z | 2019-01-05T08:47:59.000Z | airflow/providers/amazon/aws/hooks/athena.py | npodewitz/airflow | 511ea702d5f732582d018dad79754b54d5e53f9d | [
"Apache-2.0"
] | 3,546 | 2016-05-04T20:33:16.000Z | 2019-01-05T05:14:26.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... | 39.291513 | 110 | 0.646225 |
b22e37411a2c9eabf9ccee7f940bce5f0821f39a | 2,895 | py | Python | tests/model/test_page_xml_renderer.py | hnesk/ocrd-browser | c84e55cf58cab3821e04f8691958a44bca018b17 | [
"MIT"
] | null | null | null | tests/model/test_page_xml_renderer.py | hnesk/ocrd-browser | c84e55cf58cab3821e04f8691958a44bca018b17 | [
"MIT"
] | null | null | null | tests/model/test_page_xml_renderer.py | hnesk/ocrd-browser | c84e55cf58cab3821e04f8691958a44bca018b17 | [
"MIT"
] | null | null | null | from tests import TestCase
from ocrd_browser.model.page_xml_renderer import RegionFactory, Region
from ocrd_models.ocrd_page import CoordsType, SeparatorRegionType
class RegionFactoryTestCase(TestCase):
def setUp(self) -> None:
identity = {
'transform': [[1., 0., 0.], [0., 1., 0.], [0., 0., 1... | 53.611111 | 183 | 0.677375 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.