hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a0a06091ec209d847b7de3bee0f523f4913b47a | 902 | py | Python | extinct/components/models/finetuning.py | olliethomas/extinct-dino | 7d47d8f7763d9791fa8d5027898b27fcee0901c4 | [
"Apache-2.0"
] | null | null | null | extinct/components/models/finetuning.py | olliethomas/extinct-dino | 7d47d8f7763d9791fa8d5027898b27fcee0901c4 | [
"Apache-2.0"
] | 1 | 2021-10-13T14:21:10.000Z | 2021-10-13T14:21:10.000Z | extinct/components/models/finetuning.py | olliethomas/extinct-dino | 7d47d8f7763d9791fa8d5027898b27fcee0901c4 | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
from kit import implements
import pytorch_lightning as pl
import torch
from torch import Tensor, nn, optim
from extinct.components.models import ErmBaseline
__all__ = ["FineTuner"]
class FineTuner(ErmBaseline):
def reset_parameters(self) -> None:
self.clf.apply(self._... | 28.1875 | 88 | 0.68847 |
4a0a066c16365450e30da1ac665c80d182e02347 | 2,130 | py | Python | src/trunk/apps/python/sceplog.py | thefroid/seiscomp3 | 0b05d5550dcea000a93c7d9a39c5347d8786a91a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 2 | 2015-09-17T22:43:50.000Z | 2017-11-29T20:27:11.000Z | src/trunk/apps/python/sceplog.py | thefroid/seiscomp3 | 0b05d5550dcea000a93c7d9a39c5347d8786a91a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 2 | 2016-04-26T00:03:09.000Z | 2017-12-05T02:24:50.000Z | src/trunk/apps/python/sceplog.py | salichon/seiscomp3 | 4f7715f9ff9a35e7912c379ebf10446d0bceaeb2 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | #!/usr/bin/env python
############################################################################
# Copyright (C) by GFZ Potsdam #
# #
# You can redistribute and/or modify this program under the ... | 36.101695 | 82 | 0.573709 |
4a0a0720e2b976b638cc596d0d8b9cc0897c0113 | 4,849 | py | Python | colour/models/dataset/__init__.py | canavandl/colour | a453cd37b6135a9092d5ea5b2aafb8d19134bdff | [
"BSD-3-Clause"
] | 1 | 2019-06-27T11:32:48.000Z | 2019-06-27T11:32:48.000Z | colour/models/dataset/__init__.py | canavandl/colour | a453cd37b6135a9092d5ea5b2aafb8d19134bdff | [
"BSD-3-Clause"
] | null | null | null | colour/models/dataset/__init__.py | canavandl/colour | a453cd37b6135a9092d5ea5b2aafb8d19134bdff | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from .aces_rgb_idt import ACES_RICD
from .aces_rgb import ACES_RGB_COLOURSPACE, ACES_RGB_LOG_COLOURSPACE
from .aces_rgb import (
ACES_RGB_PROXY_10_COLOURSPACE,
ACES_RGB_PROXY_12_COLOURSPACE)
from .adobe_rgb_1998 import ADOBE_... | 41.09322 | 77 | 0.783254 |
4a0a0aad4162d9d8c545be609b98fdaf6362f15b | 18,994 | py | Python | src/objects/manager.py | reddcoin-project/ReddConnect | 5c212683de6b80b81fd15ed05239c3a1b46c3afd | [
"BSD-3-Clause"
] | 2 | 2019-02-24T00:20:47.000Z | 2020-04-24T15:50:31.000Z | src/objects/manager.py | reddcoin-project/ReddConnect | 5c212683de6b80b81fd15ed05239c3a1b46c3afd | [
"BSD-3-Clause"
] | null | null | null | src/objects/manager.py | reddcoin-project/ReddConnect | 5c212683de6b80b81fd15ed05239c3a1b46c3afd | [
"BSD-3-Clause"
] | 1 | 2019-01-05T15:51:37.000Z | 2019-01-05T15:51:37.000Z | """
Custom manager for Objects.
"""
from itertools import chain
from django.db.models import Q
from django.conf import settings
from django.db.models.fields import exceptions
from src.typeclasses.managers import TypedObjectManager
from src.typeclasses.managers import returns_typeclass, returns_typeclass_list
from src.u... | 45.768675 | 150 | 0.642571 |
4a0a0b47bc5f2efc43e089e34302691f85d1ead8 | 2,031 | py | Python | pieoffice/gothic.py | caiogeraldes/pieoffice | 472a98081bdf83d776ac8b05d377bf7fec2fe96b | [
"MIT"
] | null | null | null | pieoffice/gothic.py | caiogeraldes/pieoffice | 472a98081bdf83d776ac8b05d377bf7fec2fe96b | [
"MIT"
] | null | null | null | pieoffice/gothic.py | caiogeraldes/pieoffice | 472a98081bdf83d776ac8b05d377bf7fec2fe96b | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
""" Gothic converter
The transliteration scheme is as follows
-----------------------------------------------------------------------
| a 𐌰 | b 𐌱 | g 𐌲 | d 𐌳 | e 𐌴 | q 𐌵 | z 𐌶 |
| h 𐌷 | th 𐌸 | i 𐌹 | k 𐌺 | l 𐌻 | m 𐌼 | ... | 29.434783 | 75 | 0.458887 |
4a0a0b8871e54a62cce1a61910b02aecdff62120 | 3,515 | py | Python | dymouse/driver/USBScale.py | x4rMa/dymouse | 0304837f4af362ec33ec6da09c7eb6a9840dcca6 | [
"MIT"
] | 2 | 2020-11-02T17:52:01.000Z | 2021-02-25T14:34:24.000Z | dymouse/driver/USBScale.py | x4rMa/dymouse | 0304837f4af362ec33ec6da09c7eb6a9840dcca6 | [
"MIT"
] | null | null | null | dymouse/driver/USBScale.py | x4rMa/dymouse | 0304837f4af362ec33ec6da09c7eb6a9840dcca6 | [
"MIT"
] | null | null | null | from datetime import datetime
import time
import usb.core
import usb.util
class USBScaleSingleton(object):
"""
Singleton class for the DymoUSBScale
(Useful to avoid repeatedly creating/destroying
instances of the scale)
"""
def __new__(self,**kwargs):
try:
return self.sca... | 21.564417 | 81 | 0.547937 |
4a0a0b9b37ab6ea490b66f2a40b9d780c5d60546 | 2,834 | py | Python | toontown/toon/DistributedSmartNPCAI.py | TrueBlueDogemon/Toontown | ebed7fc3f2ef06a529cf02eda7ab46361aceef9d | [
"MIT"
] | 1 | 2021-02-25T06:22:49.000Z | 2021-02-25T06:22:49.000Z | toontown/toon/DistributedSmartNPCAI.py | TrueBlueDogemon/Toontown | ebed7fc3f2ef06a529cf02eda7ab46361aceef9d | [
"MIT"
] | null | null | null | toontown/toon/DistributedSmartNPCAI.py | TrueBlueDogemon/Toontown | ebed7fc3f2ef06a529cf02eda7ab46361aceef9d | [
"MIT"
] | 2 | 2020-11-08T03:38:35.000Z | 2021-09-02T07:03:47.000Z | from otp.ai.AIBaseGlobal import *
from direct.task.Task import Task
from pandac.PandaModules import *
from DistributedNPCToonBaseAI import *
from toontown.quest import Quests
import time
from QuestionMgr import ChatterBotFactory, ChatterBotType
from direct.task import Task
class DistributedSmartNPCAI(DistributedNPCToo... | 36.333333 | 120 | 0.5988 |
4a0a0c0c6755ea5e814bd4a821452c2b051a2206 | 12,915 | py | Python | classes/dataPDF.py | AUFinalProject/Phase5 | 540e6feee957679728ec0709da82eb93d00bed51 | [
"MIT"
] | null | null | null | classes/dataPDF.py | AUFinalProject/Phase5 | 540e6feee957679728ec0709da82eb93d00bed51 | [
"MIT"
] | null | null | null | classes/dataPDF.py | AUFinalProject/Phase5 | 540e6feee957679728ec0709da82eb93d00bed51 | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------------------------------------------------------------------------------------------
# The our class for PDF files
# @Authors: Alexey Titov and Shir Bentabou
# @Version: 1.0
# --------------------------------------------------------------------... | 42.483553 | 190 | 0.536895 |
4a0a0c45a5803962754651c062bb9a85a979f60d | 26,007 | py | Python | python/DBmanagement.py | billsioros/MMGP | d9cdd206e9baa4991ade1304dc4be53e1859b49d | [
"MIT"
] | null | null | null | python/DBmanagement.py | billsioros/MMGP | d9cdd206e9baa4991ade1304dc4be53e1859b49d | [
"MIT"
] | null | null | null | python/DBmanagement.py | billsioros/MMGP | d9cdd206e9baa4991ade1304dc4be53e1859b49d | [
"MIT"
] | null | null | null | import sqlite3
import os
from time import sleep
from hashlib import sha1 as sha1
import util
import csv
cwd = os.getcwd()
class DBManager:
""" Connects to an sqlite3 database if it exists in current directory, or creates a new one
Connection = current connection """
def __init__(self, fileName, new=... | 39.644817 | 183 | 0.471219 |
4a0a0df4944e8651a6c47f8c62dee081bb1a8126 | 2,241 | py | Python | sphinx/util/docstrings.py | merwok-forks/sphinx | b7cada236f765003a73ab5dca48f975d54c0c298 | [
"BSD-2-Clause"
] | null | null | null | sphinx/util/docstrings.py | merwok-forks/sphinx | b7cada236f765003a73ab5dca48f975d54c0c298 | [
"BSD-2-Clause"
] | null | null | null | sphinx/util/docstrings.py | merwok-forks/sphinx | b7cada236f765003a73ab5dca48f975d54c0c298 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
sphinx.util.docstrings
~~~~~~~~~~~~~~~~~~~~~~
Utilities for docstring processing.
:copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import sys
if False:
# For type annotation
from typing import List #... | 32.014286 | 80 | 0.616243 |
4a0a0e061265abd4d22cf40f80b8be924b1687c6 | 2,263 | py | Python | test/builtin_split_by_characters.py | MaxSac/build | 482c25f3a26171073c7e6c59f0427f2259a63fec | [
"BSL-1.0"
] | 11,356 | 2017-12-08T19:42:32.000Z | 2022-03-31T16:55:25.000Z | test/builtin_split_by_characters.py | MaxSac/build | 482c25f3a26171073c7e6c59f0427f2259a63fec | [
"BSL-1.0"
] | 2,402 | 2017-12-08T22:31:01.000Z | 2022-03-28T19:25:52.000Z | test/builtin_split_by_characters.py | MaxSac/build | 482c25f3a26171073c7e6c59f0427f2259a63fec | [
"BSL-1.0"
] | 1,343 | 2017-12-08T19:47:19.000Z | 2022-03-26T11:31:36.000Z | #!/usr/bin/python
# Copyright 2012. Jurko Gospodnetic
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# This tests the SPLIT_BY_CHARACTERS rule.
import BoostBuild
def test_invalid(params, expected_error_line):
... | 39.017241 | 77 | 0.743261 |
4a0a0e084432a089e714af414ea79035cc046eea | 4,374 | py | Python | pySDC/playgrounds/Boris/penningtrap_HookClass.py | brownbaerchen/pySDC | 31293859d731646aa09cef4345669eac65501550 | [
"BSD-2-Clause"
] | 20 | 2015-03-21T09:02:55.000Z | 2022-02-26T20:22:21.000Z | pySDC/playgrounds/Boris/penningtrap_HookClass.py | brownbaerchen/pySDC | 31293859d731646aa09cef4345669eac65501550 | [
"BSD-2-Clause"
] | 61 | 2015-03-02T09:35:55.000Z | 2022-03-17T12:42:48.000Z | pySDC/playgrounds/Boris/penningtrap_HookClass.py | brownbaerchen/pySDC | 31293859d731646aa09cef4345669eac65501550 | [
"BSD-2-Clause"
] | 19 | 2015-02-20T11:52:33.000Z | 2022-02-02T10:46:27.000Z | import matplotlib.pyplot as plt
import numpy as np
# import progressbar
from pySDC.core.Hooks import hooks
class particles_output(hooks):
def __init__(self):
"""
Initialization of particles output
"""
super(particles_output, self).__init__()
fig = plt.figure()
se... | 35.852459 | 108 | 0.536351 |
4a0a0e19abf4d64888dd0f7b3ad5d9b610f2226d | 23,599 | py | Python | ddganAE/wandb/train_wandb_pred_fpc.py | Zeff020/Adversarial_ROM | 8c9e7ff86250e9370e5fdd2018f9ad04ded5f122 | [
"MIT"
] | null | null | null | ddganAE/wandb/train_wandb_pred_fpc.py | Zeff020/Adversarial_ROM | 8c9e7ff86250e9370e5fdd2018f9ad04ded5f122 | [
"MIT"
] | null | null | null | ddganAE/wandb/train_wandb_pred_fpc.py | Zeff020/Adversarial_ROM | 8c9e7ff86250e9370e5fdd2018f9ad04ded5f122 | [
"MIT"
] | null | null | null | """
Functions used for weights and biases hyperparameter optimization of
predictive models on slug flow dataset.
"""
import wandb
import tensorflow as tf
import argparse
import os
import json
import keras
from sklearn.preprocessing import MinMaxScaler
from ddganAE.models import Predictive_adversarial, Predictive
fro... | 37.34019 | 80 | 0.553159 |
4a0a0e32860dca9f20516811ec5d5c2bd587c244 | 4,545 | py | Python | dyspatch_client/exceptions.py | getdyspatch/dyspatch-python | 23ffb05eff820944acf235fa3b225bf8caec903d | [
"Apache-2.0"
] | null | null | null | dyspatch_client/exceptions.py | getdyspatch/dyspatch-python | 23ffb05eff820944acf235fa3b225bf8caec903d | [
"Apache-2.0"
] | null | null | null | dyspatch_client/exceptions.py | getdyspatch/dyspatch-python | 23ffb05eff820944acf235fa3b225bf8caec903d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Dyspatch API
# Introduction The Dyspatch API is based on the REST paradigm, and features resource based URLs with standard HTTP response codes to indicate errors. We use standard HTTP authentication and request verbs, and all responses are JSON formatted. See our [Implementation Guide](ht... | 37.254098 | 845 | 0.607921 |
4a0a0e33aceedad16ba0891672cc2d4e6d65f6bb | 1,859 | py | Python | ip/migrations/0004_default_vrf.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 84 | 2017-10-22T11:01:39.000Z | 2022-02-27T03:43:48.000Z | ip/migrations/0004_default_vrf.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 22 | 2017-12-11T07:21:56.000Z | 2021-09-23T02:53:50.000Z | ip/migrations/0004_default_vrf.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 23 | 2017-12-06T06:59:52.000Z | 2022-02-24T00:02:25.000Z | # ----------------------------------------------------------------------
# default vrf
# ----------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# ----------------------------------------------------------------------
# NOC modules
from... | 45.341463 | 106 | 0.506724 |
4a0a0ec700a852b6f5a41cac3e66fcbf0bc90eb4 | 925 | py | Python | src/django_rpx_plus/forms.py | wsantos/django-rpx-plus | 3c5ffc3d2a5bcacdf04f191c6ab04ae006c9a730 | [
"BSD-3-Clause"
] | 1 | 2021-03-06T14:23:01.000Z | 2021-03-06T14:23:01.000Z | src/django_rpx_plus/forms.py | wsantos/django-rpx-plus | 3c5ffc3d2a5bcacdf04f191c6ab04ae006c9a730 | [
"BSD-3-Clause"
] | 1 | 2017-12-06T17:42:57.000Z | 2017-12-06T17:42:57.000Z | src/django_rpx_plus/forms.py | wsantos/django-rpx-plus | 3c5ffc3d2a5bcacdf04f191c6ab04ae006c9a730 | [
"BSD-3-Clause"
] | 7 | 2016-03-30T22:15:04.000Z | 2022-01-12T18:10:26.000Z | from django import forms
from django.contrib.auth.models import User
from django.utils.translation import ugettext_lazy as _
class RegisterForm(forms.Form):
username = forms.RegexField(regex=r'^\w+$', max_length = 30, label = _('Username'),
error_messages={'invalid':_('The username... | 44.047619 | 129 | 0.667027 |
4a0a0f110092a5f3a928f69091c2a7b893abbfdf | 2,937 | py | Python | GoogleCloudPlatform/DataProc-Training/spark_analysis.py | jpacerqueira/project_lost_saturn | ce23e2881242441c9c74b2f0a66af1ebc5d3f351 | [
"Apache-2.0"
] | 1 | 2020-04-13T09:19:43.000Z | 2020-04-13T09:19:43.000Z | GoogleCloudPlatform/DataProc-Training/spark_analysis.py | jpacerqueira/project_lost_saturn | ce23e2881242441c9c74b2f0a66af1ebc5d3f351 | [
"Apache-2.0"
] | 1 | 2020-10-28T12:45:32.000Z | 2020-10-28T12:45:32.000Z | GoogleCloudPlatform/DataProc-Training/spark_analysis.py | jpacerqueira/project_lost_saturn | ce23e2881242441c9c74b2f0a66af1ebc5d3f351 | [
"Apache-2.0"
] | 4 | 2020-03-14T05:17:37.000Z | 2022-01-06T16:29:38.000Z |
import matplotlib
matplotlib.use('agg')
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--bucket", help="bucket for input and output")
args = parser.parse_args()
BUCKET = args.bucket
from pyspark.sql import SparkSession, SQLContext, Row
gcs_bucket='qwiklabs-gcp-ffc84680e86718f5'
... | 39.16 | 96 | 0.586994 |
4a0a10824f8cc383f019851f642e665b100e0664 | 13,597 | py | Python | usability_tests_simulation/bot.py | PEI-I1/Telegram-API-Endpoint | 6b6c4feaa3577f2860672277965c626a76adde82 | [
"MIT"
] | null | null | null | usability_tests_simulation/bot.py | PEI-I1/Telegram-API-Endpoint | 6b6c4feaa3577f2860672277965c626a76adde82 | [
"MIT"
] | 1 | 2021-06-02T00:54:33.000Z | 2021-06-02T00:54:33.000Z | usability_tests_simulation/bot.py | PEI-I1/Telegram-API-Endpoint | 6b6c4feaa3577f2860672277965c626a76adde82 | [
"MIT"
] | null | null | null | import requests
from config import TELEGRAM_SEND_MESSAGE_URL, TELEGRAM_SEND_PHOTO_URL, TELEGRAM_SEND_TYPING_ACTION
import json
import re
import time
class Bot:
def __init__(self):
self.chat = None # ID of Telegram chat
self.message_received = None # Message received on T... | 52.296154 | 338 | 0.503935 |
4a0a133651b0f7982fa7d1e75021f71caa365f6e | 9,097 | py | Python | frappe/core/doctype/data_import/exporter.py | gangadhar-kadam/saloon-frappe | ec4bb97f8e63449324d07346ec87a76c6d075b40 | [
"MIT"
] | null | null | null | frappe/core/doctype/data_import/exporter.py | gangadhar-kadam/saloon-frappe | ec4bb97f8e63449324d07346ec87a76c6d075b40 | [
"MIT"
] | null | null | null | frappe/core/doctype/data_import/exporter.py | gangadhar-kadam/saloon-frappe | ec4bb97f8e63449324d07346ec87a76c6d075b40 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe, json
from frappe import _
import frappe.permissions
import re, csv, os
from frappe.utils.csvutils import UnicodeWriter
from frappe.utils import cstr, formatdate, f... | 29.535714 | 123 | 0.68682 |
4a0a145c6d95f55c0e473ec051b4317d40735ee7 | 25 | py | Python | scavenger/api/scraper/__init__.py | Gulats/scavenger | ba8a712a60ae9f4f4ebdbc8111369c9a5954aa05 | [
"MIT"
] | null | null | null | scavenger/api/scraper/__init__.py | Gulats/scavenger | ba8a712a60ae9f4f4ebdbc8111369c9a5954aa05 | [
"MIT"
] | 4 | 2019-01-28T17:47:31.000Z | 2019-01-28T17:56:25.000Z | scavenger/api/scraper/__init__.py | Gulats/scavenger | ba8a712a60ae9f4f4ebdbc8111369c9a5954aa05 | [
"MIT"
] | null | null | null | from .controller import * | 25 | 25 | 0.8 |
4a0a148fde8709574e0dfb3084815e0d3c424ca6 | 7,126 | py | Python | octavia/controller/worker/v2/tasks/lifecycle_tasks.py | johnsom/octavia | 41c628a084002017d2003926cf0e25ba3ffeee0c | [
"Apache-2.0"
] | null | null | null | octavia/controller/worker/v2/tasks/lifecycle_tasks.py | johnsom/octavia | 41c628a084002017d2003926cf0e25ba3ffeee0c | [
"Apache-2.0"
] | null | null | null | octavia/controller/worker/v2/tasks/lifecycle_tasks.py | johnsom/octavia | 41c628a084002017d2003926cf0e25ba3ffeee0c | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Rackspace
#
# 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 agree... | 35.809045 | 78 | 0.706147 |
4a0a14b74a646966a85dd8cb054088bedb640a9b | 1,495 | py | Python | notebook/pillow_composite.py | vhn0912/python-snippets | 80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038 | [
"MIT"
] | 174 | 2018-05-30T21:14:50.000Z | 2022-03-25T07:59:37.000Z | notebook/pillow_composite.py | vhn0912/python-snippets | 80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038 | [
"MIT"
] | 5 | 2019-08-10T03:22:02.000Z | 2021-07-12T20:31:17.000Z | notebook/pillow_composite.py | vhn0912/python-snippets | 80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038 | [
"MIT"
] | 53 | 2018-04-27T05:26:35.000Z | 2022-03-25T07:59:37.000Z | from PIL import Image, ImageDraw, ImageFilter
im1 = Image.open('data/src/lena.jpg')
im2 = Image.open('data/src/rocket.jpg').resize(im1.size)
im2.save('data/src/rocket_resize.jpg')
# 
# 
mask = Image.new("L", im1.size, 128)
im = Image.composite(im... | 31.145833 | 76 | 0.751839 |
4a0a15c30b5fa16a23c26288a535b29fea9aa1f6 | 8,936 | py | Python | saleor/product/tests/test_generate_and_set_variant_name.py | fairhopeweb/saleor | 9ac6c22652d46ba65a5b894da5f1ba5bec48c019 | [
"CC-BY-4.0"
] | 15,337 | 2015-01-12T02:11:52.000Z | 2021-10-05T19:19:29.000Z | saleor/product/tests/test_generate_and_set_variant_name.py | fairhopeweb/saleor | 9ac6c22652d46ba65a5b894da5f1ba5bec48c019 | [
"CC-BY-4.0"
] | 7,486 | 2015-02-11T10:52:13.000Z | 2021-10-06T09:37:15.000Z | saleor/product/tests/test_generate_and_set_variant_name.py | fairhopeweb/saleor | 9ac6c22652d46ba65a5b894da5f1ba5bec48c019 | [
"CC-BY-4.0"
] | 5,864 | 2015-01-16T14:52:54.000Z | 2021-10-05T23:01:15.000Z | from decimal import Decimal
from unittest.mock import MagicMock, Mock
import pytest
from ...attribute import AttributeInputType
from ...attribute.models import AttributeValue
from ...attribute.utils import associate_attribute_values_to_instance
from ...product import ProductTypeKind
from ...product.models import Prod... | 38.188034 | 88 | 0.743733 |
4a0a17638f49bf892dcf0ff25cf0d2a63c5404fd | 3,465 | py | Python | paddlers/models/ppdet/utils/check.py | huilin16/PaddleRS | ca0d6223d8e56cd3bd3cbd3a033c89f1718ce26a | [
"Apache-2.0"
] | 40 | 2022-02-28T02:07:28.000Z | 2022-03-31T09:54:29.000Z | paddlers/models/ppdet/utils/check.py | wondering516/PaddleRS | b6f7033f3c0ca7bc6952456c0a0f53eef6c1c07f | [
"Apache-2.0"
] | 5 | 2022-03-15T12:13:33.000Z | 2022-03-31T15:54:08.000Z | paddlers/models/ppdet/utils/check.py | wondering516/PaddleRS | b6f7033f3c0ca7bc6952456c0a0f53eef6c1c07f | [
"Apache-2.0"
] | 20 | 2022-02-28T02:07:31.000Z | 2022-03-31T11:40:40.000Z | # Copyright (c) 2022 PaddlePaddle 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 appli... | 30.663717 | 80 | 0.649928 |
4a0a177b70ad20b5b9965b94c940d3270bd4bfaf | 10,137 | py | Python | src/swia/model/abilities.py | valeriodigregorio/swia-skirmish-calculator | 7020e0e57b65c5606762b1f0781d0ec00a612b2e | [
"Apache-2.0"
] | null | null | null | src/swia/model/abilities.py | valeriodigregorio/swia-skirmish-calculator | 7020e0e57b65c5606762b1f0781d0ec00a612b2e | [
"Apache-2.0"
] | 4 | 2018-05-21T21:22:25.000Z | 2018-05-21T21:28:13.000Z | src/swia/model/abilities.py | valeriodigregorio/swia-skirmish-calculator | 7020e0e57b65c5606762b1f0781d0ec00a612b2e | [
"Apache-2.0"
] | null | null | null | """
abilities
Abilities module for "Star Wars: Imperial Assault"
"""
import _pickle as pickle
from swia.engine.actions import Attack, Roll
__author__ = "Valerio Di Gregorio"
__copyright__ = "Copyright 2018, Valerio Di Gregorio"
__date__ = '2018-04-02'
class Ability:
@staticmethod
def create(data):
... | 32.180952 | 93 | 0.544638 |
4a0a180a813c9fc6a4e3e968be369956fcead382 | 710 | py | Python | instructors/course-2015/flask-cont/examples/in_class/forms.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 46 | 2017-09-27T20:19:36.000Z | 2020-12-08T10:07:19.000Z | instructors/course-2015/flask-cont/examples/in_class/forms.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 6 | 2018-01-09T08:07:37.000Z | 2020-09-07T12:25:13.000Z | instructors/course-2015/flask-cont/examples/in_class/forms.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 18 | 2017-10-10T02:06:51.000Z | 2019-12-01T10:18:13.000Z | from flask_wtf import Form
from wtforms import StringField, PasswordField, TextAreaField
from wtforms.fields.html5 import EmailField, URLField
from wtforms.validators import DataRequired, URL, Optional
class HackNewsUserForm(Form):
name = StringField('name', validators=[DataRequired()])
password = PasswordFi... | 35.5 | 83 | 0.743662 |
4a0a1864ab776664c0eea0b0c90c910a1df36011 | 119 | py | Python | 51177.py | shaurya10898/CS-177 | ab72c24a2e9cc96fe9e99db4b80ff12e4c8bc5f9 | [
"MIT"
] | null | null | null | 51177.py | shaurya10898/CS-177 | ab72c24a2e9cc96fe9e99db4b80ff12e4c8bc5f9 | [
"MIT"
] | null | null | null | 51177.py | shaurya10898/CS-177 | ab72c24a2e9cc96fe9e99db4b80ff12e4c8bc5f9 | [
"MIT"
] | null | null | null | n = int(input("Enter a positive number:"))
total = 0
for k in range (1, n, 1):
total += k*k*k
print(total)
| 17 | 42 | 0.563025 |
4a0a18b349aa3737f4aa144c8d407ccf5f6ef031 | 39,308 | py | Python | pycti/entities/opencti_stix_core_relationship.py | fscc-samiR/client-python | 7c6061c1c96b8a1a9b9b0618ce742549c2949c56 | [
"Apache-2.0"
] | null | null | null | pycti/entities/opencti_stix_core_relationship.py | fscc-samiR/client-python | 7c6061c1c96b8a1a9b9b0618ce742549c2949c56 | [
"Apache-2.0"
] | null | null | null | pycti/entities/opencti_stix_core_relationship.py | fscc-samiR/client-python | 7c6061c1c96b8a1a9b9b0618ce742549c2949c56 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
class StixCoreRelationship:
def __init__(self, opencti):
self.opencti = opencti
self.properties = """
id
entity_type
parent_types
spec_version
created_at
updated_at
standard_id
relations... | 35.222222 | 409 | 0.431235 |
4a0a19b28db9e1a6b6f471cc8cb0591e27983e5e | 11,669 | py | Python | lib/tests/streamlit/state/widgets_test.py | stungkit/streamlit | 3badd94f40ba8db2f9e89e8835f7f0530d290ba0 | [
"Apache-2.0"
] | 1 | 2019-11-01T08:37:00.000Z | 2019-11-01T08:37:00.000Z | lib/tests/streamlit/state/widgets_test.py | stungkit/streamlit | 3badd94f40ba8db2f9e89e8835f7f0530d290ba0 | [
"Apache-2.0"
] | 35 | 2021-10-12T04:41:39.000Z | 2022-03-28T04:50:45.000Z | lib/tests/streamlit/state/widgets_test.py | stungkit/streamlit | 3badd94f40ba8db2f9e89e8835f7f0530d290ba0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2022 Streamlit Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 37.400641 | 88 | 0.664239 |
4a0a1a3abc058fd9e02c03c20b12a563365bdcf2 | 7,493 | py | Python | pyparsehtml/src/parse_doc_string.py | pdoms/PyParseHtml | 513ad30cdfb77eea815b66b1ad91c1c96f3dff81 | [
"MIT"
] | null | null | null | pyparsehtml/src/parse_doc_string.py | pdoms/PyParseHtml | 513ad30cdfb77eea815b66b1ad91c1c96f3dff81 | [
"MIT"
] | null | null | null | pyparsehtml/src/parse_doc_string.py | pdoms/PyParseHtml | 513ad30cdfb77eea815b66b1ad91c1c96f3dff81 | [
"MIT"
] | null | null | null | import re
import copy
from .element import Element
from .utils import isSelfCloser, mergeDict, representElementAsString, seqIdtoDict, getTagBySeqId
from .html_data import global_attributes, css_properties, html_tags_incl_attributes, html_tags_stripped
def addGlobalAttributes():
attributes = {}
for g in global_att... | 28.599237 | 120 | 0.605899 |
4a0a1c8d1caa55fef2e510f694b9be62ef57b02d | 1,622 | py | Python | tests/unit/transformations/test_arrsum.py | gnafit/gna | c1a58dac11783342c97a2da1b19c97b85bce0394 | [
"MIT"
] | 5 | 2019-10-14T01:06:57.000Z | 2021-02-02T16:33:06.000Z | tests/unit/transformations/test_arrsum.py | gnafit/gna | c1a58dac11783342c97a2da1b19c97b85bce0394 | [
"MIT"
] | null | null | null | tests/unit/transformations/test_arrsum.py | gnafit/gna | c1a58dac11783342c97a2da1b19c97b85bce0394 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import numpy as np
from load import ROOT as R
from gna.env import env
from gna.parameters.printer import print_parameters
from gna import constructors as C
from gna.unittest import *
@floatcopy(globals(), addname=True)
def test_arrsum(function_name):
varname = 'out'
ns = env.globalns(fun... | 34.510638 | 124 | 0.668311 |
4a0a1cad4874fd2bdac1e138eceb5a27b6a7ac30 | 7,191 | py | Python | tests/test_sql/test_evaluate.py | rsmith013/pygeofilter | cf3ac068d37a0895a3f88e2aa3a7d375911acc0b | [
"MIT"
] | null | null | null | tests/test_sql/test_evaluate.py | rsmith013/pygeofilter | cf3ac068d37a0895a3f88e2aa3a7d375911acc0b | [
"MIT"
] | null | null | null | tests/test_sql/test_evaluate.py | rsmith013/pygeofilter | cf3ac068d37a0895a3f88e2aa3a7d375911acc0b | [
"MIT"
] | null | null | null | from datetime import date, datetime
from pygeofilter.backends.sql import to_sql_where
from pygeofilter.parsers.ecql import parse
from osgeo import ogr
import pytest
ogr.UseExceptions()
@pytest.fixture
def data():
driver = ogr.GetDriverByName('MEMORY')
source = driver.CreateDataSource('data')
layer = s... | 33.446512 | 101 | 0.664303 |
4a0a20038c2552f31fb5f2c6376d5d8783aee838 | 5,402 | py | Python | pypureclient/flasharray/FA_2_5/models/protection_group_get_response.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 14 | 2018-12-07T18:30:27.000Z | 2022-02-22T09:12:33.000Z | pypureclient/flasharray/FA_2_5/models/protection_group_get_response.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 28 | 2019-09-17T21:03:52.000Z | 2022-03-29T22:07:35.000Z | pypureclient/flasharray/FA_2_5/models/protection_group_get_response.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 15 | 2020-06-11T15:50:08.000Z | 2022-03-21T09:27:25.000Z | # coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.5
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
import typing
from .... | 39.720588 | 524 | 0.61903 |
4a0a2287628e420f3fd25e9926104d795ebf2232 | 916 | py | Python | valentine/algorithms/match.py | delftdata/valentine | 3be3fcbe91f1a838f21399eeb5e6ec97f4b94e76 | [
"Apache-2.0"
] | 20 | 2020-11-18T16:10:38.000Z | 2022-01-26T09:09:54.000Z | valentine/algorithms/match.py | delftdata/valentine | 3be3fcbe91f1a838f21399eeb5e6ec97f4b94e76 | [
"Apache-2.0"
] | 6 | 2021-10-15T11:25:23.000Z | 2021-11-16T10:21:48.000Z | valentine/algorithms/match.py | delftdata/valentine | 3be3fcbe91f1a838f21399eeb5e6ec97f4b94e76 | [
"Apache-2.0"
] | 4 | 2021-06-07T11:02:04.000Z | 2021-11-05T21:50:52.000Z | class Match:
"""
Class representing a match of two columns target is the one we want to find the matches of, source an other
that exists in the database and the similarity between the two.
NOTE: Use the to_dict method when you want to append a match to a list of matches
"""
def __init__(self, t... | 43.619048 | 111 | 0.694323 |
4a0a229a5ef6c6c1c3bf022333c5bfcf2a509f75 | 838 | py | Python | Day15/Day15.py | wagyourtail/Advent-Of-Code | f6b8dc796ef54555c5630453f4011d5b472ac9cc | [
"MIT"
] | null | null | null | Day15/Day15.py | wagyourtail/Advent-Of-Code | f6b8dc796ef54555c5630453f4011d5b472ac9cc | [
"MIT"
] | null | null | null | Day15/Day15.py | wagyourtail/Advent-Of-Code | f6b8dc796ef54555c5630453f4011d5b472ac9cc | [
"MIT"
] | null | null | null |
def part1(inp):
while len(inp) < 2020:
prev = inp[-1]
for i in range(len(inp) - 2, -1, -1):
if prev == inp[i]:
inp.append(len(inp) - i - 1)
break
else:
inp.append(0)
return inp[-1]
def part2(inp, leng):
a = {}
j = 0
fo... | 20.95 | 59 | 0.424821 |
4a0a230543c463bb2d7bb78e6df68268614226f0 | 274 | py | Python | one_fm/legal/doctype/legal_investigation_penalty/legal_investigation_penalty.py | askmetoo/One-FM | c93ed63695a3e62ee8129bd9adf563116b749030 | [
"MIT"
] | 16 | 2021-06-14T23:56:47.000Z | 2022-03-22T12:05:06.000Z | one_fm/legal/doctype/legal_investigation_penalty/legal_investigation_penalty.py | askmetoo/One-FM | c93ed63695a3e62ee8129bd9adf563116b749030 | [
"MIT"
] | 119 | 2020-08-17T16:27:45.000Z | 2022-03-28T12:42:56.000Z | one_fm/legal/doctype/legal_investigation_penalty/legal_investigation_penalty.py | askmetoo/One-FM | c93ed63695a3e62ee8129bd9adf563116b749030 | [
"MIT"
] | 12 | 2021-05-16T13:35:40.000Z | 2022-02-21T12:41:04.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2020, omar jaber and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class LegalInvestigationPenalty(Document):
pass
| 24.909091 | 49 | 0.784672 |
4a0a25291003cf3331ade74e4ce91f99a4731e88 | 61 | py | Python | code/python/array_add.py | evmorov/ruby-coffeescript | 1c61c5ce351509b210e26feceee6efab0b255442 | [
"MIT"
] | 29 | 2016-06-15T09:19:18.000Z | 2022-03-21T14:34:47.000Z | code/python/array_add.py | evmorov/ruby-coffeescript | 1c61c5ce351509b210e26feceee6efab0b255442 | [
"MIT"
] | 7 | 2016-06-16T07:02:43.000Z | 2020-01-08T21:12:30.000Z | code/python/array_add.py | evmorov/ruby-coffeescript | 1c61c5ce351509b210e26feceee6efab0b255442 | [
"MIT"
] | 7 | 2016-06-15T14:57:46.000Z | 2021-12-09T17:57:22.000Z | arr = []
arr.append('first')
arr.append('second')
print(arr)
| 12.2 | 20 | 0.655738 |
4a0a254d5c5a480bb21531ae5eb0328aee72073a | 73,675 | py | Python | src/transformers/models/auto/modeling_auto.py | timpal0l/transformers | d86d57faa3b6511c6e4d9139535d77b695b9af8a | [
"Apache-2.0"
] | 2 | 2020-11-30T11:30:40.000Z | 2021-03-26T17:20:33.000Z | src/transformers/models/auto/modeling_auto.py | timpal0l/transformers | d86d57faa3b6511c6e4d9139535d77b695b9af8a | [
"Apache-2.0"
] | 1 | 2020-11-12T11:00:12.000Z | 2020-11-12T11:00:12.000Z | src/transformers/models/auto/modeling_auto.py | timpal0l/transformers | d86d57faa3b6511c6e4d9139535d77b695b9af8a | [
"Apache-2.0"
] | 1 | 2020-11-17T02:48:00.000Z | 2020-11-17T02:48:00.000Z | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# 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... | 44.597458 | 147 | 0.680122 |
4a0a25c94a0cd026d1780c79edf7777d2cdbd6aa | 327 | py | Python | setup.py | BrownSparkles/data-skew | f0ff5ccc6b30c147fe0727866af0eef70af76d33 | [
"MIT"
] | null | null | null | setup.py | BrownSparkles/data-skew | f0ff5ccc6b30c147fe0727866af0eef70af76d33 | [
"MIT"
] | 1 | 2019-11-07T06:02:20.000Z | 2019-11-07T06:02:20.000Z | setup.py | BrownSparkles/data-skew | f0ff5ccc6b30c147fe0727866af0eef70af76d33 | [
"MIT"
] | 1 | 2019-11-07T06:04:44.000Z | 2019-11-07T06:04:44.000Z | from setuptools import setup
setup(name='data_skew',
version='0.1.1',
description='Create DataFrames based on a required bias',
url='http://github.com/JVoogt/data-skew',
author='J Voogt',
author_email='jvoogt1@outlook.com',
license='MIT',
packages=['data_skew'],
zip_safe... | 29.727273 | 63 | 0.64526 |
4a0a26615c315c56b24f9b391a3eed2287cf2652 | 2,424 | py | Python | tests/test_multi_standbys.py | Spread0x/pg_auto_failover | e471d140a528e277c0272a6a5a307be8d2050ac4 | [
"PostgreSQL"
] | null | null | null | tests/test_multi_standbys.py | Spread0x/pg_auto_failover | e471d140a528e277c0272a6a5a307be8d2050ac4 | [
"PostgreSQL"
] | null | null | null | tests/test_multi_standbys.py | Spread0x/pg_auto_failover | e471d140a528e277c0272a6a5a307be8d2050ac4 | [
"PostgreSQL"
] | null | null | null | import pgautofailover_utils as pgautofailover
from nose.tools import *
import time
cluster = None
monitor = None
node1 = None
node2 = None
def setup_module():
global cluster
cluster = pgautofailover.Cluster()
def teardown_module():
cluster.destroy()
def test_000_create_monitor():
global monitor
... | 29.560976 | 66 | 0.743399 |
4a0a2677c3ab0402a1a40cdc665b805385914010 | 890 | py | Python | substrabac/substrapp/models/algo.py | GuillaumeCisco/substra-backend | 777ec0cfc10a1aad34cccba449e4923c20786d32 | [
"Apache-2.0"
] | null | null | null | substrabac/substrapp/models/algo.py | GuillaumeCisco/substra-backend | 777ec0cfc10a1aad34cccba449e4923c20786d32 | [
"Apache-2.0"
] | null | null | null | substrabac/substrapp/models/algo.py | GuillaumeCisco/substra-backend | 777ec0cfc10a1aad34cccba449e4923c20786d32 | [
"Apache-2.0"
] | null | null | null | from django.db import models
from substrapp.utils import get_hash
def upload_to(instance, filename):
return 'algos/{0}/{1}'.format(instance.pk, filename)
class Algo(models.Model):
"""Storage Data table"""
pkhash = models.CharField(primary_key=True, max_length=64, blank=True)
file = models.FileField... | 35.6 | 120 | 0.695506 |
4a0a26dc72683f331443908321acfa3588b8594f | 1,933 | py | Python | testStringManipulation.py | MartenMoti/TextCompression | 7d96c9e0bc2c226d6675ba8ac1e315c379b4dd06 | [
"MIT"
] | 4 | 2017-06-07T18:42:05.000Z | 2020-03-05T07:56:12.000Z | testStringManipulation.py | MartenMoti/TextCompression | 7d96c9e0bc2c226d6675ba8ac1e315c379b4dd06 | [
"MIT"
] | null | null | null | testStringManipulation.py | MartenMoti/TextCompression | 7d96c9e0bc2c226d6675ba8ac1e315c379b4dd06 | [
"MIT"
] | null | null | null | import unittest
import stringManipulation
from stringManipulation import *
class TestSplitIntoWords(unittest.TestCase):
def testGeneric(self):
testStr = "The quick brown fox jumps over the lazy dog."
splitStr = ["The", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog."]
self.as... | 39.44898 | 91 | 0.70357 |
4a0a26e607527bf69974fb2567325de93cb158c0 | 1,371 | py | Python | src/pysme/config.py | AWehrhahn/SME | 542e880ed779381f7cbbaaacb59475fa6a6d3537 | [
"BSD-3-Clause"
] | 14 | 2019-06-26T18:43:09.000Z | 2022-03-12T00:53:42.000Z | src/pysme/config.py | AWehrhahn/SME | 542e880ed779381f7cbbaaacb59475fa6a6d3537 | [
"BSD-3-Clause"
] | 10 | 2020-03-01T15:21:23.000Z | 2021-09-01T15:28:37.000Z | src/pysme/config.py | AWehrhahn/SME | 542e880ed779381f7cbbaaacb59475fa6a6d3537 | [
"BSD-3-Clause"
] | 6 | 2019-03-01T15:25:24.000Z | 2022-03-30T10:26:33.000Z | """
Handle the Json configuration file
At the moment it is only used for the LargeFileStorage
"""
import json
import logging
from os.path import dirname, exists, expanduser, join
logger = logging.getLogger(__name__)
def _requires_load(func):
def func_new(self, *args, **kwargs):
if self._cfg is None:
... | 24.052632 | 96 | 0.618527 |
4a0a26f9cdb035799d8ba839e2a66ff7f7a4f685 | 14,674 | py | Python | buildscripts/setup_multiversion_mongodb.py | EdwardPrentice/wrongo | 1e7c9136f5fab7040b5bd5df51b4946876625c88 | [
"Apache-2.0"
] | 12 | 2020-04-27T21:31:57.000Z | 2020-12-13T13:25:06.000Z | buildscripts/setup_multiversion_mongodb.py | EdwardPrentice/wrongo | 1e7c9136f5fab7040b5bd5df51b4946876625c88 | [
"Apache-2.0"
] | 2 | 2021-03-26T00:01:11.000Z | 2021-03-26T00:02:19.000Z | buildscripts/setup_multiversion_mongodb.py | EdwardPrentice/wrongo | 1e7c9136f5fab7040b5bd5df51b4946876625c88 | [
"Apache-2.0"
] | 4 | 2021-03-27T14:40:25.000Z | 2022-03-19T20:52:41.000Z | #!/usr/bin/env python
import re
import sys
import os
import tempfile
import subprocess
import json
import urlparse
import tarfile
import signal
import threading
import traceback
import shutil
import errno
from contextlib import closing
# To ensure it exists on the system
import zipfile
#
# Useful script for installin... | 40.874652 | 116 | 0.602699 |
4a0a2750c0f9d65fca60a75bc1e765c892e3a586 | 1,274 | py | Python | setup.py | tglauch/DeepIceLearning_Module | 8c05929ec97226f07ab9e13a1dfc539d0e47a2b1 | [
"MIT"
] | 3 | 2019-10-10T22:02:47.000Z | 2020-03-17T08:39:35.000Z | setup.py | tglauch/DeepIceLearning_Module | 8c05929ec97226f07ab9e13a1dfc539d0e47a2b1 | [
"MIT"
] | null | null | null | setup.py | tglauch/DeepIceLearning_Module | 8c05929ec97226f07ab9e13a1dfc539d0e47a2b1 | [
"MIT"
] | 1 | 2020-05-11T15:49:46.000Z | 2020-05-11T15:49:46.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import setuptools
with open("README.md") as readme:
long_description = readme.read()
setuptools.setup(
name="i3deepice",
version="0.1",
author="Theo Glauch",
author_email="theo.glauch@tum.de",
description="DeepIceLearning Icetray Module",
lon... | 30.333333 | 75 | 0.579278 |
4a0a28c8b18ab62856e7813e1b2497cf81e4c210 | 830 | py | Python | cricket_db/parsers/innings.py | oli5679/cricsheet-db | be4f3d518afc9e3012e03c45166c446467abca73 | [
"MIT"
] | 2 | 2020-01-21T10:50:35.000Z | 2020-12-28T11:09:20.000Z | cricket_db/parsers/innings.py | berianjames/cricsheet-db | be4f3d518afc9e3012e03c45166c446467abca73 | [
"MIT"
] | null | null | null | cricket_db/parsers/innings.py | berianjames/cricsheet-db | be4f3d518afc9e3012e03c45166c446467abca73 | [
"MIT"
] | 2 | 2020-01-21T10:57:16.000Z | 2020-05-31T19:13:11.000Z | from cricket_db.parsers.parser import Parser
class InningsParser(Parser):
def __init__(self, match_id, innings_number):
self.match_id = match_id
self.innings_number = innings_number
def parse(self, raw):
innings = {
'match_id': self.match_id,
'innings_number': ... | 33.2 | 89 | 0.626506 |
4a0a298f54dafddcb2464359bb01b641473951e1 | 66,188 | py | Python | dist-packages/reportlab/platypus/tables.py | Jianwei-Wang/python2.7_lib | 911b8e81512e5ac5f13e669ab46f7693ed897378 | [
"PSF-2.0"
] | 1 | 2020-10-30T14:47:11.000Z | 2020-10-30T14:47:11.000Z | dist-packages/reportlab/platypus/tables.py | Jianwei-Wang/python2.7_lib | 911b8e81512e5ac5f13e669ab46f7693ed897378 | [
"PSF-2.0"
] | 7 | 2021-02-08T20:22:15.000Z | 2022-03-11T23:19:41.000Z | dist-packages/reportlab/platypus/tables.py | Jianwei-Wang/python2.7_lib | 911b8e81512e5ac5f13e669ab46f7693ed897378 | [
"PSF-2.0"
] | null | null | null | #Copyright ReportLab Europe Ltd. 2000-2012
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/platypus/tables.py
__version__=''' $Id$ '''
__doc__="""
Tables are created by passing the constructor a tuple of column widths, a tuple of row heights... | 41.034098 | 202 | 0.523101 |
4a0a2a16488fbcb23d6421199f8d56bd38298ee4 | 4,015 | py | Python | src/tree_dict_test.py | yaricom/english-article-correction | e48e9af2d86e20ee0a3d091a5340a8669302c36a | [
"MIT"
] | 6 | 2017-06-05T08:58:55.000Z | 2020-11-22T13:49:34.000Z | src/tree_dict_test.py | yaricom/english-article-correction | e48e9af2d86e20ee0a3d091a5340a8669302c36a | [
"MIT"
] | null | null | null | src/tree_dict_test.py | yaricom/english-article-correction | e48e9af2d86e20ee0a3d091a5340a8669302c36a | [
"MIT"
] | 2 | 2017-04-24T08:19:06.000Z | 2020-12-16T08:42:09.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
The tests for tree implementation
@author: yaric
"""
import unittest
import tree_dict as td
import config
import utils
class TestDeepTreeMethods(unittest.TestCase):
@classmethod
def setUpClass(cls):
data = utils.read_json(config.parse_train_path)
... | 32.12 | 84 | 0.596015 |
4a0a2ac4bf5a2b725453d1fcdc6482980c4016d7 | 12,988 | py | Python | sympy/polys/agca/tests/test_modules.py | sn6uv/sympy | 5b149c2f72847e4785c65358b09d99b29f101dd5 | [
"BSD-3-Clause"
] | null | null | null | sympy/polys/agca/tests/test_modules.py | sn6uv/sympy | 5b149c2f72847e4785c65358b09d99b29f101dd5 | [
"BSD-3-Clause"
] | null | null | null | sympy/polys/agca/tests/test_modules.py | sn6uv/sympy | 5b149c2f72847e4785c65358b09d99b29f101dd5 | [
"BSD-3-Clause"
] | null | null | null | """Test modules.py code."""
from sympy.polys.agca.modules import FreeModule, ModuleOrder, FreeModulePolyRing
from sympy.polys import CoercionFailed, QQ, lex, grlex, ilex, ZZ
from sympy.abc import x, y, z
from sympy.utilities.pytest import raises
from sympy import S
def test_FreeModuleElement():
M = QQ[x].free_mod... | 33.735065 | 87 | 0.524638 |
4a0a2cfafed92c013911ba72b75b9b38b1ff878e | 3,588 | py | Python | bindings/python/ensmallen/datasets/string/candidatusmycoplasmahaemolamaestrpurdue.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/candidatusmycoplasmahaemolamaestrpurdue.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/candidatusmycoplasmahaemolamaestrpurdue.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Candidatus Mycoplasma haemolamae str. Purdue.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING... | 34.171429 | 223 | 0.684783 |
4a0a2d0e65bb321ca557a7f9a4d2f11161733931 | 5,347 | py | Python | utils/ell_proj_np.py | StanfordASL/UP | 1677960690cc1a7576d62639333decb31b730707 | [
"MIT"
] | 6 | 2021-01-08T05:44:52.000Z | 2021-12-12T06:39:14.000Z | utils/ell_proj_np.py | StanfordASL/UP | 1677960690cc1a7576d62639333decb31b730707 | [
"MIT"
] | null | null | null | utils/ell_proj_np.py | StanfordASL/UP | 1677960690cc1a7576d62639333decb31b730707 | [
"MIT"
] | 1 | 2021-03-19T15:47:23.000Z | 2021-03-19T15:47:23.000Z | ##
## Code written by Robert Dyro, Stanford ASL, 2020
##
## Reproduces the Self-adaptive Alternating Direction Method of Multipliers (S-ADMM) as described in
## Z. Jia, X. Cai, and D. Han. Comparison of several fast algorithms for projection onto anellipsoid.
## Journal of Computational and Applied Mathem... | 34.496774 | 106 | 0.501403 |
4a0a2d4420d2cbbcba0049caf1aaacb8c886f95b | 870 | py | Python | python/athena/gpu_links/EmbeddingLookUpLink.py | DMALab/TSplit | 8f86f987163aa06521bfeeb174616eb4a0a81b47 | [
"Apache-2.0"
] | 2 | 2021-05-29T11:18:14.000Z | 2021-09-09T14:29:21.000Z | python/athena/gpu_links/EmbeddingLookUpLink.py | DMALab/TSplit | 8f86f987163aa06521bfeeb174616eb4a0a81b47 | [
"Apache-2.0"
] | null | null | null | python/athena/gpu_links/EmbeddingLookUpLink.py | DMALab/TSplit | 8f86f987163aa06521bfeeb174616eb4a0a81b47 | [
"Apache-2.0"
] | 1 | 2021-05-01T16:34:37.000Z | 2021-05-01T16:34:37.000Z | from __future__ import absolute_import
import ctypes
from .._base import _LIB
from .. import ndarray as _nd
def embedding_lookup(in_mat, ids, out_mat, stream = None, profiler = None):
assert isinstance(in_mat, _nd.NDArray)
assert isinstance(ids, _nd.NDArray)
assert isinstance(out_mat, _nd.NDArray)
_L... | 41.428571 | 134 | 0.758621 |
4a0a2dddfb1969c976a03f1d256ecc78ae8af792 | 54,966 | py | Python | src/catsys/imgs/hgencoder.py | AtomCrafty/catsystem-py | 11bd96708e3959be84e41e30397820ebaa54974d | [
"MIT"
] | 6 | 2020-10-20T13:26:56.000Z | 2022-02-15T05:26:38.000Z | src/catsys/imgs/hgencoder.py | AtomCrafty/catsystem-py | 11bd96708e3959be84e41e30397820ebaa54974d | [
"MIT"
] | 2 | 2020-10-20T16:15:35.000Z | 2021-07-08T18:15:23.000Z | src/catsys/imgs/hgencoder.py | AtomCrafty/catsystem-py | 11bd96708e3959be84e41e30397820ebaa54974d | [
"MIT"
] | 1 | 2020-10-19T15:20:50.000Z | 2020-10-19T15:20:50.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""HG image encoding utility
Provides the encoding and decoding methods for HG image encodings (HG-2, HG-3).
"""
__version__ = '1.0.0'
__date__ = '2020-09-19'
__author__ = 'Robert Jordan'
__all__ = []
#####################################################################... | 37.519454 | 192 | 0.551814 |
4a0a2de4a48a72bb8154ec6eceb7b65dad656e62 | 8,724 | py | Python | lib/streamlit/elements/write.py | rpyleonard/streamlit | 2d523cfe9a2a211602bb883de028c5bb85558f5f | [
"Apache-2.0"
] | 1 | 2021-01-29T02:32:53.000Z | 2021-01-29T02:32:53.000Z | lib/streamlit/elements/write.py | PickMio/streamlit | bd41a464d010db587b5e5709ab68d062af0c14d9 | [
"Apache-2.0"
] | 64 | 2021-01-06T17:40:21.000Z | 2022-03-25T05:12:26.000Z | lib/streamlit/elements/write.py | PickMio/streamlit | bd41a464d010db587b5e5709ab68d062af0c14d9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2020 Streamlit Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 38.09607 | 89 | 0.576112 |
4a0a2e9704af8a9a89a32122e52c44c8cd813e62 | 675 | py | Python | api/generators/MapGeneratorBeatStrategy.py | strategineer/lynchman | 7b07c15c801841ad3f94734d6912d248c3f1bcbd | [
"MIT"
] | 1 | 2019-04-12T23:49:01.000Z | 2019-04-12T23:49:01.000Z | api/generators/MapGeneratorBeatStrategy.py | KeikakuB/lynchman | 7b07c15c801841ad3f94734d6912d248c3f1bcbd | [
"MIT"
] | null | null | null | api/generators/MapGeneratorBeatStrategy.py | KeikakuB/lynchman | 7b07c15c801841ad3f94734d6912d248c3f1bcbd | [
"MIT"
] | 1 | 2021-08-15T13:15:07.000Z | 2021-08-15T13:15:07.000Z | from .MapGeneratorStrategy import MapGeneratorStrategy
from api.data.Block import Block
import api.data.Constants
from api.data.JsonNoteType import JsonNoteType
class MapGeneratorBeatStrategy(MapGeneratorStrategy):
"""This strategy generates a map in which the same note is placed on every beat."""
def __init__... | 39.705882 | 137 | 0.715556 |
4a0a2f2be776f10b0b810e13854bba629751c666 | 629 | py | Python | utils/md/katex.py | zerolfx/aiplay-api | 73161ce8fba67c392df73b452984f6cb09fc48e7 | [
"MIT"
] | 3 | 2017-02-21T01:11:45.000Z | 2020-11-17T13:08:12.000Z | utils/md/katex.py | zerolfx/aiplay-api | 73161ce8fba67c392df73b452984f6cb09fc48e7 | [
"MIT"
] | null | null | null | utils/md/katex.py | zerolfx/aiplay-api | 73161ce8fba67c392df73b452984f6cb09fc48e7 | [
"MIT"
] | null | null | null | import re
import subprocess
_katex_error_message = '<span class="katex">ERROR</span>'
_katex_empty_message = '<span class="katex"></span>'
def convert(eqn_string):
""" Takes equation string, e.g. "E = mc^2", and outputs KaTeX HTML """
import os
command = ['node', os.path.join(os.path.dirname(__file__), '... | 31.45 | 92 | 0.666137 |
4a0a2f333920d67bb54bcdc40d8b37e9cfb2fe50 | 1,711 | py | Python | app/blueprints/open/routes/projects.py | neurothrone/project-dot | 20889075611bed645689a76a30257f96e4b55988 | [
"MIT"
] | null | null | null | app/blueprints/open/routes/projects.py | neurothrone/project-dot | 20889075611bed645689a76a30257f96e4b55988 | [
"MIT"
] | null | null | null | app/blueprints/open/routes/projects.py | neurothrone/project-dot | 20889075611bed645689a76a30257f96e4b55988 | [
"MIT"
] | null | null | null | from flask import flash, make_response, redirect, render_template, request, url_for
from .. import bp_open
from app.controllers.project import ProjectController
@bp_open.get("/projects")
def projects():
search_text = request.args.get("search_text", "")
page = request.args.get("page", 1, type=int)
paginat... | 36.404255 | 85 | 0.672706 |
4a0a2fc1802398f01e29a4b0b2f1080e56ffce07 | 4,522 | py | Python | sdks/python/apache_beam/examples/complete/autocomplete_test.py | prabhaarya/beam | 150e311a0d78f827396dd5090004752134622771 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | sdks/python/apache_beam/examples/complete/autocomplete_test.py | prabhaarya/beam | 150e311a0d78f827396dd5090004752134622771 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 6 | 2022-02-18T15:52:33.000Z | 2022-03-09T22:25:01.000Z | sdks/python/apache_beam/examples/complete/autocomplete_test.py | prabhaarya/beam | 150e311a0d78f827396dd5090004752134622771 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 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 us... | 34 | 80 | 0.683547 |
4a0a2fd1f0b4f985eb69e4c04916a8c78c567c35 | 1,603 | py | Python | cbmpy-tools/miriam-tools/parseMIRIAM.py | bgoli/cbmpy-dev | 04a6179af8e04aefdb49ed97f34544ede8180005 | [
"BSD-2-Clause"
] | null | null | null | cbmpy-tools/miriam-tools/parseMIRIAM.py | bgoli/cbmpy-dev | 04a6179af8e04aefdb49ed97f34544ede8180005 | [
"BSD-2-Clause"
] | null | null | null | cbmpy-tools/miriam-tools/parseMIRIAM.py | bgoli/cbmpy-dev | 04a6179af8e04aefdb49ed97f34544ede8180005 | [
"BSD-2-Clause"
] | null | null | null | import os, time, numpy, re, pprint
cDir = os.path.dirname(os.path.abspath(os.sys.argv[0]))
#import pyscescbm as cbm
PP = pprint.PrettyPrinter()
## mDir = os.path.join(cDir, 'miriam')
mDir = cDir
mFile = os.path.join(mDir,'miriamresources.xml')
F = file(mFile,'r')
res = F.read()
F.close()
datatype = re.compile('<dat... | 29.145455 | 116 | 0.584529 |
4a0a30d7a080e8ba6d2609f54bce73be26709ec9 | 9,720 | py | Python | multiagent/scenarios/simple_tax_noop.py | ngrupen/multiagent-particle-envs | 0379c39ed5792a08c2e23a7183d2f690af38fcc6 | [
"MIT"
] | null | null | null | multiagent/scenarios/simple_tax_noop.py | ngrupen/multiagent-particle-envs | 0379c39ed5792a08c2e23a7183d2f690af38fcc6 | [
"MIT"
] | null | null | null | multiagent/scenarios/simple_tax_noop.py | ngrupen/multiagent-particle-envs | 0379c39ed5792a08c2e23a7183d2f690af38fcc6 | [
"MIT"
] | null | null | null | import numpy as np
import math
from multiagent.core import World, Agent, Landmark, Wall
from multiagent.scenario import BaseScenario
from multiagent.utils import overlaps, toroidal_distance
COLOR_SCHEMES = {
'regular' : [np.array([0.85, 0.35, 0.35]), np.array([0.85, 0.35, 0.35]), np.array([0.85, 0.35, 0.35])],
... | 38.571429 | 165 | 0.572428 |
4a0a334bb1b88b8c4baafdd5400a1d1f41635151 | 31,322 | py | Python | manage_externals/test/test_unit_repository_git.py | guoqing-noaa/ufs-rtma-app | 04106ae1899118f66c5b045092ebc0d736c0cbf6 | [
"CC0-1.0"
] | 1 | 2021-08-30T03:11:41.000Z | 2021-08-30T03:11:41.000Z | manage_externals/test/test_unit_repository_git.py | guoqing-noaa/ufs-rtma-app | 04106ae1899118f66c5b045092ebc0d736c0cbf6 | [
"CC0-1.0"
] | 2 | 2021-09-18T00:18:10.000Z | 2021-10-18T15:10:07.000Z | manage_externals/test/test_unit_repository_git.py | guoqing-noaa/ufs-rtma-app | 04106ae1899118f66c5b045092ebc0d736c0cbf6 | [
"CC0-1.0"
] | 2 | 2020-06-15T17:44:13.000Z | 2020-06-15T17:48:01.000Z | #!/usr/bin/env python
"""Unit test driver for checkout_externals
Note: this script assume the path to the checkout_externals.py module is
already in the python path.
"""
# pylint: disable=too-many-lines,protected-access
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ i... | 38.716934 | 84 | 0.640189 |
4a0a33fe78d2157d100cfcfe208d9b876c949042 | 6,841 | py | Python | ingestclient/test/test_boss_validator_v02.py | lrodri29/ingest-client | 548e1891990a70c23f2534eefbdbda35014edab1 | [
"Apache-2.0"
] | null | null | null | ingestclient/test/test_boss_validator_v02.py | lrodri29/ingest-client | 548e1891990a70c23f2534eefbdbda35014edab1 | [
"Apache-2.0"
] | null | null | null | ingestclient/test/test_boss_validator_v02.py | lrodri29/ingest-client | 548e1891990a70c23f2534eefbdbda35014edab1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 The Johns Hopkins University Applied Physics Laboratory
#
# 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 ... | 34.725888 | 103 | 0.573454 |
4a0a3760a556ca092ccbaf5d1be6b4be6e8f5e59 | 28,092 | py | Python | python/pyspark/sql/tests/test_udf.py | zzy1120716/spark | ca711778683a16999560cbdd7c61d98ad6bde6db | [
"Apache-2.0"
] | 2 | 2017-08-04T11:37:01.000Z | 2017-09-24T18:21:56.000Z | python/pyspark/sql/tests/test_udf.py | zzy1120716/spark | ca711778683a16999560cbdd7c61d98ad6bde6db | [
"Apache-2.0"
] | 2 | 2016-11-21T11:03:26.000Z | 2018-08-23T04:33:23.000Z | python/pyspark/sql/tests/test_udf.py | zzy1120716/spark | ca711778683a16999560cbdd7c61d98ad6bde6db | [
"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 us... | 42.371041 | 100 | 0.609391 |
4a0a39061f9cc7e1555c400e973f3f7325573b32 | 3,473 | py | Python | cmd.py | togatoga/vn | 1266b40a1986bb28e72a6cc06bf45d61cd44b5db | [
"MIT"
] | 7 | 2018-01-31T18:00:09.000Z | 2018-08-21T01:49:44.000Z | cmd.py | togatoga/vn | 1266b40a1986bb28e72a6cc06bf45d61cd44b5db | [
"MIT"
] | 1 | 2018-03-07T23:56:29.000Z | 2018-03-07T23:56:29.000Z | cmd.py | togatoga/vn | 1266b40a1986bb28e72a6cc06bf45d61cd44b5db | [
"MIT"
] | 1 | 2021-01-26T19:12:44.000Z | 2021-01-26T19:12:44.000Z | #!/usr/bin/env python
import click
import crayons
from prompt_toolkit import prompt
from bs4 import BeautifulSoup
from vn.util import is_japanese,get_synonyms
from vn.glosbe import Glosbe
@click.group()
def cmd():
pass
@cmd.command(help="translate [phrase]")
@click.argument('phrase', required=False)
@click.o... | 31.288288 | 137 | 0.576447 |
4a0a392b802c524b22ca757ed9cc3b0a78e7cfe7 | 2,625 | py | Python | src/inhibitor_urea_denaturation/plot_proteins.py | dezeraecox-manuscripts/COX_Proteome-stability | a5397baae7f0bc73980b88f8ccf7b83e3d05f590 | [
"MIT"
] | null | null | null | src/inhibitor_urea_denaturation/plot_proteins.py | dezeraecox-manuscripts/COX_Proteome-stability | a5397baae7f0bc73980b88f8ccf7b83e3d05f590 | [
"MIT"
] | null | null | null | src/inhibitor_urea_denaturation/plot_proteins.py | dezeraecox-manuscripts/COX_Proteome-stability | a5397baae7f0bc73980b88f8ccf7b83e3d05f590 | [
"MIT"
] | null | null | null | import os
import re
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import matplotlib
from loguru import logger
from GEN_Utils import FileHandling
logger.info('Import OK')
font = {'family' : 'normal',
'weight' : 'normal',
'size' : 12 }
matplotlib.rc('font', **font)
plt.... | 31.25 | 109 | 0.645714 |
4a0a39d3be9377d8cb99fef8f0a1811180f97055 | 802 | py | Python | phone_auth/migrations/0008_auto_20210409_2200.py | prateekcom/django-phone-auth | 0af0333939304673657399db0cd762aee4778955 | [
"MIT"
] | null | null | null | phone_auth/migrations/0008_auto_20210409_2200.py | prateekcom/django-phone-auth | 0af0333939304673657399db0cd762aee4778955 | [
"MIT"
] | null | null | null | phone_auth/migrations/0008_auto_20210409_2200.py | prateekcom/django-phone-auth | 0af0333939304673657399db0cd762aee4778955 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-04-09 16:30
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('phone_auth', '0007_auto_... | 29.703704 | 110 | 0.663342 |
4a0a3b2840633965b1b56e52135ea33121d4d798 | 54 | py | Python | joladnijo/__init__.py | joladnijo/joladnijo-backend | 89240e3990ce9cdad86a1d212d28062c07a58edb | [
"MIT"
] | null | null | null | joladnijo/__init__.py | joladnijo/joladnijo-backend | 89240e3990ce9cdad86a1d212d28062c07a58edb | [
"MIT"
] | 40 | 2022-03-06T19:46:07.000Z | 2022-03-27T11:50:02.000Z | joladnijo/__init__.py | joladnijo/joladnijo-backend | 89240e3990ce9cdad86a1d212d28062c07a58edb | [
"MIT"
] | 1 | 2022-03-29T08:53:21.000Z | 2022-03-29T08:53:21.000Z | default_app_config = 'joladnijo.apps.JoladnijoConfig'
| 27 | 53 | 0.851852 |
4a0a3b6400096b01ad12c7a70f707572d5e23e1d | 739 | py | Python | setup.py | hibikisan2018/stockinfo | eea2ea71a697bcbb0454277c096e239e229e798e | [
"BSD-2-Clause"
] | 1 | 2018-05-13T05:39:52.000Z | 2018-05-13T05:39:52.000Z | setup.py | hibikisan2018/stockinfo | eea2ea71a697bcbb0454277c096e239e229e798e | [
"BSD-2-Clause"
] | null | null | null | setup.py | hibikisan2018/stockinfo | eea2ea71a697bcbb0454277c096e239e229e798e | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Learn more: https://github.com/kennethreitz/setup.py
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
setup(
name='stockinfo',
version='0.1.0',
description='Notifying N225 and USD... | 23.09375 | 65 | 0.644114 |
4a0a3d582033bfd86290c3077ac9afa5589a4fb1 | 120 | py | Python | beginner/chapter_1/exam_1_6.py | Bokji24Dev/CodeStudy | 4c0fc852e6f472d082e9836c59ad22d229f74d87 | [
"MIT"
] | null | null | null | beginner/chapter_1/exam_1_6.py | Bokji24Dev/CodeStudy | 4c0fc852e6f472d082e9836c59ad22d229f74d87 | [
"MIT"
] | null | null | null | beginner/chapter_1/exam_1_6.py | Bokji24Dev/CodeStudy | 4c0fc852e6f472d082e9836c59ad22d229f74d87 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
# 개념
# 변수란 어떠한 값을 담는 상자입니다.
# 규칙
# 변수_이름 = 저장할_값
과일상자 = "과일"
숫자상자 = 1
print(과일상자)
print(숫자상자)
| 9.230769 | 22 | 0.566667 |
4a0a3d727541b2855a1862bd07e7c3e796ebc070 | 28,816 | py | Python | thermofeel/thermofeel.py | milankl/thermofeel | 5f7468c85bd9d06d556904dc767500dfec0712b2 | [
"Apache-2.0"
] | null | null | null | thermofeel/thermofeel.py | milankl/thermofeel | 5f7468c85bd9d06d556904dc767500dfec0712b2 | [
"Apache-2.0"
] | null | null | null | thermofeel/thermofeel.py | milankl/thermofeel | 5f7468c85bd9d06d556904dc767500dfec0712b2 | [
"Apache-2.0"
] | null | null | null | # (C) Copyright 1996- ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmen... | 30.984946 | 111 | 0.549591 |
4a0a3ddec54f924d442d2226a7676fff4d8c3a5e | 3,019 | py | Python | young/apps/users/migrations/0001_initial.py | Aooyh/Young | 223671c05085f79a9f12513ccc16abbb4ca801d4 | [
"MIT"
] | 1 | 2019-04-20T07:54:21.000Z | 2019-04-20T07:54:21.000Z | young/apps/users/migrations/0001_initial.py | Aooyh/Young | 223671c05085f79a9f12513ccc16abbb4ca801d4 | [
"MIT"
] | null | null | null | young/apps/users/migrations/0001_initial.py | Aooyh/Young | 223671c05085f79a9f12513ccc16abbb4ca801d4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-12-25 15:00
from __future__ import unicode_literals
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
... | 62.895833 | 329 | 0.662471 |
4a0a3fed7ab0bd697149e886caf8fac5f9bd1ea2 | 16,591 | py | Python | mayan/apps/documents/tests/test_document_views.py | O2Graphics/Mayan-EDMS | e11e6f47240f3c536764be66828dbe6428dceb41 | [
"Apache-2.0"
] | null | null | null | mayan/apps/documents/tests/test_document_views.py | O2Graphics/Mayan-EDMS | e11e6f47240f3c536764be66828dbe6428dceb41 | [
"Apache-2.0"
] | 5 | 2021-03-19T22:56:45.000Z | 2022-03-12T00:08:43.000Z | mayan/apps/documents/tests/test_document_views.py | halsten/mayan-edms | 10372daede6e6dea0bea67eb98767e3be6fbf86f | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
from django.utils.encoding import force_text
from mayan.apps.converter.layers import layer_saved_transformations
from mayan.apps.converter.permissions import permission_transformation_delete
from mayan.apps.converter.tests.mixins import LayerTestMixin
from ..models import Dele... | 35.911255 | 85 | 0.689048 |
4a0a4028a4694621f15495493c1f99fc67a7abfe | 4,861 | py | Python | TensorFlow+Keras/cifar10/cifar10.py | 16647615268/python | 933644a49dfac2c614e243e3db378441cb6a6dd7 | [
"Apache-2.0"
] | 3 | 2019-10-05T07:26:53.000Z | 2019-10-10T08:08:17.000Z | TensorFlow+Keras/cifar10/cifar10.py | yangli-os/python | ddf5636fb522c0b28f93866f0f65a38fa007a79b | [
"Apache-2.0"
] | null | null | null | TensorFlow+Keras/cifar10/cifar10.py | yangli-os/python | ddf5636fb522c0b28f93866f0f65a38fa007a79b | [
"Apache-2.0"
] | 2 | 2020-06-18T09:54:02.000Z | 2021-01-24T03:48:19.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon Jun 4 14:38:23 2018
@author: liyang
"""
from keras.datasets import cifar10
from keras.utils import np_utils #后续将label标签转换成One-Hot Encoding
import numpy as np
np.random.seed(10)
(x_train_image,y_train_label),\
(x_test_image,y_test_label)=cifar10.load_data()
#print(... | 45.429907 | 91 | 0.716931 |
4a0a41035ec97783246632758208dc6504143b41 | 2,471 | py | Python | next_sentence/processing.py | gdyp/bert-awesome | f0836aadaa23e95b82449570a39768bfe24bdadd | [
"Apache-2.0"
] | null | null | null | next_sentence/processing.py | gdyp/bert-awesome | f0836aadaa23e95b82449570a39768bfe24bdadd | [
"Apache-2.0"
] | null | null | null | next_sentence/processing.py | gdyp/bert-awesome | f0836aadaa23e95b82449570a39768bfe24bdadd | [
"Apache-2.0"
] | null | null | null | #! -*- coding: utf-8 -*-
import csv
import torch
import pickle
from tqdm import tqdm
from utils.utils import tokenizer
from config import BERT_PRETRAINED_PATH
from inputters import InputExample, InputFeatures
MAX_LENGTH = 30
tokenizer = tokenizer()
number_map = {
'0': 1,
'1': 0
}
def read_file(path):
... | 26.287234 | 80 | 0.611493 |
4a0a420d471cf8d04c0663bcc0b176ca41ac94e4 | 562 | py | Python | yawhois/client.py | huyphan/pyyawhois | 77fb2f73a9c67989f1d41d98f37037406a69d136 | [
"MIT"
] | null | null | null | yawhois/client.py | huyphan/pyyawhois | 77fb2f73a9c67989f1d41d98f37037406a69d136 | [
"MIT"
] | null | null | null | yawhois/client.py | huyphan/pyyawhois | 77fb2f73a9c67989f1d41d98f37037406a69d136 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
This module provides a Client object to handle whois queries.
"""
from .server import Server
DEFAULT_TIMEOUT = 10
class Client(object):
def __init__(self, settings = {}):
if settings.has_key('timeout'):
self.timeout = settings.pop('timeout')
... | 21.615385 | 62 | 0.597865 |
4a0a429a794d41a8db85bc52007405a14c503169 | 28 | py | Python | numpretty/__init__.py | obfuscatedgenerated/numpretty | d751cb967eab8f0009e4659347720d49b2771bf3 | [
"MIT"
] | 1 | 2022-02-17T22:06:26.000Z | 2022-02-17T22:06:26.000Z | numpretty/__init__.py | obfuscatedgenerated/numpretty | d751cb967eab8f0009e4659347720d49b2771bf3 | [
"MIT"
] | null | null | null | numpretty/__init__.py | obfuscatedgenerated/numpretty | d751cb967eab8f0009e4659347720d49b2771bf3 | [
"MIT"
] | null | null | null | from numpretty.main import * | 28 | 28 | 0.821429 |
4a0a43cfc3ef8d0b09c1145196a380f063e26866 | 702 | py | Python | py/common/design_patterns/Adapter.py | 7134g/mySpiderAll | fc4cb986a5efa05977c7f569c69b60a4e6e861bf | [
"MIT"
] | null | null | null | py/common/design_patterns/Adapter.py | 7134g/mySpiderAll | fc4cb986a5efa05977c7f569c69b60a4e6e861bf | [
"MIT"
] | null | null | null | py/common/design_patterns/Adapter.py | 7134g/mySpiderAll | fc4cb986a5efa05977c7f569c69b60a4e6e861bf | [
"MIT"
] | null | null | null | # 接口1
class S1:
def do_something(self, data):
return "".join(["S1", data])
# 接口2
class N1:
def do_something(self, data):
return "".join(["N1", data])
# 适配器
class Adapter:
def __init__(self, obj, adapted_methods):
self.obj = obj
self.__dict__.update(adapted_methods)
def ... | 19.5 | 59 | 0.579772 |
4a0a448b12411602f98974d07d79fdbc065d4052 | 11,796 | py | Python | sunpy/time/tests/test_time.py | samaloney/sunpy | 89142033a7a76bcd3b2791b779b8b43fac65a7f4 | [
"BSD-2-Clause"
] | null | null | null | sunpy/time/tests/test_time.py | samaloney/sunpy | 89142033a7a76bcd3b2791b779b8b43fac65a7f4 | [
"BSD-2-Clause"
] | null | null | null | sunpy/time/tests/test_time.py | samaloney/sunpy | 89142033a7a76bcd3b2791b779b8b43fac65a7f4 | [
"BSD-2-Clause"
] | null | null | null | from datetime import date, datetime
import numpy as np
import pandas
import pytest
import astropy.time
from astropy.time import Time
import sunpy.time as time
from sunpy.time import parse_time, is_time_equal
LANDING = Time('1966-02-03', format='isot')
def test_parse_time_24():
dt = parse_time("2010-10-10T24:0... | 27.952607 | 99 | 0.629196 |
4a0a458acf65648749f6a31ca5582510dd0f9940 | 2,901 | py | Python | ping_pong.py | AlexLito666/ping_ping | 803a2cb57501b31767622c80722ade2866982a08 | [
"CC0-1.0"
] | null | null | null | ping_pong.py | AlexLito666/ping_ping | 803a2cb57501b31767622c80722ade2866982a08 | [
"CC0-1.0"
] | null | null | null | ping_pong.py | AlexLito666/ping_ping | 803a2cb57501b31767622c80722ade2866982a08 | [
"CC0-1.0"
] | null | null | null |
from pygame import *
'''Необходимые классы'''
#класс-родитель для спрайтов
class GameSprite(sprite.Sprite):
def __init__(self, player_image, player_x, player_y, player_speed, wight, height):
super().__init__()
self.image = transform.scale(image.load(player_image), (wight, height)) #вместе ... | 29.30303 | 106 | 0.577732 |
4a0a45b0aba470ba1b9b68daeaa2cb57055aa136 | 4,291 | py | Python | test/functional/neutronless/disconnected_service/conftest.py | F5K-Jayson/f5-openstack-agent | f98f48266f029a719a2d446a06c741f0ed6653ff | [
"Apache-2.0"
] | null | null | null | test/functional/neutronless/disconnected_service/conftest.py | F5K-Jayson/f5-openstack-agent | f98f48266f029a719a2d446a06c741f0ed6653ff | [
"Apache-2.0"
] | null | null | null | test/functional/neutronless/disconnected_service/conftest.py | F5K-Jayson/f5-openstack-agent | f98f48266f029a719a2d446a06c741f0ed6653ff | [
"Apache-2.0"
] | 2 | 2018-02-27T08:42:30.000Z | 2018-03-09T16:34:46.000Z | # Copyright 2016 F5 Networks Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 35.46281 | 79 | 0.669541 |
4a0a4615f68358364512aeee527a676301442650 | 2,829 | py | Python | sloth/gui/rixs/items.py | maurov/xraysloth | 6f18ddcb02050431574693d46bcf4b89c719c40b | [
"BSD-3-Clause"
] | 4 | 2015-07-03T09:38:58.000Z | 2022-03-16T11:09:49.000Z | sloth/gui/rixs/items.py | maurov/xraysloth | 6f18ddcb02050431574693d46bcf4b89c719c40b | [
"BSD-3-Clause"
] | null | null | null | sloth/gui/rixs/items.py | maurov/xraysloth | 6f18ddcb02050431574693d46bcf4b89c719c40b | [
"BSD-3-Clause"
] | 2 | 2017-05-22T17:14:11.000Z | 2017-07-04T04:52:08.000Z | #!/usr/bin/env python
# coding: utf-8
"""
RIXS items
"""
from silx.gui import qt
from sloth.gui.daxs.items import TreeItem
class RixsItem(TreeItem):
def __init__(self, name=None, parentItem=None, isChecked=False, data=None):
super(RixsItem, self).__init__(name, parentItem, isChecked)
self._plotW... | 29.778947 | 90 | 0.60304 |
4a0a461cfeac76258ace4dbcdf5478ee042869af | 15,342 | py | Python | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefixes_/undefined_subtlvs/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 64 | 2016-10-20T15:47:18.000Z | 2021-11-11T11:57:32.000Z | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefixes_/undefined_subtlvs/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 126 | 2016-10-05T10:36:14.000Z | 2019-05-15T08:43:23.000Z | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv6_reachability/prefixes/prefixes_/undefined_subtlvs/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 63 | 2016-11-07T15:23:08.000Z | 2021-09-22T14:41:16.000Z | # -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | 39.541237 | 569 | 0.590145 |
4a0a464792f101a24cc97b3e67a2f554cb691010 | 6,203 | py | Python | deeppavlov/models/vectorizers/hashing_tfidf_vectorizer.py | havesupper/DeepPavlov | 142f9ff05d53e78bae77f6392613eccea0aa57f7 | [
"Apache-2.0"
] | 1 | 2018-07-18T11:50:45.000Z | 2018-07-18T11:50:45.000Z | deeppavlov/models/vectorizers/hashing_tfidf_vectorizer.py | havesupper/DeepPavlov | 142f9ff05d53e78bae77f6392613eccea0aa57f7 | [
"Apache-2.0"
] | null | null | null | deeppavlov/models/vectorizers/hashing_tfidf_vectorizer.py | havesupper/DeepPavlov | 142f9ff05d53e78bae77f6392613eccea0aa57f7 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2017 Neural Networks and Deep Learning lab, MIPT
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... | 35.045198 | 100 | 0.61841 |
4a0a4714139035a823bde16934e683809b56f444 | 22,066 | py | Python | tools/efro/entity/_field.py | Awesome-Logic/ballistica | 233a4a4f7840c9c666a1809626b6993a4b145349 | [
"MIT"
] | 1 | 2020-04-04T01:32:29.000Z | 2020-04-04T01:32:29.000Z | tools/efro/entity/_field.py | Awesome-Logic/ballistica | 233a4a4f7840c9c666a1809626b6993a4b145349 | [
"MIT"
] | null | null | null | tools/efro/entity/_field.py | Awesome-Logic/ballistica | 233a4a4f7840c9c666a1809626b6993a4b145349 | [
"MIT"
] | null | null | null | # Copyright (c) 2011-2020 Eric Froemling
#
# 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, copy, modify, merge, publish,... | 38.309028 | 79 | 0.598704 |
4a0a4755c849160343f0d27df0aa86b46ee30b5e | 4,349 | py | Python | CytoPy/tests/test_flow/test_utilities.py | fabbondanza/CytoPy | 74baea59cfe9e9f664b6b1bf7abf9847f34893eb | [
"MIT"
] | null | null | null | CytoPy/tests/test_flow/test_utilities.py | fabbondanza/CytoPy | 74baea59cfe9e9f664b6b1bf7abf9847f34893eb | [
"MIT"
] | null | null | null | CytoPy/tests/test_flow/test_utilities.py | fabbondanza/CytoPy | 74baea59cfe9e9f664b6b1bf7abf9847f34893eb | [
"MIT"
] | null | null | null | import sys
sys.path.append('/home/ross/CytoPy')
from CytoPy.data.mongo_setup import global_init
from CytoPy.flow.gating import utilities
from CytoPy.tests import make_example_date
from sklearn.neighbors import KernelDensity
from scipy.signal import find_peaks
from itertools import combinations
import numpy as np
impor... | 38.149123 | 105 | 0.551391 |
4a0a4772da8fe89c13bbcea10e9223aa128769d6 | 4,931 | py | Python | DDoS_Scripts/scan.py | thexaoulm/dos | fd8a3bc623e7615df062edde34e5972a0545d668 | [
"MIT"
] | 2 | 2020-05-26T12:51:01.000Z | 2021-12-24T01:27:52.000Z | DDoS_Scripts/scan.py | thexaoulm/dos | fd8a3bc623e7615df062edde34e5972a0545d668 | [
"MIT"
] | null | null | null | DDoS_Scripts/scan.py | thexaoulm/dos | fd8a3bc623e7615df062edde34e5972a0545d668 | [
"MIT"
] | 1 | 2021-10-10T03:45:08.000Z | 2021-10-10T03:45:08.000Z | # Voids hacka scanna
# nano /usr/include/bits/typesizes.h -> change 99999 to 99999
# ulimit -n 99999
# python scan.py 1000 <start-range> <end-range>
import threading, paramiko, random, socket, time, sys
paramiko.util.log_to_file("/dev/null")
server_ip = "208.67.1.26"
blacklisted = ["127.0","10.0","192.168"]
passw... | 29.884848 | 129 | 0.468262 |
4a0a47dc486ca8d88586c1ba8b81d1a0db242f24 | 3,955 | py | Python | appengine/monorail/sitewide/hostinghome.py | xswz8015/infra | f956b78ce4c39cc76acdda47601b86794ae0c1ba | [
"BSD-3-Clause"
] | null | null | null | appengine/monorail/sitewide/hostinghome.py | xswz8015/infra | f956b78ce4c39cc76acdda47601b86794ae0c1ba | [
"BSD-3-Clause"
] | 7 | 2022-02-15T01:11:37.000Z | 2022-03-02T12:46:13.000Z | appengine/monorail/sitewide/hostinghome.py | NDevTK/chromium-infra | d38e088e158d81f7f2065a38aa1ea1894f735ec4 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
"""A class to display the hosting home page."""
from __future__ import print_function
from __fu... | 36.62037 | 78 | 0.733502 |
4a0a48445aba68d00888a8e2ebb082177903377e | 3,462 | py | Python | src/compas_rhino/geometry/plane.py | arpastrana/compas | ed677a162c14dbe562c82d72f370279259faf7da | [
"MIT"
] | null | null | null | src/compas_rhino/geometry/plane.py | arpastrana/compas | ed677a162c14dbe562c82d72f370279259faf7da | [
"MIT"
] | null | null | null | src/compas_rhino/geometry/plane.py | arpastrana/compas | ed677a162c14dbe562c82d72f370279259faf7da | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import compas
from compas.geometry import Plane
from compas.geometry import Frame
from compas_rhino.geometry.base import BaseRhinoGeometry
if compas.RHINO:
import Rhino
__all__ = ['RhinoPlane']
class R... | 31.472727 | 145 | 0.591854 |
4a0a4910f6f84268ddb16877548ff314a9a81d09 | 560 | py | Python | developement_code/get_short_train_data.py | darongliu/Input_Method | 28055937fc777cbba8cbc4c87ba5a2670da7d4e2 | [
"MIT"
] | 1 | 2018-07-03T07:42:42.000Z | 2018-07-03T07:42:42.000Z | developement_code/get_short_train_data.py | darongliu/Input_Method | 28055937fc777cbba8cbc4c87ba5a2670da7d4e2 | [
"MIT"
] | null | null | null | developement_code/get_short_train_data.py | darongliu/Input_Method | 28055937fc777cbba8cbc4c87ba5a2670da7d4e2 | [
"MIT"
] | null | null | null | import os
data_root = "../data"
origin_file = os.path.join(data_root , "all_chinese_char_seperate_train.ptt.corpus.20140906.txt")
save_file = os.path.join(data_root , "all_chinese_char_seperate_train_short.ptt.corpus.20140906.txt")
with open(origin_file , 'r') as f_read , open(save_file , 'w') as f_save :
allline... | 32.941176 | 101 | 0.633929 |
4a0a493d3448f996eea0873ddc011de1d911fc04 | 5,511 | py | Python | corehq/apps/reports/tests/test_sql_reports.py | satyaakam/commcare-hq | 233f255ff20ab3a16013e9fdfdb9c1dcf632e415 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/reports/tests/test_sql_reports.py | satyaakam/commcare-hq | 233f255ff20ab3a16013e9fdfdb9c1dcf632e415 | [
"BSD-3-Clause"
] | 1 | 2021-06-02T04:45:16.000Z | 2021-06-02T04:45:16.000Z | corehq/apps/reports/tests/test_sql_reports.py | satyaakam/commcare-hq | 233f255ff20ab3a16013e9fdfdb9c1dcf632e415 | [
"BSD-3-Clause"
] | null | null | null | from datetime import datetime, time
from django import test as unittest
from django.test.client import RequestFactory
from dimagi.utils.dates import DateSpan
from corehq.apps.domain.shortcuts import create_domain
from corehq.apps.users.models import WebUser
from corehq.sql_db.connections import Session
from corehq.u... | 41.43609 | 109 | 0.636727 |
4a0a493e80a75f82d4597ff9c4be7afbfc45c000 | 2,218 | py | Python | starthinker/task/dcm_api/schema/floodlightActivityPublisherDynamicTag.py | viohman/starthinker | 20bd2d7fd1e541eb8a2c9b7159941f667e22e38e | [
"Apache-2.0"
] | null | null | null | starthinker/task/dcm_api/schema/floodlightActivityPublisherDynamicTag.py | viohman/starthinker | 20bd2d7fd1e541eb8a2c9b7159941f667e22e38e | [
"Apache-2.0"
] | 6 | 2021-03-19T12:00:18.000Z | 2022-02-10T09:43:42.000Z | starthinker/task/dcm_api/schema/floodlightActivityPublisherDynamicTag.py | viohman/starthinker | 20bd2d7fd1e541eb8a2c9b7159941f667e22e38e | [
"Apache-2.0"
] | null | null | null | ###########################################################################
#
# Copyright 2019 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/... | 21.960396 | 75 | 0.48422 |
4a0a4973c5651f17e7d54c318ede70e5c832dbe6 | 5,198 | py | Python | test/test_conv2d.py | wavecomp/waveext | ef7da7f751d565c160f4e6fbaa71b6ef256702cd | [
"Apache-2.0"
] | 3 | 2018-07-27T13:14:49.000Z | 2019-05-13T21:25:16.000Z | test/test_conv2d.py | kshiring/waveext | ef7da7f751d565c160f4e6fbaa71b6ef256702cd | [
"Apache-2.0"
] | 1 | 2018-07-20T18:59:58.000Z | 2018-07-20T18:59:58.000Z | test/test_conv2d.py | kshiring/waveext | ef7da7f751d565c160f4e6fbaa71b6ef256702cd | [
"Apache-2.0"
] | 2 | 2018-07-20T18:50:26.000Z | 2019-04-02T11:45:18.000Z | #!/usr/bin/env python3
# test_conv2d.py
#
# Copyright (c) 2010-2018 Wave Computing, Inc. and its applicable licensors.
# All rights reserved; provided, that any files identified as open source shall
# be governed by the specific open source license(s) applicable to such files.
#
# For any files associated with d... | 34.885906 | 141 | 0.595614 |
4a0a49c64b8effeb3ed7381ae68cdfe219b4001c | 364 | py | Python | 10.ShellSort.py | sarincr/Data-Structure-Algorithms-In-Python | 80443ddb67f889b1d6c41d46da40d651441b911e | [
"MIT"
] | null | null | null | 10.ShellSort.py | sarincr/Data-Structure-Algorithms-In-Python | 80443ddb67f889b1d6c41d46da40d651441b911e | [
"MIT"
] | null | null | null | 10.ShellSort.py | sarincr/Data-Structure-Algorithms-In-Python | 80443ddb67f889b1d6c41d46da40d651441b911e | [
"MIT"
] | 1 | 2021-07-06T19:14:11.000Z | 2021-07-06T19:14:11.000Z | def ShellSort(lst, n):
h = n // 2
while h > 0:
for i in range(h, n):
t = lst[i]
j = i
while j >= h and lst[j - h] > t:
lst[j] = lst[j - h]
j -= h
lst[j] = t
h = h // 2
lst = [4,9,6,8,5,2,10,7,1,3]
n = len(lst)
print('Array before Sorting:')
print(lst)
ShellSort(lst, ... | 18.2 | 38 | 0.483516 |
4a0a4c49d69bf30bc078b9962598132810ff2273 | 7,502 | py | Python | graspologic/embed/lse.py | j1c/graspologic | ff34382d1ffa0b7ea5f0e005525b7364f977e86f | [
"MIT"
] | 110 | 2018-09-18T15:33:38.000Z | 2020-09-12T20:12:09.000Z | graspologic/embed/lse.py | j1c/graspologic | ff34382d1ffa0b7ea5f0e005525b7364f977e86f | [
"MIT"
] | 431 | 2018-09-18T21:03:12.000Z | 2020-09-15T05:42:04.000Z | graspologic/embed/lse.py | j1c/graspologic | ff34382d1ffa0b7ea5f0e005525b7364f977e86f | [
"MIT"
] | 47 | 2018-09-28T11:34:45.000Z | 2020-09-08T11:34:30.000Z | # Copyright (c) Microsoft Corporation and contributors.
# Licensed under the MIT License.
from typing import Any, Optional, Union
import networkx as nx
import numpy as np
from ..types import GraphRepresentation
from ..utils import LaplacianFormType, to_laplacian
from .base import BaseSpectralEmbed, SvdAlgorithmType... | 36.067308 | 89 | 0.632631 |
4a0a4e4310aa9f1758c20bdaa4b4a56c2f00d53b | 10,761 | py | Python | python2.7/site-packages/_pytest/assertion/util.py | 84KaliPleXon3/sslstrip-hsts-openwrt | f875ded48078a3ed84bffef1e69dcbeaf2e77ae3 | [
"MIT"
] | 1,323 | 2016-11-17T21:28:18.000Z | 2022-03-31T17:42:37.000Z | python2.7/site-packages/_pytest/assertion/util.py | 84KaliPleXon3/sslstrip-hsts-openwrt | f875ded48078a3ed84bffef1e69dcbeaf2e77ae3 | [
"MIT"
] | 301 | 2017-01-02T17:49:13.000Z | 2022-03-14T13:17:42.000Z | python2.7/site-packages/_pytest/assertion/util.py | 84KaliPleXon3/sslstrip-hsts-openwrt | f875ded48078a3ed84bffef1e69dcbeaf2e77ae3 | [
"MIT"
] | 131 | 2017-02-09T08:05:03.000Z | 2022-03-15T06:44:34.000Z | """Utilities for assertion debugging"""
import pprint
import _pytest._code
import py
try:
from collections import Sequence
except ImportError:
Sequence = list
BuiltinAssertionError = py.builtin.builtins.AssertionError
u = py.builtin._totext
# The _reprcompare attribute on the util module is used by the new a... | 35.750831 | 115 | 0.582753 |
4a0a4f4954ed3b665e87e644cc89ffe9ab293989 | 1,491 | py | Python | core/brain/play/song/reaction.py | vsilent/smarty-bot | 963cba05433be14494ba339343c9903ccab3c37d | [
"MIT"
] | 1 | 2016-10-08T09:01:05.000Z | 2016-10-08T09:01:05.000Z | core/brain/play/song/reaction.py | vsilent/smarty-bot | 963cba05433be14494ba339343c9903ccab3c37d | [
"MIT"
] | 1 | 2019-09-24T09:56:52.000Z | 2019-09-24T09:56:52.000Z | core/brain/play/song/reaction.py | vsilent/smarty-bot | 963cba05433be14494ba339343c9903ccab3c37d | [
"MIT"
] | null | null | null | import logging
#from core.output import say
from core.config.settings import logger, DEMO_MUSIC_DIR
import subprocess
import os, random
class Reaction:
"""class Reaction"""
def __str__(self):
return 'Reac'
@classmethod
def __init__(self, *args, **kwargs):
""" original request string ""... | 29.235294 | 90 | 0.599598 |
4a0a506a28def373c681dff69b71e82f5a737513 | 2,900 | py | Python | app/oauth2/oauth2.py | yishan1331/heroku-yishan-paas | bd46bc8c067999b1dfb83b863b5ba64e76933d0a | [
"MIT"
] | null | null | null | app/oauth2/oauth2.py | yishan1331/heroku-yishan-paas | bd46bc8c067999b1dfb83b863b5ba64e76933d0a | [
"MIT"
] | null | null | null | app/oauth2/oauth2.py | yishan1331/heroku-yishan-paas | bd46bc8c067999b1dfb83b863b5ba64e76933d0a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
from authlib.integrations.flask_oauth2 import (
AuthorizationServer,
ResourceProtector,
)
#Yishan add
from authlib.integrations.sqla_oauth2 import (
create_query_client_func,
create_save_token_func,
create_revocation_endpoint,
create_bearer_token_validator,
... | 37.662338 | 161 | 0.708966 |
4a0a506fad2c8d3aadee2ccae1728fb7d7d684a0 | 251 | py | Python | test/udp/client.py | Folamh/atreoraigh | 97a4fba51908df6aa2f3a34f934fce6ef1bc5dcc | [
"MIT"
] | null | null | null | test/udp/client.py | Folamh/atreoraigh | 97a4fba51908df6aa2f3a34f934fce6ef1bc5dcc | [
"MIT"
] | null | null | null | test/udp/client.py | Folamh/atreoraigh | 97a4fba51908df6aa2f3a34f934fce6ef1bc5dcc | [
"MIT"
] | null | null | null | import socket
import sys
def main():
sock = socket.socket(socket.AF_INET, # Internet
socket.SOCK_DGRAM) # UDP
sock.sendto(sys.argv[2].encode('utf-8'), ("", int(sys.argv[1])))
if __name__ == '__main__':
main()
| 20.916667 | 68 | 0.577689 |
4a0a5211136d1c2368021b84e12fc3bb04b5cb95 | 153 | py | Python | src/icemac/ab/calexport/masterdata/menu.py | icemac/icemac.ab.calexport | ae16aa6d3c7f15b5bc386f135c018f9d552d8d5c | [
"BSD-2-Clause"
] | null | null | null | src/icemac/ab/calexport/masterdata/menu.py | icemac/icemac.ab.calexport | ae16aa6d3c7f15b5bc386f135c018f9d552d8d5c | [
"BSD-2-Clause"
] | null | null | null | src/icemac/ab/calexport/masterdata/menu.py | icemac/icemac.ab.calexport | ae16aa6d3c7f15b5bc386f135c018f9d552d8d5c | [
"BSD-2-Clause"
] | null | null | null | import icemac.addressbook.browser.menus.menu
export_views = icemac.addressbook.browser.menus.menu.SelectMenuItemOn(
'edit-export-masterdata.html')
| 25.5 | 70 | 0.810458 |
4a0a52c2265381d4d7f544063527eed6533203cb | 1,988 | py | Python | setup.py | oesteban/pyregseg | 16639a048a6990465d460bfce65623556b104e51 | [
"MIT"
] | null | null | null | setup.py | oesteban/pyregseg | 16639a048a6990465d460bfce65623556b104e51 | [
"MIT"
] | 2 | 2017-10-13T23:15:31.000Z | 2017-10-13T23:17:01.000Z | setup.py | oesteban/pyregseg | 16639a048a6990465d460bfce65623556b104e51 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: oesteban
# @Date: 2015-11-19 16:44:27
# @Last Modified by: oesteban
# @Last Modified time: 2017-10-13 15:08:22
""" regseg setup script """
from __future__ import print_function, division, absolute_import, unicode_literals
def main():
""" Install entry-p... | 27.611111 | 82 | 0.60664 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.