hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5971d820cd9591fb3ba07ca6dc3d006b8c920e17 | 1,906 | py | Python | pavdhutils/tokenize.py | vierth/pavut | 0c9c5032e80c7a7184fea72d9a4f4e46fb47c83d | [
"Apache-2.0"
] | null | null | null | pavdhutils/tokenize.py | vierth/pavut | 0c9c5032e80c7a7184fea72d9a4f4e46fb47c83d | [
"Apache-2.0"
] | null | null | null | pavdhutils/tokenize.py | vierth/pavut | 0c9c5032e80c7a7184fea72d9a4f4e46fb47c83d | [
"Apache-2.0"
] | null | null | null | """Classes in this file tokenize input strings"""
from pavdhutils.errors import CustomException
import sys
class Tokenize:
def __init__(self, text, method="char", lang="zh", regex=r"\w+",
removewhitespace=True):
self.methods = ["char", "word", "regex"]
self.mstring = ", ".join(sel... | 32.305085 | 88 | 0.544071 |
5fbae803f2bec7cca0068b90ba74118206bfda1e | 10,997 | py | Python | proyecto/flask/Lib/site-packages/whoosh/lang/snowball/spanish.py | grupoprog3/proyecto_final | 56fa4d33852a347476e721bf02bb3bc53a7b7a70 | [
"Apache-2.0"
] | 3 | 2017-04-27T09:37:25.000Z | 2017-08-12T16:25:22.000Z | proyecto/flask/Lib/site-packages/whoosh/lang/snowball/spanish.py | grupoprog3/proyecto_final | 56fa4d33852a347476e721bf02bb3bc53a7b7a70 | [
"Apache-2.0"
] | 27 | 2017-04-01T15:06:36.000Z | 2021-02-08T20:19:58.000Z | proyecto/flask/Lib/site-packages/whoosh/lang/snowball/spanish.py | grupoprog3/proyecto_final | 56fa4d33852a347476e721bf02bb3bc53a7b7a70 | [
"Apache-2.0"
] | 1 | 2021-05-10T08:41:12.000Z | 2021-05-10T08:41:12.000Z | from .bases import _StandardStemmer
from whoosh.compat import u
class SpanishStemmer(_StandardStemmer):
"""
The Spanish Snowball stemmer.
:cvar __vowels: The Spanish vowels.
:type __vowels: unicode
:cvar __step0_suffixes: Suffixes to be deleted in step 0 of the algorithm.
:type __step0_suff... | 44.164659 | 80 | 0.371192 |
66e2360d4f2f97d76b48c75a61bac1ea7a76c976 | 9,706 | py | Python | models/swae_plus.py | Meso272/PyTorch-VAE | b1f80082a92c706969a63162ae083b9f7d15d9aa | [
"Apache-2.0"
] | null | null | null | models/swae_plus.py | Meso272/PyTorch-VAE | b1f80082a92c706969a63162ae083b9f7d15d9aa | [
"Apache-2.0"
] | null | null | null | models/swae_plus.py | Meso272/PyTorch-VAE | b1f80082a92c706969a63162ae083b9f7d15d9aa | [
"Apache-2.0"
] | 1 | 2022-02-11T23:22:41.000Z | 2022-02-11T23:22:41.000Z | import torch
from models import BaseVAE
from torch import nn
from torch.nn import functional as F
from torch import distributions as dist
from .types_ import *
class SWAE_PLUS(BaseVAE):
def __init__(self,
in_channels: int,
latent_dim: int,
hidden_dims: List = No... | 36.216418 | 109 | 0.505358 |
b5fc8c660b494b6db3d100eaf760c0b9f50588d9 | 853 | py | Python | hasher-matcher-actioner/hmalib/lambdas/actions/reactioner.py | king40or1/ThreatExchange | 95680d1568241bf63249f91480bbf1c7bbe9b699 | [
"BSD-3-Clause"
] | null | null | null | hasher-matcher-actioner/hmalib/lambdas/actions/reactioner.py | king40or1/ThreatExchange | 95680d1568241bf63249f91480bbf1c7bbe9b699 | [
"BSD-3-Clause"
] | null | null | null | hasher-matcher-actioner/hmalib/lambdas/actions/reactioner.py | king40or1/ThreatExchange | 95680d1568241bf63249f91480bbf1c7bbe9b699 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import json
from hmalib.common.logging import get_logger
from hmalib.common.actioner_models import ReactionMessage
logger = get_logger(__name__)
def lambda_handler(event, context):
"""
This is the main entry point for reacting to Threat... | 28.433333 | 85 | 0.712778 |
5bd9a927037cf5f79ef0a1422f11d4681aea5e1b | 19,600 | py | Python | Zebra_puzzle_classes.py | c-okelly/Data_Algo_zebra_puzzle | 36820accc761b084ddcbe55b5feaad7e150b6920 | [
"MIT"
] | null | null | null | Zebra_puzzle_classes.py | c-okelly/Data_Algo_zebra_puzzle | 36820accc761b084ddcbe55b5feaad7e150b6920 | [
"MIT"
] | null | null | null | Zebra_puzzle_classes.py | c-okelly/Data_Algo_zebra_puzzle | 36820accc761b084ddcbe55b5feaad7e150b6920 | [
"MIT"
] | null | null | null | # Author Conor O'Kelly
# This file will contain all of the classes required for the puzzle
import copy
class Problem:
__problem_solved = False
__varialbes_list = []
__constraint_set = []
__multi_solution_list = []
def __init__(self,variables):
# Generate type and domain no from data inpu... | 38.28125 | 189 | 0.648214 |
072e6ba52f86a5cc9e5c0f75ed2a541d1b4e4e6e | 396 | py | Python | gram/migrations/0004_image_comments_number.py | marknesh/instagram-app | 514ec6e59ad127857234245b05130431fa3262cc | [
"MIT"
] | null | null | null | gram/migrations/0004_image_comments_number.py | marknesh/instagram-app | 514ec6e59ad127857234245b05130431fa3262cc | [
"MIT"
] | 10 | 2020-03-08T21:13:29.000Z | 2021-04-08T19:41:14.000Z | gram/migrations/0004_image_comments_number.py | marknesh/instagram-app | 514ec6e59ad127857234245b05130431fa3262cc | [
"MIT"
] | null | null | null | # Generated by Django 3.0.3 on 2020-03-07 15:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('gram', '0003_auto_20200307_1503'),
]
operations = [
migrations.AddField(
model_name='image',
name='comments_number',... | 20.842105 | 57 | 0.608586 |
ff84fdc248ecf3e8f27dccdd140865dd21c5390f | 5,053 | py | Python | src/Products/ZODBMountPoint/__init__.py | zms-publishing/Products.TemporaryFolder | 56d520b9a6a26f6e230c908c6a00c5f1f871c495 | [
"ZPL-2.1"
] | null | null | null | src/Products/ZODBMountPoint/__init__.py | zms-publishing/Products.TemporaryFolder | 56d520b9a6a26f6e230c908c6a00c5f1f871c495 | [
"ZPL-2.1"
] | null | null | null | src/Products/ZODBMountPoint/__init__.py | zms-publishing/Products.TemporaryFolder | 56d520b9a6a26f6e230c908c6a00c5f1f871c495 | [
"ZPL-2.1"
] | null | null | null | ##############################################################################
#
# Copyright (c) 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | 40.103175 | 79 | 0.605977 |
3aecb42489f40d779968b2959bda855ad4ff9c39 | 2,518 | py | Python | alpha/abstobmc.py | heryxpc/prototype | 45c9c61c43115a97adc9690ad2269be9c07eb47d | [
"Apache-2.0"
] | null | null | null | alpha/abstobmc.py | heryxpc/prototype | 45c9c61c43115a97adc9690ad2269be9c07eb47d | [
"Apache-2.0"
] | null | null | null | alpha/abstobmc.py | heryxpc/prototype | 45c9c61c43115a97adc9690ad2269be9c07eb47d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Abstract to Bounded Model Checking module that executes sequentially
software verification tools on concurrent programs.
Aim is to prove that conjunction of Abstract Interpreation and Bounded
Model Checking provide enhanced performance on software verification
on concurrent programs.
"""
f... | 27.67033 | 72 | 0.706116 |
06541b395485ff386b27b6c5d5b04cb7e083c771 | 17,388 | py | Python | pysnmp-with-texts/HUAWEI-SLB-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/HUAWEI-SLB-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/HUAWEI-SLB-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module HUAWEI-SLB-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HUAWEI-SLB-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:48:29 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2... | 149.896552 | 1,395 | 0.774327 |
28050dc3ca0d272aa33d4ced78c7558b90699a16 | 9,249 | py | Python | certipy/template.py | wisdark/Certipy | 5d95b01c46263ede8e04057c5ebdab9b38b083a0 | [
"MIT"
] | 367 | 2021-10-21T19:23:47.000Z | 2022-03-30T21:55:05.000Z | certipy/template.py | wisdark/Certipy | 5d95b01c46263ede8e04057c5ebdab9b38b083a0 | [
"MIT"
] | 38 | 2021-10-18T01:31:43.000Z | 2022-03-14T08:21:22.000Z | certipy/template.py | wisdark/Certipy | 5d95b01c46263ede8e04057c5ebdab9b38b083a0 | [
"MIT"
] | 58 | 2021-11-03T09:40:04.000Z | 2022-03-26T23:17:35.000Z | import argparse
import json
import logging
from typing import Callable, Dict, Tuple
import ldap3
from ldap3.protocol.microsoft import security_descriptor_control
from certipy import target
from certipy.ldap import LDAPConnection, LDAPEntry
from certipy.target import Target
NAME = "template"
PROTECTED_ATTRIBUTES = [... | 32.114583 | 344 | 0.583523 |
442ecbb0683c73c8f2d5e9b61ef8b65b4e4101ba | 8,798 | py | Python | argoverse/visualization/vis_mask.py | gargrohin/argoverse-api | 6f695673b3ee5783955d0f9c72dedb95a8013fe1 | [
"MIT"
] | 560 | 2019-06-20T00:15:25.000Z | 2022-03-29T15:21:31.000Z | argoverse/visualization/vis_mask.py | gargrohin/argoverse-api | 6f695673b3ee5783955d0f9c72dedb95a8013fe1 | [
"MIT"
] | 200 | 2019-06-20T05:21:35.000Z | 2022-03-27T01:30:00.000Z | argoverse/visualization/vis_mask.py | gargrohin/argoverse-api | 6f695673b3ee5783955d0f9c72dedb95a8013fe1 | [
"MIT"
] | 193 | 2019-06-19T20:51:23.000Z | 2022-03-24T08:46:24.000Z | # Copyright (c) 2017-present, Facebook, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | 29.92517 | 117 | 0.586042 |
6d1a6cfb97d9d0862ed818d98542441dec556b12 | 433 | py | Python | Desafio066.py | GabrielSanchesRosa/Python | 3a129e27e076b2a91af03d68ede50b9c45c50217 | [
"MIT"
] | null | null | null | Desafio066.py | GabrielSanchesRosa/Python | 3a129e27e076b2a91af03d68ede50b9c45c50217 | [
"MIT"
] | null | null | null | Desafio066.py | GabrielSanchesRosa/Python | 3a129e27e076b2a91af03d68ede50b9c45c50217 | [
"MIT"
] | null | null | null | # Crie um programa que leia vários números inteiros pelo teclado. O programa só vai parar quando o usuário digitar 999, que é a condição de parada. No final mostres quantos números foram digitados e a soma entre eles (desconsiderando o flag).
soma = cont = 0
while True:
num = int(input("Digite um valor (999 para pa... | 30.928571 | 242 | 0.704388 |
4e3645c305bedbea6ca72b2b0763cf19cf45067e | 3,994 | py | Python | sentiment_analysis.py | Krishna00111/Mining-Social-Media | 34ebb196d82dbf1722baa2ecdc1790887eeea1bc | [
"Apache-2.0"
] | null | null | null | sentiment_analysis.py | Krishna00111/Mining-Social-Media | 34ebb196d82dbf1722baa2ecdc1790887eeea1bc | [
"Apache-2.0"
] | null | null | null | sentiment_analysis.py | Krishna00111/Mining-Social-Media | 34ebb196d82dbf1722baa2ecdc1790887eeea1bc | [
"Apache-2.0"
] | null | null | null | import re
import tweepy
from tweepy import OAuthHandler
from textblob import TextBlob
import pandas as pd
#
# def clean_tweet(tweet):
# '''
# Utility function to clean tweet text by removing links, special characters
# using simple regex statements.
# '''
# return ' '.join(re.sub("(@[A-... | 33.563025 | 92 | 0.601903 |
32a6293d4731e30f83f197f03654a86e153f0d36 | 10,074 | py | Python | gamestonk_terminal/options/yfinance_view.py | jbhurat/GamestonkTerminal | 06957c27f3bea36028a242a68a4a1aabbb566577 | [
"MIT"
] | 1 | 2021-07-25T20:34:29.000Z | 2021-07-25T20:34:29.000Z | gamestonk_terminal/options/yfinance_view.py | TomiToivio/GamestonkTerminal | 419c3691db220c467d2979b19ca308b3b800c0bd | [
"MIT"
] | 1 | 2022-02-10T06:49:37.000Z | 2022-02-10T06:49:37.000Z | gamestonk_terminal/options/yfinance_view.py | TomiToivio/GamestonkTerminal | 419c3691db220c467d2979b19ca308b3b800c0bd | [
"MIT"
] | null | null | null | """Yfinance options view"""
__docformat__ = "numpy"
import argparse
from bisect import bisect_left
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import yfinance as yf
import numpy as np
import gamestonk_terminal.feature_flags as gtff
import gamestonk_terminal.config_plot as cfp
from games... | 27.375 | 100 | 0.59589 |
24c11687e699dc5783df9228c2ba6577df76af2d | 1,105 | py | Python | usr/gre/gamelib.py | Bugnon/oc-2018 | 7961de5ba9923512bd50c579c37f1dadf070b692 | [
"MIT"
] | 3 | 2018-09-20T12:16:48.000Z | 2019-06-21T08:32:17.000Z | games/xxx/gamelib.py | Bugnon/oc-2018 | 7961de5ba9923512bd50c579c37f1dadf070b692 | [
"MIT"
] | null | null | null | games/xxx/gamelib.py | Bugnon/oc-2018 | 7961de5ba9923512bd50c579c37f1dadf070b692 | [
"MIT"
] | 2 | 2018-09-20T11:55:05.000Z | 2019-09-01T19:40:13.000Z | """
gamelib is a SenseHAT game library module which provides
- color constants
- a function to display a color matrix
"""
from sense_hat import SenseHat
BLACK = (0, 0, 0)
LEMON = (255, 255, 128)
PINK = (255, 0, 128)
RED = (255, 0, 0)
MINT = (128, 255, 128)
BLUE = (0, 0, 255)
GREEN = (0, 255, 0)
MAGENTA = (255, 0, 255... | 24.555556 | 80 | 0.59819 |
325e329cfe779d43580df77eadd43e60fc338cfb | 1,506 | py | Python | tests/project/test_project_in_pc.py | tuxtof/calm-dsl | 5af67435d8304b97e170a690068f2d5975e9bfe6 | [
"Apache-2.0"
] | 37 | 2019-12-23T15:23:20.000Z | 2022-03-15T11:12:11.000Z | tests/project/test_project_in_pc.py | gabybeitler/calm-dsl | bac453413cfcf800eef95d89d5a7323c83654a93 | [
"Apache-2.0"
] | 144 | 2020-03-09T11:22:09.000Z | 2022-03-28T21:34:09.000Z | tests/project/test_project_in_pc.py | gabybeitler/calm-dsl | bac453413cfcf800eef95d89d5a7323c83654a93 | [
"Apache-2.0"
] | 46 | 2020-01-23T14:28:04.000Z | 2022-03-09T04:17:10.000Z | import json
from calm.dsl.builtins import Project
from calm.dsl.builtins import Provider, Ref, read_local_file
DSL_CONFIG = json.loads(read_local_file(".tests/config.json"))
ACCOUNTS = DSL_CONFIG["ACCOUNTS"]
NTNX_ACCOUNT = ACCOUNTS["NUTANIX_PC"][0]
NTNX_ACCOUNT_NAME = NTNX_ACCOUNT["NAME"]
NTNX_SUBNET = NTNX_ACCOUNT[... | 29.529412 | 80 | 0.714475 |
2be5148d8e6d50b037c4aff48cf1196b53d8f484 | 3,119 | py | Python | tests/test_serve.py | freemo/makinage | bab1a276b7d3a15f69e8236a0837bc17470afcc5 | [
"MIT"
] | 22 | 2020-03-16T13:41:59.000Z | 2022-03-14T10:16:36.000Z | tests/test_serve.py | freemo/makinage | bab1a276b7d3a15f69e8236a0837bc17470afcc5 | [
"MIT"
] | 9 | 2020-10-22T21:20:22.000Z | 2022-03-26T20:50:23.000Z | tests/test_serve.py | maki-nage/makinage | 4a4a4f12af24a57a58c7ea0ddd95dbfabbcc6896 | [
"MIT"
] | null | null | null | import os
import pytest
from collections import namedtuple
from rx.subject import Subject
pytest.importorskip("makinage.serve.serve")
from makinage.serve.serve import create_transform_functions, \
create_model_predict, infer, serve
from makinage.sample.serve import ZeroModel, predict_zero
import numpy as np
zer... | 23.628788 | 69 | 0.60436 |
cf7163e6a0a9948d3bc4445f04c0ba8868309291 | 5,185 | py | Python | cli/tests/test_polypod/test_custom_resources/test_mx_job_crd.py | polyaxon/cli | 3543c0220a8a7c06fc9573cd2a740f8ae4930641 | [
"Apache-2.0"
] | null | null | null | cli/tests/test_polypod/test_custom_resources/test_mx_job_crd.py | polyaxon/cli | 3543c0220a8a7c06fc9573cd2a740f8ae4930641 | [
"Apache-2.0"
] | 1 | 2022-01-24T11:26:47.000Z | 2022-03-18T23:17:58.000Z | cli/tests/test_polypod/test_custom_resources/test_mx_job_crd.py | polyaxon/cli | 3543c0220a8a7c06fc9573cd2a740f8ae4930641 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018-2022 Polyaxon, 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 ... | 36.006944 | 87 | 0.593635 |
c621415aa32b05b48b210feb4d1a014dba422657 | 143 | py | Python | source/tutorial/map/urls.py | sinjorjob/GeoDjango_demo_site | 357e31119932d9a528d05faa9cdc18cf432bdea5 | [
"MIT"
] | null | null | null | source/tutorial/map/urls.py | sinjorjob/GeoDjango_demo_site | 357e31119932d9a528d05faa9cdc18cf432bdea5 | [
"MIT"
] | 1 | 2021-05-11T08:06:18.000Z | 2021-05-11T08:06:18.000Z | source/tutorial/map/urls.py | sinjorjob/GeoDjango_demo_site | 357e31119932d9a528d05faa9cdc18cf432bdea5 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path
from . import views
urlpatterns = [
path('map/', views.Home.as_view()),
]
| 14.3 | 39 | 0.706294 |
d33bb1f6f4e0a4ae6197804ba9c6b93dfb6a510f | 787 | py | Python | tests/unit/assets/asset.py | amaas-fintech/amaas-core-sdk-python | bd77884de6e5ab05d864638addeb4bb338a51183 | [
"Apache-2.0"
] | null | null | null | tests/unit/assets/asset.py | amaas-fintech/amaas-core-sdk-python | bd77884de6e5ab05d864638addeb4bb338a51183 | [
"Apache-2.0"
] | 8 | 2017-06-06T09:42:41.000Z | 2018-01-16T10:16:16.000Z | tests/unit/assets/asset.py | amaas-fintech/amaas-core-sdk-python | bd77884de6e5ab05d864638addeb4bb338a51183 | [
"Apache-2.0"
] | 8 | 2017-01-18T04:14:01.000Z | 2017-12-01T08:03:10.000Z | from __future__ import absolute_import, division, print_function, unicode_literals
import unittest
from amaascore.tools.generate_asset import generate_asset
from amaascore.tools.generate_asset import generate_bond
class AssetTest(unittest.TestCase):
def setUp(self):
self.longMessage = True # Print com... | 29.148148 | 82 | 0.728081 |
8c27f88fa0b6cfc6a4007e410ec0a994de8ebd3b | 2,057 | py | Python | Cryptography/RSA.py | LucasEmmes/pythonScripts | 0316b355795cd7f99012321a94492d57af60dd8d | [
"MIT"
] | null | null | null | Cryptography/RSA.py | LucasEmmes/pythonScripts | 0316b355795cd7f99012321a94492d57af60dd8d | [
"MIT"
] | null | null | null | Cryptography/RSA.py | LucasEmmes/pythonScripts | 0316b355795cd7f99012321a94492d57af60dd8d | [
"MIT"
] | null | null | null | import math
import random
def RSA_generate_keys(*args):
"""
Generates a pair of public and private RSA keys
PARAMS:
*args: ((int), (int)) tuple with two prime numbers that you wish to be used. Can be ommited, in which case it will generate a random set for you (not implemented yet)
RETURNS... | 24.783133 | 174 | 0.555664 |
96544f3fc9948d04ff94a6c0f147621c325996da | 793 | py | Python | algorithms/ar-binsrt/python2/bin_sort.py | NuclearCactus/FOSSALGO | eb66f3bdcd6c42c66e8fc7110a32ac021596ca66 | [
"MIT"
] | 59 | 2018-09-11T17:40:25.000Z | 2022-03-03T14:40:39.000Z | algorithms/ar-binsrt/python2/bin_sort.py | RitvikDayal/FOSSALGO | ae225a5fffbd78d0dff83fd7b178ba47bfd7a769 | [
"MIT"
] | 468 | 2018-08-28T17:04:29.000Z | 2021-12-03T15:16:34.000Z | algorithms/ar-binsrt/python2/bin_sort.py | RitvikDayal/FOSSALGO | ae225a5fffbd78d0dff83fd7b178ba47bfd7a769 | [
"MIT"
] | 253 | 2018-08-28T17:08:51.000Z | 2021-11-01T12:30:39.000Z | def insertionSort(b):
for i in xrange(1, len(b)):
up = b[i]
j = i - 1
while j >= 0 and b[j] > up:
b[j+1] = b[j]
j = j - 1
b[j+1] = up
return b
def bucketSort(x):
arr = []
slot_num = 10
for i in xrange(slot_num):
arr.append([])
for... | 20.333333 | 38 | 0.470366 |
96c137546871aad380aeffab231528fb3f4c1171 | 556 | py | Python | ex01/funcoes/__init__.py | duartele/exerc-python | fc149a5bcd0686ba4cad87e95277658f9bbdc63b | [
"MIT"
] | null | null | null | ex01/funcoes/__init__.py | duartele/exerc-python | fc149a5bcd0686ba4cad87e95277658f9bbdc63b | [
"MIT"
] | null | null | null | ex01/funcoes/__init__.py | duartele/exerc-python | fc149a5bcd0686ba4cad87e95277658f9bbdc63b | [
"MIT"
] | null | null | null | def leiaInt(msg):
while True:
try:
n = int(input(msg))
except (ValueError, TypeError):
print('\033[31mERRO: por favor, digite um número válido.\033[m')
else:
return n
def linha(tam=42):
return '-' * tam
def cabecalho(txt):
print(linha())
pr... | 18.533333 | 76 | 0.526978 |
e30b07049440a270ba7d0ccecbc255befa29154e | 4,249 | py | Python | reference/ddtrace/contrib/falcon/middleware.py | stschenk/opentelemetry-python-contrib | 28c1331e571d386baab74f5028e3268e4bfda4cd | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | reference/ddtrace/contrib/falcon/middleware.py | stschenk/opentelemetry-python-contrib | 28c1331e571d386baab74f5028e3268e4bfda4cd | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2020-12-12T17:59:41.000Z | 2020-12-12T18:54:03.000Z | reference/ddtrace/contrib/falcon/middleware.py | stschenk/opentelemetry-python-contrib | 28c1331e571d386baab74f5028e3268e4bfda4cd | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2020-10-22T04:16:33.000Z | 2020-10-22T04:16:33.000Z | import sys
from ddtrace.ext import SpanTypes, http as httpx
from ddtrace.http import store_request_headers, store_response_headers
from ddtrace.propagation.http import HTTPPropagator
from ...compat import iteritems
from ...constants import ANALYTICS_SAMPLE_RATE_KEY
from ...settings import config
class TraceMiddlewa... | 36.316239 | 86 | 0.645328 |
5dc0d12839d826d5b9cc07a16aa43d65508f75ad | 27,516 | py | Python | pgAdmin4/pgAdmin4/lib/python2.7/site-packages/pgadmin4/regression/python_test_utils/test_utils.py | Anillab/One-Minute-Pitch | 123f7b2010d3ae0f031066db1bcfe6eda7a41e84 | [
"MIT"
] | 4 | 2019-10-03T21:58:22.000Z | 2021-02-12T13:33:32.000Z | pgAdmin4/pgAdmin4/lib/python2.7/site-packages/pgadmin4/regression/python_test_utils/test_utils.py | Anillab/One-Minute-Pitch | 123f7b2010d3ae0f031066db1bcfe6eda7a41e84 | [
"MIT"
] | 4 | 2020-01-22T13:45:12.000Z | 2022-02-10T20:58:09.000Z | pgAdmin4/pgAdmin4/lib/python2.7/site-packages/pgadmin4/regression/python_test_utils/test_utils.py | Anillab/One-Minute-Pitch | 123f7b2010d3ae0f031066db1bcfe6eda7a41e84 | [
"MIT"
] | 1 | 2021-01-13T09:30:29.000Z | 2021-01-13T09:30:29.000Z | ##########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2018, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
##########################################################################
from __future__ i... | 37.538881 | 99 | 0.562473 |
a90f1c0070f63992a7ce7980270dc13a3abefee4 | 1,155 | py | Python | models/cog.py | nmarotte/MACS_VUBot | d7dff822c825dc95c96726048b60507ba0e69eea | [
"MIT"
] | null | null | null | models/cog.py | nmarotte/MACS_VUBot | d7dff822c825dc95c96726048b60507ba0e69eea | [
"MIT"
] | null | null | null | models/cog.py | nmarotte/MACS_VUBot | d7dff822c825dc95c96726048b60507ba0e69eea | [
"MIT"
] | null | null | null | from discord.ext import commands
from discord.ext.commands import Context
from models.client import MaxVUBot
class CommandCog(commands.Cog):
@commands.command()
async def pls_pin(self, ctx: Context):
message_reference: Optional[discord.MessageReference] = ctx.message.reference
if not message_... | 39.827586 | 100 | 0.703896 |
86e64b4e5d5dcafc9834d9e4ab967adc6499c3ea | 1,454 | py | Python | lib/extensions/package.py | renebentes/JoomlaProjects | 30c07041b90fc51e4de3fb544b378854f71db2f1 | [
"MIT"
] | 1 | 2015-04-19T10:36:18.000Z | 2015-04-19T10:36:18.000Z | lib/extensions/package.py | renebentes/JoomlaProjects | 30c07041b90fc51e4de3fb544b378854f71db2f1 | [
"MIT"
] | null | null | null | lib/extensions/package.py | renebentes/JoomlaProjects | 30c07041b90fc51e4de3fb544b378854f71db2f1 | [
"MIT"
] | 1 | 2015-01-14T02:10:55.000Z | 2015-01-14T02:10:55.000Z | # coding: utf-8
import sublime
import os
st_version = int(sublime.version())
if st_version > 3000:
from JoomlaPack.lib import *
from JoomlaPack.lib.extensions.base import Base
from JoomlaPack.lib.inflector import *
else:
from lib import *
from lib.extensions.base import Base
from lib.inflector ... | 28.509804 | 77 | 0.611417 |
a2294fa43b8e83f14bb40023000ad94b5e617e29 | 8,548 | py | Python | simba/run_RF_model_old.py | justinshenk/simba | a58ccd0ceeda201c1452d186033ce6b25fbab564 | [
"MIT"
] | 172 | 2019-12-18T22:19:42.000Z | 2022-03-29T01:58:25.000Z | simba/run_RF_model_old.py | justinshenk/simba | a58ccd0ceeda201c1452d186033ce6b25fbab564 | [
"MIT"
] | 165 | 2020-01-10T19:05:16.000Z | 2022-03-31T16:08:36.000Z | simba/run_RF_model_old.py | justinshenk/simba | a58ccd0ceeda201c1452d186033ce6b25fbab564 | [
"MIT"
] | 80 | 2019-12-20T00:01:43.000Z | 2022-03-29T16:20:10.000Z | import warnings
warnings.filterwarnings('ignore',category=FutureWarning)
warnings.filterwarnings('ignore',category=DeprecationWarning)
import pandas as pd
import pickle
import numpy as np
import statistics
import os
from configparser import ConfigParser, MissingSectionHeaderError, NoOptionError, NoSectionError
... | 52.121951 | 179 | 0.606224 |
6fb54e6f66f0543f886254d3182105f4513d799a | 19,912 | py | Python | gfootball/env/wrappers.py | chevin-ken/football | cfcdf12c06a2a04af3daef4e135c5e19ddcfa15d | [
"Apache-2.0"
] | null | null | null | gfootball/env/wrappers.py | chevin-ken/football | cfcdf12c06a2a04af3daef4e135c5e19ddcfa15d | [
"Apache-2.0"
] | null | null | null | gfootball/env/wrappers.py | chevin-ken/football | cfcdf12c06a2a04af3daef4e135c5e19ddcfa15d | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2019 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | 35.056338 | 88 | 0.641573 |
01c130eedee1a68adb0c1c9c2224f6a2f34232b4 | 1,518 | py | Python | knn_and_regression/tests/test_a_environment.py | WallabyLester/Machine_Learning_From_Scratch | 6042cf421f5de2db61fb570b7c4de64dc03453f3 | [
"MIT"
] | null | null | null | knn_and_regression/tests/test_a_environment.py | WallabyLester/Machine_Learning_From_Scratch | 6042cf421f5de2db61fb570b7c4de64dc03453f3 | [
"MIT"
] | null | null | null | knn_and_regression/tests/test_a_environment.py | WallabyLester/Machine_Learning_From_Scratch | 6042cf421f5de2db61fb570b7c4de64dc03453f3 | [
"MIT"
] | null | null | null | from pathlib import Path
import glob
def test_a_imports():
"""
Please don't import sklearn or scipy.stats to solve any of the problems in this assignment.
If you fail this test, we will give you a zero for this assignment, regardless of how
sklearn or scipy.stats was used in your code.
the 'a' in... | 30.979592 | 99 | 0.613966 |
b3f4c4c7797b434f0e41c09e612b3d12eff4fc71 | 1,713 | py | Python | scripts/jupyterhub-secret.py | biviosoftware/salt-srv | 61031c5cdbf67d833aa8113d10f49775237ddbb9 | [
"Apache-2.0"
] | 1 | 2017-04-28T10:54:42.000Z | 2017-04-28T10:54:42.000Z | scripts/jupyterhub-secret.py | biviosoftware/salt-srv | 61031c5cdbf67d833aa8113d10f49775237ddbb9 | [
"Apache-2.0"
] | 4 | 2016-05-12T00:22:38.000Z | 2016-05-12T14:21:11.000Z | scripts/jupyterhub-secret.py | biviosoftware/salt-conf | 61031c5cdbf67d833aa8113d10f49775237ddbb9 | [
"Apache-2.0"
] | 1 | 2016-07-05T18:38:11.000Z | 2016-07-05T18:38:11.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
u"""Generate secrets for test purposes.
You will need to get real values for:
* github_client_id
* github_client_secret
* admin_user
The rest can be generated this way for production::
admin_users=xyz github_client_secret=x github_client_id=x python secr... | 26.765625 | 84 | 0.654991 |
286821e9bbff6810a1ca470421a63165fbc78b00 | 942 | py | Python | loadfiles.py | FrancoisNadeau/loadutils | c51e641b62c588eaf2716c5af2d0468311dcae24 | [
"MIT"
] | null | null | null | loadfiles.py | FrancoisNadeau/loadutils | c51e641b62c588eaf2716c5af2d0468311dcae24 | [
"MIT"
] | null | null | null | loadfiles.py | FrancoisNadeau/loadutils | c51e641b62c588eaf2716c5af2d0468311dcae24 | [
"MIT"
] | null | null | null | #!usr/bin/env/python3
import os
from typing import Union
import pandas as pd
from os.path import basename as bname
from os.path import dirname as dname
def loadfiles(pathlist: Union[list, tuple]) -> object:
""" Returns a pd.DataFrame with columns
-----------------------------------
'filename': nam... | 33.642857 | 66 | 0.526539 |
49d6b3d7a45638900a94d8d4660aa34e8205fe33 | 10,766 | py | Python | chi/plots/_residuals.py | DavAug/erlotinib | 9d113257de52b56359ed6451ba7db455645315d1 | [
"BSD-3-Clause"
] | null | null | null | chi/plots/_residuals.py | DavAug/erlotinib | 9d113257de52b56359ed6451ba7db455645315d1 | [
"BSD-3-Clause"
] | 221 | 2020-11-06T13:03:32.000Z | 2021-07-30T08:17:58.000Z | chi/plots/_residuals.py | DavAug/erlotinib | 9d113257de52b56359ed6451ba7db455645315d1 | [
"BSD-3-Clause"
] | 1 | 2021-02-10T13:03:58.000Z | 2021-02-10T13:03:58.000Z | #
# This file is part of the chi repository
# (https://github.com/DavAug/chi/) which is released under the
# BSD 3-clause license. See accompanying LICENSE.md for copyright notice and
# full license details.
#
import numpy as np
import pandas as pd
import plotly.colors
import plotly.graph_objects as go
from chi impor... | 39.149091 | 79 | 0.614063 |
e499102552bd3aee4d085fbe1a241bdf1d971995 | 948 | py | Python | Python/mianjing.py | JWang169/LintCodeJava | b75b06fa1551f5e4d8a559ef64e1ac29db79c083 | [
"CNRI-Python"
] | 1 | 2020-12-10T05:36:15.000Z | 2020-12-10T05:36:15.000Z | Python/mianjing.py | JWang169/LintCodeJava | b75b06fa1551f5e4d8a559ef64e1ac29db79c083 | [
"CNRI-Python"
] | null | null | null | Python/mianjing.py | JWang169/LintCodeJava | b75b06fa1551f5e4d8a559ef64e1ac29db79c083 | [
"CNRI-Python"
] | 3 | 2020-04-06T05:55:08.000Z | 2021-08-29T14:26:54.000Z | """
第一轮
给一个 m*n 的空矩阵,有一个 API 可以每天随机加一个 tower (矩阵里面的一个点)。一个 tower 代表矩阵里的一个点
相邻(上下左右)的 tower之间可以连通。
问多少天能连通最左最右两个 column (任意 column 上面的点就行)。 相当于就是问什么时候可以确定最左最右是连通的
"""
def tower(grid, x, y):
m, n = len(grid[0]), len(grid)
dx = [-1, 1, 0, 0]
dy = [0, 0, -1, 1]
for i in range(4):
nx, ny = x + dx[i] + y + dy[i]
if ... | 18.230769 | 86 | 0.619198 |
4adf7c986a316670c061c397ed68c2efccd4e95e | 2,179 | py | Python | Linkedlist/singlyll_Add_At_index.py | mukul20-21/python_datastructure | 6126722f0742110752fb634a7da1081bdbce9444 | [
"Apache-2.0"
] | null | null | null | Linkedlist/singlyll_Add_At_index.py | mukul20-21/python_datastructure | 6126722f0742110752fb634a7da1081bdbce9444 | [
"Apache-2.0"
] | null | null | null | Linkedlist/singlyll_Add_At_index.py | mukul20-21/python_datastructure | 6126722f0742110752fb634a7da1081bdbce9444 | [
"Apache-2.0"
] | null | null | null | class Node:
def __init__(self,data):
self.data = data
self.next = None
class LinkedList:
def __init__(self):
self.head = None
def __str__ (self):
result = []
node = self.head # create a pointer named as node for over convience..!!
... | 38.22807 | 119 | 0.479119 |
3f0ac36a51b93c22b506e35f7443161865822f46 | 3,391 | py | Python | scraper/scraper/db.py | toolen/covid-leningrad-region | d50c8e26269c4876c1ff927b97bd25969d7924c4 | [
"MIT"
] | null | null | null | scraper/scraper/db.py | toolen/covid-leningrad-region | d50c8e26269c4876c1ff927b97bd25969d7924c4 | [
"MIT"
] | null | null | null | scraper/scraper/db.py | toolen/covid-leningrad-region | d50c8e26269c4876c1ff927b97bd25969d7924c4 | [
"MIT"
] | null | null | null | """This file contains the code for working with the database."""
import logging
from typing import Dict, List, Optional, Union, cast
from pymongo import MongoClient, UpdateOne
from pymongo.collection import Collection
from pymongo.errors import BulkWriteError
from tenacity import retry, wait_fixed
from scraper.consta... | 28.258333 | 84 | 0.598349 |
731518e39ee696af90ef69b8ac939589b5f645ee | 20,408 | py | Python | skimage/segmentation/random_walker_segmentation.py | lyuka/scikit-image | 9fd8bb09a34d41aed078029f583ab2917ca87bbd | [
"BSD-3-Clause"
] | 1 | 2016-01-26T06:14:58.000Z | 2016-01-26T06:14:58.000Z | skimage/segmentation/random_walker_segmentation.py | lyuka/scikit-image | 9fd8bb09a34d41aed078029f583ab2917ca87bbd | [
"BSD-3-Clause"
] | null | null | null | skimage/segmentation/random_walker_segmentation.py | lyuka/scikit-image | 9fd8bb09a34d41aed078029f583ab2917ca87bbd | [
"BSD-3-Clause"
] | null | null | null | """
Random walker segmentation algorithm
from *Random walks for image segmentation*, Leo Grady, IEEE Trans
Pattern Anal Mach Intell. 2006 Nov;28(11):1768-83.
Installing pyamg and using the 'cg_mg' mode of random_walker improves
significantly the performance.
"""
import warnings
import numpy as np
from scipy import s... | 39.550388 | 135 | 0.61814 |
af53fd879153376910929445a6df2a5cbf8e391f | 4,902 | py | Python | env.py | crazycs520/py12306 | f8340c84524636493505154d3b3fecda15f58a42 | [
"Apache-2.0"
] | null | null | null | env.py | crazycs520/py12306 | f8340c84524636493505154d3b3fecda15f58a42 | [
"Apache-2.0"
] | null | null | null | env.py | crazycs520/py12306 | f8340c84524636493505154d3b3fecda15f58a42 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# 12306 账号
USER_ACCOUNTS = [
# 目前已支持仅查询,不下单,屏蔽掉下面的账号即可
{
'key': 0, # 如使用多个账号 key 不能重复
'user_name': '152110938',
'password': '152110938'
},
# {
# 'key': 'wangwu',
# 'user_name': 'wangwu@qq.com',
# 'password': 'wangwu'
# }
]
# ... | 28.5 | 135 | 0.598531 |
1f6615fc09af3d6abf56b99972ea68e4ab30c184 | 8,501 | py | Python | python/ray/tune/tests/test_experiment_analysis_mem.py | daobook/ray | af9f1ef4dc160e0671206556b387f8017f3c3930 | [
"Apache-2.0"
] | 33 | 2020-05-27T14:25:24.000Z | 2022-03-22T06:11:30.000Z | python/ray/tune/tests/test_experiment_analysis_mem.py | daobook/ray | af9f1ef4dc160e0671206556b387f8017f3c3930 | [
"Apache-2.0"
] | 115 | 2021-01-19T04:40:50.000Z | 2022-03-26T07:09:00.000Z | python/ray/tune/tests/test_experiment_analysis_mem.py | daobook/ray | af9f1ef4dc160e0671206556b387f8017f3c3930 | [
"Apache-2.0"
] | 5 | 2020-08-06T15:53:07.000Z | 2022-02-09T03:31:31.000Z | import json
import unittest
import shutil
import tempfile
import os
import random
import pandas as pd
import pytest
import numpy as np
import ray
from ray.tune import (run, Trainable, sample_from, ExperimentAnalysis,
grid_search)
from ray.tune.result import DEBUG_METRICS
from ray.tune.utils.mock ... | 36.32906 | 79 | 0.581814 |
886e1cd6f912085a63fc294a605ea762da2e1a7a | 325,997 | py | Python | tir/technologies/webapp_internal.py | totvs/tir | 2f096b1b6f103b0b3069ce0171f9d6860712f375 | [
"MIT"
] | 55 | 2018-09-12T22:01:42.000Z | 2022-01-27T19:16:56.000Z | tir/technologies/webapp_internal.py | totvs/tir | 2f096b1b6f103b0b3069ce0171f9d6860712f375 | [
"MIT"
] | 44 | 2018-09-17T13:50:42.000Z | 2021-08-31T17:54:32.000Z | tir/technologies/webapp_internal.py | totvs/tir | 2f096b1b6f103b0b3069ce0171f9d6860712f375 | [
"MIT"
] | 55 | 2018-09-13T01:44:42.000Z | 2022-03-08T21:37:35.000Z | import re
import time
import pandas as pd
import inspect
import os
import random
import uuid
from functools import reduce
from selenium.webdriver.common.keys import Keys
from bs4 import BeautifulSoup
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from seleni... | 42.348272 | 236 | 0.584527 |
8ed31b3dfc0a48329c092b14d8eb5cb43cfefe82 | 4,692 | py | Python | template/learning.py | liyuan9988/IVOPEwithACME | d77fab09b2e1cb8d3dbd8b2ab88adcce6a853558 | [
"MIT"
] | 1 | 2020-09-05T01:25:39.000Z | 2020-09-05T01:25:39.000Z | template/learning.py | liyuan9988/IVOPEwithACME | d77fab09b2e1cb8d3dbd8b2ab88adcce6a853558 | [
"MIT"
] | null | null | null | template/learning.py | liyuan9988/IVOPEwithACME | d77fab09b2e1cb8d3dbd8b2ab88adcce6a853558 | [
"MIT"
] | null | null | null | # Lint as: python3
"""DFIV Learner implementation."""
from typing import Dict, List
import acme
from acme.tf import savers as tf2_savers
from acme.tf import utils as tf2_utils
from acme.utils import counting
from acme.utils import loggers
import numpy as np
import sonnet as snt
import tensorflow as tf
class DFIVLea... | 34.755556 | 80 | 0.684569 |
b56b3f5817de71b581872d829ccb6bffd06868e9 | 297 | py | Python | service/__init__.py | volbil/ethereum-indexer | 5efef3afef07a7afed558983385ebb666f27d5d9 | [
"MIT"
] | null | null | null | service/__init__.py | volbil/ethereum-indexer | 5efef3afef07a7afed558983385ebb666f27d5d9 | [
"MIT"
] | null | null | null | service/__init__.py | volbil/ethereum-indexer | 5efef3afef07a7afed558983385ebb666f27d5d9 | [
"MIT"
] | null | null | null | from flask_cors import CORS
from flask import Flask
import config
def create_app():
app = Flask(__name__)
app.config["SECRET_KEY"] = config.secret
CORS(app)
with app.app_context():
from .history import history
app.register_blueprint(history)
return app
| 18.5625 | 44 | 0.680135 |
84248feacf7542a6bf2634a042cdeb8e970b3bfa | 6,027 | py | Python | discovery-infra/test_infra/helper_classes/nodes.py | rollandf/assisted-test-infra | f2d3411ceb0838f3045e4ad88f2686bed516cf8f | [
"Apache-2.0"
] | 27 | 2020-06-26T13:38:14.000Z | 2022-03-13T11:06:34.000Z | discovery-infra/test_infra/helper_classes/nodes.py | cdvultur/assisted-test-infra | a3deeeac975c9be087c7177827d991d1680b720a | [
"Apache-2.0"
] | 1,559 | 2020-06-27T15:36:37.000Z | 2022-03-31T22:58:50.000Z | discovery-infra/test_infra/helper_classes/nodes.py | rollandf/assisted-test-infra | f2d3411ceb0838f3045e4ad88f2686bed516cf8f | [
"Apache-2.0"
] | 83 | 2020-06-26T09:24:43.000Z | 2022-03-08T23:19:59.000Z | import json
import logging
import random
from typing import Dict, Iterator, List
from munch import Munch
from test_infra.controllers.node_controllers.node import Node
from test_infra.controllers.node_controllers.node_controller import NodeController
from test_infra.tools.concurrently import run_concurrently
class N... | 32.058511 | 91 | 0.684088 |
30cef8b2a5d8d175df736de6c4ce2fc2cd8c9987 | 1,000 | py | Python | mk42/apps/core/querysets/group.py | vint21h/mk42 | 1574d1143ea829212203f2be0b11b44de1e7c722 | [
"WTFPL"
] | 5 | 2017-06-18T17:04:49.000Z | 2017-11-02T11:44:36.000Z | mk42/apps/core/querysets/group.py | vint21h/mk42 | 1574d1143ea829212203f2be0b11b44de1e7c722 | [
"WTFPL"
] | 13 | 2017-07-05T06:35:42.000Z | 2017-09-06T02:04:04.000Z | mk42/apps/core/querysets/group.py | vint21h/mk42 | 1574d1143ea829212203f2be0b11b44de1e7c722 | [
"WTFPL"
] | 10 | 2017-06-29T05:31:52.000Z | 2017-10-27T09:31:32.000Z | # -*- coding: utf-8 -*-
# mk42
# mk42/apps/core/querysets/groups.py
from __future__ import unicode_literals
from django.db import models
__all__ = [
"GroupQuerySet",
]
class GroupQuerySet(models.QuerySet):
"""
Group model queryset.
"""
def active(self, *args, **kwargs):
"""
R... | 20.833333 | 48 | 0.586 |
2c854c75dc13261a567a8ab760e6cd35c32062db | 2,644 | py | Python | Space-Debris-Detection/spaceDebrisDetection.py | simransuresh/Geospatial-CV | d3c6aab70cbfedc5567701478872b51ed5742426 | [
"MIT"
] | null | null | null | Space-Debris-Detection/spaceDebrisDetection.py | simransuresh/Geospatial-CV | d3c6aab70cbfedc5567701478872b51ed5742426 | [
"MIT"
] | null | null | null | Space-Debris-Detection/spaceDebrisDetection.py | simransuresh/Geospatial-CV | d3c6aab70cbfedc5567701478872b51ed5742426 | [
"MIT"
] | null | null | null | """ Import the master rockstar first of all """
import cv2 as cv
""" Import numpy lib for kernel operations """
import numpy as np
""" All the area except debris is black in space. So create a boundary from black (0) to white (255) """
lowerBoundary = np.array([0, 0, 0])
upperBoundary = np.array([0, 0, 255])
""" Capt... | 42.645161 | 106 | 0.677761 |
4cfdd673478ba99b7ab61721556c67accf50dd2b | 3,243 | py | Python | tests/loggers/test_neptune.py | akreuzer/pytorch-lightning | 34bc1493596697a2dfc8c76036921b2bb2fb5013 | [
"Apache-2.0"
] | null | null | null | tests/loggers/test_neptune.py | akreuzer/pytorch-lightning | 34bc1493596697a2dfc8c76036921b2bb2fb5013 | [
"Apache-2.0"
] | null | null | null | tests/loggers/test_neptune.py | akreuzer/pytorch-lightning | 34bc1493596697a2dfc8c76036921b2bb2fb5013 | [
"Apache-2.0"
] | null | null | null | from unittest.mock import patch, MagicMock
import torch
import tests.base.utils as tutils
from pytorch_lightning import Trainer
from pytorch_lightning.loggers import NeptuneLogger
from tests.base import LightningTestModel
@patch('pytorch_lightning.loggers.neptune.neptune')
def test_neptune_online(neptune):
logg... | 38.152941 | 98 | 0.753006 |
cba1f87518ef9ecc5da79255c4b60ed7a00bf61c | 4,606 | py | Python | parser/fase2/team08/Tytus_SQLPARSER_G8/Instrucciones/FunctionBinaryString/Convert.py | Gabriel-15/tytus | fb00718bf3fcc5211a3604fba1a551f44bdc6deb | [
"MIT"
] | 35 | 2020-12-07T03:11:43.000Z | 2021-04-15T17:38:16.000Z | parser/fase2/team08/Tytus_SQLPARSER_G8/Instrucciones/FunctionBinaryString/Convert.py | Gabriel-15/tytus | fb00718bf3fcc5211a3604fba1a551f44bdc6deb | [
"MIT"
] | 47 | 2020-12-09T01:29:09.000Z | 2021-01-13T05:37:50.000Z | parser/fase2/team08/Tytus_SQLPARSER_G8/Instrucciones/FunctionBinaryString/Convert.py | Gabriel-15/tytus | fb00718bf3fcc5211a3604fba1a551f44bdc6deb | [
"MIT"
] | 556 | 2020-12-07T03:13:31.000Z | 2021-06-17T17:41:10.000Z | from Instrucciones.TablaSimbolos.Instruccion import Instruccion
from Instrucciones.TablaSimbolos.Tipo import Tipo_Dato, Tipo
from Instrucciones.Excepcion import Excepcion
from Instrucciones.Expresiones.Aritmetica import Aritmetica
from Instrucciones.Expresiones.Primitivo import Primitivo
from decimal import Decimal
fro... | 47 | 193 | 0.574034 |
a46f41e2ef00264f5f317759795ef5ec6e91845b | 1,432 | py | Python | src/py/4.3.4-Task-API-Multi-label.py | saibaldas/automl-in-action-notebooks | 4ddd105c7fccf2382091afaf05884ab816ad4b38 | [
"MIT"
] | 1 | 2022-03-29T19:47:09.000Z | 2022-03-29T19:47:09.000Z | src/py/4.3.4-Task-API-Multi-label.py | qingquansong/automl-in-action-notebooks | 4ddd105c7fccf2382091afaf05884ab816ad4b38 | [
"MIT"
] | null | null | null | src/py/4.3.4-Task-API-Multi-label.py | qingquansong/automl-in-action-notebooks | 4ddd105c7fccf2382091afaf05884ab816ad4b38 | [
"MIT"
] | null | null | null | """shell
pip install -r https://raw.githubusercontent.com/datamllab/automl-in-action-notebooks/master/requirements.txt
"""
import tensorflow as tf
import autokeras as ak
"""
### Create synthetic multi-label dataset
"""
from sklearn.datasets import make_multilabel_classification
X, Y = make_multilabel_classification... | 23.47541 | 109 | 0.711592 |
43229af607708505bd71d9b2f35372b263e56a94 | 16,564 | py | Python | VL-BERT/cls/data/datasets/cls_v2.py | weihezhai/HatefulMemesChallenge | 04f52643c0864d1efb6c0a9c674db42764f6834c | [
"MIT"
] | 63 | 2020-12-09T18:58:16.000Z | 2022-03-21T02:34:35.000Z | VL-BERT/cls/data/datasets/cls_v2.py | weihezhai/HatefulMemesChallenge | 04f52643c0864d1efb6c0a9c674db42764f6834c | [
"MIT"
] | 5 | 2021-01-29T10:33:04.000Z | 2021-08-25T14:15:27.000Z | VL-BERT/cls/data/datasets/cls_v2.py | weihezhai/HatefulMemesChallenge | 04f52643c0864d1efb6c0a9c674db42764f6834c | [
"MIT"
] | 18 | 2020-12-11T20:36:04.000Z | 2021-12-12T07:04:20.000Z | import os
import json
import re
import base64
import numpy as np
import csv
import sys
import time
import pprint
import logging
import collections
import random
import torch
from torch.utils.data import Dataset
from external.pytorch_pretrained_bert import BertTokenizer
from transformers import PreTrainedTokenizer, Pre... | 40.009662 | 139 | 0.553248 |
0cb99e2dd2a898cb718bb9bea2576ce3423e3d6a | 1,375 | py | Python | models/bert_base_uncased.py | chrisAS12/specseminars-2021-mi | 9f1bfa6dc5abac6d3b9f8b9cb2224431c78f0365 | [
"MIT"
] | null | null | null | models/bert_base_uncased.py | chrisAS12/specseminars-2021-mi | 9f1bfa6dc5abac6d3b9f8b9cb2224431c78f0365 | [
"MIT"
] | null | null | null | models/bert_base_uncased.py | chrisAS12/specseminars-2021-mi | 9f1bfa6dc5abac6d3b9f8b9cb2224431c78f0365 | [
"MIT"
] | null | null | null | from transformers import pipeline, AutoTokenizer, AutoModelForMaskedLM
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
model = AutoModelForMaskedLM.from_pretrained("bert-base-uncased")
def predict(sentence, symbol_to_replace, model, tokenizer):
try:
fill_mask = pipeline(
"fill-... | 33.536585 | 106 | 0.666909 |
8b6db77ed6de5e88ef9a82a6aeff74b8ee68a8ed | 3,053 | py | Python | saleor/graphql/app/tests/queries/test_apps_pagination.py | fairhopeweb/saleor | 9ac6c22652d46ba65a5b894da5f1ba5bec48c019 | [
"CC-BY-4.0"
] | 15,337 | 2015-01-12T02:11:52.000Z | 2021-10-05T19:19:29.000Z | saleor/graphql/app/tests/queries/test_apps_pagination.py | fairhopeweb/saleor | 9ac6c22652d46ba65a5b894da5f1ba5bec48c019 | [
"CC-BY-4.0"
] | 7,486 | 2015-02-11T10:52:13.000Z | 2021-10-06T09:37:15.000Z | saleor/graphql/app/tests/queries/test_apps_pagination.py | aminziadna/saleor | 2e78fb5bcf8b83a6278af02551a104cfa555a1fb | [
"CC-BY-4.0"
] | 5,864 | 2015-01-16T14:52:54.000Z | 2021-10-05T23:01:15.000Z | import pytest
from .....app.models import App
from ....tests.utils import get_graphql_content
@pytest.fixture()
def apps_for_pagination():
apps = App.objects.bulk_create(
[
App(name="Account1", is_active=True),
App(name="AccountAccount1", is_active=True),
App(name="Acc... | 28.53271 | 86 | 0.586964 |
4bb199db9d8b7091619d4946c6f35bc0baef2624 | 738 | py | Python | adafruit-circuitpython-bundle-py-20201107/examples/circuitplayground_tapdetect_single_double.py | rantler/AdaFruit | 9b0aa56ede9ac358b835162cad4c6531c09ba5b0 | [
"CC0-1.0"
] | null | null | null | adafruit-circuitpython-bundle-py-20201107/examples/circuitplayground_tapdetect_single_double.py | rantler/AdaFruit | 9b0aa56ede9ac358b835162cad4c6531c09ba5b0 | [
"CC0-1.0"
] | null | null | null | adafruit-circuitpython-bundle-py-20201107/examples/circuitplayground_tapdetect_single_double.py | rantler/AdaFruit | 9b0aa56ede9ac358b835162cad4c6531c09ba5b0 | [
"CC0-1.0"
] | null | null | null | """This example shows how you can use single-tap and double-tap together with a delay between.
Single-tap the board twice and then double-tap the board twice to complete the program."""
from adafruit_circuitplayground import cp
# Set to check for single-taps.
cp.detect_taps = 1
tap_count = 0
# We're looking f... | 27.333333 | 95 | 0.692412 |
bf0a93b4c0a0a5c40490e0e2359bbe388da07698 | 119 | py | Python | HARK/__init__.py | jdice/HARK | 16361c6aa3790fb0f09a53c40d46f01cb8634a9a | [
"Apache-2.0"
] | null | null | null | HARK/__init__.py | jdice/HARK | 16361c6aa3790fb0f09a53c40d46f01cb8634a9a | [
"Apache-2.0"
] | null | null | null | HARK/__init__.py | jdice/HARK | 16361c6aa3790fb0f09a53c40d46f01cb8634a9a | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from .core import *
__version__ = '0.10.1.dev3'
from .BayerLuetticke import *
| 17 | 38 | 0.773109 |
42f8fef54f2f840c878ed599bf7f3c4e5aa7120b | 2,916 | py | Python | test/functional/mempool_resurrect.py | ogfuncoin/ogfuncoin | 18d00bc1d93335c86ae6f2971321e93e627ae570 | [
"MIT"
] | null | null | null | test/functional/mempool_resurrect.py | ogfuncoin/ogfuncoin | 18d00bc1d93335c86ae6f2971321e93e627ae570 | [
"MIT"
] | null | null | null | test/functional/mempool_resurrect.py | ogfuncoin/ogfuncoin | 18d00bc1d93335c86ae6f2971321e93e627ae570 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2018 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 resurrection of mined transactions when the blockchain is re-organized."""
from test_framework.bl... | 41.070423 | 123 | 0.674211 |
0b04217b97b68a98f8ad34bb79e894b479a89302 | 123 | py | Python | sciwing/models/__init__.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | 50 | 2019-09-13T10:32:29.000Z | 2022-02-14T16:52:53.000Z | sciwing/models/__init__.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | 31 | 2019-09-03T11:06:03.000Z | 2021-08-20T14:57:09.000Z | sciwing/models/__init__.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | 9 | 2019-09-16T03:25:15.000Z | 2021-05-11T10:28:25.000Z | from sciwing.models.simpleclassifier import SimpleClassifier
from sciwing.models.rnn_seq_crf_tagger import RnnSeqCrfTagger
| 41 | 61 | 0.902439 |
485e9a85206fd5ce9356be87fa2983d1489f2245 | 3,444 | py | Python | tests/components/knx/test_init.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | null | null | null | tests/components/knx/test_init.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | null | null | null | tests/components/knx/test_init.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | null | null | null | """Test KNX init."""
import pytest
from xknx import XKNX
from xknx.io import (
DEFAULT_MCAST_GRP,
DEFAULT_MCAST_PORT,
ConnectionConfig,
ConnectionType,
)
from homeassistant.components.knx.const import (
CONF_KNX_AUTOMATIC,
CONF_KNX_CONNECTION_TYPE,
CONF_KNX_DEFAULT_RATE_LIMIT,
CONF_KNX_... | 31.888889 | 88 | 0.631823 |
314eb5150682e75213243cd890d64f7b63af63ef | 31,734 | py | Python | qtapps/skrf_qtwidgets/widgets.py | DavidLutton/scikit-rf | 1e0dfb2c560058ae21ddf255f395a753b6ea696f | [
"BSD-3-Clause"
] | null | null | null | qtapps/skrf_qtwidgets/widgets.py | DavidLutton/scikit-rf | 1e0dfb2c560058ae21ddf255f395a753b6ea696f | [
"BSD-3-Clause"
] | null | null | null | qtapps/skrf_qtwidgets/widgets.py | DavidLutton/scikit-rf | 1e0dfb2c560058ae21ddf255f395a753b6ea696f | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
import traceback
from qtpy import QtWidgets, QtCore, QtGui
import skrf
from . import numeric_inputs
from . import qt
from .analyzers import analyzers
def load_network_file(caption="load network file", filter="touchstone file (*.s*p)"):
fname = qt.getOpenFileName_Global(caption, filter)
... | 40.528736 | 149 | 0.673757 |
349ba3465e9e6a1999cf5255a95b83cf9ee09c98 | 8,893 | py | Python | examples/Nolan/AFRL/Carts/cart76.py | Rapid-Design-of-Systems-Laboratory/beluga-legacy | d14713d8211b64293c4427005cf02fbd58630598 | [
"MIT"
] | 1 | 2019-03-26T03:00:03.000Z | 2019-03-26T03:00:03.000Z | examples/Nolan/AFRL/Carts/cart76.py | Rapid-Design-of-Systems-Laboratory/beluga-legacy | d14713d8211b64293c4427005cf02fbd58630598 | [
"MIT"
] | null | null | null | examples/Nolan/AFRL/Carts/cart76.py | Rapid-Design-of-Systems-Laboratory/beluga-legacy | d14713d8211b64293c4427005cf02fbd58630598 | [
"MIT"
] | 1 | 2019-07-14T22:53:52.000Z | 2019-07-14T22:53:52.000Z | if __name__ == "__main__":
import numpy as np
import beluga.Beluga as Beluga
import beluga.bvpsol as bvpsol
import beluga.bvpsol.algorithms as algorithms
import beluga.optim.Problem
from beluga.optim.problem import *
from beluga.continuation import *
import logging
# Import Librari... | 30.248299 | 288 | 0.505116 |
5060f3f800088af76811aca7b4b7329105e95ce4 | 1,767 | py | Python | quality_manager/measurements/test_measurement.py | MOOCworkbench/MOOCworkbench | c478dd4f185c50e0a48319e2b30d418533c32a34 | [
"MIT"
] | null | null | null | quality_manager/measurements/test_measurement.py | MOOCworkbench/MOOCworkbench | c478dd4f185c50e0a48319e2b30d418533c32a34 | [
"MIT"
] | 1 | 2017-07-09T17:38:21.000Z | 2017-07-09T17:38:22.000Z | quality_manager/measurements/test_measurement.py | MOOCworkbench/MOOCworkbench | c478dd4f185c50e0a48319e2b30d418533c32a34 | [
"MIT"
] | null | null | null | from coverage_manager.helpers.coveralls_helper import CoverallsHelper
from git_manager.helpers.github_helper import GitHubHelper
from quality_manager.measurements.measurement import MeasurementAbstraction
from quality_manager.models import (ExperimentMeasure, ExperimentMeasureResult,
... | 40.159091 | 106 | 0.682513 |
a8e89b3e5ea2d6af21bd75d221ed07b8dd13f4ae | 5,575 | py | Python | check_in/github_checks_requests.py | JayBatra/check-in | 4d11a0a70e62a44318a562de03fcf5c4f868e988 | [
"MIT"
] | null | null | null | check_in/github_checks_requests.py | JayBatra/check-in | 4d11a0a70e62a44318a562de03fcf5c4f868e988 | [
"MIT"
] | null | null | null | check_in/github_checks_requests.py | JayBatra/check-in | 4d11a0a70e62a44318a562de03fcf5c4f868e988 | [
"MIT"
] | null | null | null | from functools import partial
from typing import List, Optional
import attr
__all__ = 'NewCheckRequest', 'UpdateCheckRequest', 'to_gh_query'
str_attrib = partial(attr.ib, converter=lambda s: str(s) if s is not None else '')
int_attrib = partial(attr.ib, converter=int)
optional_attrib = partial(
attr.ib,
... | 30.464481 | 137 | 0.655426 |
2c6cfd8766d897bcf19758203b8a815d035e32dd | 75,306 | py | Python | xnu-4903.241.1/tools/lldbmacros/net.py | DogeCoding/iOSCompiledRuntime | 81bada7472a3470d3424f2d0bbcc414d755c3620 | [
"MIT"
] | 672 | 2019-10-09T11:15:13.000Z | 2021-09-21T10:02:33.000Z | xnu-4903.221.2/tools/lldbmacros/net.py | KaiserFeng/KFAppleOpenSource | 7ea6ab19f1492a2da262d3554f90882393f975a4 | [
"MIT"
] | 19 | 2019-11-05T03:32:31.000Z | 2021-07-15T11:16:25.000Z | xnu-4903.221.2/tools/lldbmacros/net.py | KaiserFeng/KFAppleOpenSource | 7ea6ab19f1492a2da262d3554f90882393f975a4 | [
"MIT"
] | 216 | 2019-10-10T01:47:36.000Z | 2021-09-23T07:56:54.000Z |
""" Please make sure you read the README COMPLETELY BEFORE reading anything below.
It is very critical that you read coding guidelines in Section E in README file.
"""
from xnu import *
from utils import *
from string import *
from socket import *
import xnudefines
from netdefines import *
from routedefines imp... | 39.530709 | 353 | 0.56609 |
9a5c0085a0dbcedb9406d4dd24af668ed735b1f1 | 7,724 | py | Python | parse_args.py | headacheboy/IGSQL | 5cdbdbf5e530be14ff6441d2a4a514f3546d76ba | [
"Apache-2.0"
] | 18 | 2020-11-13T03:18:05.000Z | 2022-01-11T02:38:06.000Z | parse_args.py | kiminh/IGSQL | 5cdbdbf5e530be14ff6441d2a4a514f3546d76ba | [
"Apache-2.0"
] | 2 | 2020-12-07T10:06:15.000Z | 2021-03-10T07:13:45.000Z | parse_args.py | kiminh/IGSQL | 5cdbdbf5e530be14ff6441d2a4a514f3546d76ba | [
"Apache-2.0"
] | 4 | 2020-11-17T06:42:34.000Z | 2021-12-29T05:18:30.000Z | import sys
args = sys.argv
import os
import argparse
def interpret_args():
""" Interprets the command line arguments, and returns a dictionary. """
parser = argparse.ArgumentParser()
parser.add_argument("--no_gpus", type=bool, default=1)
### Data parameters
parser.add_argument(
'--raw_tr... | 46.53012 | 118 | 0.714267 |
e0a32547fcb15c8068fee150f7654fe501a68512 | 38,465 | py | Python | tests/nlu/test_evaluation.py | Goxiaoy/rasa | 93d9983e465f7a426930a746fef1252cbb2f8f35 | [
"Apache-2.0"
] | null | null | null | tests/nlu/test_evaluation.py | Goxiaoy/rasa | 93d9983e465f7a426930a746fef1252cbb2f8f35 | [
"Apache-2.0"
] | null | null | null | tests/nlu/test_evaluation.py | Goxiaoy/rasa | 93d9983e465f7a426930a746fef1252cbb2f8f35 | [
"Apache-2.0"
] | null | null | null | import datetime
import json
import os
import sys
from pathlib import Path
from typing import Text, List, Dict, Any, Set, Optional
from tests.conftest import AsyncMock
import pytest
from _pytest.monkeypatch import MonkeyPatch
from unittest.mock import Mock
import rasa.nlu.test
import rasa.shared.nlu.training_data.loa... | 31.528689 | 88 | 0.586585 |
1c14b6cf25a43c1c8af9aa94b5243285b1576d68 | 3,707 | py | Python | old/gene.cluster.py | orionzhou/biolib | 940fb66f1b2608d34a2d00ebdf41dc84c6381f42 | [
"BSD-2-Clause"
] | 3 | 2019-02-22T20:35:23.000Z | 2021-11-25T10:01:50.000Z | old/gene.cluster.py | orionzhou/biolib | 940fb66f1b2608d34a2d00ebdf41dc84c6381f42 | [
"BSD-2-Clause"
] | null | null | null | old/gene.cluster.py | orionzhou/biolib | 940fb66f1b2608d34a2d00ebdf41dc84c6381f42 | [
"BSD-2-Clause"
] | 1 | 2021-02-19T03:10:14.000Z | 2021-02-19T03:10:14.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import math
import os.path as op
import numpy as np
import argparse
orgs = """HM101
HM058 HM125 HM056 HM129 HM060
HM095 HM185 HM034 HM004 HM050
HM023 HM010 HM022 HM324 HM340
HM056.AC HM034.AC HM340.AC""".split()
dirw = "/home/youngn/zh... | 30.891667 | 151 | 0.541678 |
30619bf96f2b7a67321a63a5b0e9c74356f75de3 | 7,574 | py | Python | analysis/delphi_download.py | neuroelf/dermodelphi | c8dcc52310efcbe8f314f0cd01ffafed2199f56a | [
"MIT"
] | null | null | null | analysis/delphi_download.py | neuroelf/dermodelphi | c8dcc52310efcbe8f314f0cd01ffafed2199f56a | [
"MIT"
] | 1 | 2022-02-18T06:13:10.000Z | 2022-02-18T06:13:10.000Z | analysis/delphi_download.py | neuroelf/dermodelphi | c8dcc52310efcbe8f314f0cd01ffafed2199f56a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# imports
import csv
import os
import warnings
import bs4
import getpass
import json
import netrc
import pandas
import requests
# backend URL
DELPHI_BACKEND = 'https://delphi.diagnosismapper.com/'
# location to JSON file
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
PACKAGE_DIR = THIS... | 33.219298 | 85 | 0.537893 |
1942b2520de2623e26424852255d25e71cd1fb45 | 523 | py | Python | source/GUI/panelThree.py | gwiedeman/eadmachine | f6c0c0f92fc20ab6dcf4962fda827b7adb4749d4 | [
"Unlicense"
] | 5 | 2016-01-25T15:27:12.000Z | 2021-08-17T22:31:48.000Z | source/GUI/panelThree.py | gwiedeman/eadmachine | f6c0c0f92fc20ab6dcf4962fda827b7adb4749d4 | [
"Unlicense"
] | null | null | null | source/GUI/panelThree.py | gwiedeman/eadmachine | f6c0c0f92fc20ab6dcf4962fda827b7adb4749d4 | [
"Unlicense"
] | null | null | null | import wx
class TabPanel(wx.Panel):
"""
This will be the first notebook tab
"""
#----------------------------------------------------------------------
def __init__(self, parent):
""""""
wx.Panel.__init__(self, parent=parent, id=wx.ID_ANY)
titleImage = wx.StaticBitmap(s... | 34.866667 | 112 | 0.539197 |
b4e6bda10fd1a7196c8e7e2aef32645cc84a68ec | 4,045 | py | Python | utils/prioritize/az300_to_bed.py | kokyriakidis/cloudbiolinux | a318ecbade2b27e23c275601571b1b19c8842d7a | [
"MIT"
] | 122 | 2015-01-04T13:23:27.000Z | 2022-01-18T22:52:12.000Z | utils/prioritize/az300_to_bed.py | kokyriakidis/cloudbiolinux | a318ecbade2b27e23c275601571b1b19c8842d7a | [
"MIT"
] | 170 | 2015-02-09T18:03:49.000Z | 2021-11-14T02:32:09.000Z | utils/prioritize/az300_to_bed.py | kokyriakidis/cloudbiolinux | a318ecbade2b27e23c275601571b1b19c8842d7a | [
"MIT"
] | 107 | 2015-01-06T06:10:04.000Z | 2022-02-10T17:25:34.000Z | #!/usr/bin/env python
"""Map AZ300 gene name list to transcript regions.
This requires a 3 pass approach to get gene names to coordinates:
- it first tries against ensemble BED coordinates in a transcript file with
the supplied name
- it then remaps the name with gene.info to alternative symbols and tries to
find... | 36.772727 | 99 | 0.614586 |
65450bbda9c4d9643aee9e790dd3a9fdb3e4f563 | 937 | py | Python | test/test_rerun_zos_parameters.py | dcompane/controlm_py | c521208be2f00303383bb32ca5eb2b7ff91999d3 | [
"MIT"
] | 2 | 2020-03-20T18:24:23.000Z | 2021-03-05T22:05:04.000Z | test/test_rerun_zos_parameters.py | dcompane/controlm_py | c521208be2f00303383bb32ca5eb2b7ff91999d3 | [
"MIT"
] | null | null | null | test/test_rerun_zos_parameters.py | dcompane/controlm_py | c521208be2f00303383bb32ca5eb2b7ff91999d3 | [
"MIT"
] | 1 | 2021-05-27T15:54:37.000Z | 2021-05-27T15:54:37.000Z | # coding: utf-8
"""
Control-M Services
Provides access to BMC Control-M Services # noqa: E501
OpenAPI spec version: 9.20.220
Contact: customer_support@bmc.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import con... | 23.425 | 92 | 0.717182 |
f8ce388d5462683f462ab0e8f2aa128181a7e5b3 | 1,522 | py | Python | profiles_api/serializers.py | Algernonagon/rest-api | 35fd73fb8f4524c8f9082f21707491411acf3e50 | [
"MIT"
] | null | null | null | profiles_api/serializers.py | Algernonagon/rest-api | 35fd73fb8f4524c8f9082f21707491411acf3e50 | [
"MIT"
] | 7 | 2020-06-06T01:54:36.000Z | 2022-02-10T10:30:34.000Z | profiles_api/serializers.py | Algernonagon/rest-api | 35fd73fb8f4524c8f9082f21707491411acf3e50 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from profiles_api import models
class HelloSerializer(serializers.Serializer):
"""Serializes a name field for testing our APIView"""
name = serializers.CharField(max_length=10)
class UserProfileSerializer(serializers.ModelSerializer):
"""Serializes a us... | 30.44 | 69 | 0.610381 |
44f6a91fa13949d563a870cd5ef247e7869f85bb | 2,234 | py | Python | db/food_database/models.py | IBPA/FoodAtlas | 0a431f0a391adaa8984b380f3f6f7189f27b9311 | [
"Apache-2.0"
] | 1 | 2022-02-07T10:04:35.000Z | 2022-02-07T10:04:35.000Z | db/food_database/models.py | IBPA/FoodAtlas | 0a431f0a391adaa8984b380f3f6f7189f27b9311 | [
"Apache-2.0"
] | null | null | null | db/food_database/models.py | IBPA/FoodAtlas | 0a431f0a391adaa8984b380f3f6f7189f27b9311 | [
"Apache-2.0"
] | null | null | null | from django.db import models
class Food(models.Model):
foodon_id = models.CharField(max_length=100)
foodb_id = models.CharField(max_length=100)
name = models.CharField(max_length=100)
synonyms = models.CharField(max_length=100)
# Create your models here.
class Chemical(models.Model):
foodb_id ... | 33.848485 | 97 | 0.753805 |
46009a30ac9f914f751741fa83ea82c1a0a6bb7f | 20,858 | py | Python | tensorflow/python/layers/core_test.py | Zwysilence/tensorflow | b55001be83da044bb21d539d433dec6231eaec55 | [
"Apache-2.0"
] | 3 | 2018-09-25T00:35:34.000Z | 2018-09-25T00:38:06.000Z | tensorflow/python/layers/core_test.py | Zwysilence/tensorflow | b55001be83da044bb21d539d433dec6231eaec55 | [
"Apache-2.0"
] | 1 | 2019-08-22T20:29:33.000Z | 2019-12-19T10:16:21.000Z | tensorflow/python/layers/core_test.py | Zwysilence/tensorflow | b55001be83da044bb21d539d433dec6231eaec55 | [
"Apache-2.0"
] | 6 | 2018-12-20T01:35:20.000Z | 2020-07-10T17:29:57.000Z | # Copyright 2015 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.384921 | 99 | 0.699204 |
3f59e3431fca5b35c2016d9e0390026de6cdce3f | 1,418 | py | Python | cgi-bin/change_password.py | bengood362/csci4140-asg1 | caa8aa61b2f6daefe4cde69a6b2d8fa23b2d4b1f | [
"ImageMagick"
] | null | null | null | cgi-bin/change_password.py | bengood362/csci4140-asg1 | caa8aa61b2f6daefe4cde69a6b2d8fa23b2d4b1f | [
"ImageMagick"
] | null | null | null | cgi-bin/change_password.py | bengood362/csci4140-asg1 | caa8aa61b2f6daefe4cde69a6b2d8fa23b2d4b1f | [
"ImageMagick"
] | null | null | null | #!/usr/bin/python
# try_change_password.cgi
import cgi
import utils
def htmlTop():
print("""Content-type:text/html\n\n
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8'/>
<title>Change password</title>
</head>
<body>"""... | 31.511111 | 92 | 0.588152 |
bea9bb6dffa02beecabaa2133c9ad2cc6f03bf36 | 20,637 | py | Python | tensorflow/python/training/warm_starting_util.py | hsm207/tensorflow | 8ab4678ba216c3ec8fa32f417cb667b056689939 | [
"Apache-2.0"
] | 4 | 2021-06-15T17:26:07.000Z | 2021-11-17T10:58:08.000Z | tensorflow/python/training/warm_starting_util.py | hsm207/tensorflow | 8ab4678ba216c3ec8fa32f417cb667b056689939 | [
"Apache-2.0"
] | 4 | 2020-09-26T00:55:50.000Z | 2022-02-10T01:53:06.000Z | tensorflow/python/training/warm_starting_util.py | hsm207/tensorflow | 8ab4678ba216c3ec8fa32f417cb667b056689939 | [
"Apache-2.0"
] | 6 | 2018-12-20T01:35:20.000Z | 2020-07-10T17:29:57.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... | 42.815353 | 113 | 0.693172 |
d8e15a25f908c0b8924d4756aac5f9aefd910a0d | 2,722 | py | Python | prescience_client/commands/delete_command.py | ovh/prescience-client | a447d19f11c6739c4a4828b6072e80b39dc4cf13 | [
"BSD-3-Clause"
] | 15 | 2019-01-16T14:16:00.000Z | 2021-12-08T09:09:24.000Z | prescience_client/commands/delete_command.py | ovh/prescience-client | a447d19f11c6739c4a4828b6072e80b39dc4cf13 | [
"BSD-3-Clause"
] | 4 | 2019-03-28T15:12:46.000Z | 2019-11-20T10:47:37.000Z | prescience_client/commands/delete_command.py | ovh/prescience-client | a447d19f11c6739c4a4828b6072e80b39dc4cf13 | [
"BSD-3-Clause"
] | 1 | 2019-01-25T07:22:12.000Z | 2019-01-25T07:22:12.000Z | from prescience_client.commands import prompt_for_source_id_if_needed, prompt_for_dataset_id_if_needed, \
prompt_for_model_id_if_needed
from prescience_client.commands.command import Command
class DeleteCommand(Command):
def __init__(self, prescience_client):
super().__init__(
name='delete... | 38.885714 | 114 | 0.684056 |
12259ae863fbeb3aa008eaca07b40386b6cf457b | 301 | py | Python | data/multilingual/Mong.KHK/Mono_8/pdf_to_json_test_Mong.KHK_Mono_8.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | 1 | 2021-09-19T19:47:35.000Z | 2021-09-19T19:47:35.000Z | data/multilingual/Mong.KHK/Mono_8/pdf_to_json_test_Mong.KHK_Mono_8.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | data/multilingual/Mong.KHK/Mono_8/pdf_to_json_test_Mong.KHK_Mono_8.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | import pdf_to_json as p2j
import json
url = "file:data/multilingual/Mong.KHK/Mono_8/udhr_Mong.KHK_Mono_8.pdf"
lConverter = p2j.pdf_to_json.pdf_to_json_converter()
lConverter.mImageHashOnly = True
lDict = lConverter.convert(url)
print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
| 30.1 | 71 | 0.810631 |
113201340c81a6e21229078ae0ba458c3747ab04 | 5,941 | py | Python | kinow_client/models/product_attribute_create_request_1.py | kinow-io/kinow-python-sdk | 4c1699a3c78048b84287bd049a669651a5b4e2d5 | [
"Apache-2.0"
] | 1 | 2019-06-26T14:24:54.000Z | 2019-06-26T14:24:54.000Z | kinow_client/models/product_attribute_create_request_1.py | kinow-io/kinow-python-sdk | 4c1699a3c78048b84287bd049a669651a5b4e2d5 | [
"Apache-2.0"
] | null | null | null | kinow_client/models/product_attribute_create_request_1.py | kinow-io/kinow-python-sdk | 4c1699a3c78048b84287bd049a669651a5b4e2d5 | [
"Apache-2.0"
] | 1 | 2018-02-01T10:08:40.000Z | 2018-02-01T10:08:40.000Z | # coding: utf-8
"""
Server API
Reference for Server API (REST/Json)
OpenAPI spec version: 1.4.58
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class ProductAttributeCreateRequest1(object):
"""
NOTE:... | 27.127854 | 97 | 0.575492 |
377a6f04f9656f158c0b2fa5f71e372fef0e4dd0 | 2,459 | py | Python | src/python/marbles/ie/ccg/utils.py | marbles-ai/ie | b3fef462d3418580c827c94bc206bd2991500c1f | [
"MIT"
] | null | null | null | src/python/marbles/ie/ccg/utils.py | marbles-ai/ie | b3fef462d3418580c827c94bc206bd2991500c1f | [
"MIT"
] | null | null | null | src/python/marbles/ie/ccg/utils.py | marbles-ai/ie | b3fef462d3418580c827c94bc206bd2991500c1f | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, print_function
from marbles import future_string
from marbles.ie.ccg import Category, CAT_CONJ
## @ingroup gfn
def extract_predarg_categories_from_pt(pt, lst=None):
"""Extract the predicate-argument categories from a CCG parse tree.
Args:
pt: The parse tree re... | 28.929412 | 118 | 0.56161 |
3c5845fe92dd67afd72ab53a73bac76035171c92 | 35,208 | py | Python | cengal/code_flow_control/chained_flow/versions/v_1/chained_flow.py | FI-Mihej/Cengal | 516b9780da6ccc9168f8f89d7ba13dc29e24bc0b | [
"Apache-2.0"
] | 3 | 2018-07-23T18:48:58.000Z | 2021-07-18T14:17:20.000Z | cengal/code_flow_control/chained_flow/versions/v_1/chained_flow.py | FI-Mihej/Cengal | 516b9780da6ccc9168f8f89d7ba13dc29e24bc0b | [
"Apache-2.0"
] | null | null | null | cengal/code_flow_control/chained_flow/versions/v_1/chained_flow.py | FI-Mihej/Cengal | 516b9780da6ccc9168f8f89d7ba13dc29e24bc0b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
# Copyright © 2016 ButenkoMS. All rights reserved. Contacts: <gtalk@butenkoms.space>
#
# 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.a... | 42.368231 | 123 | 0.673171 |
4056322a83e015c7dcf0404b7d749bd06aa4f198 | 1,435 | py | Python | iot/mqttsn/mqttsn_messages/WillMsgUpd.py | mobius-software-ltd/iotbroker.cloud-python-client | 48242f5c2a7ffeadb9e03e7aa4ab4a961e09af63 | [
"RSA-MD"
] | 2 | 2021-06-25T10:32:32.000Z | 2022-01-20T02:04:21.000Z | iot/mqttsn/mqttsn_messages/WillMsgUpd.py | mobius-software-ltd/iotbroker.cloud-python-client | 48242f5c2a7ffeadb9e03e7aa4ab4a961e09af63 | [
"RSA-MD"
] | 2 | 2022-01-07T09:12:32.000Z | 2022-03-27T12:57:37.000Z | iot/mqttsn/mqttsn_messages/WillMsgUpd.py | mobius-software-ltd/iotbroker.cloud-python-client | 48242f5c2a7ffeadb9e03e7aa4ab4a961e09af63 | [
"RSA-MD"
] | 1 | 2019-02-28T21:22:16.000Z | 2019-02-28T21:22:16.000Z | """
# Mobius Software LTD
# Copyright 2015-2018, Mobius Software LTD
#
# This is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2.1 of
# the License, or (at your option) any later ve... | 35 | 69 | 0.696864 |
b7249450d404aab3115fd39b23b33cf45cac19bc | 4,320 | py | Python | Bio/Wise/dnal.py | ntamas/biopython | ff12c3dd533274678113ecdbd88b0136fb77e565 | [
"PostgreSQL"
] | 1 | 2022-01-18T22:33:06.000Z | 2022-01-18T22:33:06.000Z | Bio/Wise/dnal.py | ntamas/biopython | ff12c3dd533274678113ecdbd88b0136fb77e565 | [
"PostgreSQL"
] | null | null | null | Bio/Wise/dnal.py | ntamas/biopython | ff12c3dd533274678113ecdbd88b0136fb77e565 | [
"PostgreSQL"
] | null | null | null | #!/usr/bin/env python
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
#
# Bio.Wise contains modules for running and processing the output of
# some of the models in the Wise2 package by Ewan Birney av... | 30.20979 | 129 | 0.636806 |
05ed3a9614636fd8226bfba8c25d91e8ba18c5a3 | 643 | py | Python | controle_financeiro/controle_financeiro/settings/test.py | douglaspands/controle-financeiro | 1f8f44dca6132b730e92ccf62447dede4119b28e | [
"MIT"
] | null | null | null | controle_financeiro/controle_financeiro/settings/test.py | douglaspands/controle-financeiro | 1f8f44dca6132b730e92ccf62447dede4119b28e | [
"MIT"
] | null | null | null | controle_financeiro/controle_financeiro/settings/test.py | douglaspands/controle-financeiro | 1f8f44dca6132b730e92ccf62447dede4119b28e | [
"MIT"
] | 1 | 2021-06-15T22:14:22.000Z | 2021-06-15T22:14:22.000Z | import os
from decouple import config
from .base import *
SETTING_NAME = "test"
# Database
# https://docs.djangoproject.com/en/3.1/ref/settings/#databases
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db_test.sqlite3",
}
}
DEBUG = True
ALLOWED_HOSTS... | 19.484848 | 84 | 0.671851 |
70730cc03695fe860dd95be030451c28849506a9 | 41 | py | Python | installer/py2exe/test/test_noZipFile.py | ifwe/digsby | f5fe00244744aa131e07f09348d10563f3d8fa99 | [
"Python-2.0"
] | 35 | 2015-08-15T14:32:38.000Z | 2021-12-09T16:21:26.000Z | installer/py2exe/test/test_noZipFile.py | niterain/digsby | 16a62c7df1018a49eaa8151c0f8b881c7e252949 | [
"Python-2.0"
] | 4 | 2015-09-12T10:42:57.000Z | 2017-02-27T04:05:51.000Z | installer/py2exe/test/test_noZipFile.py | niterain/digsby | 16a62c7df1018a49eaa8151c0f8b881c7e252949 | [
"Python-2.0"
] | 15 | 2015-07-10T23:58:07.000Z | 2022-01-23T22:16:33.000Z | if __name__ == "__main__":
print 2+2
| 13.666667 | 26 | 0.609756 |
6035672698bd808db2de34233726f4f5536fb283 | 18,673 | py | Python | synapse/metrics/__init__.py | ThiefMaster/synapse | f2af3e4fc550e7e93be1b0f425c3e9c484b96293 | [
"Apache-2.0"
] | 1 | 2020-07-21T17:51:02.000Z | 2020-07-21T17:51:02.000Z | synapse/metrics/__init__.py | mjvaldez/synapse | de119063f248981510e961e83f1515a3add19a21 | [
"Apache-2.0"
] | null | null | null | synapse/metrics/__init__.py | mjvaldez/synapse | de119063f248981510e961e83f1515a3add19a21 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2015, 2016 OpenMarket 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 applica... | 31.974315 | 113 | 0.619825 |
594c92a85130dcc3de3de1b414510b7973b0524a | 4,176 | py | Python | troposphere_mate/canned/iam/awslambda.py | tsuttsu305/troposphere_mate-project | 15ee94cc913efb32bc991979efcad943c992074c | [
"MIT"
] | 10 | 2019-07-08T14:52:16.000Z | 2021-10-15T22:18:22.000Z | troposphere_mate/canned/iam/awslambda.py | tsuttsu305/troposphere_mate-project | 15ee94cc913efb32bc991979efcad943c992074c | [
"MIT"
] | 1 | 2019-07-08T00:36:50.000Z | 2019-07-08T00:36:50.000Z | troposphere_mate/canned/iam/awslambda.py | tsuttsu305/troposphere_mate-project | 15ee94cc913efb32bc991979efcad943c992074c | [
"MIT"
] | 2 | 2020-03-22T14:44:54.000Z | 2020-08-05T02:08:01.000Z | # -*- coding: utf-8 -*-
from troposphere_mate import Template, iam
from ...core.canned import MultiEnvBasicConfig, Constant
from ...core.mate import DEFAULT_LABELS_FIELD
from .const_aws_service_name import create_assume_role_policy_document, AWSServiceName
from .const_aws_managed_policy_arn import AWSManagedPolicyArn
... | 40.543689 | 105 | 0.515326 |
4faea2b3068977dfd3dd9cbefcc0c912506a8b1c | 54,556 | py | Python | amber/convert_amber.py | hannahbrucemacdonald/openmm-forcefields | 11a9ed2edf0745e77d3e362f27a6c1d5b77abfc5 | [
"MIT"
] | null | null | null | amber/convert_amber.py | hannahbrucemacdonald/openmm-forcefields | 11a9ed2edf0745e77d3e362f27a6c1d5b77abfc5 | [
"MIT"
] | null | null | null | amber/convert_amber.py | hannahbrucemacdonald/openmm-forcefields | 11a9ed2edf0745e77d3e362f27a6c1d5b77abfc5 | [
"MIT"
] | null | null | null | # AMBER --> OpenMM force-field conversion script
# Author: Rafal P. Wiewiora, ChoderaLab
from __future__ import print_function, division
import parmed
from parmed.utils.six import iteritems
from parmed.utils.six.moves import StringIO, zip
import simtk.openmm.app as app
import simtk.unit as u
import simtk
import os
impo... | 42.688576 | 149 | 0.620518 |
f5023075ad24645c9d3c45169a5f3b8b057a6dc7 | 8,860 | py | Python | FortniteAPI/Stats.py | tww0003/Fortnite-Tracker-Python-Wrapper | 46ca061aace98b319937260881949301843fc8cb | [
"WTFPL"
] | 1 | 2020-12-30T03:32:40.000Z | 2020-12-30T03:32:40.000Z | FortniteAPI/Stats.py | tww0003/Fortnite-Tracker-Python-Wrapper | 46ca061aace98b319937260881949301843fc8cb | [
"WTFPL"
] | null | null | null | FortniteAPI/Stats.py | tww0003/Fortnite-Tracker-Python-Wrapper | 46ca061aace98b319937260881949301843fc8cb | [
"WTFPL"
] | null | null | null | from enum import Enum
class FortnitePlaylist(Enum):
SOLO = "p2"
DUO = "p10"
SQUAD = "p9"
CURRENT_SOLO = "curr_p2"
CURRENT_DUO = "curr_p10"
CURRENT_SQUAD = "curr_p9"
class FortniteStats:
def __init__(self, json=None):
if json is not None:
self.json_data = json
... | 41.596244 | 105 | 0.675056 |
73ce5bd1653ec9af3c6bc45c483f489eb8bb088e | 3,773 | py | Python | atomate/vasp/fireworks/exchange.py | rkingsbury/atomate | d26b65d5c46882d9585f14188514d9a65276336c | [
"BSD-3-Clause-LBNL"
] | 167 | 2017-01-26T00:14:19.000Z | 2022-03-18T20:47:58.000Z | atomate/vasp/fireworks/exchange.py | rkingsbury/atomate | d26b65d5c46882d9585f14188514d9a65276336c | [
"BSD-3-Clause-LBNL"
] | 422 | 2016-12-16T18:21:15.000Z | 2022-03-23T22:13:19.000Z | atomate/vasp/fireworks/exchange.py | rkingsbury/atomate | d26b65d5c46882d9585f14188514d9a65276336c | [
"BSD-3-Clause-LBNL"
] | 158 | 2016-12-16T18:28:00.000Z | 2022-03-28T11:40:03.000Z | from fireworks import Firework
from atomate.vasp.firetasks.exchange import (
HeisenbergModelMapping,
HeisenbergModelToDb,
VampireMC,
VampireToDb,
)
from atomate.vasp.config import DB_FILE
__author__ = "Nathan C. Frey"
__email__ = "ncfrey@lbl.gov"
class HeisenbergModelFW(Firework):
def __init_... | 29.708661 | 88 | 0.593692 |
a5fe04d96b34d393824953631cb21e8a75a50b5c | 2,903 | py | Python | tests/validator_integration_test.py | drewjj/ode-output-validator-library | 8d104ee85e60feb06f6b4c0f353478866f4badff | [
"Apache-2.0"
] | null | null | null | tests/validator_integration_test.py | drewjj/ode-output-validator-library | 8d104ee85e60feb06f6b4c0f353478866f4badff | [
"Apache-2.0"
] | null | null | null | tests/validator_integration_test.py | drewjj/ode-output-validator-library | 8d104ee85e60feb06f6b4c0f353478866f4badff | [
"Apache-2.0"
] | null | null | null | from odevalidator import TestCase, ValidatorException
import unittest
import queue
from tests import assert_results
class ValidatorIntegrationTest(unittest.TestCase):
def test_good_file_does_good_things(self):
data_file = 'tests/testfiles/good.json'
results = self._validate_file(data_file)
... | 38.706667 | 89 | 0.69032 |
13227c4242d5cc5aee61a9cf30813736e492ddaa | 218 | py | Python | kbsite/urls.py | PerpetuumCommunity/simplePostKB | f5afa9711bc9352d9032ede3e92d26bc088f1603 | [
"MIT"
] | 1 | 2018-05-21T10:55:37.000Z | 2018-05-21T10:55:37.000Z | kbsite/urls.py | PerpetuumCommunity/simplePostKB | f5afa9711bc9352d9032ede3e92d26bc088f1603 | [
"MIT"
] | null | null | null | kbsite/urls.py | PerpetuumCommunity/simplePostKB | f5afa9711bc9352d9032ede3e92d26bc088f1603 | [
"MIT"
] | null | null | null | from django.conf.urls import url
import views
urlpatterns = [
url(r'^$', views.home, name="home"),
url(r'^(?P<pagenum>\d+)$', views.home, name="home"),
url(r'^postkill', views.postkill, name="postkill"),
] | 27.25 | 56 | 0.62844 |
5aeaa52c99d1563647e9b0620d586c5d96c05032 | 1,961 | py | Python | src/FrontEnd/Elaborator/fe_types_elaborator.py | Typee-Language/Typee | adf61fee616bd798dae3bdc6710fd819e188e925 | [
"MIT"
] | 9 | 2018-07-07T23:07:20.000Z | 2021-06-26T19:37:54.000Z | src/FrontEnd/Elaborator/fe_types_elaborator.py | Typee-Language/Typee | adf61fee616bd798dae3bdc6710fd819e188e925 | [
"MIT"
] | 147 | 2018-07-07T23:05:58.000Z | 2021-07-26T14:02:45.000Z | src/FrontEnd/Elaborator/fe_types_elaborator.py | Typee-Language/Typee | adf61fee616bd798dae3bdc6710fd819e188e925 | [
"MIT"
] | 2 | 2018-07-08T16:30:50.000Z | 2018-07-08T22:32:03.000Z | # -*- coding: utf-8 -*-
"""
Copyright (c) 2018-2021 Philippe Schmouker, Typee project, http://www.typee.ovh
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 witho... | 36.314815 | 79 | 0.566548 |
f310ed88eea5316b8b9359a47c63d008485a0e8c | 1,897 | py | Python | fpga/utils/fanglobs.py | bugblat/fan | 854b2c0c6b94270bd08a2cf58bfa1871d34bb8ef | [
"MIT"
] | 5 | 2016-01-21T21:22:04.000Z | 2022-02-16T22:26:59.000Z | fpga/utils/fanglobs.py | bugblat/fan | 854b2c0c6b94270bd08a2cf58bfa1871d34bb8ef | [
"MIT"
] | null | null | null | fpga/utils/fanglobs.py | bugblat/fan | 854b2c0c6b94270bd08a2cf58bfa1871d34bb8ef | [
"MIT"
] | 2 | 2015-12-29T15:32:52.000Z | 2017-06-22T15:23:08.000Z | ##---------------------------------------------------------
# Name: fanglobs.py
# Purpose: globals
#
# Author: Tim
#
# Created: 08/07/2014
# Copyright: (c) Tim Eccles and Bugblat Ltd. 2014
# Licence: see the LICENSE.txt file
##---------------------------------------------------------
##------... | 27.492754 | 75 | 0.519241 |
0c402cdebb7ee06f0bdad0a203ef73a13d887c8a | 646 | py | Python | fixedwords/migrations/0002_auto_20180122_1234.py | notkrd/languagegames | d0d5a0a0673c039de4f699c1fe5cfd60b8eeaa70 | [
"MIT"
] | null | null | null | fixedwords/migrations/0002_auto_20180122_1234.py | notkrd/languagegames | d0d5a0a0673c039de4f699c1fe5cfd60b8eeaa70 | [
"MIT"
] | null | null | null | fixedwords/migrations/0002_auto_20180122_1234.py | notkrd/languagegames | d0d5a0a0673c039de4f699c1fe5cfd60b8eeaa70 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-01-22 20:34
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('fixedwords', '0001_initial'),
]
operations = [
migrations.Add... | 24.846154 | 64 | 0.56192 |
372211223051bf0ef4dc391e8d4e247b505a3fd0 | 8,204 | py | Python | scene_generation/scene_generation/vis.py | LUGUANSONG/i2g2i | ec532f2e128301472478c3d8fe4c72929e2967a4 | [
"MIT"
] | null | null | null | scene_generation/scene_generation/vis.py | LUGUANSONG/i2g2i | ec532f2e128301472478c3d8fe4c72929e2967a4 | [
"MIT"
] | 3 | 2021-06-08T21:42:14.000Z | 2022-01-13T02:48:20.000Z | scene_generation/scene_generation/vis.py | LUGUANSONG/i2g2i | ec532f2e128301472478c3d8fe4c72929e2967a4 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 32.947791 | 82 | 0.588615 |
422e7e184ee8bdbd700ab7431c79c3b2b0f3fbaf | 16,704 | py | Python | src/renamesensorsspl/renamesensorsspl.py | Shadoward/renamesensors-spl | 7f3c61401cda44716d90d6b250c87b97e2d18d94 | [
"MIT"
] | null | null | null | src/renamesensorsspl/renamesensorsspl.py | Shadoward/renamesensors-spl | 7f3c61401cda44716d90d6b250c87b97e2d18d94 | [
"MIT"
] | null | null | null | src/renamesensorsspl/renamesensorsspl.py | Shadoward/renamesensors-spl | 7f3c61401cda44716d90d6b250c87b97e2d18d94 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
###############################################################
# Author: patrice.ponchant@furgo.com (Fugro Brasil) #
# Created: 10/12/2020 #
# Python : 3.x #
########################################... | 45.024259 | 316 | 0.551066 |
c601a41cfd2b3f75247c64814f0824e640ffecd3 | 8,688 | py | Python | ddi_search_engine/Bio/AlignAce/Motif.py | dbmi-pitt/DIKB-Evidence-analytics | 9ffd629db30c41ced224ff2afdf132ce9276ae3f | [
"MIT"
] | 3 | 2015-06-08T17:58:54.000Z | 2022-03-10T18:49:44.000Z | ddi_search_engine/Bio/AlignAce/Motif.py | dbmi-pitt/DIKB-Evidence-analytics | 9ffd629db30c41ced224ff2afdf132ce9276ae3f | [
"MIT"
] | null | null | null | ddi_search_engine/Bio/AlignAce/Motif.py | dbmi-pitt/DIKB-Evidence-analytics | 9ffd629db30c41ced224ff2afdf132ce9276ae3f | [
"MIT"
] | null | null | null | # Copyright 2003 by Bartek Wilczynski. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""
Implementation of sequence motifs.
Changes:
9.2007 (BW) : added the to_faste() and .we... | 31.478261 | 133 | 0.499194 |
ad4793fcbef8a253abc3135d750b32ed689ca542 | 5,313 | py | Python | render_jinja2_templates.py | gcarling/bossylobster-blog | 723ce3226d6c4cd09476cf688938a416b199720b | [
"Apache-2.0"
] | 1 | 2021-04-09T17:30:52.000Z | 2021-04-09T17:30:52.000Z | render_jinja2_templates.py | gcarling/bossylobster-blog | 723ce3226d6c4cd09476cf688938a416b199720b | [
"Apache-2.0"
] | 40 | 2015-01-07T00:49:33.000Z | 2022-02-07T19:31:32.000Z | render_jinja2_templates.py | gcarling/bossylobster-blog | 723ce3226d6c4cd09476cf688938a416b199720b | [
"Apache-2.0"
] | 2 | 2019-05-10T03:53:39.000Z | 2020-12-03T20:24:33.000Z | # 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 31.070175 | 78 | 0.685112 |
4a893471c9f9fd27c8c61351eff3bd8e4da503ed | 21,189 | py | Python | google/monitoring/v3/monitoring-v3-py/google/cloud/monitoring_v3/types/metric_service.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/monitoring/v3/monitoring-v3-py/google/cloud/monitoring_v3/types/metric_service.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/monitoring/v3/monitoring-v3-py/google/cloud/monitoring_v3/types/metric_service.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 31.114537 | 103 | 0.615083 |
92244e60e737818b7c8d50ead8375f1d52d628cb | 6,524 | py | Python | sdk/python/kfp/components/_airflow_op.py | kamalmemon/pipelines | 7e68991a2a7bfa767f893facfe58190690ca89ed | [
"Apache-2.0"
] | 6 | 2020-05-19T02:35:11.000Z | 2020-05-29T17:58:42.000Z | sdk/python/kfp/components/_airflow_op.py | kamalmemon/pipelines | 7e68991a2a7bfa767f893facfe58190690ca89ed | [
"Apache-2.0"
] | 1,932 | 2021-01-25T11:23:37.000Z | 2022-03-31T17:10:18.000Z | sdk/python/kfp/components/_airflow_op.py | kamalmemon/pipelines | 7e68991a2a7bfa767f893facfe58190690ca89ed | [
"Apache-2.0"
] | 11 | 2020-05-19T22:26:41.000Z | 2021-01-25T09:56:21.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 47.275362 | 402 | 0.754905 |
39adb3e52bbd23c73cd9df37c0a45f7bdc56546d | 8,085 | py | Python | mergify_engine/tests/unit/actions/test_merge.py | ErwanSimonetti/mergify-engine | 9b82ac2ff9e1de2707f19320e119a48a54af34c9 | [
"Apache-2.0"
] | null | null | null | mergify_engine/tests/unit/actions/test_merge.py | ErwanSimonetti/mergify-engine | 9b82ac2ff9e1de2707f19320e119a48a54af34c9 | [
"Apache-2.0"
] | 24 | 2022-02-14T08:36:56.000Z | 2022-03-31T07:35:47.000Z | mergify_engine/tests/unit/actions/test_merge.py | ErwanSimonetti/mergify-engine | 9b82ac2ff9e1de2707f19320e119a48a54af34c9 | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
#
# Copyright © 2020 Mergify SAS
#
# 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... | 25.186916 | 86 | 0.586889 |
f3b8218078d970c6316fb597e98f40de60569335 | 1,644 | py | Python | tests/test_utils/test_schema_as_dict.py | dalito/linkml-runtime | 192a33962aed06f727ffad1a697003ac6ec85c2c | [
"CC0-1.0"
] | null | null | null | tests/test_utils/test_schema_as_dict.py | dalito/linkml-runtime | 192a33962aed06f727ffad1a697003ac6ec85c2c | [
"CC0-1.0"
] | null | null | null | tests/test_utils/test_schema_as_dict.py | dalito/linkml-runtime | 192a33962aed06f727ffad1a697003ac6ec85c2c | [
"CC0-1.0"
] | null | null | null | import os
import unittest
import logging
import yaml
from linkml_runtime.linkml_model.meta import SchemaDefinition, ClassDefinition
from linkml_runtime.loaders.yaml_loader import YAMLLoader
from linkml_runtime.utils.schema_as_dict import schema_as_yaml_dump, schema_as_dict
from linkml_runtime.utils.schemaview import S... | 34.978723 | 83 | 0.667275 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.