hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2e9e3de0cef920d2df3c276d892fe72e3f20b57b | 16,655 | py | Python | test/functional/test_framework/mininode.py | WillyTheCat/mfmcoin | bf285afc37dcf83bec82bfea2bd7a1242fb4a846 | [
"MIT"
] | null | null | null | test/functional/test_framework/mininode.py | WillyTheCat/mfmcoin | bf285afc37dcf83bec82bfea2bd7a1242fb4a846 | [
"MIT"
] | null | null | null | test/functional/test_framework/mininode.py | WillyTheCat/mfmcoin | bf285afc37dcf83bec82bfea2bd7a1242fb4a846 | [
"MIT"
] | 1 | 2019-04-30T18:41:08.000Z | 2019-04-30T18:41:08.000Z | #!/usr/bin/env python3
# Copyright (c) 2010 ArtForz -- public domain half-a-node
# Copyright (c) 2012 Jeff Garzik
# Copyright (c) 2010-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""MFMCoin P2P ... | 37.595937 | 182 | 0.635425 |
1e651a7278db7db85f4921acf1196611ae106b14 | 5,360 | py | Python | test.py | guitarmind/pytorch-saltnet | 25bf11b053b16cd7feb5c799e1aeffee8b667bcb | [
"MIT"
] | null | null | null | test.py | guitarmind/pytorch-saltnet | 25bf11b053b16cd7feb5c799e1aeffee8b667bcb | [
"MIT"
] | null | null | null | test.py | guitarmind/pytorch-saltnet | 25bf11b053b16cd7feb5c799e1aeffee8b667bcb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Test UNet and create a Kaggle submission."""
__author__ = 'Erdene-Ochir Tuguldur, Yuan Xu'
import time
import argparse
from tqdm import tqdm
import pandas as pd
import torch
from torch.utils.data import DataLoader
import models
from torchvision.transforms import *
from datasets import *
fro... | 39.124088 | 117 | 0.669776 |
da5e8792672cb940a648e1d4b4c8597375ecc4b8 | 15,198 | py | Python | cocoa_folder/mutualfriends/scripts/summarize_eval.py | s-akanksha/DialoGraph_ICLR21 | d5bbc10b2623c9f84d21a99a5e54e7dcfdfb1bcc | [
"Apache-2.0"
] | 12 | 2021-03-17T05:15:33.000Z | 2022-01-19T06:09:21.000Z | cocoa_folder/mutualfriends/scripts/summarize_eval.py | s-akanksha/DialoGraph_ICLR21 | d5bbc10b2623c9f84d21a99a5e54e7dcfdfb1bcc | [
"Apache-2.0"
] | 2 | 2021-05-25T07:28:46.000Z | 2022-02-11T01:54:43.000Z | cocoa_folder/mutualfriends/scripts/summarize_eval.py | s-akanksha/DialoGraph_ICLR21 | d5bbc10b2623c9f84d21a99a5e54e7dcfdfb1bcc | [
"Apache-2.0"
] | 4 | 2021-10-11T03:39:38.000Z | 2022-02-01T23:58:50.000Z | import matplotlib
matplotlib.use('Agg')
#font_size = 18
#matplotlib.rcParams.update({k: font_size for k in ('font.size', 'axes.labelsize', 'xtick.labelsize', 'ytick.labelsize', 'legend.fontsize')})
import matplotlib.pyplot as plt
from argparse import ArgumentParser
from src.core.util import read_json, write_json
from s... | 44.438596 | 141 | 0.629491 |
a8d7363c45e8a4ab8bef3c3e0fe4b0bb0d5c15f8 | 9,388 | py | Python | load_data_batch_3.py | BlackBox-EVA2019/BlackBox | 74b9038694f8e221bef3c26e898aa25e2baa6497 | [
"MIT"
] | 1 | 2020-10-31T08:10:14.000Z | 2020-10-31T08:10:14.000Z | load_data_batch_3.py | BlackBox-EVA2019/BlackBox | 74b9038694f8e221bef3c26e898aa25e2baa6497 | [
"MIT"
] | null | null | null | load_data_batch_3.py | BlackBox-EVA2019/BlackBox | 74b9038694f8e221bef3c26e898aa25e2baa6497 | [
"MIT"
] | 1 | 2020-05-03T21:34:24.000Z | 2020-05-03T21:34:24.000Z | #!/usr/bin/env python
# coding: utf-8
import math # for math.floor()
import pathlib
import numpy as np
from fastai.imports import *
from fastai.basics import *
from fastai.callbacks import *
from torch.utils.data import Subset
# Global variable (for add_noise_in holes() to be fast)
master_mask_2D = None # shou... | 39.779661 | 115 | 0.66617 |
42ae8b6473f0dcc5b764a772a9f85383ba5c3c2f | 1,949 | py | Python | products/migrations/0001_initial.py | cagataysarioglu/TanTradeWebsite | 8a095f0a1958a3314544f2cff1b203818f071d05 | [
"MIT"
] | 2 | 2021-01-24T12:41:05.000Z | 2021-01-24T14:06:29.000Z | products/migrations/0001_initial.py | cagataysarioglu/djangoTanTrade | 8a095f0a1958a3314544f2cff1b203818f071d05 | [
"MIT"
] | null | null | null | products/migrations/0001_initial.py | cagataysarioglu/djangoTanTrade | 8a095f0a1958a3314544f2cff1b203818f071d05 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.5 on 2021-01-27 13:33
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Category',
fields=[
... | 47.536585 | 153 | 0.610056 |
6a793a3b8dd76a7449c350779ea75a6cf9b87878 | 435 | py | Python | contador.py | gangagoura/projeto-dataproc-dio | 913ce32b425ee46dfff54d927e21035383b65b93 | [
"Apache-2.0"
] | null | null | null | contador.py | gangagoura/projeto-dataproc-dio | 913ce32b425ee46dfff54d927e21035383b65b93 | [
"Apache-2.0"
] | null | null | null | contador.py | gangagoura/projeto-dataproc-dio | 913ce32b425ee46dfff54d927e21035383b65b93 | [
"Apache-2.0"
] | null | null | null | import sys
from pyspark import SparkContext, SparkConf
if __name__ == "__main__":
sc = SparkContext("local","PySpark Exemplo - Desafio Dataproc")
words = sc.textFile("gs://desafiodataproc666/livro.txt").flatMap(lambda line: line.split(" "))
wordCounts = words.map(lambda word: (word, 1)).reduceByKey(lambda a... | 54.375 | 118 | 0.731034 |
a51f570d1e7fd0b970ce77741575939b2d9119dc | 2,880 | py | Python | h2o-py/tests/testdir_algos/deeplearning/pyunit_tweedie_offset_deeplearning.py | huamichaelchen/h2o-3 | 2b52f2240652a1c73c1708762248c0773d0c073e | [
"Apache-2.0"
] | null | null | null | h2o-py/tests/testdir_algos/deeplearning/pyunit_tweedie_offset_deeplearning.py | huamichaelchen/h2o-3 | 2b52f2240652a1c73c1708762248c0773d0c073e | [
"Apache-2.0"
] | null | null | null | h2o-py/tests/testdir_algos/deeplearning/pyunit_tweedie_offset_deeplearning.py | huamichaelchen/h2o-3 | 2b52f2240652a1c73c1708762248c0773d0c073e | [
"Apache-2.0"
] | null | null | null | import sys, os
sys.path.insert(1, os.path.join("..",".."))
import h2o
from tests import pyunit_utils
from h2o.estimators.deeplearning import H2ODeepLearningEstimator
def tweedie_offset():
insurance = h2o.import_file(pyunit_utils.locate("smalldata/glm_test/insurance.csv"))
insurance["offset"] = insurance["Holders"... | 58.77551 | 122 | 0.605556 |
c82bd087844d44431c4d46719a9925f222254271 | 14,758 | py | Python | configs/e29.py | EliasVansteenkiste/bare_pytorch_project | 3d8536e203bdfa7f6b90db77ade116c8ce23e78c | [
"MIT"
] | 1 | 2017-10-10T18:02:01.000Z | 2017-10-10T18:02:01.000Z | configs/e29.py | EliasVansteenkiste/bare_pytorch_project | 3d8536e203bdfa7f6b90db77ade116c8ce23e78c | [
"MIT"
] | null | null | null | configs/e29.py | EliasVansteenkiste/bare_pytorch_project | 3d8536e203bdfa7f6b90db77ade116c8ce23e78c | [
"MIT"
] | null | null | null |
#copy of j25
import numpy as np
from collections import namedtuple
from functools import partial
from PIL import Image
import data_transforms
import data_iterators
import pathfinder
import utils
import app
import torch
import torchvision
import torch.optim as optim
import torch.nn as nn
from torch.nn import init
... | 38.836842 | 166 | 0.524597 |
fc53cc59ce605884edcdad0caecffca502b5ee21 | 10,922 | py | Python | src/azure-cli/azure/cli/command_modules/acr/token.py | chef-davin/azure-cli | 2ebd33d5f69a27d07404cc48cf475d5fbdda6378 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/acr/token.py | chef-davin/azure-cli | 2ebd33d5f69a27d07404cc48cf475d5fbdda6378 | [
"MIT"
] | 1 | 2021-06-02T02:38:22.000Z | 2021-06-02T02:38:22.000Z | src/azure-cli/azure/cli/command_modules/acr/token.py | chef-davin/azure-cli | 2ebd33d5f69a27d07404cc48cf475d5fbdda6378 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 40.154412 | 116 | 0.642282 |
af12c51f5d87455cf32d5d5eed27b9e25482cc35 | 8,870 | py | Python | eggs/pychecker-0.8.19-py2.7.egg/pychecker/options.py | kruthikarshankar/bemoss_os | 460a5a41b38240bb9f6dacc23d373ae1942259a8 | [
"Unlicense"
] | 3 | 2018-11-25T01:09:55.000Z | 2021-08-24T01:56:36.000Z | eggs/pychecker-0.8.19-py2.7.egg/pychecker/options.py | kwarodom/bemoss_os_1.2 | 460a5a41b38240bb9f6dacc23d373ae1942259a8 | [
"Unlicense"
] | null | null | null | eggs/pychecker-0.8.19-py2.7.egg/pychecker/options.py | kwarodom/bemoss_os_1.2 | 460a5a41b38240bb9f6dacc23d373ae1942259a8 | [
"Unlicense"
] | 3 | 2018-11-09T03:38:09.000Z | 2020-02-24T06:26:10.000Z | # -*- Mode: Python -*-
# vi:si:et:sw=4:sts=4:ts=4
"Main module for running pychecker a Tkinter GUI for all the options"
import sys
import os
import Tkinter, tkFileDialog
from OptionTypes import *
from string import capitalize, strip, rstrip, split
import Config
MAX_SUBBOX_ROWS = 8
MAX_BOX_COLS = 3
PAD = 10
EDITOR ... | 31.792115 | 88 | 0.549605 |
810b68909417905d79d3321460702fc901e865a4 | 1,263 | py | Python | server/resources/helpers/std.py | simon-dube/CARMIN-server | 1481d2c4231458d33119c57ab2e3e480375da63b | [
"MIT"
] | 1 | 2018-03-12T23:08:12.000Z | 2018-03-12T23:08:12.000Z | server/resources/helpers/std.py | simon-dube/CARMIN-server | 1481d2c4231458d33119c57ab2e3e480375da63b | [
"MIT"
] | 15 | 2018-03-15T04:23:31.000Z | 2018-06-28T21:46:15.000Z | server/resources/helpers/std.py | simon-dube/CARMIN-server | 1481d2c4231458d33119c57ab2e3e480375da63b | [
"MIT"
] | null | null | null | from flask import Response
from server.database import db
from server.common.utils import marshal
from server.common.error_codes_and_messages import (
ErrorCodeAndMessageFormatter, EXECUTION_NOT_FOUND, UNAUTHORIZED)
from server.database.queries.executions import get_execution
from server.resources.helpers.execution... | 38.272727 | 76 | 0.713381 |
258a7d9d695bb43c335482254d8e784fad10b557 | 3,282 | py | Python | Optical Character Recognition/train_ocr_cnn.py | birdortyedi/deep-learning | ef81a44cf7c8a8ef9fb21920dd0b03c21f6106af | [
"Apache-2.0"
] | 3 | 2019-10-03T22:15:52.000Z | 2020-03-18T12:27:08.000Z | Optical Character Recognition/train_ocr_cnn.py | birdortyedi/deep-learning | ef81a44cf7c8a8ef9fb21920dd0b03c21f6106af | [
"Apache-2.0"
] | null | null | null | Optical Character Recognition/train_ocr_cnn.py | birdortyedi/deep-learning | ef81a44cf7c8a8ef9fb21920dd0b03c21f6106af | [
"Apache-2.0"
] | 4 | 2019-08-27T16:01:48.000Z | 2020-03-18T12:28:01.000Z | import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.utils import shuffle
from tensorflow.contrib.keras.python.keras.models import Sequential
from tensorflow.contrib.keras.python.keras.layers import Dense, Conv2D, MaxPooling2D, Flatten,SpatialDropout2D
from tensorflow.contrib.keras.pytho... | 45.583333 | 137 | 0.761731 |
d3403cfb17702c2f463daedbd7e5995415139620 | 644 | py | Python | alembic/versions/2afbc7d30a21_add_ip_address_to_database.py | PeterGrace/pi_director | 217f8c504830d2e8c18f166b62b8138d3d25a167 | [
"MIT"
] | 12 | 2015-08-28T20:48:29.000Z | 2021-08-23T02:56:55.000Z | alembic/versions/2afbc7d30a21_add_ip_address_to_database.py | PeterGrace/pi_director | 217f8c504830d2e8c18f166b62b8138d3d25a167 | [
"MIT"
] | 21 | 2015-08-31T19:41:04.000Z | 2016-02-17T21:42:39.000Z | alembic/versions/2afbc7d30a21_add_ip_address_to_database.py | PeterGrace/pi_director | 217f8c504830d2e8c18f166b62b8138d3d25a167 | [
"MIT"
] | 7 | 2015-08-28T20:50:03.000Z | 2020-06-06T12:49:29.000Z | """add ip address to database
Revision ID: 2afbc7d30a21
Revises: 41c29db70997
Create Date: 2015-09-08 21:19:59.721831
"""
# revision identifiers, used by Alembic.
revision = '2afbc7d30a21'
down_revision = '41c29db70997'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgr... | 22.206897 | 69 | 0.694099 |
80ad210c692d419cc0f7f4bf5b5da94f8a8ad770 | 11,203 | py | Python | burger/toppings/identify.py | extremeheat/Burger | fdff962aeb1aa0351fc222e005af3fa9248345fb | [
"MIT"
] | null | null | null | burger/toppings/identify.py | extremeheat/Burger | fdff962aeb1aa0351fc222e005af3fa9248345fb | [
"MIT"
] | null | null | null | burger/toppings/identify.py | extremeheat/Burger | fdff962aeb1aa0351fc222e005af3fa9248345fb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf8 -*-
"""
Copyright (c) 2011 Tyler Kenendy <tk@tkte.ch>
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... | 43.254826 | 117 | 0.611354 |
893868d917ecfadb6fa008252414333b1ef45d0f | 89 | py | Python | python/testData/inspections/PyRedundantParenthesesInspection/While.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2018-12-29T09:53:39.000Z | 2018-12-29T09:53:42.000Z | python/testData/inspections/PyRedundantParenthesesInspection/While.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/inspections/PyRedundantParenthesesInspection/While.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | while <weak_warning descr="Remove redundant parentheses">(True)</weak_warning>:
pass
| 29.666667 | 79 | 0.764045 |
171e1d311819b8bdf4bb2d6579b9d7cd485f8a6c | 869 | py | Python | tests/bpyutils/util/test_environ.py | boilpy/bpyutils | 9f81c544abaf7b3221f3c6783f293c344bd94544 | [
"MIT"
] | null | null | null | tests/bpyutils/util/test_environ.py | boilpy/bpyutils | 9f81c544abaf7b3221f3c6783f293c344bd94544 | [
"MIT"
] | null | null | null | tests/bpyutils/util/test_environ.py | boilpy/bpyutils | 9f81c544abaf7b3221f3c6783f293c344bd94544 | [
"MIT"
] | null | null | null | # imports - test imports
import pytest
# imports - module imports
from bpyutils.util.environ import getenvvar, getenv, value_to_envval
def test_getenvvar():
assert getenvvar("FOOBAR") == "BPYUTILS_FOOBAR"
assert getenvvar("FOOBAR", prefix = False) == "FOOBAR"
def test_getenv():
with pyt... | 24.138889 | 69 | 0.681243 |
37a4c07469e683c6353b87d005f31dc665b6fbae | 249 | py | Python | month02/day03/buffer.py | chaofan-zheng/tedu-python-demo | abe983ddc52690f4726cf42cc6390cba815026d8 | [
"Apache-2.0"
] | 4 | 2021-01-07T14:25:15.000Z | 2021-02-01T10:36:10.000Z | month02/day03/buffer.py | chaofan-zheng/tedu-python-demo | abe983ddc52690f4726cf42cc6390cba815026d8 | [
"Apache-2.0"
] | null | null | null | month02/day03/buffer.py | chaofan-zheng/tedu-python-demo | abe983ddc52690f4726cf42cc6390cba815026d8 | [
"Apache-2.0"
] | null | null | null | """
读写缓冲区
"""
# 行缓冲打开
# file = open("file.txt",'w',buffering=1)
# 设置缓冲大小
file = open("file.txt",'wb',buffering=10)
while True:
msg = input(">>")
if not msg:
break
file.write(msg.encode())
# file.flush() # 刷新缓冲
file.close() | 14.647059 | 41 | 0.562249 |
b3144326a45d280a526e77655067f78ab9c74092 | 397 | py | Python | horologium-api/asgi.py | jimux/horologium | 3200fb4c091ac2078394114be672485d0c7841c8 | [
"MIT"
] | null | null | null | horologium-api/asgi.py | jimux/horologium | 3200fb4c091ac2078394114be672485d0c7841c8 | [
"MIT"
] | 4 | 2021-06-04T23:37:55.000Z | 2021-09-22T19:25:00.000Z | horologium-api/asgi.py | jimux/horologium | 3200fb4c091ac2078394114be672485d0c7841c8 | [
"MIT"
] | null | null | null | """
ASGI config for horologium project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SE... | 23.352941 | 78 | 0.788413 |
66a39d0495f6f943c7ad6b0f6c5e7059be12f936 | 6,675 | py | Python | ml_ephys/preprocessing/p_bandpass_filter.py | alexmorley/ml_ephys | 2fa734846c566070fe92cb560efe8db4fdbde9f8 | [
"Apache-2.0"
] | null | null | null | ml_ephys/preprocessing/p_bandpass_filter.py | alexmorley/ml_ephys | 2fa734846c566070fe92cb560efe8db4fdbde9f8 | [
"Apache-2.0"
] | null | null | null | ml_ephys/preprocessing/p_bandpass_filter.py | alexmorley/ml_ephys | 2fa734846c566070fe92cb560efe8db4fdbde9f8 | [
"Apache-2.0"
] | null | null | null | from mountainlab_pytools import mdaio
import numpy as np
from scipy import special
import multiprocessing
import time
import os
class SharedChunkInfo():
def __init__(self,num_chunks):
self.timer_timestamp = multiprocessing.Value('d',time.time(),lock=False)
self.last_appended_chunk = multiprocessing... | 39.264706 | 127 | 0.653184 |
837728b72a1088b5498a60e413101dddcbf30dba | 20 | py | Python | Process/EDM/__init__.py | jwbrooks0/johnspythonlibrary2 | 10ca519276d8c32da0fbd41a597f75c0c98a8736 | [
"MIT"
] | null | null | null | Process/EDM/__init__.py | jwbrooks0/johnspythonlibrary2 | 10ca519276d8c32da0fbd41a597f75c0c98a8736 | [
"MIT"
] | null | null | null | Process/EDM/__init__.py | jwbrooks0/johnspythonlibrary2 | 10ca519276d8c32da0fbd41a597f75c0c98a8736 | [
"MIT"
] | null | null | null | from ._edm import *
| 10 | 19 | 0.7 |
2c5ca0f869dcfa50a93fe5c90b5d428420ebf054 | 4,053 | py | Python | src/confs/settings/base.py | nffdiogosilva/Data-Center-REST-API | 7c34302103cf769f7f861cda970c41c4f9bbac27 | [
"MIT"
] | null | null | null | src/confs/settings/base.py | nffdiogosilva/Data-Center-REST-API | 7c34302103cf769f7f861cda970c41c4f9bbac27 | [
"MIT"
] | null | null | null | src/confs/settings/base.py | nffdiogosilva/Data-Center-REST-API | 7c34302103cf769f7f861cda970c41c4f9bbac27 | [
"MIT"
] | null | null | null | import os
import environ
from .. import BASE_DIR
env = environ.Env()
if env.bool('DJANGO_READ_DOT_ENV_FILE', default=True):
env.read_env(str(BASE_DIR.parent / '.env'))
gettext = lambda s: s
SECRET_KEY = env('SECRET_KEY')
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ALLOWED_HOSTS = []
SITE_ID = 1
ADMINS = (
('... | 22.027174 | 95 | 0.628423 |
a4dce82a041df30adc2302d231ea5e9b830c846d | 1,236 | py | Python | mars/tensor/expressions/linalg/__init__.py | ChenQuan/mars | 46fc9747e99210cebfabfc2d85bcc8272440d1a3 | [
"Apache-2.0"
] | null | null | null | mars/tensor/expressions/linalg/__init__.py | ChenQuan/mars | 46fc9747e99210cebfabfc2d85bcc8272440d1a3 | [
"Apache-2.0"
] | null | null | null | mars/tensor/expressions/linalg/__init__.py | ChenQuan/mars | 46fc9747e99210cebfabfc2d85bcc8272440d1a3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 1999-2018 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... | 28.744186 | 74 | 0.749191 |
16581581786bb27cb66c5508c9748590c1ec2f71 | 2,549 | py | Python | azure-mgmt-datafactory/azure/mgmt/datafactory/models/control_activity.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-datafactory/azure/mgmt/datafactory/models/control_activity.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-datafactory/azure/mgmt/datafactory/models/control_activity.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 41.786885 | 290 | 0.648882 |
09d1b761dc58a8a229341fb29de85869b6026687 | 3,253 | py | Python | openmaptiles/pgutils.py | Duiesel/openmaptiles-tools | 939cad0549881e820dae517f3df0001abbc50a8c | [
"MIT"
] | null | null | null | openmaptiles/pgutils.py | Duiesel/openmaptiles-tools | 939cad0549881e820dae517f3df0001abbc50a8c | [
"MIT"
] | null | null | null | openmaptiles/pgutils.py | Duiesel/openmaptiles-tools | 939cad0549881e820dae517f3df0001abbc50a8c | [
"MIT"
] | null | null | null | import re
from os import getenv
from typing import Tuple, Dict, Union
import asyncpg
from asyncpg import UndefinedFunctionError, UndefinedObjectError, Connection
from openmaptiles.perfutils import COLOR
from openmaptiles.utils import coalesce, print_err
async def get_postgis_version(conn: Connection) -> Union[str, ... | 32.858586 | 83 | 0.609899 |
3889fc374609fb458441a4c8f28131f81673c44d | 1,073 | py | Python | setup.py | andreycizov/python-xmake | e3bb0f82499453be761a4be46cb1670553dcaeee | [
"Apache-2.0"
] | null | null | null | setup.py | andreycizov/python-xmake | e3bb0f82499453be761a4be46cb1670553dcaeee | [
"Apache-2.0"
] | 1 | 2018-07-14T03:45:33.000Z | 2018-07-14T03:52:13.000Z | setup.py | andreycizov/python-xmake | e3bb0f82499453be761a4be46cb1670553dcaeee | [
"Apache-2.0"
] | null | null | null | import sys
from setuptools import setup, find_packages
readme = open('README.rst').read()
history = open('HISTORY.rst').read()
reqs = [x.strip() for x in open('requirements.txt').readlines()]
test_reqs = [x.strip() for x in open('requirements-tests.txt').readlines()]
if sys.version_info >= (3, 7):
reqs = [x for ... | 30.657143 | 75 | 0.655172 |
84d31857db4723ce51a9ed37ae07eda1fbb5950b | 256 | py | Python | entomb/__init__.py | countermeasure/entomb | 4eba79a66ca8d01ccd634f9d74928cb061b5efdb | [
"MIT"
] | null | null | null | entomb/__init__.py | countermeasure/entomb | 4eba79a66ca8d01ccd634f9d74928cb061b5efdb | [
"MIT"
] | null | null | null | entomb/__init__.py | countermeasure/entomb | 4eba79a66ca8d01ccd634f9d74928cb061b5efdb | [
"MIT"
] | null | null | null | # Package metadata
__author__ = "Sky Christensen"
__author_email__ = "sky@skychristensen.com"
__description__ = "File immutability manager"
__licence__ = "MIT"
__title__ = "Entomb"
__url__ = "https://github.com/countermeasure/entomb"
__version__ = "0.4.0"
| 28.444444 | 52 | 0.769531 |
644eef4b0a9d57c238dcb70bd27dd0e5b33d1cd0 | 53 | py | Python | fs_leonid/__init__.py | fogstream/django-fs-leonid | 1e117459d69a34fabd7f7ef582599f8d29336b34 | [
"MIT"
] | null | null | null | fs_leonid/__init__.py | fogstream/django-fs-leonid | 1e117459d69a34fabd7f7ef582599f8d29336b34 | [
"MIT"
] | null | null | null | fs_leonid/__init__.py | fogstream/django-fs-leonid | 1e117459d69a34fabd7f7ef582599f8d29336b34 | [
"MIT"
] | null | null | null | default_app_config = 'fs_leonid.apps.FsLeonidConfig'
| 26.5 | 52 | 0.849057 |
a1e7e29ad700a8a8678ea4700e4ba6f7670dc3a9 | 3,993 | py | Python | src/solver.py | Hika-Kondo/cv_assignments_3 | 7730f50f589bd9b69d13efdb043877bf6f00822c | [
"MIT"
] | null | null | null | src/solver.py | Hika-Kondo/cv_assignments_3 | 7730f50f589bd9b69d13efdb043877bf6f00822c | [
"MIT"
] | null | null | null | src/solver.py | Hika-Kondo/cv_assignments_3 | 7730f50f589bd9b69d13efdb043877bf6f00822c | [
"MIT"
] | null | null | null | import numpy as np
import torch
import torch.nn as nn
from torch.utils.tensorboard import SummaryWriter
import torchvision
from torchsummary import summary
from omegaconf import DictConfig
from pathlib import Path
from logging import getLogger
import dataclasses
from dataclasses import dataclass
class Solver:
... | 33.275 | 119 | 0.591535 |
bc2602153e47d11f1eab989564ef963e49227423 | 5,313 | py | Python | test/functional/feature_config_args.py | minblock/Nightcoin | 000f2f62724c555dc0a92b196efdf30145e9c69b | [
"MIT"
] | null | null | null | test/functional/feature_config_args.py | minblock/Nightcoin | 000f2f62724c555dc0a92b196efdf30145e9c69b | [
"MIT"
] | null | null | null | test/functional/feature_config_args.py | minblock/Nightcoin | 000f2f62724c555dc0a92b196efdf30145e9c69b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017-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 various command line arguments and configuration file parameters."""
import os
from test_framewo... | 53.13 | 200 | 0.688312 |
26a128023cf6518cb5bb2694b5f6411445fe4dc4 | 6,036 | py | Python | src/icp/apps/home/tests.py | project-icp/bee-pollinator-app | 9357755e6d78e1bf8594de1b777d02318bb3e54f | [
"Apache-2.0"
] | 6 | 2016-10-14T18:54:39.000Z | 2021-06-03T21:04:27.000Z | src/icp/apps/home/tests.py | project-icp/bee-pollinator-app | 9357755e6d78e1bf8594de1b777d02318bb3e54f | [
"Apache-2.0"
] | 528 | 2016-10-14T17:38:54.000Z | 2022-02-26T10:53:21.000Z | src/icp/apps/home/tests.py | project-icp/bee-pollinator-app | 9357755e6d78e1bf8594de1b777d02318bb3e54f | [
"Apache-2.0"
] | 2 | 2016-10-17T18:06:38.000Z | 2020-10-23T09:48:24.000Z | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
import re
from django.contrib.auth.models import User
from django.test import TestCase
from rest_framework.test import APIClient
def getRoute(url):
"""
Gets relative route ... | 32.278075 | 79 | 0.617462 |
6337bc0bf343d7f3996dbdc39b7cce7a8f52a768 | 1,975 | py | Python | django_cockroachdb/client.py | mlazowik/django-cockroachdb | e6a01c093f6f22f3764f845f04504434cb6aaa8c | [
"Apache-2.0"
] | 94 | 2019-11-21T06:52:08.000Z | 2022-01-03T14:14:40.000Z | django_cockroachdb/client.py | mlazowik/django-cockroachdb | e6a01c093f6f22f3764f845f04504434cb6aaa8c | [
"Apache-2.0"
] | 83 | 2019-11-14T19:25:28.000Z | 2022-03-12T17:41:57.000Z | django_cockroachdb/client.py | mlazowik/django-cockroachdb | e6a01c093f6f22f3764f845f04504434cb6aaa8c | [
"Apache-2.0"
] | 15 | 2019-11-21T06:52:48.000Z | 2022-02-06T02:22:05.000Z | import os.path
import signal
import subprocess
from django.db.backends.base.client import BaseDatabaseClient
class DatabaseClient(BaseDatabaseClient):
executable_name = 'cockroach'
@classmethod
def settings_to_cmd_args_env(cls, settings_dict, parameters):
args = [cls.executable_name, 'sql']
... | 35.267857 | 96 | 0.598987 |
d29c190ef77b67d0fe368d5211c009eceb997570 | 367 | py | Python | Chapter05/OutlierDetection/kafkatest.py | PacktPublishing/Artificial-Intelligence-for-IoT-Cookbook | c2f522c2a1dbb78c99e05abc3c0e8706618f4353 | [
"MIT"
] | 19 | 2019-11-06T08:00:03.000Z | 2022-01-01T20:02:40.000Z | Chapter05/OutlierDetection/kafkatest.py | PacktPublishing/Artificial-Intelligence-for-IoT-Cookbook | c2f522c2a1dbb78c99e05abc3c0e8706618f4353 | [
"MIT"
] | null | null | null | Chapter05/OutlierDetection/kafkatest.py | PacktPublishing/Artificial-Intelligence-for-IoT-Cookbook | c2f522c2a1dbb78c99e05abc3c0e8706618f4353 | [
"MIT"
] | 9 | 2020-02-17T23:44:16.000Z | 2022-02-03T15:26:46.000Z | from kafka import KafkaProducer
import json
device= 'YOURDEVICEID'
server = '127.0.0.1:9092'
producer = KafkaProducer(bootstrap_servers=server)
alert = {'button':'event.action', 'direction':'event.direction', 'device':'device'}
message = json.dumps(alert)
producer.send(device+'alerts' ,key=bytes("alert", encoding='... | 33.363636 | 107 | 0.741144 |
d182d40c0d438d0b1761567448622da1822b4330 | 5,019 | py | Python | tilenol/gadgets/base.py | paulie-g/tilenol | 6e52c558d1c698ef8320e6ef32771af2864c1c49 | [
"MIT"
] | 42 | 2015-01-19T15:43:16.000Z | 2021-09-19T15:20:58.000Z | tilenol/gadgets/base.py | paulie-g/tilenol | 6e52c558d1c698ef8320e6ef32771af2864c1c49 | [
"MIT"
] | 2 | 2015-05-30T03:15:17.000Z | 2019-02-28T16:37:02.000Z | tilenol/gadgets/base.py | tailhook/tilenol | 3b71f6600d437a4e5f167315683e7f0137cd3788 | [
"MIT"
] | 11 | 2015-10-04T06:01:02.000Z | 2022-03-26T18:46:46.000Z | import string
from functools import partial
from zorro.di import di, has_dependencies, dependency
from tilenol.xcb import Core as XCore, Keysyms
from tilenol.events import EventDispatcher
from tilenol.theme import Theme
@has_dependencies
class GadgetBase(object):
xcore = dependency(XCore, 'xcore')
theme = ... | 29.698225 | 71 | 0.553497 |
fab29a204ac854afcdaf1674dd56bbb7485d124f | 4,521 | py | Python | Model/Rivanna_HPC/keras_mmps153_stormBS_fcst_lstm_rivanna.py | uva-hydroinformatics/Norfolk_Groundwater_Model | 1d0d8be5b87fac1c9febea5877d44645e9deae9d | [
"MIT"
] | 7 | 2019-02-06T15:55:01.000Z | 2021-09-13T07:50:38.000Z | Model/Rivanna_HPC/keras_mmps153_stormBS_fcst_lstm_rivanna.py | uva-hydroinformatics/Norfolk_Groundwater_Model | 1d0d8be5b87fac1c9febea5877d44645e9deae9d | [
"MIT"
] | 3 | 2018-11-05T19:36:43.000Z | 2018-11-05T20:04:54.000Z | Model/Rivanna_HPC/keras_mmps153_stormBS_fcst_lstm_rivanna.py | uva-hydroinformatics/Norfolk_Groundwater_Model | 1d0d8be5b87fac1c9febea5877d44645e9deae9d | [
"MIT"
] | 3 | 2018-08-08T13:45:54.000Z | 2020-01-07T15:20:16.000Z | """
Written by Benjamin Bowes, 10-23-2018
Model: LSTM
Train Data: storm data set, bootstrapped
Test Data: bootstrapped and forecast data
This network uses the last 25 observations of gwl, tide, and rain to predict the next 18
values of gwl for well MMPS-153
"""
import tensorflow as tf
import keras
from ... | 38.641026 | 125 | 0.740765 |
9eb4db1b31721dc7d5dc9358612684723bcbc5e7 | 187 | py | Python | Course-1-Programming-for-Everybody-Getting-Started-with-Python/Codes/definite_loop_friends.py | Mohamed2011-bit/-Python-For-Everybody-Coursera- | ec9686e0d21bb4f05436187abf36a1424bfd155a | [
"MIT"
] | 3 | 2020-06-06T05:48:03.000Z | 2022-01-15T23:27:13.000Z | Course-1-Programming-for-Everybody-Getting-Started-with-Python/Codes/definite_loop_friends.py | Mohamed2011-bit/-Python-For-Everybody-Coursera- | ec9686e0d21bb4f05436187abf36a1424bfd155a | [
"MIT"
] | null | null | null | Course-1-Programming-for-Everybody-Getting-Started-with-Python/Codes/definite_loop_friends.py | Mohamed2011-bit/-Python-For-Everybody-Coursera- | ec9686e0d21bb4f05436187abf36a1424bfd155a | [
"MIT"
] | 3 | 2021-03-24T22:05:38.000Z | 2022-03-27T13:45:30.000Z | friends = ['Joseph', 'Glenn', 'Sally']
for friend in friends:
print('Happy New Year', friend)
print('Done!')
# Iteration variable friend
# Friend changes each time through the loop | 20.777778 | 43 | 0.700535 |
c18eb508d2e4d2bfe5255ad21817ac8e2876cfd8 | 6,291 | py | Python | imessageCounter.py | blueshiftofdeath/imessage-counter | 6f3322a9a3c8ec7c8d5a0210fcc98bfe3166a562 | [
"MIT"
] | null | null | null | imessageCounter.py | blueshiftofdeath/imessage-counter | 6f3322a9a3c8ec7c8d5a0210fcc98bfe3166a562 | [
"MIT"
] | null | null | null | imessageCounter.py | blueshiftofdeath/imessage-counter | 6f3322a9a3c8ec7c8d5a0210fcc98bfe3166a562 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import datetime, sqlite3, os
from datetime import timedelta
from itertools import groupby
from matplotlib.dates import DayLocator, MonthLocator, WeekdayLocator
from matplotlib.dates import AutoDateFormatter, Date... | 33.822581 | 102 | 0.598633 |
c0ed6c2ea8010842df5fb1d6c649f224af47d08a | 461 | py | Python | lambdas/_template/entry.py | marty-sullivan/CodePipeline-Template | 89f5d05f375947eb067f15bf13794e4905a95b4e | [
"Apache-2.0"
] | 1 | 2020-12-29T19:42:42.000Z | 2020-12-29T19:42:42.000Z | lambdas/_template/entry.py | marty-sullivan/CodePipeline-Template | 89f5d05f375947eb067f15bf13794e4905a95b4e | [
"Apache-2.0"
] | null | null | null | lambdas/_template/entry.py | marty-sullivan/CodePipeline-Template | 89f5d05f375947eb067f15bf13794e4905a95b4e | [
"Apache-2.0"
] | 1 | 2020-09-29T16:39:35.000Z | 2020-09-29T16:39:35.000Z | import logging
from boto3.session import Session
from os import environ
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
logging.getLogger('boto').setLevel(logging.WARN)
logging.getLogger('boto3').setLevel(logging.WARN)
logging.getLogger('botocore').setLevel(logging.WARN)
logging.getLogger('s3transfer').set... | 27.117647 | 54 | 0.798265 |
4f8385bb26bf8c7cec1d903516dabb54f6a913c4 | 9,534 | py | Python | neutron/tests/unit/extensions/test_qos_gateway_ip.py | EwaldvanGeffen/neutron | 858d7f33950a80c73501377a4b2cd36b915d0f40 | [
"Apache-2.0"
] | 4 | 2015-11-07T01:58:32.000Z | 2019-10-08T06:18:36.000Z | neutron/tests/unit/extensions/test_qos_gateway_ip.py | EwaldvanGeffen/neutron | 858d7f33950a80c73501377a4b2cd36b915d0f40 | [
"Apache-2.0"
] | 5 | 2018-05-31T13:09:00.000Z | 2022-01-13T15:23:29.000Z | neutron/tests/unit/extensions/test_qos_gateway_ip.py | EwaldvanGeffen/neutron | 858d7f33950a80c73501377a4b2cd36b915d0f40 | [
"Apache-2.0"
] | 2 | 2017-12-05T15:05:26.000Z | 2019-09-09T16:03:49.000Z | # Copyright 2018 OpenStack Foundation
# Copyright 2017 Letv Cloud Computing
# 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/l... | 40.398305 | 78 | 0.58884 |
9c4ac0bed05a14fedb9c5f3bcaec5b667f8246b3 | 485 | py | Python | Python-For-Everyone-Horstmann/Chapter2-Programming-with-Numbers-and-Strings/P2.1.py | islayy/Books-solutions | 5fe05deb4e9f65875284d8af43bd383bf9ae145b | [
"MIT"
] | null | null | null | Python-For-Everyone-Horstmann/Chapter2-Programming-with-Numbers-and-Strings/P2.1.py | islayy/Books-solutions | 5fe05deb4e9f65875284d8af43bd383bf9ae145b | [
"MIT"
] | null | null | null | Python-For-Everyone-Horstmann/Chapter2-Programming-with-Numbers-and-Strings/P2.1.py | islayy/Books-solutions | 5fe05deb4e9f65875284d8af43bd383bf9ae145b | [
"MIT"
] | 1 | 2021-01-30T22:19:07.000Z | 2021-01-30T22:19:07.000Z | # Write a program that displays the dimensions of a lettersize (8.5 × 11 inch) sheet of
# paper in millimeters. There are 25.4 millimeters per inch. Use con stants and com
# ments in your program.
dimensionX = float(input("Enter the dimensions of the sheet in inches.\nX: "))
dimensionY = float(input("Y: "))
milimet... | 37.307692 | 88 | 0.740206 |
04edd3048ed688d51a26a8bfde6f64dd264f6d8d | 7,011 | py | Python | userspace/build.py | stevej/osdev | 9b745b5de0ba198d3ba245de62453012f346d5af | [
"MIT",
"NCSA",
"Unlicense"
] | 52 | 2015-01-29T17:20:29.000Z | 2022-03-19T17:20:29.000Z | userspace/build.py | stevej/osdev | 9b745b5de0ba198d3ba245de62453012f346d5af | [
"MIT",
"NCSA",
"Unlicense"
] | null | null | null | userspace/build.py | stevej/osdev | 9b745b5de0ba198d3ba245de62453012f346d5af | [
"MIT",
"NCSA",
"Unlicense"
] | 16 | 2016-09-09T05:30:54.000Z | 2022-01-17T03:48:22.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
JuJu - An automagical build tool for the とあるOS userspace.
Run with:
python build.py
For information on the build status, run as:
python build.py status
To clean build products, use:
python build.py clean
"""
# TODO: Add support for rebuilding individual targets
... | 31.581081 | 128 | 0.634146 |
13825e20bec9846a89d48e41501357056da7ecf6 | 126 | py | Python | test/output/050.py | EliRibble/pyfmt | e84a5531a7c06703eddd9dbc2072b0c8deae8c57 | [
"MIT"
] | null | null | null | test/output/050.py | EliRibble/pyfmt | e84a5531a7c06703eddd9dbc2072b0c8deae8c57 | [
"MIT"
] | null | null | null | test/output/050.py | EliRibble/pyfmt | e84a5531a7c06703eddd9dbc2072b0c8deae8c57 | [
"MIT"
] | null | null | null | def main():
accumulator = 0
for i in range(10):
accumulator += i
print(accumulator)
if __name__ == "__main__":
main()
| 12.6 | 26 | 0.650794 |
36c79fb91e4da38e0594ce508418a274b3060595 | 3,923 | py | Python | src/lib/trains/base_trainer.py | seqsense/CenterNet | 5cd5f3c1f42d8cfb5fc3157f8c1945b6787f11eb | [
"MIT"
] | null | null | null | src/lib/trains/base_trainer.py | seqsense/CenterNet | 5cd5f3c1f42d8cfb5fc3157f8c1945b6787f11eb | [
"MIT"
] | null | null | null | src/lib/trains/base_trainer.py | seqsense/CenterNet | 5cd5f3c1f42d8cfb5fc3157f8c1945b6787f11eb | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import time
import torch
from progress.bar import Bar
from models.data_parallel import DataParallel
from centernet_utils.utils import AverageMeter
class ModleWithLoss(torch.nn.Module):
def __init__(self, mo... | 32.966387 | 80 | 0.64517 |
48f351953085bb305be69aaa0f1de8ac71cb0593 | 7,085 | py | Python | molecool/functions.py | leegoldfryd/lee_workshop | 8a9a9916886de28ca552ef5741b1c40989b9c81e | [
"BSD-3-Clause"
] | null | null | null | molecool/functions.py | leegoldfryd/lee_workshop | 8a9a9916886de28ca552ef5741b1c40989b9c81e | [
"BSD-3-Clause"
] | null | null | null | molecool/functions.py | leegoldfryd/lee_workshop | 8a9a9916886de28ca552ef5741b1c40989b9c81e | [
"BSD-3-Clause"
] | null | null | null | """
functions.py
A python package for analyzing and visualizing molecular files. For MolSSI workshop
Handles the primary functions
"""
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D # noqa: F401
def calculate_distance(rA, rB):
"""
Calculate the distance between... | 23.460265 | 114 | 0.595483 |
3006d42cd4cb9bb7b2dfa7a79cfa37bf46efc9c4 | 41,322 | py | Python | tests/test_local.py | YWMditto/mrjob | acfcdda93e2d1cd1fde7cd52b30280293ae3376f | [
"Apache-2.0"
] | 1 | 2020-05-07T13:04:04.000Z | 2020-05-07T13:04:04.000Z | tests/test_local.py | YWMditto/mrjob | acfcdda93e2d1cd1fde7cd52b30280293ae3376f | [
"Apache-2.0"
] | null | null | null | tests/test_local.py | YWMditto/mrjob | acfcdda93e2d1cd1fde7cd52b30280293ae3376f | [
"Apache-2.0"
] | null | null | null | # Copyright 2009-2012 Yelp and Contributors
# Copyright 2013 David Marin and Lyft
# Copyright 2015-2017 Yelp
# Copyright 2018 Yelp and Contributors
# Copyright 2019 Yelp
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtai... | 34.521303 | 79 | 0.58095 |
66e0461518179125c6d3fa5d2d182ff6323689eb | 4,668 | py | Python | lib/sprites.py | Aaaaace/flappybird-pygame | 282c2306e58879e140abf05171779ec61ddc5fdc | [
"MIT"
] | 1 | 2018-12-12T09:08:19.000Z | 2018-12-12T09:08:19.000Z | lib/sprites.py | Aaaaace/flappybird-pygame | 282c2306e58879e140abf05171779ec61ddc5fdc | [
"MIT"
] | null | null | null | lib/sprites.py | Aaaaace/flappybird-pygame | 282c2306e58879e140abf05171779ec61ddc5fdc | [
"MIT"
] | null | null | null | '''
包含了游戏中的所有Sprite
'''
import pygame
from pygame.locals import *
import constants
from itertools import cycle
from gameobjects import Vec2d
import random
from asserts import BIRD_LIST, PIPE_LIST, BASE, NUMBER_LIST # 图片资源
class Bird(pygame.sprite.Sprite):
'''
<summary>玩家控制的小鸟,只用于更新小鸟的动画(结构通用)</summary>
... | 34.072993 | 82 | 0.571551 |
705630c3f5e3f086c13d7f18242dfcbc98965c18 | 1,446 | py | Python | src/apps/surveys18/tests/test_business.py | COAStatistics/alss | e1b14cb13de7b8455fa6835587cb1ceb16e4595c | [
"MIT"
] | null | null | null | src/apps/surveys18/tests/test_business.py | COAStatistics/alss | e1b14cb13de7b8455fa6835587cb1ceb16e4595c | [
"MIT"
] | 81 | 2018-09-04T13:16:02.000Z | 2022-03-11T23:20:40.000Z | src/apps/surveys18/tests/test_business.py | COAStatistics/alss | e1b14cb13de7b8455fa6835587cb1ceb16e4595c | [
"MIT"
] | 4 | 2018-08-21T22:17:59.000Z | 2019-03-15T01:14:29.000Z | from . import TestCase, setup_fixtures
from apps.surveys18.models import Survey, Business, FarmRelatedBusiness
class ModelTestCase(TestCase):
@classmethod
def setUpTestData(cls):
# load fixtures
setup_fixtures()
def test_create_business(self):
survey_id = Survey.objects.get(id=3)
... | 35.268293 | 81 | 0.70816 |
82c07daeaba1e2d0f06128143abe57facbc2ff3e | 325 | py | Python | Section3/L2 Scalar/Scalar1.8.py | Mohit-Sharma1/Takenmind_Internship_assignments | 7099ae3a70fca009f6298482e90e988124868148 | [
"MIT"
] | null | null | null | Section3/L2 Scalar/Scalar1.8.py | Mohit-Sharma1/Takenmind_Internship_assignments | 7099ae3a70fca009f6298482e90e988124868148 | [
"MIT"
] | null | null | null | Section3/L2 Scalar/Scalar1.8.py | Mohit-Sharma1/Takenmind_Internship_assignments | 7099ae3a70fca009f6298482e90e988124868148 | [
"MIT"
] | null | null | null | from __future__ import division
import numpy as np
array1= np.array([[1,2,3,4],[5,6,7,8]])
print array1
#multiplication
array2=array1*array1
print array2
#exp multiplication
array3=array1**3
print array3
#subtraction
array4=array1-array1
print array4
array5=array2 - array1
print array5
#reciprocal
print 1/arr... | 11.607143 | 39 | 0.769231 |
923ce9f0cd56f869d53a1ef5eb6ec55e9b6b58ff | 4,831 | py | Python | termfun/nbinput.py | kyleperik/termfun | 4e38f19df0eaa92f818a7965b2802aaeb4b1f753 | [
"MIT"
] | null | null | null | termfun/nbinput.py | kyleperik/termfun | 4e38f19df0eaa92f818a7965b2802aaeb4b1f753 | [
"MIT"
] | null | null | null | termfun/nbinput.py | kyleperik/termfun | 4e38f19df0eaa92f818a7965b2802aaeb4b1f753 | [
"MIT"
] | null | null | null | """
Taken from https://github.com/itsapi/pycraft/blob/master/nbinput.py
with permission
Most of this code came from this page:
http://code.activestate.com/recipes/134892/#c5
"""
import sys
import select
UP, DOWN, RIGHT, LEFT = 'A', 'B', 'C', 'D'
class NonBlockingInput:
"""
Gets a single character from sta... | 25.696809 | 83 | 0.553923 |
219eea55f3080166fef3ec6a93fd67fba1dbf4b1 | 2,938 | py | Python | src/my_utils/motion.py | xenakal/Simulation_Interactions | 4e428bb70445ba7fd2d102facdd18c5def4542b7 | [
"MIT"
] | 2 | 2021-03-24T07:26:40.000Z | 2022-02-05T23:07:27.000Z | src/my_utils/motion.py | xenakal/Simulation_Interactions | 4e428bb70445ba7fd2d102facdd18c5def4542b7 | [
"MIT"
] | null | null | null | src/my_utils/motion.py | xenakal/Simulation_Interactions | 4e428bb70445ba7fd2d102facdd18c5def4542b7 | [
"MIT"
] | null | null | null | from src.multi_agent.elements.target import *
import math
def limit_to_value_max(value_max, value):
"""
:param
1.(int) value_max -- value that should not be exceed
2.(int) value -- actual value
:return
1. return a value in the given... | 31.934783 | 119 | 0.576242 |
b382d5bd646dc62f67c14d134eb115790e9cd55d | 1,163 | py | Python | test/integrationTests/test_integration_core_event.py | andreuesteras/sim-port | a7d8bbe04abff890f10353a83e40e16d6db64415 | [
"Apache-1.1"
] | null | null | null | test/integrationTests/test_integration_core_event.py | andreuesteras/sim-port | a7d8bbe04abff890f10353a83e40e16d6db64415 | [
"Apache-1.1"
] | null | null | null | test/integrationTests/test_integration_core_event.py | andreuesteras/sim-port | a7d8bbe04abff890f10353a83e40e16d6db64415 | [
"Apache-1.1"
] | null | null | null | from unittest import TestCase
from src.Constants import Constants
from src.Core import Core
from src.Event import Event
from src.Source import Source
class TestIntegrationCoreEvent(TestCase):
def setUp(self):
self.coreObj = Core()
self.event = Event(eventCreator=self.coreObj)
def tearDown(se... | 37.516129 | 103 | 0.676698 |
9219bda43b45272654d1bfccf33a5fb9dea2273a | 10,228 | py | Python | juriscraper/pacer/reports.py | dmvj/juriscraper | 5dd28926c3a465550da436daa0143be8de1b249a | [
"BSD-2-Clause"
] | null | null | null | juriscraper/pacer/reports.py | dmvj/juriscraper | 5dd28926c3a465550da436daa0143be8de1b249a | [
"BSD-2-Clause"
] | null | null | null | juriscraper/pacer/reports.py | dmvj/juriscraper | 5dd28926c3a465550da436daa0143be8de1b249a | [
"BSD-2-Clause"
] | null | null | null | # coding=utf-8
import re
from typing import Tuple
import six
from lxml.html import HtmlElement
from requests import Response
from six.moves.urllib.parse import urljoin
from .utils import is_pdf, make_doc1_url
from ..lib.html_utils import (
clean_html,
fix_links_in_lxml_tree,
get_html5_parsed_text,
get... | 37.881481 | 80 | 0.598357 |
43451f47c016ea62ac65f2b1a2b856af9283bc00 | 1,726 | py | Python | Tools/SQLMap/sqlmap/plugins/generic/fingerprint.py | michaelhidalgo/7WCSQ | da7fe7f0fa97abff0848a4adc13742e4e39c4afe | [
"Apache-2.0"
] | null | null | null | Tools/SQLMap/sqlmap/plugins/generic/fingerprint.py | michaelhidalgo/7WCSQ | da7fe7f0fa97abff0848a4adc13742e4e39c4afe | [
"Apache-2.0"
] | null | null | null | Tools/SQLMap/sqlmap/plugins/generic/fingerprint.py | michaelhidalgo/7WCSQ | da7fe7f0fa97abff0848a4adc13742e4e39c4afe | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
from lib.core.common import Backend
from lib.core.common import readInput
from lib.core.data import logger
from lib.core.enums import OS
from lib.core.exception import SqlmapU... | 29.254237 | 71 | 0.621669 |
bd58bf2bb18a8dc70c2dabd159696336075ba0da | 500 | py | Python | 22. decoradores.py | JSNavas/CursoPython2.7 | d1f9170dbf897b6eb729f9696a208880e33c550b | [
"MIT"
] | null | null | null | 22. decoradores.py | JSNavas/CursoPython2.7 | d1f9170dbf897b6eb729f9696a208880e33c550b | [
"MIT"
] | null | null | null | 22. decoradores.py | JSNavas/CursoPython2.7 | d1f9170dbf897b6eb729f9696a208880e33c550b | [
"MIT"
] | null | null | null | passwdAdmin = "navas"
# Objeto decorador
def admin(decorar):
def validar(*args,**kwargs):
if loggeado:
decorar(*args,**kwargs)
else:
print "No tiene permiso para usar la funcion", decorar.__name__
return validar
# Funcion decorada
@admin
def suma():
a = input("Numero 1: ")
b = input("Numero 2: ")
... | 11.904762 | 66 | 0.664 |
652cc48a5f826ddc6ae73b306f5bcedc4dba7eb7 | 1,659 | py | Python | Murphi/ModularMurphi/TemplateClass.py | icsa-caps/HieraGen | 4026c1718878d2ef69dd13d3e6e10cab69174fda | [
"MIT"
] | 6 | 2020-07-07T15:45:13.000Z | 2021-08-29T06:44:29.000Z | Murphi/ModularMurphi/TemplateClass.py | icsa-caps/HieraGen | 4026c1718878d2ef69dd13d3e6e10cab69174fda | [
"MIT"
] | null | null | null | Murphi/ModularMurphi/TemplateClass.py | icsa-caps/HieraGen | 4026c1718878d2ef69dd13d3e6e10cab69174fda | [
"MIT"
] | null | null | null | import inspect
import os
import re
class TemplateHandler:
# Constant definitions
tab = " "
nl = "\n"
sem = ";"
end = sem + nl
def __init__(self, template_dir: str):
self.templatepath = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) + \
... | 29.105263 | 120 | 0.485835 |
b5546f243975fe9c510251adec49d7c6c1a783dc | 124 | py | Python | uq4k/__init__.py | JPLMLIA/UQ4K | 7884200992b9bf5b4d8782e243eb4ff2470cea3f | [
"MIT"
] | 1 | 2022-03-18T14:40:23.000Z | 2022-03-18T14:40:23.000Z | uq4k/__init__.py | JPLMLIA/UQ4K | 7884200992b9bf5b4d8782e243eb4ff2470cea3f | [
"MIT"
] | null | null | null | uq4k/__init__.py | JPLMLIA/UQ4K | 7884200992b9bf5b4d8782e243eb4ff2470cea3f | [
"MIT"
] | null | null | null | """Top-level package for uq4k."""
__author__ = """Mahdy Shirdel"""
__email__ = 'mshirdel@utexas.edu'
__version__ = '0.1.0'
| 20.666667 | 33 | 0.677419 |
4d01a337dd81e904d9398e8f495c6a6aeffecaeb | 28,469 | py | Python | Janaagraha Bot/venv/Lib/site-packages/pyasn1_modules/rfc4210.py | CFGIndia20/team-19 | e2b27ad8009303d262c2dc60551d6fcc4645b3b5 | [
"MIT"
] | 15 | 2020-06-29T08:33:39.000Z | 2022-02-12T00:28:51.000Z | Janaagraha Bot/venv/Lib/site-packages/pyasn1_modules/rfc4210.py | CFGIndia20/team-19 | e2b27ad8009303d262c2dc60551d6fcc4645b3b5 | [
"MIT"
] | 21 | 2020-03-01T18:21:09.000Z | 2020-05-26T14:49:08.000Z | Janaagraha Bot/venv/Lib/site-packages/pyasn1_modules/rfc4210.py | CFGIndia20/team-19 | e2b27ad8009303d262c2dc60551d6fcc4645b3b5 | [
"MIT"
] | 11 | 2020-06-29T08:40:24.000Z | 2022-02-24T17:39:16.000Z | #
# This file is part of pyasn1-modules software.
#
# Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com>
# License: http://snmplabs.com/pyasn1/license.html
#
# Certificate Management Protocol structures as per RFC4210
#
# Based on Alex Railean's work
#
from pyasn1.type import char
from pyasn1.type import constra... | 35.409204 | 163 | 0.592855 |
d5a0bce6835c97cfa950d6dd8a020d4f4225f2cf | 621 | py | Python | wbml/data/crude_oil.py | wesselb/wbml | 06bf71777ab9a75ef71845f95f91755626b37ddf | [
"MIT"
] | 4 | 2019-12-04T11:30:34.000Z | 2022-02-24T09:16:28.000Z | wbml/data/crude_oil.py | wesselb/wbml | 06bf71777ab9a75ef71845f95f91755626b37ddf | [
"MIT"
] | null | null | null | wbml/data/crude_oil.py | wesselb/wbml | 06bf71777ab9a75ef71845f95f91755626b37ddf | [
"MIT"
] | 1 | 2018-10-14T13:10:39.000Z | 2018-10-14T13:10:39.000Z | import pandas as pd
from .data import data_path, resource, date_to_decimal_year
__all__ = ["load"]
def load():
_fetch()
df = pd.read_csv(data_path("crude_oil", "crude_oil.csv"))
df.columns = [c.lower() for c in df.columns]
df.rename(columns={"close/last": "close"})
df.date = list(map(lambda x: ... | 23.884615 | 79 | 0.650564 |
f41f39379eb702fea2050b7e350d6f72b8d29e07 | 13,875 | py | Python | lifelines/datasets/__init__.py | jojordan3/lifelines | e0f1a8f2a5392d8ddaf567979ce9469b62f10024 | [
"MIT"
] | null | null | null | lifelines/datasets/__init__.py | jojordan3/lifelines | e0f1a8f2a5392d8ddaf567979ce9469b62f10024 | [
"MIT"
] | null | null | null | lifelines/datasets/__init__.py | jojordan3/lifelines | e0f1a8f2a5392d8ddaf567979ce9469b62f10024 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pandas as pd
from pkg_resources import resource_filename
def load_dataset(filename, **kwargs):
"""
Load a dataset from lifelines.datasets
Parameters
----------
filename : string
for example "larynx.csv"
usecols : list
list of columns in file to u... | 33.433735 | 393 | 0.495928 |
0f78ccdd39e9c115f21269fca15a6e62cb8021d2 | 1,462 | py | Python | library/pyjamas/gmaps/Base.py | certik/pyjamas | 5bb72e63e50f09743ac986f4c9690ba50c499ba9 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-09-19T09:14:16.000Z | 2018-09-19T09:14:16.000Z | library/pyjamas/gmaps/Base.py | emk/pyjamas | d7633919d1ec9cd4a36675e356c7e5de71ac2a67 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | library/pyjamas/gmaps/Base.py | emk/pyjamas | d7633919d1ec9cd4a36675e356c7e5de71ac2a67 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-08-13T20:32:25.000Z | 2019-08-13T20:32:25.000Z | # Copyright (C) 2009 Daniel Carvalho <idnael@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 28.115385 | 74 | 0.670315 |
d517634262c9b5de2368706f6c1f77208cac23e3 | 3,861 | py | Python | src/buildchain/compiler.py | vanelk/vpp | 09ad7fdd6ed80b0a9a2c3f8fcffd1c24d6e1dfcd | [
"MIT"
] | null | null | null | src/buildchain/compiler.py | vanelk/vpp | 09ad7fdd6ed80b0a9a2c3f8fcffd1c24d6e1dfcd | [
"MIT"
] | null | null | null | src/buildchain/compiler.py | vanelk/vpp | 09ad7fdd6ed80b0a9a2c3f8fcffd1c24d6e1dfcd | [
"MIT"
] | null | null | null | from src.ast.tokens import TokType
from src.buildchain import Visitor
from src.ast.nodes import *
from llvm.core import Module, Type, Builder, Constant, Function
from llvm.ee import GenericValue
from src.context import Context
from src.valtypes.checks import Types, arrayType, fncType
int_type = Type.int()
float_type ... | 37.485437 | 82 | 0.630666 |
e0cc3689e153bddf193f5431167b04c237b459c2 | 1,014 | py | Python | TranspositionCipher/check_eng.py | AlMikFox3/Ciphers | aa592c94c09682e03f07c7d036eda8a17dcafbf4 | [
"MIT"
] | 1 | 2020-02-08T07:24:05.000Z | 2020-02-08T07:24:05.000Z | TranspositionCipher/check_eng.py | AlMikFox3/Ciphers | aa592c94c09682e03f07c7d036eda8a17dcafbf4 | [
"MIT"
] | null | null | null | TranspositionCipher/check_eng.py | AlMikFox3/Ciphers | aa592c94c09682e03f07c7d036eda8a17dcafbf4 | [
"MIT"
] | 2 | 2019-08-08T17:40:11.000Z | 2020-01-24T08:50:01.000Z | letter_upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
letter_space = letter_upper + letter_upper.lower() + ' \t\n'
def get_dict():
f = open('dictionary.txt','r')
eng_words = {}
dict_words = f.read().split('\n')
for word in dict_words:
eng_words[word] = None
f.close()
return eng_words
eng_words = get_dic... | 19.5 | 61 | 0.661736 |
09015d07ccca46937e32ea56b9dfac0975896654 | 19,599 | py | Python | girder/models/item.py | adsorensen/girder | ae461d1198e6173f36168a71d4f7a9a5f66e6b70 | [
"Apache-2.0"
] | null | null | null | girder/models/item.py | adsorensen/girder | ae461d1198e6173f36168a71d4f7a9a5f66e6b70 | [
"Apache-2.0"
] | null | null | null | girder/models/item.py | adsorensen/girder | ae461d1198e6173f36168a71d4f7a9a5f66e6b70 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright 2013 Kitware 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 cop... | 37.982558 | 91 | 0.571101 |
d67e79423d5c89c56a8611ce334d61d1f8df2d78 | 494 | py | Python | test/test_Trainer.py | taoyilee/Keras_MedicalImgAI | 02ecf1f52ee91e3050b2d30f602a3161ff0726cf | [
"MIT"
] | 26 | 2018-03-14T13:58:22.000Z | 2022-02-11T14:32:48.000Z | test/test_Trainer.py | taoyilee/Keras_MedicalImgAI | 02ecf1f52ee91e3050b2d30f602a3161ff0726cf | [
"MIT"
] | 3 | 2018-11-09T21:54:03.000Z | 2020-05-08T09:07:06.000Z | test/test_Trainer.py | taoyilee/Keras_MedicalImgAI | 02ecf1f52ee91e3050b2d30f602a3161ff0726cf | [
"MIT"
] | 9 | 2018-03-14T13:58:25.000Z | 2020-06-02T03:21:48.000Z | import argparse
from app.main.Trainer import Trainer
def main(config_file):
tr = Trainer(config_file)
tr.train()
if __name__ == "__main__":
'''
Entry Point
'''
# use argparse to accept command line variables (config.ini)
parser = argparse.ArgumentParser(description='Train a specfic dat... | 22.454545 | 100 | 0.696356 |
866a64bc8721d836858b9c2c552faded1b45d01c | 5,422 | py | Python | code/main.py | WilliamsRizzi/LUS2 | 3fc046fe448d3c4f28828f8ac129581dbcb984b0 | [
"MIT"
] | null | null | null | code/main.py | WilliamsRizzi/LUS2 | 3fc046fe448d3c4f28828f8ac129581dbcb984b0 | [
"MIT"
] | null | null | null | code/main.py | WilliamsRizzi/LUS2 | 3fc046fe448d3c4f28828f8ac129581dbcb984b0 | [
"MIT"
] | null | null | null | #12/06/18 willo
import os
print 'LUS2 willo'
#OFFSET FOLDERS
DATA = '../data/'
TEMPLATES = '../templates/'
SANDBOX = 'sandbox/'
RESULT = '../result/'
#TRAIN FILES
train_data_in = DATA + 'NLSPARQL.train.data'
test_data_in = DATA + 'NLSPARQL.test.data'
#TEST FILES
train_file_crf = SANDBOX + 'train.data'
test_file_crf... | 31.707602 | 122 | 0.613796 |
eeb0516155458faea94fc6a8c2d4f4e057fa56e5 | 477 | py | Python | Tutorials/30-Days-of-Code/30-binary-numbers.py | RitvijSrivastava/Hackerrank-1 | 781e60ff18b581bda88be63bd095118778bc2d56 | [
"MIT"
] | 29 | 2018-10-08T18:14:09.000Z | 2021-10-10T08:37:06.000Z | Tutorials/30-Days-of-Code/30-binary-numbers.py | RitvijSrivastava/Hackerrank-1 | 781e60ff18b581bda88be63bd095118778bc2d56 | [
"MIT"
] | 36 | 2018-10-03T18:39:26.000Z | 2021-10-08T21:21:40.000Z | Tutorials/30-Days-of-Code/30-binary-numbers.py | RitvijSrivastava/Hackerrank-1 | 781e60ff18b581bda88be63bd095118778bc2d56 | [
"MIT"
] | 86 | 2018-10-03T19:19:40.000Z | 2021-12-23T11:59:22.000Z | #!/bin/python3
import math
import os
import random
import re
import sys
def get_binary(n):
a = []
while n > 0:
d = n % 2
a.append(d)
n //= 2
lo, mx = 0, 0
# print(a)
for i in range(len(a)):
if a[i] == 0:
if lo > mx:
mx = lo
lo... | 15.387097 | 27 | 0.429769 |
efa4ea7890659e312b8e30229b2b49606f521d26 | 2,086 | py | Python | Server/server.py | reimondhill/iOSGlobalChallenge | 1fff909072fc41c46c064babb6bd2be2ea0f463f | [
"MIT"
] | null | null | null | Server/server.py | reimondhill/iOSGlobalChallenge | 1fff909072fc41c46c064babb6bd2be2ea0f463f | [
"MIT"
] | null | null | null | Server/server.py | reimondhill/iOSGlobalChallenge | 1fff909072fc41c46c064babb6bd2be2ea0f463f | [
"MIT"
] | null | null | null | #!/usr/bin/python
import random
import json
import urlparse
import uuid
from wsgiref.util import setup_testing_defaults
from wsgiref.simple_server import make_server
chosen_path = ''
def index_view(environ, start_response):
global chosen_path
chosen_path = str(uuid.uuid1())
print "Chosen path %s for next ... | 33.111111 | 100 | 0.618888 |
f5f925f8070084041c22f3fdd721d4deba05d972 | 770 | py | Python | torch2trt_dynamic/plugins/create_repeatdim_plugin.py | jinfagang/torch2trt_dynamic | fad7a7845f13cb59c05de25fcb83e7591acb492c | [
"MIT"
] | 155 | 2020-05-09T12:40:29.000Z | 2022-03-26T05:54:40.000Z | torch2trt_dynamic/plugins/create_repeatdim_plugin.py | jinfagang/torch2trt_dynamic | fad7a7845f13cb59c05de25fcb83e7591acb492c | [
"MIT"
] | 25 | 2020-08-03T11:38:08.000Z | 2022-03-16T07:33:22.000Z | torch2trt_dynamic/plugins/create_repeatdim_plugin.py | jinfagang/torch2trt_dynamic | fad7a7845f13cb59c05de25fcb83e7591acb492c | [
"MIT"
] | 22 | 2020-05-17T04:50:20.000Z | 2021-12-28T09:45:26.000Z | import numpy as np
import tensorrt as trt
def create_repeat_plugin(layer_name, repeat_shape, type_id=trt.DataType.FLOAT):
creator = trt.get_plugin_registry().get_plugin_creator(
'RepeatDimsPluginDynamic', '1', '')
pfc = trt.PluginFieldCollection()
pf_repeat_shape = trt.PluginField('repeat_dims'... | 33.478261 | 79 | 0.592208 |
ac98bffc01dcd2333759dace5374f411d44b8a65 | 1,374 | py | Python | webapp/views/project/forms.py | nwallin1/ezEML | e854f81496339ededa90b4864632b345512db40d | [
"Apache-2.0"
] | 3 | 2020-10-06T18:47:30.000Z | 2021-01-04T23:44:15.000Z | webapp/views/project/forms.py | nwallin1/ezEML | e854f81496339ededa90b4864632b345512db40d | [
"Apache-2.0"
] | 45 | 2020-09-14T19:20:49.000Z | 2022-03-01T02:25:58.000Z | webapp/views/project/forms.py | nwallin1/ezEML | e854f81496339ededa90b4864632b345512db40d | [
"Apache-2.0"
] | 3 | 2020-12-21T19:35:36.000Z | 2021-11-08T19:18:19.000Z | from wtforms import (
StringField, HiddenField, validators
)
from wtforms.validators import (
InputRequired
)
from wtforms.widgets import TextArea
from webapp.home.forms import EDIForm
class ProjectForm(EDIForm):
title = StringField('Project Title *', validators=[InputRequired(message='Project Title is... | 28.625 | 107 | 0.678311 |
1cdf961aca242e753f9f2c7f854c75e346dadb12 | 10,744 | py | Python | geomstats/geometry/product_manifold.py | xpennec/geomstats | 6c3ed380c992d7f866448845e890ed198ce8bbea | [
"MIT"
] | 743 | 2018-05-23T02:23:29.000Z | 2022-03-29T22:59:22.000Z | geomstats/geometry/product_manifold.py | xpennec/geomstats | 6c3ed380c992d7f866448845e890ed198ce8bbea | [
"MIT"
] | 1,119 | 2018-05-15T05:29:38.000Z | 2022-03-31T18:27:02.000Z | geomstats/geometry/product_manifold.py | xpennec/geomstats | 6c3ed380c992d7f866448845e890ed198ce8bbea | [
"MIT"
] | 159 | 2018-05-23T17:49:24.000Z | 2022-03-30T16:44:47.000Z | """Product of manifolds."""
import joblib
import geomstats.backend as gs
import geomstats.errors
import geomstats.vectorization
from geomstats.geometry.manifold import Manifold
from geomstats.geometry.product_riemannian_metric import ProductRiemannianMetric
class ProductManifold(Manifold):
"""Class for a produc... | 34.216561 | 86 | 0.564687 |
1d40303bd4677773e1fba300c2c45ba3b596120a | 1,722 | py | Python | data_analysis/gen_banding_study_videos.py | vztu/DebandingNet | 4af8e83ffbfc70dc220dd6fea2827fb75796f10c | [
"MIT"
] | null | null | null | data_analysis/gen_banding_study_videos.py | vztu/DebandingNet | 4af8e83ffbfc70dc220dd6fea2827fb75796f10c | [
"MIT"
] | null | null | null | data_analysis/gen_banding_study_videos.py | vztu/DebandingNet | 4af8e83ffbfc70dc220dd6fea2827fb75796f10c | [
"MIT"
] | null | null | null |
import os
import glob
import matplotlib.pyplot as plt
import pylab as py
import seaborn as sns
from matplotlib import rc
import numpy as np
import random
# plt.style.use("seaborn")
ticks_size = 12
label_size = 14
ORG_DIR = 'result/Waterloo1K'
VP9_DIR = 'result/Waterloo1K_vp9'
files = sorted(glob.glob(os.path.join(O... | 29.689655 | 71 | 0.65331 |
b02ec6c22481dd6c1af1463aca6cad164f87f369 | 2,583 | py | Python | make_metadata.py | tmilliman/stardot_overlay | a410659c209af5d954f6b2828ec22a249c611dc9 | [
"MIT"
] | null | null | null | make_metadata.py | tmilliman/stardot_overlay | a410659c209af5d954f6b2828ec22a249c611dc9 | [
"MIT"
] | null | null | null | make_metadata.py | tmilliman/stardot_overlay | a410659c209af5d954f6b2828ec22a249c611dc9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Script to extract the Exposure value from an image overlay and create
a simple metadata file with a single line:
e.g.
exposure=20
If the metadata file already exists then just exit.
"""
import os
import sys
import argparse
from stardot_overlay import get_exposure
from stardot_overlay i... | 27.774194 | 78 | 0.555168 |
95efa231c66445772faf2a565f72270235162b34 | 6,195 | py | Python | tests/unit/remote/ssh/test_ssh.py | n3hrox/dvc | 387a471857a19c823ea728fb97fb2908c7fdf199 | [
"Apache-2.0"
] | null | null | null | tests/unit/remote/ssh/test_ssh.py | n3hrox/dvc | 387a471857a19c823ea728fb97fb2908c7fdf199 | [
"Apache-2.0"
] | null | null | null | tests/unit/remote/ssh/test_ssh.py | n3hrox/dvc | 387a471857a19c823ea728fb97fb2908c7fdf199 | [
"Apache-2.0"
] | 1 | 2019-12-01T07:43:48.000Z | 2019-12-01T07:43:48.000Z | import getpass
import os
import sys
from unittest import TestCase
import pytest
from mock import mock_open
from mock import patch
from dvc.remote.ssh import RemoteSSH
from dvc.system import System
from tests.func.test_data_cloud import get_ssh_url_mocked
class TestRemoteSSH(TestCase):
def test_url(self):
... | 28.948598 | 74 | 0.636804 |
d03b7231436b0097e9f3f8eab03053efe14d54a2 | 7,931 | py | Python | batch/processor_modify_personal_info.py | BoostryJP/ibet-Prime | 924e7f8da4f8feea0a572e8b5532e09bcdf2dc99 | [
"Apache-2.0"
] | 2 | 2021-08-19T12:35:25.000Z | 2022-02-16T04:13:38.000Z | batch/processor_modify_personal_info.py | BoostryJP/ibet-Prime | 924e7f8da4f8feea0a572e8b5532e09bcdf2dc99 | [
"Apache-2.0"
] | 46 | 2021-09-02T03:22:05.000Z | 2022-03-31T09:20:00.000Z | batch/processor_modify_personal_info.py | BoostryJP/ibet-Prime | 924e7f8da4f8feea0a572e8b5532e09bcdf2dc99 | [
"Apache-2.0"
] | 1 | 2021-11-17T23:18:27.000Z | 2021-11-17T23:18:27.000Z | """
Copyright BOOSTRY Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distr... | 34.185345 | 124 | 0.659438 |
c47692921cf14a36c4697729d99c4902b05db30b | 1,254 | py | Python | setup.py | C-nit/uniprot_fasta_parser | 84ea160ba60784efc4602e3f17d332eb85f8831c | [
"MIT"
] | null | null | null | setup.py | C-nit/uniprot_fasta_parser | 84ea160ba60784efc4602e3f17d332eb85f8831c | [
"MIT"
] | null | null | null | setup.py | C-nit/uniprot_fasta_parser | 84ea160ba60784efc4602e3f17d332eb85f8831c | [
"MIT"
] | null | null | null | """Package installer."""
import os
from setuptools import setup
from setuptools import find_packages
LONG_DESCRIPTION = ''
if os.path.exists('README.md'):
with open('README.md') as fp:
LONG_DESCRIPTION = fp.read()
REQUIREMENTS = []
if os.path.exists('requirements.txt'):
with open('requirements.txt') a... | 29.857143 | 70 | 0.643541 |
cb8b5e4eb4f80a6f15e82106a9ea4f5cc9826f3a | 25,197 | py | Python | datumaro/datumaro/plugins/voc_format/extractor.py | SUNx2YCH/cvat | 7e8fc2366afe2b41f534633e4b9d42fbd580546a | [
"MIT"
] | null | null | null | datumaro/datumaro/plugins/voc_format/extractor.py | SUNx2YCH/cvat | 7e8fc2366afe2b41f534633e4b9d42fbd580546a | [
"MIT"
] | null | null | null | datumaro/datumaro/plugins/voc_format/extractor.py | SUNx2YCH/cvat | 7e8fc2366afe2b41f534633e4b9d42fbd580546a | [
"MIT"
] | null | null | null |
# Copyright (C) 2019 Intel Corporation
#
# SPDX-License-Identifier: MIT
from collections import defaultdict
import os
import os.path as osp
from xml.etree import ElementTree as ET
from datumaro.components.extractor import (SourceExtractor, Extractor,
DEFAULT_SUBSET_NAME, DatasetItem,
AnnotationType, Label, M... | 34.898892 | 82 | 0.575584 |
209fdcdd24243e37655cda3d1b0443231becdca8 | 10,264 | py | Python | homeassistant/components/plugwise/climate.py | c10h22/core | 39f2d4cb5a7a3327339c903b5389ddf5f92c6f45 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/plugwise/climate.py | c10h22/core | 39f2d4cb5a7a3327339c903b5389ddf5f92c6f45 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/plugwise/climate.py | c10h22/core | 39f2d4cb5a7a3327339c903b5389ddf5f92c6f45 | [
"Apache-2.0"
] | null | null | null | """Plugwise Climate component for Home Assistant."""
import logging
from typing import Dict
from Plugwise_Smile.Smile import Smile
from homeassistant.components.climate import ClimateEntity
from homeassistant.components.climate.const import (
CURRENT_HVAC_COOL,
CURRENT_HVAC_HEAT,
CURRENT_HVAC_IDLE,
H... | 33.433225 | 82 | 0.635425 |
a3834dd5541591ebbe9223d094986193a37b7415 | 1,861 | py | Python | entity_matching_tool/config.py | testlnord/entity_matching_tool | 6b965d6b2f8418000369e79264f4ce0c1b1cb64f | [
"MIT"
] | 2 | 2017-06-14T13:43:03.000Z | 2019-02-15T19:20:03.000Z | entity_matching_tool/config.py | testlnord/entity_matching_tool | 6b965d6b2f8418000369e79264f4ce0c1b1cb64f | [
"MIT"
] | 16 | 2017-03-20T08:10:12.000Z | 2017-03-23T10:00:03.000Z | entity_matching_tool/config.py | testlnord/entity_matching_tool | 6b965d6b2f8418000369e79264f4ce0c1b1cb64f | [
"MIT"
] | 4 | 2017-10-11T11:12:18.000Z | 2018-07-03T09:46:01.000Z | import os
class BaseConfig(object):
DEBUG = os.environ.get('DEBUG', True)
TESTING = False
SECRET_KEY = 'emtool'
POSTGRES = {
'user': 'postgres',
'pw': 'postgres',
'db': 'postgres',
'host': 'db',
'port': '5432',
}
SQLALCHEMY_DATABASE_URI = os.environ.get(... | 30.016129 | 112 | 0.559377 |
53420d64e506095cffd3cb509e3a169aa389b7bc | 754 | py | Python | python/cross-stack-resources/native-objects/native_objects/infrastructure_stack.py | damshenas/aws-cdk-examples | 85d247df404444cde6ef913aae31aaa47cd93daa | [
"Apache-2.0"
] | 1 | 2022-02-02T20:23:28.000Z | 2022-02-02T20:23:28.000Z | python/cross-stack-resources/native-objects/native_objects/infrastructure_stack.py | damshenas/aws-cdk-examples | 85d247df404444cde6ef913aae31aaa47cd93daa | [
"Apache-2.0"
] | null | null | null | python/cross-stack-resources/native-objects/native_objects/infrastructure_stack.py | damshenas/aws-cdk-examples | 85d247df404444cde6ef913aae31aaa47cd93daa | [
"Apache-2.0"
] | null | null | null | from aws_cdk import (
aws_lambda as lambda_,
Stack
)
from constructs import Construct
class InfrastructureStack(Stack):
def __init__(self, scope: Construct, id: str, **kwargs) -> None:
super().__init__(scope, id, **kwargs)
my_main_func = lambda_.Function(
self,
"my... | 27.925926 | 89 | 0.632626 |
93068bfcda1a28c74df6af7364cb05dfe601a402 | 31,318 | py | Python | tensorflow_federated/python/core/impl/executors/eager_tf_executor_test.py | ESWZY/federated | 4e5738666cfe5498ab1538e9dd6dc886917acf46 | [
"Apache-2.0"
] | 1 | 2021-04-01T08:35:06.000Z | 2021-04-01T08:35:06.000Z | tensorflow_federated/python/core/impl/executors/eager_tf_executor_test.py | moneymel68/federated | 1693d5fdd25938dc9aadede8d103ed117d1d34c9 | [
"Apache-2.0"
] | null | null | null | tensorflow_federated/python/core/impl/executors/eager_tf_executor_test.py | moneymel68/federated | 1693d5fdd25938dc9aadede8d103ed117d1d34c9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019, The TensorFlow Federated Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 40.672727 | 80 | 0.717606 |
e818dc95c3b4371ad5bd94f7fbb45df2b4443e91 | 1,579 | py | Python | test/s3test.py | bcdev/xcube | 9d275ef3baef8fbcea5c1fbbfb84c3d0164aecd3 | [
"MIT"
] | 97 | 2018-06-26T13:02:55.000Z | 2022-03-26T21:03:13.000Z | test/s3test.py | bcdev/xcube | 9d275ef3baef8fbcea5c1fbbfb84c3d0164aecd3 | [
"MIT"
] | 524 | 2018-11-09T12:00:08.000Z | 2022-03-31T17:00:13.000Z | test/s3test.py | bcdev/xcube | 9d275ef3baef8fbcea5c1fbbfb84c3d0164aecd3 | [
"MIT"
] | 15 | 2019-07-09T08:46:03.000Z | 2022-02-07T18:47:34.000Z | import os
import subprocess
import sys
import time
import unittest
import urllib
import urllib.error
import urllib.request
import moto.server
MOTO_SERVER_ENDPOINT_URL = f'http://127.0.0.1:5000'
MOTOSERVER_PATH = moto.server.__file__
MOTOSERVER_ARGS = [sys.executable, MOTOSERVER_PATH, 's3']
class S3Test(unittest.Te... | 30.960784 | 115 | 0.650412 |
04a7a33c98dc4067ae8f971f2e85d3cd453bcf8b | 19,701 | py | Python | oth-chain/chains/blockchain.py | McSido/oth-chain | 16da2c06ce1188a825e3f3b236cd2c2fb5d59a68 | [
"MIT"
] | null | null | null | oth-chain/chains/blockchain.py | McSido/oth-chain | 16da2c06ce1188a825e3f3b236cd2c2fb5d59a68 | [
"MIT"
] | 10 | 2018-04-05T09:46:31.000Z | 2018-08-29T13:58:32.000Z | oth-chain/chains/blockchain.py | McSido/oth-chain | 16da2c06ce1188a825e3f3b236cd2c2fb5d59a68 | [
"MIT"
] | null | null | null | """ Abstract implementation of a blockchain
"""
import hashlib
import math
import os
from collections import OrderedDict, namedtuple
from pathlib import Path
from pprint import pprint
from queue import Queue
from time import time
from typing import Any, Callable, List, Optional, Tuple
from utils import print_debug_inf... | 34.442308 | 79 | 0.539871 |
bbe7ba97c20f298e3e891a45203c4997cdb1dd2d | 2,673 | py | Python | plotting_for_publication_plos_bio/plot_species_prevalence.py | zhiru-liu/microbiome_evolution | 5a08fbf41357d845236e3ff46c31315929d2b649 | [
"BSD-2-Clause"
] | null | null | null | plotting_for_publication_plos_bio/plot_species_prevalence.py | zhiru-liu/microbiome_evolution | 5a08fbf41357d845236e3ff46c31315929d2b649 | [
"BSD-2-Clause"
] | null | null | null | plotting_for_publication_plos_bio/plot_species_prevalence.py | zhiru-liu/microbiome_evolution | 5a08fbf41357d845236e3ff46c31315929d2b649 | [
"BSD-2-Clause"
] | null | null | null | import matplotlib
matplotlib.use('Agg')
import pylab
import sys
import numpy
from utils import diversity_utils, gene_diversity_utils, stats_utils
from parsers import parse_midas_data
import matplotlib.colors as colors
import matplotlib.cm as cmx
from math import log10,ceil
import matplotlib as mpl
import matplotlib... | 29.373626 | 143 | 0.746727 |
34d6bda3353534a63f3622406f01c071d1f1f797 | 400 | py | Python | api/tests.py | david30907d/My-Django-React-Template | 5b3b3763ea0a9c548a021a9f02ae5deeecfe5308 | [
"MIT"
] | null | null | null | api/tests.py | david30907d/My-Django-React-Template | 5b3b3763ea0a9c548a021a9f02ae5deeecfe5308 | [
"MIT"
] | 5 | 2020-03-06T04:35:52.000Z | 2021-05-11T05:35:17.000Z | api/tests.py | david30907d/My-Django-React-Template | 5b3b3763ea0a9c548a021a9f02ae5deeecfe5308 | [
"MIT"
] | null | null | null | from django.http import JsonResponse
from django.test import Client, TestCase
class APITestCase(TestCase):
def setUp(self: TestCase) -> None:
self.client = Client()
def test_api_response(self: TestCase) -> None:
response = self.client.get("/health")
self.assertAlmostEqual(response.sta... | 30.769231 | 64 | 0.69 |
f11570b51df39cbf91a5a50f7125fb7a97434996 | 554 | py | Python | run.py | 0penbullet/DiscordPhone | ffcc053f4ae892911574f5b8a29df77c8b0e34ab | [
"MIT"
] | 11 | 2020-09-06T17:35:43.000Z | 2022-02-18T22:13:24.000Z | run.py | 0penbullet/DiscordPhone | ffcc053f4ae892911574f5b8a29df77c8b0e34ab | [
"MIT"
] | 2 | 2021-01-16T13:47:22.000Z | 2021-05-15T14:54:54.000Z | run.py | 0penbullet/DiscordPhone | ffcc053f4ae892911574f5b8a29df77c8b0e34ab | [
"MIT"
] | 3 | 2021-03-04T11:03:33.000Z | 2022-03-03T18:00:29.000Z | #!/usr/bin/env python3
# -*- coding: latin-1 -*-
import logging
from os import environ as env
from dotenv import load_dotenv
from discordphone.DiscordPhone import DiscordPhone
load_dotenv(dotenv_path='.env')
logging.basicConfig(
filename='discordphone.log',
filemode='a',
format='%(asctime)s,%(msecs)d %(n... | 23.083333 | 70 | 0.707581 |
9c913e5adbd64213b3eb39eff94f1d37953a3a05 | 796 | py | Python | torchonn/models/__init__.py | JeremieMelo/pytorch-onn | 670996112277a6c19c7da400afbe0a4ce45ad5de | [
"MIT"
] | 16 | 2021-06-09T07:51:43.000Z | 2022-03-24T08:16:52.000Z | torchonn/models/__init__.py | JeremieMelo/pytorch-onn | 670996112277a6c19c7da400afbe0a4ce45ad5de | [
"MIT"
] | null | null | null | torchonn/models/__init__.py | JeremieMelo/pytorch-onn | 670996112277a6c19c7da400afbe0a4ce45ad5de | [
"MIT"
] | 3 | 2021-07-20T15:16:49.000Z | 2022-03-24T08:16:56.000Z | '''
Description:
Author: Jiaqi Gu (jqgu@utexas.edu)
Date: 2021-11-29 20:25:40
LastEditors: Jiaqi Gu (jqgu@utexas.edu)
LastEditTime: 2021-11-29 20:25:40
'''
import importlib
import os
# from .base_model import *
# automatically import any Python files in this directory
for file in sorted(os.listdir(os.path.dirname(__fi... | 34.608696 | 73 | 0.657035 |
536a9b187177c157da4efa1ca4f85c003c799d4e | 4,202 | py | Python | benchmark/startQiskit2918.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit2918.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit2918.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=42
import cirq
import qiskit
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2
import numpy as np
import networkx as nx
def bitwise_... | 34.727273 | 140 | 0.650881 |
90bd3c350f7ea73fac5c309893cd116d93e45aed | 2,885 | py | Python | day015-day058/day015/main.py | sysarghir/100-days-of-python | 8edc7ce102429333d4abd80ac3f4067e4028c66d | [
"MIT"
] | null | null | null | day015-day058/day015/main.py | sysarghir/100-days-of-python | 8edc7ce102429333d4abd80ac3f4067e4028c66d | [
"MIT"
] | null | null | null | day015-day058/day015/main.py | sysarghir/100-days-of-python | 8edc7ce102429333d4abd80ac3f4067e4028c66d | [
"MIT"
] | null | null | null | # Coffee Machine
import sys
import os
from art import logo
from art import invent
MENU = {
"espresso": {
"ingredients": {
"water": 50,
"coffee": 18,
},
"cost": 1.5,
},
"latte": {
"ingredients": {
"water": 200,
... | 27.47619 | 99 | 0.533102 |
6c6dbe1992d8edc0239a0eedf92664739dc4b335 | 979 | py | Python | payloads/persistence/injectkey.py | Optixal/sshpwn | 9a6ed19b8351c61f0a905b0bd4123ac315e80ab0 | [
"MIT"
] | 9 | 2016-09-19T11:50:51.000Z | 2020-09-29T02:36:16.000Z | payloads/persistence/injectkey.py | Optixal/sshpwn | 9a6ed19b8351c61f0a905b0bd4123ac315e80ab0 | [
"MIT"
] | null | null | null | payloads/persistence/injectkey.py | Optixal/sshpwn | 9a6ed19b8351c61f0a905b0bd4123ac315e80ab0 | [
"MIT"
] | 6 | 2016-09-19T17:36:30.000Z | 2021-01-14T13:35:49.000Z | #!/usr/bin/python3
from pwn import *
import misc.coloredstatus as cs
from time import sleep
import os
def execute(session, configs, params):
remote_ssh_dir = "/home/" + session.user + "/.ssh/" if session.user != "root" else "/root/.ssh/"
try:
shell = session.shell("/bin/bash")
shell.send... | 29.666667 | 100 | 0.600613 |
b23e8580a823dbfd781c6ba59f12b009ab86c0ad | 937 | py | Python | Chapter10/Files/lambda/releaseChange/index.py | PacktPublishing/Automated-Machine-Learning-on-AWS | 26763c0d8253de82c3a54435ac9323b637169e01 | [
"MIT"
] | 19 | 2021-07-13T09:19:40.000Z | 2022-02-19T04:14:23.000Z | Chapter10/Files/lambda/releaseChange/index.py | Muthuuk/Automated-Machine-Learning-on-AWS | e232aee0d89c066c8f6f95522a45f2d25495db1c | [
"MIT"
] | null | null | null | Chapter10/Files/lambda/releaseChange/index.py | Muthuuk/Automated-Machine-Learning-on-AWS | e232aee0d89c066c8f6f95522a45f2d25495db1c | [
"MIT"
] | 9 | 2021-07-25T05:16:21.000Z | 2022-02-20T03:47:36.000Z | import os
import logging
import boto3
import botocore
from botocore.exceptions import ClientError
logger = logging.getLogger()
logger.setLevel(logging.INFO)
cp = boto3.client("codepipeline")
def lambda_handler(event, context):
logger.debug("## Environment Variables ##")
logger.debug(os.environ)
logger.de... | 30.225806 | 85 | 0.690502 |
2416102c4b70e3f0213fc8140134f38991a4ee72 | 2,008 | py | Python | Knil Dungeon (prototype 1)/Knil.py | WexyR/KNIL | b81c5d4025d1f4e1607b0e948c4611cff0fdbc2e | [
"MIT"
] | null | null | null | Knil Dungeon (prototype 1)/Knil.py | WexyR/KNIL | b81c5d4025d1f4e1607b0e948c4611cff0fdbc2e | [
"MIT"
] | null | null | null | Knil Dungeon (prototype 1)/Knil.py | WexyR/KNIL | b81c5d4025d1f4e1607b0e948c4611cff0fdbc2e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
from Tools import *
import Menu
import PNJ
import Background
translation = {"UP":("y", -1), "LEFT":("x", -1), "DOWN":("y", 1), "RIGHT":("x", 1)}
def create(x, y):
knil = dict()
knil["x"] = x # position relative par rapport au (0, 0) de l'écran
knil["y"] = y # /... | 23.348837 | 84 | 0.564741 |
82ecd27ef72ccbb1e6b708dd09b70cdffb859c67 | 5,318 | py | Python | image/python/scrtoimg.py | varmfskii/zxnext_tools | eddd4e9a4c00cb3fd6882f77b09accf88285dc54 | [
"MIT"
] | 25 | 2019-02-15T22:44:50.000Z | 2021-09-08T19:01:01.000Z | image/python/scrtoimg.py | varmfskii/zxnext_tools | eddd4e9a4c00cb3fd6882f77b09accf88285dc54 | [
"MIT"
] | 2 | 2020-03-06T15:44:55.000Z | 2020-03-06T15:45:55.000Z | image/python/scrtoimg.py | varmfskii/zxnext_tools | eddd4e9a4c00cb3fd6882f77b09accf88285dc54 | [
"MIT"
] | 1 | 2021-04-01T15:28:49.000Z | 2021-04-01T15:28:49.000Z | #!/usr/bin/env python3
from PIL import Image
import numpy as np
import zxntools as zxn
import sys
NAME = 'scrtoimg'
VERSION = '1.00.00'
DATE = "11 Apr 2021"
def my_help(name):
version()
sys.stderr.write(
("Usage: {} [<options>] [<infile>] [<outfile>]\n"
"\toptions are\n"
"\t-h\t--he... | 26.457711 | 118 | 0.520873 |
3ffb39f9d47e2e0bb84f70e6778ae11c162494e6 | 16,406 | py | Python | lab2/MultiHeadlineAndTickPrediction.py | Tornadoofsoul/StockMarketML | 4d9ad5a2df59a109d7e4aa25353609244188e9ea | [
"MIT"
] | 38 | 2017-10-21T16:55:37.000Z | 2022-01-28T02:40:58.000Z | lab2/MultiHeadlineAndTickPrediction.py | Tornadoofsoul/StockMarketML | 4d9ad5a2df59a109d7e4aa25353609244188e9ea | [
"MIT"
] | 11 | 2017-10-12T23:41:29.000Z | 2018-05-20T15:57:22.000Z | lab2/MultiHeadlineAndTickPrediction.py | Tornadoofsoul/StockMarketML | 4d9ad5a2df59a109d7e4aa25353609244188e9ea | [
"MIT"
] | 9 | 2018-01-07T12:21:14.000Z | 2022-01-28T02:41:01.000Z |
# coding: utf-8
# In[1]:
# Imports
from datetime import datetime, timedelta
from Database import db
import numpy as np
import pickle
import os
import re
import matplotlib.pyplot as plt
from tqdm import tqdm_notebook
from keras.optimizers import RMSprop
from keras.models import Sequential, load_model, Model
fro... | 32.295276 | 145 | 0.578874 |
e196d0dd3cb7acfeef453c5d4ecb175aaebcff1e | 5,854 | py | Python | profiles/tests/unit_test_views.py | jordifierro/pachatary-api | c03ad67ceb856068daa6d082091372eb1ed3d009 | [
"MIT"
] | 3 | 2018-12-05T16:44:59.000Z | 2020-08-01T14:12:32.000Z | profiles/tests/unit_test_views.py | jordifierro/pachatary-api | c03ad67ceb856068daa6d082091372eb1ed3d009 | [
"MIT"
] | 6 | 2020-06-03T15:56:59.000Z | 2022-02-10T07:23:55.000Z | profiles/tests/unit_test_views.py | jordifierro/pachatary-api | c03ad67ceb856068daa6d082091372eb1ed3d009 | [
"MIT"
] | null | null | null | from mock import Mock
from pachatary.entities import Picture
from profiles.entities import Profile
from profiles.views import ProfileView, UploadProfilePictureView
class TestProfileView:
def test_returns_profile(self):
TestProfileView.ScenarioMaker() \
.given_an_interactor_that_returns_p... | 46.094488 | 108 | 0.558763 |
2e2e088751df676a2acac2152f4200c0f80ba8aa | 25 | py | Python | hello.py | code-in527/OSGeo-HelloWorld | c76bc09f786e29817cbb9a50c35a8338b8503bbf | [
"Unlicense"
] | null | null | null | hello.py | code-in527/OSGeo-HelloWorld | c76bc09f786e29817cbb9a50c35a8338b8503bbf | [
"Unlicense"
] | 1 | 2019-12-06T22:30:14.000Z | 2019-12-06T22:30:14.000Z | hello.py | code-in527/OSGeo-HelloWorld | c76bc09f786e29817cbb9a50c35a8338b8503bbf | [
"Unlicense"
] | null | null | null | print("Hello World 2.0")
| 12.5 | 24 | 0.68 |
ddca2a71828acf91a49b556f62e959d6dbe2949f | 30,953 | py | Python | python/pyspark/serializers.py | jeremyjliu/spark | 5154b7b409d1c39240f25ab32ce35b75ed54a2fa | [
"Apache-2.0"
] | 2 | 2019-06-28T12:17:22.000Z | 2019-12-02T11:51:23.000Z | python/pyspark/serializers.py | hqbhoho/spark | 5c55812400e1e0a8aaeb50a50be106e80c916c86 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5 | 2019-11-14T13:17:32.000Z | 2021-01-20T23:58:33.000Z | python/pyspark/serializers.py | hqbhoho/spark | 5c55812400e1e0a8aaeb50a50be106e80c916c86 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2021-08-03T12:22:27.000Z | 2021-08-03T12:22:27.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 34.545759 | 100 | 0.642167 |
29fa3b19579dcf19835d3145e77a966a563b21d5 | 5,710 | py | Python | gbtsearch.py | ShenDezhou/INF | 610e7fac004c633e923ae002ac5170fd93c16de4 | [
"Apache-2.0"
] | null | null | null | gbtsearch.py | ShenDezhou/INF | 610e7fac004c633e923ae002ac5170fd93c16de4 | [
"Apache-2.0"
] | null | null | null | gbtsearch.py | ShenDezhou/INF | 610e7fac004c633e923ae002ac5170fd93c16de4 | [
"Apache-2.0"
] | null | null | null | import numpy
import pandas
from sklearn.metrics import mean_squared_error, r2_score
import joblib
from sklearn.model_selection import train_test_split, GridSearchCV
from sklearn.ensemble import GradientBoostingClassifier
# {'mean_fit_time': array([1229.10919428, 1228.10097528, 1269.69574928, 1266.0566771 ,
# 12... | 62.747253 | 680 | 0.672504 |
943db50ff977665987695d74ba64794710702eb5 | 3,705 | py | Python | oe_utils/scripts/rocs.py | skearnes/color-features | a6af3686c82a5d1d6b68341fe5e5b16e8e4ed356 | [
"BSD-3-Clause"
] | 5 | 2016-06-07T04:17:24.000Z | 2021-05-27T07:41:57.000Z | oe_utils/scripts/rocs.py | skearnes/color-features | a6af3686c82a5d1d6b68341fe5e5b16e8e4ed356 | [
"BSD-3-Clause"
] | 1 | 2018-04-28T14:40:26.000Z | 2018-05-19T21:55:47.000Z | oe_utils/scripts/rocs.py | skearnes/color-features | a6af3686c82a5d1d6b68341fe5e5b16e8e4ed356 | [
"BSD-3-Clause"
] | 1 | 2018-12-06T22:54:43.000Z | 2018-12-06T22:54:43.000Z | #!/usr/bin/env python
"""
Get ROCS overlays.
"""
__author__ = "Steven Kearnes"
__copyright__ = "Copyright 2014, Stanford University"
__license__ = "3-clause BSD"
import argparse
import collections
from functools import partial
import numpy as np
from oe_utils.chem import MolReader
from oe_utils.scripts import get_ma... | 31.398305 | 73 | 0.640216 |
40809d2759c55112e863a806219885ff538c1afe | 914 | py | Python | tests/components/cloud/__init__.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | tests/components/cloud/__init__.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 31,101 | 2020-03-02T13:00:16.000Z | 2022-03-31T23:57:36.000Z | tests/components/cloud/__init__.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Tests for the cloud component."""
from unittest.mock import AsyncMock, patch
from homeassistant.components import cloud
from homeassistant.components.cloud import const
from homeassistant.setup import async_setup_component
async def mock_cloud(hass, config=None):
"""Mock cloud."""
assert await async_setu... | 32.642857 | 83 | 0.731947 |
3ccd462ae9b3d38d044e44b83a0dd3d4bf33e921 | 112 | py | Python | app/main/serializer/__init__.py | by46/coffee | f12e1e95f12da7e322a432a6386a1147c5549c3b | [
"MIT"
] | null | null | null | app/main/serializer/__init__.py | by46/coffee | f12e1e95f12da7e322a432a6386a1147c5549c3b | [
"MIT"
] | null | null | null | app/main/serializer/__init__.py | by46/coffee | f12e1e95f12da7e322a432a6386a1147c5549c3b | [
"MIT"
] | null | null | null | from .coffee import CoffeeResource
from .vendor import VendorResource
from .feedback import FeedbackResource
| 28 | 39 | 0.839286 |
e208305fc65ca4bd7a30c2833ce25704e4a07561 | 45,033 | py | Python | tests/auth_tests/test_forms.py | KaushikSathvara/django | 3b9fe906bf28d2e748ce4d9a1af5fbcd5df48946 | [
"BSD-3-Clause",
"0BSD"
] | 61,676 | 2015-01-01T00:05:13.000Z | 2022-03-31T20:37:54.000Z | tests/auth_tests/test_forms.py | KaushikSathvara/django | 3b9fe906bf28d2e748ce4d9a1af5fbcd5df48946 | [
"BSD-3-Clause",
"0BSD"
] | 8,884 | 2015-01-01T00:12:05.000Z | 2022-03-31T19:53:11.000Z | tests/auth_tests/test_forms.py | mustafa0x/django | d7394cfa13a4d1a02356e3a83e10ec100fbb9948 | [
"BSD-3-Clause",
"0BSD"
] | 33,143 | 2015-01-01T02:04:52.000Z | 2022-03-31T19:42:46.000Z | import datetime
import re
from unittest import mock
from django.contrib.auth.forms import (
AdminPasswordChangeForm, AuthenticationForm, PasswordChangeForm,
PasswordResetForm, ReadOnlyPasswordHashField, ReadOnlyPasswordHashWidget,
SetPasswordForm, UserChangeForm, UserCreationForm,
)
from django.contrib.aut... | 40.827743 | 119 | 0.635556 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.