hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7d61c58c24d592d74a50b068870296aad2a660fb | 321 | py | Python | desktop/core/ext-py/eventlet-0.9.14/eventlet/green/threading.py | digideskio/hortonworks-sandbox | dd8e95c91faee3daa094707baeb94c3953b41efa | [
"Apache-2.0"
] | 19 | 2015-05-01T19:59:03.000Z | 2021-12-09T08:03:16.000Z | eventlet/green/threading.py | Transisto/bitHopper | b4a946843b340c0b90c30f60aa15976002cf686e | [
"MIT"
] | 1 | 2018-01-03T15:26:49.000Z | 2018-01-03T15:26:49.000Z | eventlet/green/threading.py | Transisto/bitHopper | b4a946843b340c0b90c30f60aa15976002cf686e | [
"MIT"
] | 30 | 2015-03-25T19:40:07.000Z | 2021-05-28T22:59:26.000Z | from eventlet import patcher
from eventlet.green import thread
from eventlet.green import time
__patched__ = ['_start_new_thread', '_allocate_lock', '_get_ident', '_sleep',
'local', 'stack_size', 'Lock']
patcher.inject('threading',
globals(),
('thread', thread),
('time', time))
del patcher... | 22.928571 | 77 | 0.676012 |
564bc0e1d5761db07dbed7860dfa5269ec2e3a8f | 66 | py | Python | tests/__init__.py | olendorf/coop_evolve | 147b987088bfd6b8da23c3775e8b871ee19518b3 | [
"Apache-2.0"
] | null | null | null | tests/__init__.py | olendorf/coop_evolve | 147b987088bfd6b8da23c3775e8b871ee19518b3 | [
"Apache-2.0"
] | 5 | 2017-06-16T17:39:50.000Z | 2019-11-13T14:49:44.000Z | tests/__init__.py | olendorf/coop_evolve | 147b987088bfd6b8da23c3775e8b871ee19518b3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Unit test package for coop_evolve."""
| 16.5 | 40 | 0.590909 |
c0e33eae3e6ba730edd04f45c62c9395b794c571 | 1,747 | py | Python | test/test_contract_rabin.py | sCrypt-Inc/py-scryptlib | 58aa2d8dca36b42ea032825f1bfc01e2d9a65424 | [
"MIT"
] | 7 | 2021-11-14T20:10:29.000Z | 2022-02-26T10:05:07.000Z | test/test_contract_rabin.py | sCrypt-Inc/py-scryptlib | 58aa2d8dca36b42ea032825f1bfc01e2d9a65424 | [
"MIT"
] | 1 | 2021-08-12T16:50:42.000Z | 2021-09-08T20:13:26.000Z | test/test_contract_rabin.py | sCrypt-Inc/scryptlib-python | 4df358e89231bf9c9698240d17e06f04b61218d3 | [
"MIT"
] | 1 | 2021-10-16T23:46:23.000Z | 2021-10-16T23:46:23.000Z | import pytest
import rabin
import scryptlib.utils
import scryptlib.contract
from scryptlib.types import Int, PubKey, Sig, SigHashPreimage, Bytes
import bitcoinx
from bitcoinx import PrivateKey, TxOutput, SigHash, pack_byte, Script
contract = './test/res/rabin.scrypt'
compiler_result = scryptlib.utils.compile_contr... | 24.605634 | 69 | 0.65083 |
0e19fdc5a4a06e7d17c90818adc0cbae509ff242 | 1,931 | py | Python | __init__.py | pbiernat/ripr | 223954f4b2e1283239c80df9ea434050da710de7 | [
"MIT"
] | 338 | 2017-01-16T05:05:22.000Z | 2022-02-21T00:39:30.000Z | __init__.py | pbiernat/ripr | 223954f4b2e1283239c80df9ea434050da710de7 | [
"MIT"
] | 16 | 2017-01-16T05:00:19.000Z | 2020-01-17T16:11:37.000Z | __init__.py | pbiernat/ripr | 223954f4b2e1283239c80df9ea434050da710de7 | [
"MIT"
] | 34 | 2017-01-20T05:29:34.000Z | 2021-08-16T04:08:25.000Z | import sys
if (sys.platform == 'win32'):
if sys.version_info[0] >= 3:
sys.path.append("C:\\Python37\\lib\\site-packages\\PyQt5")
else:
sys.path.append("C:\\Python27\\lib\\site-packages\\PyQt5")
try:
from binaryninja import *
# Do not try to load if this is hit from "headless"/python... | 35.109091 | 128 | 0.66753 |
ac6843aa61fd69768aab86f11747b601b9d83b4f | 21,966 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/operations/_express_route_circuit_peerings_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 2 | 2019-08-23T21:14:00.000Z | 2021-09-07T18:32:34.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/operations/_express_route_circuit_peerings_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 4 | 2019-04-17T17:57:49.000Z | 2020-04-24T21:11:22.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/operations/_express_route_circuit_peerings_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.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 may ... | 49.696833 | 220 | 0.666348 |
21b005df190d657d45f6613ae5adf88d618df629 | 3,384 | py | Python | pliers/extractors/models.py | rogilmore/pliers | 00ee12be4a917f466d62f01bd091166fd0946b9c | [
"BSD-3-Clause"
] | 1 | 2019-04-17T16:32:07.000Z | 2019-04-17T16:32:07.000Z | pliers/extractors/models.py | rogilmore/pliers | 00ee12be4a917f466d62f01bd091166fd0946b9c | [
"BSD-3-Clause"
] | 1 | 2018-11-16T17:20:03.000Z | 2018-11-16T17:20:03.000Z | pliers/extractors/models.py | rogilmore/pliers | 00ee12be4a917f466d62f01bd091166fd0946b9c | [
"BSD-3-Clause"
] | null | null | null | ''' Extractor classes based on pre-trained models. '''
import os
import tempfile
import tarfile
import subprocess
import re
import requests
from pliers.extractors.image import ImageExtractor
from pliers.extractors.base import ExtractorResult
class TensorFlowInceptionV3Extractor(ImageExtractor):
''' Labels objec... | 38.896552 | 102 | 0.64273 |
e319f1769f89410247d7d58ad8b65388f593ea4a | 395 | py | Python | Challenges/Facebook/problem_20.py | JeremySomsouk/DailyCodingProblem | ca4e19571b175d92a913b5b373a6f17fccd87731 | [
"Unlicense"
] | 54 | 2019-03-14T21:27:13.000Z | 2021-12-08T12:58:08.000Z | Challenges/Facebook/problem_20.py | JeremySomsouk/DailyCodingProblem | ca4e19571b175d92a913b5b373a6f17fccd87731 | [
"Unlicense"
] | null | null | null | Challenges/Facebook/problem_20.py | JeremySomsouk/DailyCodingProblem | ca4e19571b175d92a913b5b373a6f17fccd87731 | [
"Unlicense"
] | 8 | 2020-02-06T23:28:01.000Z | 2021-08-05T20:33:16.000Z | """ Asked by: Facebook [Medium].
Given an array of numbers representing the stock prices of a company in chronological order and an integer k,
return the maximum profit you can make from k buys and sells. You must buy the stock before you can sell it,
and you must sell the stock before you can buy it again.
For exa... | 39.5 | 110 | 0.731646 |
afb62a0dd4ba36fa75ca51b736ee1f577a75d84c | 889 | py | Python | ecommerce/urls.py | iasmini/ecommerce | 42ab2761800ea08989a3b206f6524d798835dbed | [
"MIT"
] | null | null | null | ecommerce/urls.py | iasmini/ecommerce | 42ab2761800ea08989a3b206f6524d798835dbed | [
"MIT"
] | null | null | null | ecommerce/urls.py | iasmini/ecommerce | 42ab2761800ea08989a3b206f6524d798835dbed | [
"MIT"
] | null | null | null | """ecommerce URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-bas... | 34.192308 | 77 | 0.705287 |
1391dcf66dac22361c2d5499a7c1e71d0e1b33dd | 1,534 | py | Python | shared/templates/file_owner/template.py | deperrone/content | caaff27f01a1d6c15da461f9fafe26090e8fdd18 | [
"BSD-3-Clause"
] | 1,138 | 2018-09-05T06:31:44.000Z | 2022-03-31T03:38:24.000Z | shared/templates/file_owner/template.py | deperrone/content | caaff27f01a1d6c15da461f9fafe26090e8fdd18 | [
"BSD-3-Clause"
] | 4,743 | 2018-09-04T15:14:04.000Z | 2022-03-31T23:17:57.000Z | shared/templates/file_owner/template.py | deperrone/content | caaff27f01a1d6c15da461f9fafe26090e8fdd18 | [
"BSD-3-Clause"
] | 400 | 2018-09-08T20:08:49.000Z | 2022-03-30T20:54:32.000Z | from ssg.utils import parse_template_boolean_value, check_conflict_regex_directory
def _file_owner_groupowner_permissions_regex(data):
# this avoids code duplicates
if isinstance(data["filepath"], str):
data["filepath"] = [data["filepath"]]
if "file_regex" in data:
# we can have a list of ... | 41.459459 | 118 | 0.634941 |
f16dcdfcbc1e123d3a37e09aeebcbc7aca0ba170 | 8,063 | py | Python | tests/contrib/hooks/test_gcp_dataflow_hook.py | abhishek-ch/incubator-airflow | 3358551c8e73d9019900f7a85f18ebfd88591450 | [
"Apache-2.0"
] | 4 | 2015-11-12T10:58:54.000Z | 2017-08-05T06:41:36.000Z | tests/contrib/hooks/test_gcp_dataflow_hook.py | abhishek-ch/incubator-airflow | 3358551c8e73d9019900f7a85f18ebfd88591450 | [
"Apache-2.0"
] | 9 | 2016-01-14T18:06:48.000Z | 2018-10-02T16:32:51.000Z | tests/contrib/hooks/test_gcp_dataflow_hook.py | abhishek-ch/incubator-airflow | 3358551c8e73d9019900f7a85f18ebfd88591450 | [
"Apache-2.0"
] | 2 | 2015-12-14T11:38:49.000Z | 2018-03-26T15:03:07.000Z | # -*- coding: utf-8 -*-
#
# 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
#... | 42.436842 | 89 | 0.671958 |
ece46545a57bc999ddf48e8063372722a6522406 | 1,775 | py | Python | target_snowflake/__init__.py | sicarul/target-snowflake | 5c52c5d58e8e0a21a6ad6aa04b351392302fe007 | [
"MIT"
] | null | null | null | target_snowflake/__init__.py | sicarul/target-snowflake | 5c52c5d58e8e0a21a6ad6aa04b351392302fe007 | [
"MIT"
] | null | null | null | target_snowflake/__init__.py | sicarul/target-snowflake | 5c52c5d58e8e0a21a6ad6aa04b351392302fe007 | [
"MIT"
] | null | null | null | import singer
from singer import utils
from target_postgres import target_tools
from target_redshift.s3 import S3
from target_snowflake.connection import connect
from target_snowflake.snowflake import SnowflakeTarget
LOGGER = singer.get_logger()
REQUIRED_CONFIG_KEYS = [
'snowflake_account',
'snowflake_wareho... | 30.084746 | 78 | 0.643944 |
41dddce27f852725643ba5ffaf52496fcbeb7f6e | 314 | py | Python | QUANTAXIS/QAIndicator/indicators.py | 5267/QUANTAXIS | c3f38b805939e33309e2da7ea8cb32d245c3edfb | [
"MIT"
] | 5 | 2017-06-30T04:42:29.000Z | 2018-01-05T09:20:28.000Z | QUANTAXIS/QAIndicator/indicators.py | 5267/QUANTAXIS | c3f38b805939e33309e2da7ea8cb32d245c3edfb | [
"MIT"
] | null | null | null | QUANTAXIS/QAIndicator/indicators.py | 5267/QUANTAXIS | c3f38b805939e33309e2da7ea8cb32d245c3edfb | [
"MIT"
] | null | null | null | #coding:utf-8
import pandas as pd
"""
QUANTAXIS 指标计算
"""
def QA_indicator_ma(data,ma):
return pd.rolling_mean(data, ma)
def QA_indicator_sma(data,ma):
return pd.ewma(data, span=ma)
def QA_indicator_lb(data):
pass
def QA_indicator_rsi(N1=6, N2=12, N3=24):
"""
RSI 相对强弱指标
"""
pass | 14.952381 | 41 | 0.652866 |
5067ffbf2dc4b477c1b73bc79861764f9fdbbecc | 2,229 | py | Python | mongoengine/queryset/manager.py | DonQueso89/mongoengine | d73f0bb1af7fa63424137174da76f89dca762010 | [
"MIT"
] | 2 | 2020-02-03T13:46:50.000Z | 2020-08-12T23:45:41.000Z | mongoengine/queryset/manager.py | DonQueso89/mongoengine | d73f0bb1af7fa63424137174da76f89dca762010 | [
"MIT"
] | 6 | 2021-03-02T01:30:46.000Z | 2022-02-26T03:15:16.000Z | mongoengine/queryset/manager.py | DonQueso89/mongoengine | d73f0bb1af7fa63424137174da76f89dca762010 | [
"MIT"
] | 2 | 2016-08-24T00:58:34.000Z | 2017-05-18T20:15:50.000Z | from functools import partial
from mongoengine.queryset.queryset import QuerySet
__all__ = ("queryset_manager", "QuerySetManager")
class QuerySetManager(object):
"""
The default QuerySet Manager.
Custom QuerySet Manager functions can extend this class and users can
add extra queryset functionality. ... | 38.431034 | 79 | 0.68865 |
1b491ee57eb658c59e3f5d22b6882ffb60b474c3 | 5,640 | py | Python | dm_control/entities/manipulators/kinova/jaco_arm.py | h8907283/dm_control | fe4449606742a7b8bec81930790b98244cddc538 | [
"Apache-2.0"
] | 2,863 | 2018-01-03T01:38:52.000Z | 2022-03-30T09:49:50.000Z | dm_control/entities/manipulators/kinova/jaco_arm.py | krakhit/dm_control | 4e1a35595124742015ae0c7a829e099a5aa100f5 | [
"Apache-2.0"
] | 266 | 2018-01-03T16:00:04.000Z | 2022-03-26T15:45:48.000Z | dm_control/entities/manipulators/kinova/jaco_arm.py | krakhit/dm_control | 4e1a35595124742015ae0c7a829e099a5aa100f5 | [
"Apache-2.0"
] | 580 | 2018-01-03T03:17:27.000Z | 2022-03-31T19:29:32.000Z | # Copyright 2019 The dm_control Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 36.387097 | 175 | 0.725355 |
0b9809b2c18e28f3af61ecc6021ff494abd1e0f4 | 533 | py | Python | setup.py | soumyarani/mopac | 72f10fdd3ea3c9c61b6c808ca07ee9031b7d4aa8 | [
"MIT"
] | 20 | 2021-03-16T08:18:01.000Z | 2022-03-12T13:46:43.000Z | setup.py | soumyarani/mopac | 72f10fdd3ea3c9c61b6c808ca07ee9031b7d4aa8 | [
"MIT"
] | 1 | 2021-05-13T14:49:25.000Z | 2021-05-13T19:45:26.000Z | setup.py | soumyarani/mopac | 72f10fdd3ea3c9c61b6c808ca07ee9031b7d4aa8 | [
"MIT"
] | 5 | 2020-11-01T15:46:39.000Z | 2021-07-30T13:12:06.000Z | from distutils.core import setup
from setuptools import find_packages
setup(
name='mopac',
packages=find_packages(),
version='0.1',
description='Model-based policy optimization',
long_description=open('./README.md').read(),
author='',
author_email='',
url='',
entry_points={
... | 23.173913 | 62 | 0.626642 |
a355f8cc7ba43ffb4fffa04559113ae990a50e20 | 536 | py | Python | news/news/items.py | ayueaa/Some-Spiders | 4cf085e55eab822c08d06b62099d1c235d1840ae | [
"MIT"
] | 5 | 2021-09-08T13:18:46.000Z | 2022-03-08T03:04:43.000Z | news/news/items.py | ayueaa/Some-Spiders | 4cf085e55eab822c08d06b62099d1c235d1840ae | [
"MIT"
] | 6 | 2021-03-19T00:38:28.000Z | 2022-03-11T23:47:06.000Z | news/news/items.py | ayueaa/Some-Spiders | 4cf085e55eab822c08d06b62099d1c235d1840ae | [
"MIT"
] | 3 | 2020-01-09T11:41:42.000Z | 2021-12-11T22:47:16.000Z | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class NewsItem(scrapy.Item):
title = scrapy.Field()
abstract = scrapy.Field()
chinese_tag = scrapy.Field()
comments_count = scrapy.Fie... | 20.615385 | 52 | 0.660448 |
996823546158c5cf84880a83865b45e2195bc5fe | 47,738 | py | Python | benchmarking/plasmid_reconstruction/scripts/gather_quast_results.py | lisavader/ST131 | 781484c2cbf9fd0a2d4be8318cb12ebeee7edaec | [
"MIT"
] | null | null | null | benchmarking/plasmid_reconstruction/scripts/gather_quast_results.py | lisavader/ST131 | 781484c2cbf9fd0a2d4be8318cb12ebeee7edaec | [
"MIT"
] | null | null | null | benchmarking/plasmid_reconstruction/scripts/gather_quast_results.py | lisavader/ST131 | 781484c2cbf9fd0a2d4be8318cb12ebeee7edaec | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Oct 16 10:21:35 2020
@author: jpaganini
"""
import sys
import os
import glob
import fastaparser
import re
import shutil
from collections import defaultdict
#1. Create a dictionary with the lengths of each of the contigs included in the predictions
b... | 70.514032 | 306 | 0.458126 |
bda29ff6418d1c9ace75b6928ce21eefac402932 | 5,573 | py | Python | lib/python2.7/site-packages/ryu/app/simple_switch_13.py | nishaero/wifi-userseg-ryu | 1132f2c813b79eff755bdd1a9e73e7ad3980af7c | [
"Apache-2.0"
] | null | null | null | lib/python2.7/site-packages/ryu/app/simple_switch_13.py | nishaero/wifi-userseg-ryu | 1132f2c813b79eff755bdd1a9e73e7ad3980af7c | [
"Apache-2.0"
] | null | null | null | lib/python2.7/site-packages/ryu/app/simple_switch_13.py | nishaero/wifi-userseg-ryu | 1132f2c813b79eff755bdd1a9e73e7ad3980af7c | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2011 Nippon Telegraph and Telephone Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 38.171233 | 104 | 0.64346 |
01f7f59f404d63f0b9057dc5faae8d325fac16e6 | 402 | py | Python | api/migrations/0060_auto_20210106_1120.py | matttbe/patchew | 25c7f60ea21878236a75c64421f950de4af80050 | [
"MIT"
] | 54 | 2016-08-06T18:04:22.000Z | 2022-02-24T22:55:07.000Z | api/migrations/0060_auto_20210106_1120.py | matttbe/patchew | 25c7f60ea21878236a75c64421f950de4af80050 | [
"MIT"
] | 125 | 2016-06-21T01:06:29.000Z | 2022-03-25T16:59:18.000Z | api/migrations/0060_auto_20210106_1120.py | matttbe/patchew | 25c7f60ea21878236a75c64421f950de4af80050 | [
"MIT"
] | 17 | 2016-08-23T15:44:46.000Z | 2021-11-22T16:13:36.000Z | # Generated by Django 3.1 on 2021-01-06 11:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0059_populate_topic_latest'),
]
operations = [
migrations.AlterField(
model_name='message',
name='is_merged',
... | 21.157895 | 65 | 0.609453 |
9b73e22d698c9851d2f638183796745c47cedfe5 | 6,053 | py | Python | debian/pymindeps.py | ystk/debian-python3.1 | 6241444a6994140621d1b143a2d6b311b184366a | [
"PSF-2.0"
] | null | null | null | debian/pymindeps.py | ystk/debian-python3.1 | 6241444a6994140621d1b143a2d6b311b184366a | [
"PSF-2.0"
] | null | null | null | debian/pymindeps.py | ystk/debian-python3.1 | 6241444a6994140621d1b143a2d6b311b184366a | [
"PSF-2.0"
] | null | null | null | #! /usr/bin/python
# Matthias Klose
# Modified to only exclude module imports from a given module.
# Copyright 2004 Toby Dickenson
#
# 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 ... | 34.988439 | 85 | 0.58599 |
56d0d6f38f8806e68c46f2972864b44da1e851d7 | 1,709 | py | Python | app/core/migrations/0001_initial.py | kubousky/recipe_app_api | 9f3bebcf7de9cea5dd1884b158341566396b99d1 | [
"MIT"
] | null | null | null | app/core/migrations/0001_initial.py | kubousky/recipe_app_api | 9f3bebcf7de9cea5dd1884b158341566396b99d1 | [
"MIT"
] | null | null | null | app/core/migrations/0001_initial.py | kubousky/recipe_app_api | 9f3bebcf7de9cea5dd1884b158341566396b99d1 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2021-05-28 19:48
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0009_alter_user_last_name_max_length'),
]
operations = [
migrations.CreateModel(
name='User',
... | 50.264706 | 266 | 0.63897 |
fb6d60da985709eaec690014706942c1bc4c2865 | 341 | py | Python | 22_itictactoe/typehints2.py | sidsid14/tiny_python_projects | 5f98d6416388adbb77f8174df0cec5180a0a4c0c | [
"MIT"
] | 742 | 2020-01-30T12:08:38.000Z | 2022-03-28T00:17:12.000Z | 22_itictactoe/typehints2.py | sidsid14/tiny_python_projects | 5f98d6416388adbb77f8174df0cec5180a0a4c0c | [
"MIT"
] | 15 | 2020-08-08T07:09:51.000Z | 2022-02-15T19:02:10.000Z | 22_itictactoe/typehints2.py | sidsid14/tiny_python_projects | 5f98d6416388adbb77f8174df0cec5180a0a4c0c | [
"MIT"
] | 1,472 | 2020-01-21T01:50:59.000Z | 2022-03-31T08:29:33.000Z | #!/usr/bin/env python3
""" Demonstrating type hints """
from typing import List, NamedTuple, Optional
class State(NamedTuple):
board: List[str] = list('.' * 9)
player: str = 'X'
quit: bool = False
draw: bool = False
error: Optional[str] = None
winner: Optional[str] = None
state = State(quit... | 17.947368 | 45 | 0.639296 |
ced603b6b2b2c3266f8f6c05df13f8b334fe1658 | 8,823 | py | Python | tools/pepper.py | thezida/Analiza-pona-anja-djeteta-tijekomslobodne-igre-kori-tenjem-dubokihneuronskih-mre-a | bbb9b65795ad704d1654c9876f4923e30c3e9d35 | [
"MIT"
] | null | null | null | tools/pepper.py | thezida/Analiza-pona-anja-djeteta-tijekomslobodne-igre-kori-tenjem-dubokihneuronskih-mre-a | bbb9b65795ad704d1654c9876f4923e30c3e9d35 | [
"MIT"
] | null | null | null | tools/pepper.py | thezida/Analiza-pona-anja-djeteta-tijekomslobodne-igre-kori-tenjem-dubokihneuronskih-mre-a | bbb9b65795ad704d1654c9876f4923e30c3e9d35 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- encoding: UTF-8 -*-
"""Example: Shows how to show live images from Nao using PyQt"""
import qi
import argparse
import sys
from PyQt4.QtGui import QWidget, QImage, QApplication, QPainter
import vision_definitions
import _init_paths
from fast_rcnn.config import cfg
import network
import Ima... | 33.29434 | 175 | 0.614417 |
8d1407f8f38b9b4bae2b5069b9cbc472ad5f08bb | 487 | py | Python | codorphin/wsgi.py | alireza83/codorphin | 000908d8da22d02d351e80a5b7391733cf4519db | [
"MIT"
] | null | null | null | codorphin/wsgi.py | alireza83/codorphin | 000908d8da22d02d351e80a5b7391733cf4519db | [
"MIT"
] | null | null | null | codorphin/wsgi.py | alireza83/codorphin | 000908d8da22d02d351e80a5b7391733cf4519db | [
"MIT"
] | null | null | null | """
WSGI config for codorphin project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
from whitenoise.django import Dja... | 25.631579 | 78 | 0.804928 |
f48ef0641216868f274556d78c84cbc32298418b | 736 | py | Python | app.py | lamesjim/Chess-AI | 1c734cb008ab98df02b08ae1bf48f222ae2662f2 | [
"MIT"
] | 85 | 2016-12-21T04:59:13.000Z | 2022-03-04T02:41:10.000Z | app.py | jameslim1021/Chess-AI | 1c734cb008ab98df02b08ae1bf48f222ae2662f2 | [
"MIT"
] | 3 | 2016-08-06T22:37:15.000Z | 2016-08-12T17:05:55.000Z | app.py | jameslim1021/Chess-AI | 1c734cb008ab98df02b08ae1bf48f222ae2662f2 | [
"MIT"
] | 28 | 2016-10-05T03:06:18.000Z | 2022-01-30T22:01:44.000Z | import os
from flask import Flask, render_template, request, redirect, url_for, send_from_directory, jsonify
from chess_ai import Game_Engine
app = Flask(__name__, static_url_path='/static')
@app.route('/')
def index():
return render_template("index.html")
@app.route('/board', methods=['POST'])
def send_board()... | 27.259259 | 98 | 0.697011 |
44a7089f29496cd92984b07f2c14e5c0b958f987 | 1,542 | py | Python | cleaning_utils/__init__.py | rezashabrang/cleaner-utils | d0181ee1a131e877e66d943323018617aa488433 | [
"MIT"
] | 4 | 2021-12-28T16:37:00.000Z | 2022-02-17T12:02:02.000Z | cleaning_utils/__init__.py | rezashabrang/cleaner-utils | d0181ee1a131e877e66d943323018617aa488433 | [
"MIT"
] | null | null | null | cleaning_utils/__init__.py | rezashabrang/cleaner-utils | d0181ee1a131e877e66d943323018617aa488433 | [
"MIT"
] | null | null | null | """Initiates Package."""
from .address_cleaner import address_cleaner
from .clear_stop_char import clear_stop_char, strip_stars
from .datetime_diff import datetime_diff
from .from_datetime_to_iso import from_datetime_to_iso
from .from_dict_to_iso import (
from_dict_to_iso,
from_gregorian_dict_to_iso,
from_j... | 28.555556 | 68 | 0.777562 |
521cd3ae238c6f4b28313c4864bba354b5bc091a | 1,560 | py | Python | python/paddle/fluid/tests/unittests/test_sampling_id_op.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 17,085 | 2016-11-18T06:40:52.000Z | 2022-03-31T22:52:32.000Z | python/paddle/fluid/tests/unittests/test_sampling_id_op.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 29,769 | 2016-11-18T06:35:22.000Z | 2022-03-31T16:46:15.000Z | python/paddle/fluid/tests/unittests/test_sampling_id_op.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 4,641 | 2016-11-18T07:43:33.000Z | 2022-03-31T15:15:02.000Z | # Copyright (c) 2018 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 app... | 31.836735 | 74 | 0.680769 |
dd8b1c53a6843b261fad8c68e2822a301ea407a6 | 14,871 | py | Python | homeassistant/data_entry_flow.py | DavidDeSloovere/core | 909a20b36d4df6724c955c2ae28cb82fe6d50c2e | [
"Apache-2.0"
] | 4 | 2020-08-10T20:02:24.000Z | 2022-01-31T02:14:22.000Z | homeassistant/data_entry_flow.py | DavidDeSloovere/core | 909a20b36d4df6724c955c2ae28cb82fe6d50c2e | [
"Apache-2.0"
] | 78 | 2020-07-23T07:13:08.000Z | 2022-03-31T06:02:04.000Z | homeassistant/data_entry_flow.py | DavidDeSloovere/core | 909a20b36d4df6724c955c2ae28cb82fe6d50c2e | [
"Apache-2.0"
] | 3 | 2022-01-17T20:10:54.000Z | 2022-01-17T20:17:22.000Z | """Classes to help gather user submissions."""
from __future__ import annotations
import abc
import asyncio
from collections.abc import Mapping
from types import MappingProxyType
from typing import Any, TypedDict
import uuid
import voluptuous as vol
from .core import HomeAssistant, callback
from .exceptions import H... | 32.188312 | 95 | 0.606012 |
e04a3a7e6925072f19f8d0597a216a47ed11d02b | 9,433 | py | Python | sdk/python/pulumi_azure_nextgen/solutions/v20170901/get_application.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/solutions/v20170901/get_application.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/solutions/v20170901/get_application.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 36.003817 | 292 | 0.643698 |
e9706fcf333d36009d784be2f6edfc301bdd4f13 | 10,826 | py | Python | tensorflow_gan/examples/mnist/util.py | jiasenwu/gan | f92aeca269365180125d4e4c57c53cbf5e679299 | [
"Apache-2.0"
] | 1 | 2020-11-08T17:03:56.000Z | 2020-11-08T17:03:56.000Z | tensorflow_gan/examples/mnist/util.py | jiasenwu/gan | f92aeca269365180125d4e4c57c53cbf5e679299 | [
"Apache-2.0"
] | null | null | null | tensorflow_gan/examples/mnist/util.py | jiasenwu/gan | f92aeca269365180125d4e4c57c53cbf5e679299 | [
"Apache-2.0"
] | 1 | 2020-05-22T07:07:46.000Z | 2020-05-22T07:07:46.000Z | # coding=utf-8
# Copyright 2019 The TensorFlow GAN 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 applicabl... | 37.985965 | 86 | 0.765934 |
10f81017906e1a79af2c6dca2a7aa7bfdddcf9e2 | 4,576 | py | Python | onpolicy/scripts/plot/plot_hanabi.py | Chaojidahoufeng/SGroup_RL | df765ace54383982a0c71bfa8ee39a7a8b914545 | [
"MIT"
] | null | null | null | onpolicy/scripts/plot/plot_hanabi.py | Chaojidahoufeng/SGroup_RL | df765ace54383982a0c71bfa8ee39a7a8b914545 | [
"MIT"
] | null | null | null | onpolicy/scripts/plot/plot_hanabi.py | Chaojidahoufeng/SGroup_RL | df765ace54383982a0c71bfa8ee39a7a8b914545 | [
"MIT"
] | null | null | null |
import pandas
import json
import matplotlib.pyplot as plt
import numpy as np
import sys
import os
import matplotlib.animation as animation
from matplotlib.pyplot import MultipleLocator
def moving_average(interval, windowsize):
window = np.ones(int(windowsize)) / float(windowsize)
re = np.convolve(interval, ... | 34.406015 | 85 | 0.607299 |
1552a72d6c2d7007e7d169687baff7694846faf3 | 3,028 | py | Python | Inventory-GitHub-Tools.py | sei-dspooner/nlzr | 93389c82f649a927df235c445053c957e2c9ea56 | [
"MIT"
] | 10 | 2018-03-13T13:34:36.000Z | 2022-01-13T15:34:13.000Z | Inventory-GitHub-Tools.py | sei-dspooner/nlzr | 93389c82f649a927df235c445053c957e2c9ea56 | [
"MIT"
] | 2 | 2020-07-06T13:05:27.000Z | 2020-08-13T17:48:30.000Z | Inventory-GitHub-Tools.py | sei-dspooner/nlzr | 93389c82f649a927df235c445053c957e2c9ea56 | [
"MIT"
] | 6 | 2019-04-10T13:35:32.000Z | 2021-04-23T15:27:41.000Z | #!/usr/bin/python3
import csv
import pathlib
import re
import time
# Requires full path to include a trailing slash
searchPath = "<insert path here>"
#rawFolders is a temp storage list
rawFolders = []
#modFolders takes the raw and modifies it for accuracy
modFolders = []
#gitFolders is really the github tool names
g... | 34.022472 | 162 | 0.6714 |
8e4f3a617754a3cef9200908d9b91a5e89b3b5ed | 629 | py | Python | manage.py | ArRosid/learn-def | bd1bfaf32e12f758a0095b2ac259c5c5e5abf3f8 | [
"MIT"
] | 1 | 2021-10-01T11:13:19.000Z | 2021-10-01T11:13:19.000Z | manage.py | ArRosid/learn-def | bd1bfaf32e12f758a0095b2ac259c5c5e5abf3f8 | [
"MIT"
] | null | null | null | manage.py | ArRosid/learn-def | bd1bfaf32e12f758a0095b2ac259c5c5e5abf3f8 | [
"MIT"
] | 1 | 2022-02-13T16:49:50.000Z | 2022-02-13T16:49:50.000Z | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'learn_drf.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Impo... | 28.590909 | 73 | 0.683625 |
0be72e1b805d061a5a93ded7d675ac31834a031f | 377 | py | Python | tests/bcast_recv.py | ZenLighting/ZenLightSimulator | 974e2806106e534aede35b5a9efd8667c55a6a25 | [
"MIT"
] | null | null | null | tests/bcast_recv.py | ZenLighting/ZenLightSimulator | 974e2806106e534aede35b5a9efd8667c55a6a25 | [
"MIT"
] | null | null | null | tests/bcast_recv.py | ZenLighting/ZenLightSimulator | 974e2806106e534aede35b5a9efd8667c55a6a25 | [
"MIT"
] | null | null | null | import socket
sockfd = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0)
sockfd.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
sockfd.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
sockfd.bind(("", 2000))
print("Socket initialized listening for messages")
while True:
message, addy = sockfd.recvfr... | 31.416667 | 60 | 0.761273 |
ed9e90dd39b6cdb9fb0c3a2e4ecf58b75e4393f9 | 5,504 | py | Python | autocompose/util.py | rapid7/autocompose | de9b97652d055213cd2ce46b0a7d56a68eba6006 | [
"MIT"
] | 3 | 2017-02-01T07:46:34.000Z | 2017-11-17T16:28:44.000Z | autocompose/util.py | rapid7/autocompose | de9b97652d055213cd2ce46b0a7d56a68eba6006 | [
"MIT"
] | null | null | null | autocompose/util.py | rapid7/autocompose | de9b97652d055213cd2ce46b0a7d56a68eba6006 | [
"MIT"
] | 2 | 2017-02-26T21:59:31.000Z | 2021-01-26T10:05:33.000Z | import os
import re
import sys
import yaml
from compose import progress_stream
__autocompose_service_name = None
class ExplicitYamlDumper(yaml.SafeDumper):
"""
A yaml dumper that will never emit aliases.
"""
def ignore_aliases(self, data):
return True
def replace_template_variables(obj, t... | 30.577778 | 110 | 0.649346 |
90aa38a2567480a486649aa6c3060975958941a3 | 2,298 | py | Python | hook.py | gardatech/stockpile | 3e6a0788d04d24c0d83934189c36946f28535d5e | [
"Apache-2.0"
] | 49 | 2019-05-16T01:23:19.000Z | 2022-01-27T13:38:57.000Z | hook.py | gardatech/stockpile | 3e6a0788d04d24c0d83934189c36946f28535d5e | [
"Apache-2.0"
] | 70 | 2019-06-13T12:13:16.000Z | 2022-01-08T05:30:25.000Z | hook.py | gardatech/stockpile | 3e6a0788d04d24c0d83934189c36946f28535d5e | [
"Apache-2.0"
] | 61 | 2019-05-06T01:51:34.000Z | 2022-03-08T02:36:59.000Z | from app.objects.c_obfuscator import Obfuscator
from app.utility.base_world import BaseWorld
from plugins.stockpile.app.stockpile_svc import StockpileService
name = 'Stockpile'
description = 'A stockpile of abilities, adversaries, payloads and planners'
address = '/plugin/stockpile/gui'
access = BaseWorld.Access.RED
... | 48.893617 | 119 | 0.67537 |
f6817d01baa8505e3a070269980ddb99553f757c | 10,667 | py | Python | kaggle_fastai_custom_metrics/kfcm.py | shadab4150/kaggle_fastai_custom_metrics | 94fb55ea4a78ee7767ad803940cc72961f59ac3d | [
"MIT"
] | 2 | 2020-09-08T10:05:39.000Z | 2020-10-10T05:09:25.000Z | kaggle_fastai_custom_metrics/kfcm.py | shadab4150/kaggle_fastai_custom_metrics | 94fb55ea4a78ee7767ad803940cc72961f59ac3d | [
"MIT"
] | 1 | 2020-10-02T00:44:47.000Z | 2020-10-02T00:44:47.000Z | kaggle_fastai_custom_metrics/kfcm.py | shadab4150/kaggle_fastai_custom_metrics | 94fb55ea4a78ee7767ad803940cc72961f59ac3d | [
"MIT"
] | null | null | null | import sklearn
from fastai.vision import *
from scipy.stats import spearmanr
import numpy as np
import pandas as pd
import torch
class column_mean_aucroc(Callback):
'''
Column wise mean AUCROC:
It's for one hot encoded targets only.
The AUCROC is computed for each target column,
and t... | 37.960854 | 131 | 0.622293 |
08d8113e766c281733355958ba858011ae0276ea | 2,717 | py | Python | pyrep/robots/configuration_paths/holonomic_configuration_path.py | liuzhy71/PyRep | f2146e0660bf829197c30c4b652dc502d9535621 | [
"MIT"
] | null | null | null | pyrep/robots/configuration_paths/holonomic_configuration_path.py | liuzhy71/PyRep | f2146e0660bf829197c30c4b652dc502d9535621 | [
"MIT"
] | null | null | null | pyrep/robots/configuration_paths/holonomic_configuration_path.py | liuzhy71/PyRep | f2146e0660bf829197c30c4b652dc502d9535621 | [
"MIT"
] | null | null | null | from PyRep.pyrep.backend import sim, utils
from PyRep.pyrep.robots.configuration_paths.mobile_configuration_path import (
MobileConfigurationPath)
from PyRep.pyrep.const import PYREP_SCRIPT_TYPE
from math import sqrt
class HolonomicConfigurationPath(MobileConfigurationPath):
"""A path expressed in joint confi... | 37.736111 | 90 | 0.621642 |
18c0ca580b6ee96914d3e7a38364432c08a4d6a9 | 712 | py | Python | others/shanon_entropy.py | stworekAsiorek/CRDiS | bb95860bbe75f84d7bac0b7ff982855ebaddf287 | [
"MIT"
] | 1 | 2021-09-07T11:17:38.000Z | 2021-09-07T11:17:38.000Z | others/shanon_entropy.py | KayJay624/SequenceGenerator | bb95860bbe75f84d7bac0b7ff982855ebaddf287 | [
"MIT"
] | null | null | null | others/shanon_entropy.py | KayJay624/SequenceGenerator | bb95860bbe75f84d7bac0b7ff982855ebaddf287 | [
"MIT"
] | 1 | 2019-01-17T18:32:45.000Z | 2019-01-17T18:32:45.000Z | import math, string, sys, fileinput
def range_bytes(): return range(256)
def range_printable(): return (ord(c) for c in string.printable)
def H(data, iterator=range_bytes):
if not data:
return 0
entropy = 0
for x in iterator():
p_x = float(data.count(chr(x)))/len(data)
if p_x > 0:
... | 29.666667 | 65 | 0.581461 |
f6ccc43dbd841053e31ef6e93a06bdc0e13a856c | 1,848 | py | Python | tests/resources/aws.py | peacemaker07/jawsug_sonic_midnight_jaws | 59aa5b9c3222c76e76e49093555d9f628f9ec225 | [
"MIT"
] | 1 | 2020-10-03T01:23:39.000Z | 2020-10-03T01:23:39.000Z | tests/resources/aws.py | peacemaker07/jawsug_sonic_midnight_jaws | 59aa5b9c3222c76e76e49093555d9f628f9ec225 | [
"MIT"
] | null | null | null | tests/resources/aws.py | peacemaker07/jawsug_sonic_midnight_jaws | 59aa5b9c3222c76e76e49093555d9f628f9ec225 | [
"MIT"
] | null | null | null | import os
import boto3
from tests.helper import get_abspath
def setup_s3(bucket_name, obj_key=None):
# bucket
s3 = boto3.resource('s3')
bucket = s3.Bucket(bucket_name)
bucket.create()
# put
if obj_key:
# put image
data = open(os.path.join(get_abspath(), 'GL_LOGO.jpg'), mode=... | 23.1 | 84 | 0.551407 |
a843b91bae71afe3430e684f550ef2bfe61378f3 | 761 | py | Python | backend/capesScrape.py | convoliution/coursolidated | 2134855a7164c47c489feeda67cea5c8ff233aa1 | [
"MIT"
] | 1 | 2018-02-08T06:19:18.000Z | 2018-02-08T06:19:18.000Z | backend/capesScrape.py | convoliution/coursolidated | 2134855a7164c47c489feeda67cea5c8ff233aa1 | [
"MIT"
] | 11 | 2018-02-07T03:54:33.000Z | 2018-03-24T23:13:46.000Z | backend/capesScrape.py | convoliution/coursolidated | 2134855a7164c47c489feeda67cea5c8ff233aa1 | [
"MIT"
] | null | null | null | import csv
import requests
from bs4 import BeautifulSoup
#url = 'http://www.cape.ucsd.edu/responses/Results.aspx?Name=&CourseNumber=CSE+110'
# for other testing purposes
url = 'http://www.ucsd.edu/catalog/courses/BIOL.html'
response = requests.get(url)
html = response.content
soup = BeautifulSoup(html, "lxm... | 26.241379 | 84 | 0.672799 |
84a054e109f3eb7959d8c3a84c8ac4f75044576d | 4,198 | py | Python | misc/sampleapp-android-tests/sampleapp/spacedodgegame_manifestorientationscale.py | zhuyongyong/crosswalk-test-suite | 24f3f8cfa663a365b0a22685d5bd096a637f72db | [
"BSD-3-Clause"
] | null | null | null | misc/sampleapp-android-tests/sampleapp/spacedodgegame_manifestorientationscale.py | zhuyongyong/crosswalk-test-suite | 24f3f8cfa663a365b0a22685d5bd096a637f72db | [
"BSD-3-Clause"
] | null | null | null | misc/sampleapp-android-tests/sampleapp/spacedodgegame_manifestorientationscale.py | zhuyongyong/crosswalk-test-suite | 24f3f8cfa663a365b0a22685d5bd096a637f72db | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2015 Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original copyright notice, this
# list of conditions and t... | 37.150442 | 112 | 0.656265 |
5cffb403e028cfe3c12642c80ca422eecfb606c4 | 1,839 | py | Python | server/tasks/Hamlet/Hamlet_server.py | mkobilev/ares | b080531b53073d7788ef4001ce2ff6c9f49d8e65 | [
"MIT"
] | null | null | null | server/tasks/Hamlet/Hamlet_server.py | mkobilev/ares | b080531b53073d7788ef4001ce2ff6c9f49d8e65 | [
"MIT"
] | null | null | null | server/tasks/Hamlet/Hamlet_server.py | mkobilev/ares | b080531b53073d7788ef4001ce2ff6c9f49d8e65 | [
"MIT"
] | 1 | 2019-06-14T18:52:59.000Z | 2019-06-14T18:52:59.000Z | # -*- coding: utf-8 -*-
import asyncore
import re
import socket
from subprocess import call
import subprocess
import threading
import os
import time
class EchoHandler(asyncore.dispatcher_with_send):
i =0
def handle_read(self):
#print(self)
self.i += 1
data = self.recv(2... | 27.044118 | 107 | 0.522567 |
b1f2731a262d3f6d592cbaf3ccaa20902224ff89 | 78 | py | Python | python/python_backup/PRAC_PYTHON/uy.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/uy.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/uy.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | for i in range(1,6,1):
for j in range(1,10,1):
j=j+2
i=i-1
print i, | 15.6 | 25 | 0.525641 |
be1ff650051742c9880c548c9836467f28f1fef6 | 1,581 | py | Python | 匯入/management/commands/詞彙分級.py | sih4sing5hong5/hue7jip8 | 64ff872e11ce36c3721889f59de92b694735400c | [
"MIT"
] | 15 | 2018-10-15T06:45:50.000Z | 2021-08-10T03:43:00.000Z | 匯入/management/commands/詞彙分級.py | tku609630339/hue7jip8 | 64ff872e11ce36c3721889f59de92b694735400c | [
"MIT"
] | 58 | 2017-08-02T07:26:11.000Z | 2020-11-06T06:50:09.000Z | 匯入/management/commands/詞彙分級.py | sih4sing5hong5/hue7jip8 | 64ff872e11ce36c3721889f59de92b694735400c | [
"MIT"
] | 4 | 2018-07-10T20:10:35.000Z | 2021-05-22T08:49:01.000Z | from http.client import HTTPSConnection
import json
import ssl
from urllib.parse import quote
from 臺灣言語工具.解析整理.拆文分析器 import 拆文分析器
from 臺灣言語服務.models import 訓練過渡格式
from 臺灣言語工具.解析整理.解析錯誤 import 解析錯誤
from 臺灣言語工具.解析整理.型態錯誤 import 型態錯誤
from 匯入.指令 import 匯入枋模
ssl.match_hostname = lambda cert, hostname: True
class Comma... | 26.79661 | 66 | 0.488931 |
0c0fc79fa694be1806969722fea80d879b6cec75 | 900 | py | Python | sdk/pyseele/resoucing/impl.py | rinkako/SeeleFlow | 4b8858f367ef02a568c03c8114e1c1b221208feb | [
"MIT"
] | 3 | 2019-12-20T13:32:34.000Z | 2021-04-27T06:02:28.000Z | sdk/pyseele/resoucing/impl.py | rinkako/SeeleFlow | 4b8858f367ef02a568c03c8114e1c1b221208feb | [
"MIT"
] | null | null | null | sdk/pyseele/resoucing/impl.py | rinkako/SeeleFlow | 4b8858f367ef02a568c03c8114e1c1b221208feb | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
"""
Project Seele
@author : Rinka
@date : 2019/12/17
"""
from pyseele.clazz import ResourcingContext
class ResourceServiceImpl:
"""
Resource Service.
RS is responsible for control workitems life-cycle, and provide work queue operations for participants.
DO NOT use this intern... | 28.125 | 107 | 0.662222 |
0ff77f4a5b3690d86a62d3ff1e35d3a99d2fd57d | 10,290 | py | Python | hard-gists/c3a540563e0774489ceafb3156b318a2/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 21 | 2019-07-08T08:26:45.000Z | 2022-01-24T23:53:25.000Z | hard-gists/c3a540563e0774489ceafb3156b318a2/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 5 | 2019-06-15T14:47:47.000Z | 2022-02-26T05:02:56.000Z | hard-gists/c3a540563e0774489ceafb3156b318a2/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 17 | 2019-05-16T03:50:34.000Z | 2021-01-14T14:35:12.000Z | #!/usr/bin/env python
# vim:fileencoding=utf-8
""" [NAME] script or package easy description
[DESCRIPTION] script or package description
"""
from argparse import ArgumentParser
from concurrent.futures import ThreadPoolExecutor, as_completed
import logging
import subprocess
import threading
import shlex
import time
im... | 31.181818 | 145 | 0.57036 |
75987c2d30da720d4c59d0797ec0514b8a5fcaf4 | 91,617 | py | Python | tensorflow/python/ops/array_ops.py | shaurya0/tensorflow | ac8e67399d75edce6a9f94afaa2adb577035966e | [
"Apache-2.0"
] | null | null | null | tensorflow/python/ops/array_ops.py | shaurya0/tensorflow | ac8e67399d75edce6a9f94afaa2adb577035966e | [
"Apache-2.0"
] | null | null | null | tensorflow/python/ops/array_ops.py | shaurya0/tensorflow | ac8e67399d75edce6a9f94afaa2adb577035966e | [
"Apache-2.0"
] | 1 | 2019-02-07T16:59:16.000Z | 2019-02-07T16:59:16.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 34.274972 | 106 | 0.646496 |
e6ef85149ad0fd68490ebbb9567268967ea45203 | 200 | py | Python | src/isaw.events/isaw/events/browser/browser.py | isawnyu/isaw.web | 604499f9fa55d1ce9698ca05f85ddb54a88f1cab | [
"CC-BY-3.0"
] | null | null | null | src/isaw.events/isaw/events/browser/browser.py | isawnyu/isaw.web | 604499f9fa55d1ce9698ca05f85ddb54a88f1cab | [
"CC-BY-3.0"
] | 405 | 2015-03-12T18:20:25.000Z | 2022-03-07T18:44:16.000Z | src/isaw.events/isaw/events/browser/browser.py | isawnyu/isaw.web | 604499f9fa55d1ce9698ca05f85ddb54a88f1cab | [
"CC-BY-3.0"
] | 1 | 2016-11-07T21:18:49.000Z | 2016-11-07T21:18:49.000Z | from Products.Five import BrowserView
class RdfView(BrowserView):
pass
class HcalView(BrowserView):
pass
class EventMainView(BrowserView):
pass
class FolderView(BrowserView):
pass
| 14.285714 | 37 | 0.755 |
8b6ffc7182d58132e92659b82a6b11f4e9089fe6 | 973 | py | Python | dns_messages/dns_objects/rr_data/AAAA.py | wahlflo/dns-messages | f42a1c1d0c933f44ca819b9a7f6e54daf48a7140 | [
"MIT"
] | null | null | null | dns_messages/dns_objects/rr_data/AAAA.py | wahlflo/dns-messages | f42a1c1d0c933f44ca819b9a7f6e54daf48a7140 | [
"MIT"
] | null | null | null | dns_messages/dns_objects/rr_data/AAAA.py | wahlflo/dns-messages | f42a1c1d0c933f44ca819b9a7f6e54daf48a7140 | [
"MIT"
] | null | null | null | import ipaddress
from .resource_record import ResourceRecord
from typing import List
from .items import *
class AAAA(ResourceRecord):
def __init__(self, name: str, rr_class: RRClass, ttl: int, ip_address: ipaddress.IPv6Address):
super().__init__(name=name, rr_class=rr_class, ttl=ttl)
self.ip_addre... | 38.92 | 147 | 0.708119 |
25f957c84146437932bb433d9335a2cbee81ee75 | 1,653 | py | Python | hw2_example/run.py | JihoChoi/BD18F-JihoChoi | 31e6a5de75a80aa94f27203fdb73ac9a919d9095 | [
"MIT"
] | 1 | 2019-12-23T10:46:23.000Z | 2019-12-23T10:46:23.000Z | hw2_example/run.py | JihoChoi/BD18F-JihoChoi | 31e6a5de75a80aa94f27203fdb73ac9a919d9095 | [
"MIT"
] | null | null | null | hw2_example/run.py | JihoChoi/BD18F-JihoChoi | 31e6a5de75a80aa94f27203fdb73ac9a919d9095 | [
"MIT"
] | null | null | null | import tensorflow as tf
import time
from tensorflow.examples.tutorials.mnist import input_data
from model import lenet
FLAGS = tf.app.flags.FLAGS
# tf.app.flags.DEFINE_integer('max_steps', 1000000,
# """Number of iterations to run for each workers.""")
tf.app.flags.DEFINE_integer('max_st... | 35.934783 | 91 | 0.573503 |
59f813f15f3bb51529843550ffa12788b8acc127 | 15,421 | py | Python | python/ccxt/async_support/base/exchange.py | qyvlik/ccxt | 8a2ba1464df91e5afa1b099998ac471daf08ba64 | [
"MIT"
] | 1 | 2021-03-31T18:35:43.000Z | 2021-03-31T18:35:43.000Z | python/ccxt/async_support/base/exchange.py | qyvlik/ccxt | 8a2ba1464df91e5afa1b099998ac471daf08ba64 | [
"MIT"
] | null | null | null | python/ccxt/async_support/base/exchange.py | qyvlik/ccxt | 8a2ba1464df91e5afa1b099998ac471daf08ba64 | [
"MIT"
] | 1 | 2020-10-21T20:09:49.000Z | 2020-10-21T20:09:49.000Z | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
__version__ = '1.52.16'
# -----------------------------------------------------------------------------
import asyncio
import concurrent.futures
import socket
import certifi
import aiohttp
import ssl
import sys
i... | 43.685552 | 355 | 0.617145 |
ffe56a62c6101c7a4ee1b602c1f6c4c3f6716362 | 716 | py | Python | sharpy-sc2/sharpy/plans/debug/no_double_orders.py | ProfessorQu/Sharpy-Bot | a8bf7ebbed113f5bf0f6891c9ca45fac9edfb26e | [
"MIT"
] | 48 | 2019-11-25T20:02:27.000Z | 2022-02-28T00:16:21.000Z | sharpy-sc2/sharpy/plans/debug/no_double_orders.py | ProfessorQu/Sharpy-Bot | a8bf7ebbed113f5bf0f6891c9ca45fac9edfb26e | [
"MIT"
] | 48 | 2020-03-10T17:08:04.000Z | 2022-02-22T08:21:12.000Z | sharpy-sc2/sharpy/plans/debug/no_double_orders.py | ProfessorQu/Sharpy-Bot | a8bf7ebbed113f5bf0f6891c9ca45fac9edfb26e | [
"MIT"
] | 25 | 2019-12-01T18:14:54.000Z | 2022-03-24T01:14:53.000Z | from sharpy.plans.acts import ActBase
from sc2 import AbilityId
class NoDoubleOrders(ActBase):
"""Don't use this for terrans, seriously!"""
def __init__(self):
super().__init__()
self.last_cancel = -1
async def execute(self) -> bool:
for unit in self.ai.structures:
if... | 29.833333 | 72 | 0.565642 |
132b6323551715a09c6c99f6088a35365239258b | 3,261 | py | Python | LandingPageCoffe/LandingPageCoffe/settings.py | AshofZ/LandingPageCoffe | c2f297cd351082f65ebd4cde9ebb6307a091d8c3 | [
"Apache-2.0"
] | null | null | null | LandingPageCoffe/LandingPageCoffe/settings.py | AshofZ/LandingPageCoffe | c2f297cd351082f65ebd4cde9ebb6307a091d8c3 | [
"Apache-2.0"
] | null | null | null | LandingPageCoffe/LandingPageCoffe/settings.py | AshofZ/LandingPageCoffe | c2f297cd351082f65ebd4cde9ebb6307a091d8c3 | [
"Apache-2.0"
] | null | null | null | """
Django settings for LandingPageCoffe project.
Generated by 'django-admin startproject' using Django 4.0.1.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/
"""
fro... | 26.088 | 91 | 0.704385 |
e019d286a8ed92238e299ff7e9df31962ccc0394 | 9,495 | py | Python | experimentor/drivers/digilent/dwfconst.py | aquilesC/experimentor | 1a70760912ef40f0e2aaee44ed1a1e5594fd5b45 | [
"MIT"
] | 4 | 2020-05-15T04:07:25.000Z | 2020-09-30T22:20:46.000Z | experimentor/drivers/digilent/dwfconst.py | aquilesC/experimentor | 1a70760912ef40f0e2aaee44ed1a1e5594fd5b45 | [
"MIT"
] | null | null | null | experimentor/drivers/digilent/dwfconst.py | aquilesC/experimentor | 1a70760912ef40f0e2aaee44ed1a1e5594fd5b45 | [
"MIT"
] | null | null | null | # ##############################################################################
# Copyright (c) 2021 Aquiles Carattino, Dispertech B.V. #
# dwfconst.py is part of Experimentor. #
# This file is released under an MIT license. ... | 31.969697 | 119 | 0.666035 |
c218aaccfae148561f7e800f0a0db52a5fb0a454 | 11,623 | py | Python | tensorflow/compiler/tests/tensor_list_ops_test.py | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | null | null | null | tensorflow/compiler/tests/tensor_list_ops_test.py | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | null | null | null | tensorflow/compiler/tests/tensor_list_ops_test.py | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 47.440816 | 81 | 0.666867 |
7a9534480bb4513f71edf2a063ab26f152c35332 | 837 | py | Python | analysis/close/rv_astro_disk_more/sample.py | iancze/TWA-3-orbit | e852f69b298d315aacc5801dacb42346e3a281c1 | [
"MIT"
] | null | null | null | analysis/close/rv_astro_disk_more/sample.py | iancze/TWA-3-orbit | e852f69b298d315aacc5801dacb42346e3a281c1 | [
"MIT"
] | null | null | null | analysis/close/rv_astro_disk_more/sample.py | iancze/TWA-3-orbit | e852f69b298d315aacc5801dacb42346e3a281c1 | [
"MIT"
] | null | null | null | import pymc3 as pm
import exoplanet as xo
import os
import src.close.rv_astro_disk_more.model as m
# with m.model:
# map_sol = xo.optimize(vars=[m.a_ang, m.MAb, m.incl])
# print(map_sol)
# map_sol1 = xo.optimize(start=map_sol, vars=[m.incl, m.Omega])
# print(map_sol1)
with m.model:
trace = pm... | 22.621622 | 67 | 0.685783 |
162f170a3511f6d503de0965fc7d518b1a2bbdbf | 2,569 | py | Python | tests/layers/test_mmd_loss.py | KevinMusgrave/pytorch-adapt | ff1491e1bfcc586afb8ee619712c8816ddf10358 | [
"MIT"
] | 131 | 2021-11-19T14:29:59.000Z | 2022-03-26T16:33:30.000Z | tests/layers/test_mmd_loss.py | MarkusSagen/pytorch-adapt | 947b9f1b748d2078cecbf4a00c34f73108d9ecde | [
"MIT"
] | 28 | 2021-11-19T17:31:56.000Z | 2022-03-02T18:42:51.000Z | tests/layers/test_mmd_loss.py | MarkusSagen/pytorch-adapt | 947b9f1b748d2078cecbf4a00c34f73108d9ecde | [
"MIT"
] | 8 | 2021-11-22T17:22:45.000Z | 2022-03-08T15:49:28.000Z | import unittest
import torch
from pytorch_adapt.layers import MMDLoss
from .. import TEST_DEVICE, TEST_DTYPES
class TestMMDLoss(unittest.TestCase):
def test_mmd_loss_quadratic(self):
for dtype in TEST_DTYPES:
loss_fn = MMDLoss(kernel_scales=1, mmd_type="quadratic")
x = torch.te... | 39.523077 | 83 | 0.548852 |
62cf5b19234116f0816cfdc8f0fb9602cf83a4a6 | 1,337 | py | Python | Week_1/examples.py | symmy596/Bath_University_Advanced_Practical_Chemistry_Year_2 | 65f846f87d97639f324c6f75f2ac0d1bedfb91d3 | [
"MIT"
] | 4 | 2019-05-21T14:35:34.000Z | 2021-08-20T15:40:46.000Z | Week_1/examples.py | symmy596/Bath_University_Advanced_Practical_Chemistry_Year_2 | 65f846f87d97639f324c6f75f2ac0d1bedfb91d3 | [
"MIT"
] | 28 | 2018-08-17T13:09:35.000Z | 2018-10-30T10:29:27.000Z | Week_1/examples.py | symmy596/Bath_University_Advanced_Practical_Chemistry_Year_2 | 65f846f87d97639f324c6f75f2ac0d1bedfb91d3 | [
"MIT"
] | 3 | 2020-09-16T14:59:09.000Z | 2020-09-28T09:50:29.000Z | import numpy as np
from pylj import md, sample
def pbc():
number_of_particles = 1
temperature = 100
box_length = 30
number_of_steps = 10000
sample_frequency = 25
# Initialise the system
system = md.initialise(number_of_particles, temperature, box_length,
'square'... | 36.135135 | 74 | 0.652954 |
264c411903a065d20bc0cc5d65d26e038b81a4cb | 29,389 | py | Python | keras/optimizers/legacy_learning_rate_decay.py | tsheaff/keras | ee227dda766d769b7499a5549e8ed77b5e88105b | [
"Apache-2.0"
] | 1 | 2020-02-02T04:43:33.000Z | 2020-02-02T04:43:33.000Z | keras/optimizers/legacy_learning_rate_decay.py | tsheaff/keras | ee227dda766d769b7499a5549e8ed77b5e88105b | [
"Apache-2.0"
] | null | null | null | keras/optimizers/legacy_learning_rate_decay.py | tsheaff/keras | ee227dda766d769b7499a5549e8ed77b5e88105b | [
"Apache-2.0"
] | 1 | 2020-12-13T22:14:48.000Z | 2020-12-13T22:14:48.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 38.266927 | 80 | 0.694716 |
358ac7f31d02c0eef83fa707ebe79791a2eaea37 | 8,648 | py | Python | tests/test_blocks.py | ianhi/animatplot | 632d988687fca7e7415e9fa49fe7eebc3f0991c6 | [
"MIT"
] | null | null | null | tests/test_blocks.py | ianhi/animatplot | 632d988687fca7e7415e9fa49fe7eebc3f0991c6 | [
"MIT"
] | null | null | null | tests/test_blocks.py | ianhi/animatplot | 632d988687fca7e7415e9fa49fe7eebc3f0991c6 | [
"MIT"
] | null | null | null | from matplotlib.testing import setup
import numpy as np
import numpy.testing as npt
import matplotlib.pyplot as plt
import matplotlib as mpl
import pytest
import animatplot as amp
from tests.tools import animation_compare
from animatplot.blocks import Block, Title
setup()
class TestTitleBlock:
def test_list_o... | 33.51938 | 77 | 0.5858 |
7db71b02e26ba37b45a490c3bc0265928c37788c | 172 | py | Python | problem0047.py | kmarcini/Project-Euler-Python | d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3 | [
"BSD-3-Clause"
] | null | null | null | problem0047.py | kmarcini/Project-Euler-Python | d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3 | [
"BSD-3-Clause"
] | null | null | null | problem0047.py | kmarcini/Project-Euler-Python | d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3 | [
"BSD-3-Clause"
] | null | null | null | ###########################
#
# #47 Distinct primes factors - Project Euler
# https://projecteuler.net/problem=47
#
# Code by Kevin Marciniak
#
###########################
| 19.111111 | 45 | 0.488372 |
61b42c2f561bcc206bdfbd1d35bef61c2ff3054c | 1,307 | py | Python | examples/gpu_lgb.py | Jie-Yuan/1_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 14 | 2019-06-25T13:46:32.000Z | 2020-10-27T02:04:59.000Z | examples/gpu_lgb.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | null | null | null | examples/gpu_lgb.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 7 | 2019-06-25T13:26:16.000Z | 2020-10-27T02:05:03.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Project : tql-Python.
# @File : gpu_lgb
# @Time : 2019-07-04 12:14
# @Author : yuanjie
# @Email : yuanjie@xiaomi.com
# @Software : PyCharm
# @Description :
"""默认参数https://www.kaggle.com/c/home-credit-default-risk/discussion/59347#... | 22.929825 | 90 | 0.617445 |
51b9b32ec73f9cf95393acf691deb48285451c61 | 2,067 | py | Python | acapi/resources/databaselist.py | darlev91/python-acquia-cloud | 5f5ea1318575b18440e57fce7c0993c070195552 | [
"MIT"
] | 9 | 2015-10-01T22:29:12.000Z | 2019-03-27T17:54:22.000Z | acapi/resources/databaselist.py | darlev91/python-acquia-cloud | 5f5ea1318575b18440e57fce7c0993c070195552 | [
"MIT"
] | 48 | 2015-08-02T12:08:46.000Z | 2020-05-11T21:00:07.000Z | acapi/resources/databaselist.py | darlev91/python-acquia-cloud | 5f5ea1318575b18440e57fce7c0993c070195552 | [
"MIT"
] | 7 | 2015-07-13T20:18:08.000Z | 2019-02-27T13:01:48.000Z | """ Acquia Cloud API database list resource. """
import re
from acapi.resources.acquialist import AcquiaList
from acapi.resources.database import Database
class DatabaseList(AcquiaList):
"""Dictionary of Acquia Cloud API database resources keyed by name."""
def __init__(self, base_uri, auth, *args, **kwarg... | 26.844156 | 76 | 0.559748 |
20b5ce7aa79faeeb47f432474c8f34f86be5f05f | 1,037 | py | Python | photolio/views.py | kelvinadeu/Photo-Gallery | 1e18a1c695ebbc1a57531d6a12a4b3199a7b11de | [
"Unlicense"
] | null | null | null | photolio/views.py | kelvinadeu/Photo-Gallery | 1e18a1c695ebbc1a57531d6a12a4b3199a7b11de | [
"Unlicense"
] | null | null | null | photolio/views.py | kelvinadeu/Photo-Gallery | 1e18a1c695ebbc1a57531d6a12a4b3199a7b11de | [
"Unlicense"
] | null | null | null | from django.shortcuts import render,redirect
from django.http import HttpResponse
from .models import Location,Cartegory,Images
# Create your views here.
def index(request):
images=Images.objects.all()
location=Location.objects.all()
print(Images)
return render(request,'index.html',{'images':images,'l... | 30.5 | 85 | 0.703954 |
dbf6cd356c2d2e82fd984d4111fbeef0664dc3f8 | 21,267 | py | Python | sgqlc/codegen/schema.py | catalyst17/sgqlc | 679474c990321dc388cfd08c7c6fdf66ee12edb9 | [
"0BSD"
] | null | null | null | sgqlc/codegen/schema.py | catalyst17/sgqlc | 679474c990321dc388cfd08c7c6fdf66ee12edb9 | [
"0BSD"
] | null | null | null | sgqlc/codegen/schema.py | catalyst17/sgqlc | 679474c990321dc388cfd08c7c6fdf66ee12edb9 | [
"0BSD"
] | null | null | null | #!/usr/bin/env python3
import argparse
import json
import os
import os.path
import sys
import re
import functools
import textwrap
from sgqlc.types import BaseItem
try:
# graphql >= 3.0
from graphql.language.ast import ValueNode as GraphQLASTValue
except ImportError:
# graphql < 3.0 (ex: 2.2)
from gra... | 30.080622 | 78 | 0.568439 |
194f0568ba5d49855176449b5fb4517303b6695c | 28,536 | py | Python | evkit/rl/storage/rollout.py | corl19paper273/midlevel-visual-priors | 9dbfeabf072ee9c841fefb1f854c8bc6ca8f1cc1 | [
"MIT"
] | null | null | null | evkit/rl/storage/rollout.py | corl19paper273/midlevel-visual-priors | 9dbfeabf072ee9c841fefb1f854c8bc6ca8f1cc1 | [
"MIT"
] | 7 | 2019-12-16T21:58:34.000Z | 2022-02-10T00:16:29.000Z | evkit/rl/storage/rollout.py | corl19paper273/midlevel-visual-priors | 9dbfeabf072ee9c841fefb1f854c8bc6ca8f1cc1 | [
"MIT"
] | null | null | null | from collections import defaultdict
import numpy as np
from torch.utils.data.sampler import BatchSampler, SubsetRandomSampler
import torch
import random
import time
from .segment_tree import SumSegmentTree, MinSegmentTree
from evkit.rl.storage.memory import ReplayMemory
from evkit.sensors import SensorDict
def _flatt... | 49.370242 | 131 | 0.626612 |
91546e19c21004e639e534eced994fe13fdffc38 | 5,501 | py | Python | scripts/rewards.py | Lorna-Liu/ultrasound_vsumm_RL | 469214c6c9ef7fb8ecdeb29b831307b5be877d5a | [
"MIT"
] | 17 | 2020-09-12T03:28:42.000Z | 2021-11-15T12:10:31.000Z | scripts/rewards.py | Lorna-Liu/ultrasound_vsumm_RL | 469214c6c9ef7fb8ecdeb29b831307b5be877d5a | [
"MIT"
] | 3 | 2020-10-16T08:52:05.000Z | 2022-03-22T02:59:55.000Z | scripts/rewards.py | Lorna-Liu/ultrasound_vsumm_RL | 469214c6c9ef7fb8ecdeb29b831307b5be877d5a | [
"MIT"
] | 1 | 2021-06-02T11:41:12.000Z | 2021-06-02T11:41:12.000Z | import torch
def compute_reward_coff(seq, actions, ignore_far_sim=True, temp_dist_thre=20, use_gpu=False,
div_coff=0.5, rep_coff=0.5):
"""
Compute diversity reward and representativeness reward
Args:
seq: sequence of features, shape (1, seq_len, dim)
actions: binar... | 39.862319 | 105 | 0.643338 |
ee483220794f9698450b2adbb65bbe6ab6c7b454 | 2,008 | py | Python | lib/SSH_pytorch/model/roi_data_layer/minibatch.py | dienthaipham103/Zalo_Challenge_2021 | 9a6159c6692bac5c2f090a91f691e798c52da2b5 | [
"MIT"
] | 1 | 2021-11-30T01:57:57.000Z | 2021-11-30T01:57:57.000Z | lib/SSH_pytorch/model/roi_data_layer/minibatch.py | dienthaipham103/Zalo_Challenge_2021 | 9a6159c6692bac5c2f090a91f691e798c52da2b5 | [
"MIT"
] | null | null | null | lib/SSH_pytorch/model/roi_data_layer/minibatch.py | dienthaipham103/Zalo_Challenge_2021 | 9a6159c6692bac5c2f090a91f691e798c52da2b5 | [
"MIT"
] | null | null | null | import numpy as np
import numpy.random as npr
import cv2
from lib.SSH_pytorch.model.utils.config import cfg
from lib.SSH_pytorch.model.utils.blob import prep_im_for_blob, im_list_to_blob
def get_minibatch(roidb):
"""Return the mini-batch for training"""
num_images = len(roidb)
random_scale_inds = npr.randi... | 34.62069 | 78 | 0.633466 |
97195219df8ec72f304610bf3838a982baa7be63 | 1,445 | py | Python | emission/core/wrapper/confirmedsection.py | GabrielKS/e-mission-server | bb83b428e648353e91b55de90274bdf8109b1a12 | [
"BSD-3-Clause"
] | 21 | 2015-02-09T00:35:17.000Z | 2021-12-14T16:41:05.000Z | emission/core/wrapper/confirmedsection.py | GabrielKS/e-mission-server | bb83b428e648353e91b55de90274bdf8109b1a12 | [
"BSD-3-Clause"
] | 672 | 2015-01-29T18:10:56.000Z | 2022-03-24T13:04:51.000Z | emission/core/wrapper/confirmedsection.py | GabrielKS/e-mission-server | bb83b428e648353e91b55de90274bdf8109b1a12 | [
"BSD-3-Clause"
] | 110 | 2015-01-29T18:11:10.000Z | 2022-03-29T17:58:14.000Z | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from builtins import *
import emission.core.wrapper.cleanedsection as ecwc
import emission.core.wrap... | 46.612903 | 97 | 0.736332 |
787056080fcb35724e5410750f9fa95df5f23d2d | 737 | py | Python | examples/quotes-aiohttp/quotes.py | rperesy/aioflask | 446c34671fe2d7084815e2639cf416534ac1a5e8 | [
"MIT"
] | 189 | 2020-07-16T18:03:05.000Z | 2022-03-31T02:07:12.000Z | examples/quotes-aiohttp/quotes.py | rperesy/aioflask | 446c34671fe2d7084815e2639cf416534ac1a5e8 | [
"MIT"
] | 9 | 2020-07-17T01:23:57.000Z | 2022-03-11T12:48:30.000Z | examples/quotes-aiohttp/quotes.py | rperesy/aioflask | 446c34671fe2d7084815e2639cf416534ac1a5e8 | [
"MIT"
] | 8 | 2020-10-01T20:36:28.000Z | 2021-08-12T05:25:59.000Z | import asyncio
import aiohttp
from aioflask import Flask, render_template_string
app = Flask(__name__)
template = '''<!doctype html>
<html>
<head>
<title>Quotes</title>
</head>
<body>
<h1>Quotes</h1>
{% for quote in quotes %}
<p><i>"{{ quote.content }}"</i> — {{ quote.author }}</p>
{% e... | 23.774194 | 66 | 0.649932 |
995c944c358a57da40dc856adc28bbbb701493be | 13,195 | py | Python | src/transformers/models/bert_japanese/tokenization_bert_japanese.py | reichang182/Transformer | 301536b15f1e757c51411800c25876617e9f1191 | [
"Apache-2.0"
] | 34 | 2021-07-05T02:44:31.000Z | 2022-03-28T14:39:57.000Z | src/transformers/models/bert_japanese/tokenization_bert_japanese.py | slavetothebiologicalforce/transformers | 6f90c29eaaba898919b7689ab7e2cfce1604cdb8 | [
"Apache-2.0"
] | 3 | 2021-07-22T15:49:44.000Z | 2022-03-19T08:46:27.000Z | src/transformers/models/bert_japanese/tokenization_bert_japanese.py | slavetothebiologicalforce/transformers | 6f90c29eaaba898919b7689ab7e2cfce1604cdb8 | [
"Apache-2.0"
] | 6 | 2021-07-05T02:44:32.000Z | 2022-02-14T10:10:13.000Z | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and 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/LICEN... | 37.808023 | 165 | 0.614399 |
955511b308f2330f3942d989571caa880ae5a761 | 5,115 | py | Python | hyundai_motor.py | JKKorea/rnn_stock_predictions | 13f425eb845053a5b1fb477801414292577abe02 | [
"Apache-2.0"
] | 57 | 2017-06-28T18:04:51.000Z | 2021-08-13T03:23:19.000Z | hyundai_motor.py | JKKorea/rnn_stock_predictions | 13f425eb845053a5b1fb477801414292577abe02 | [
"Apache-2.0"
] | 1 | 2018-01-20T06:54:47.000Z | 2018-01-24T03:18:23.000Z | hyundai_motor.py | JKKorea/rnn_stock_predictions | 13f425eb845053a5b1fb477801414292577abe02 | [
"Apache-2.0"
] | 30 | 2017-06-28T17:08:23.000Z | 2021-12-27T19:15:07.000Z | import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
import time
tf.set_random_seed(777) # reproducibility
def MinMaxScaler(data):
numerator = data - np.min(data, 0)
denominator = np.max(data, 0) - np.min(data, 0)
# noise term prevents the zero division
return numerator / (denomi... | 28.259669 | 84 | 0.65435 |
0d9471526b94685d972d438ded9d7b3236d37361 | 1,371 | py | Python | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE2/week1/map_magnifier.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE2/week1/map_magnifier.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE2/week1/map_magnifier.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | # Demonstration of a magnifier on a map
import simplegui
# 1521x1818 pixel map of native American language
# source - Gutenberg project
image = simplegui.load_image("http://commondatastorage.googleapis.com/codeskulptor-assets/gutenberg.jpg")
# Image dimensions
MAP_WIDTH = 1521
MAP_HEIGHT = 1818
# Scaling factor
SC... | 24.927273 | 105 | 0.718454 |
06e32598261177a1bf883ddd54f1a3e0f6e45826 | 1,490 | py | Python | pyorm/db/engine/utils.py | TonyFlury/pyorm | 6d811fa32d3ba4c4a013fbb8f627277fa9d20b64 | [
"MIT"
] | null | null | null | pyorm/db/engine/utils.py | TonyFlury/pyorm | 6d811fa32d3ba4c4a013fbb8f627277fa9d20b64 | [
"MIT"
] | null | null | null | pyorm/db/engine/utils.py | TonyFlury/pyorm | 6d811fa32d3ba4c4a013fbb8f627277fa9d20b64 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
"""
# pyORM : Implementation of utils.py
Summary :
<summary of module/class being implemented>
Use Case :
As a <actor> I want <outcome> So that <justification>
Testable Statements :
Can I <Boolean statement>
....
"""
from functools import wraps
__version__ = "0... | 28.653846 | 93 | 0.7 |
61c279d00ea442f151b2398ad1eaf39c1380a70c | 1,830 | py | Python | report/run-manifest-bouncer-saas.py | app-sre/app-bouncer | 1153e21872f0c929904da32e34785286149302a4 | [
"Apache-2.0"
] | 1 | 2020-07-05T21:23:05.000Z | 2020-07-05T21:23:05.000Z | report/run-manifest-bouncer-saas.py | app-sre/app-bouncer | 1153e21872f0c929904da32e34785286149302a4 | [
"Apache-2.0"
] | 4 | 2019-12-03T16:26:57.000Z | 2020-09-30T22:14:46.000Z | report/run-manifest-bouncer-saas.py | app-sre/app-bouncer | 1153e21872f0c929904da32e34785286149302a4 | [
"Apache-2.0"
] | 7 | 2019-09-05T08:15:14.000Z | 2020-04-21T15:15:08.000Z | #!/usr/bin/env python
import os
import datetime
import sh
import yaml
WORK_DIR = 'saas-repos'
errors = {}
for saas_repo in os.listdir(WORK_DIR):
saas_repo_path = os.path.join(WORK_DIR, saas_repo)
config = yaml.safe_load(open(os.path.join(saas_repo_path, 'config.yaml')))
git_dir = os.path.join(saas_re... | 32.105263 | 78 | 0.591803 |
52005de7c5dbdfdacabc80894e0613b42b3bde17 | 913 | py | Python | fe-image/server/__init__.py | elastest/elastest-recommendation-engine-trial | 8064141f0695d925b39d694e9a00a2e2ebe2f3d9 | [
"Apache-2.0"
] | null | null | null | fe-image/server/__init__.py | elastest/elastest-recommendation-engine-trial | 8064141f0695d925b39d694e9a00a2e2ebe2f3d9 | [
"Apache-2.0"
] | null | null | null | fe-image/server/__init__.py | elastest/elastest-recommendation-engine-trial | 8064141f0695d925b39d694e9a00a2e2ebe2f3d9 | [
"Apache-2.0"
] | 1 | 2020-01-13T12:46:05.000Z | 2020-01-13T12:46:05.000Z | # (C) Copyright IBM Corp. 2019
#
# 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... | 32.607143 | 74 | 0.77218 |
ce187d19e4d8162c4a13d58d87836d4299223d67 | 20,197 | py | Python | nova/tests/functional/api/client.py | lixiaoy1/nova | 357b8b38e88300948bb2e07d1bbaabd1e9d7b60e | [
"Apache-2.0"
] | 1 | 2019-04-22T06:25:26.000Z | 2019-04-22T06:25:26.000Z | nova/tests/functional/api/client.py | woraser/nova | fc3890667e4971e3f0f35ac921c2a6c25f72adec | [
"Apache-2.0"
] | null | null | null | nova/tests/functional/api/client.py | woraser/nova | fc3890667e4971e3f0f35ac921c2a6c25f72adec | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2011 Justin Santa Barbara
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 38.179584 | 79 | 0.615339 |
4ba545fd5cf569a61d20d171f2548c97e46668f1 | 1,954 | py | Python | towel/templatetags/modelview_list.py | timgates42/towel | d00fb74e3bc8724a45704378c3cd40444bb36259 | [
"BSD-3-Clause"
] | null | null | null | towel/templatetags/modelview_list.py | timgates42/towel | d00fb74e3bc8724a45704378c3cd40444bb36259 | [
"BSD-3-Clause"
] | null | null | null | towel/templatetags/modelview_list.py | timgates42/towel | d00fb74e3bc8724a45704378c3cd40444bb36259 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, unicode_literals
from django import template
from django.db import models
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext as _
from towel.templatetags import towel_resources
register = template.Library()
register.inclusion_tag("to... | 27.521127 | 86 | 0.58393 |
5c788ed95cc4b230fdd326ab2edd045c2ccf99a5 | 683 | py | Python | models/fallahi_eval/assemble_index_cards.py | pupster90/indra | e90b0bc1016fc2d210a9b46fb160b78a7d6a5ab9 | [
"BSD-2-Clause"
] | 2 | 2020-01-14T08:59:10.000Z | 2020-12-18T16:21:38.000Z | models/fallahi_eval/assemble_index_cards.py | pupster90/indra | e90b0bc1016fc2d210a9b46fb160b78a7d6a5ab9 | [
"BSD-2-Clause"
] | null | null | null | models/fallahi_eval/assemble_index_cards.py | pupster90/indra | e90b0bc1016fc2d210a9b46fb160b78a7d6a5ab9 | [
"BSD-2-Clause"
] | null | null | null | from util import *
from indra.statements import *
from indra.assemblers import IndexCardAssembler
stmts = pklload('pysb_stmts')
ica = IndexCardAssembler()
counter = 1
base_path = os.path.join(based, 'index_cards')
for st in stmts:
if isinstance(st, Modification) and st.enz is None:
continue
pmids = [e... | 29.695652 | 79 | 0.661786 |
eab46f8abdc68d9c04c06a861c52cfe283326caf | 7,205 | py | Python | pyhf/constraints.py | minrk/pyhf | f9b833c1c7cf0cafd87e23f84f6c815fe50b3047 | [
"Apache-2.0"
] | 8 | 2018-01-24T17:09:26.000Z | 2018-02-08T13:56:04.000Z | pyhf/constraints.py | minrk/pyhf | f9b833c1c7cf0cafd87e23f84f6c815fe50b3047 | [
"Apache-2.0"
] | 69 | 2018-01-25T23:53:35.000Z | 2018-02-09T16:13:21.000Z | pyhf/constraints.py | minrk/pyhf | f9b833c1c7cf0cafd87e23f84f6c815fe50b3047 | [
"Apache-2.0"
] | 3 | 2018-01-25T16:38:10.000Z | 2018-02-06T15:24:00.000Z | from . import get_backend, default_backend
from . import events
class gaussian_constraint_combined(object):
def __init__(self, pdfconfig):
# iterate over all constraints order doesn't matter....
self.par_indices = list(range(len(pdfconfig.suggested_init())))
self.data_indices = list(range... | 38.529412 | 87 | 0.57821 |
b7082f1a5b16df377a2b3dabac742ecc2ee9a964 | 319 | py | Python | setup.py | xyla-io/rele | 8e6bb10a4a40f6af1708cb64abc0a767146f29c2 | [
"MIT"
] | null | null | null | setup.py | xyla-io/rele | 8e6bb10a4a40f6af1708cb64abc0a767146f29c2 | [
"MIT"
] | null | null | null | setup.py | xyla-io/rele | 8e6bb10a4a40f6af1708cb64abc0a767146f29c2 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='rele',
version='0.0.1',
description='An inout mapping definition module.',
url='https://github.com/xyla-io/rele',
author='Xyla',
author_email='access@xyla.io',
license='MIT',
packages=find_packages(),
install_requires=[
],
zip_safe=False
) | 21.266667 | 52 | 0.69906 |
9e81272988532cab32ad85a561dd564cad6a74a7 | 3,917 | py | Python | web_flat/settings.py | foo290/flat-webpage-api | 0b791a49b0b2ef4e06dd0a40eece8f1fd15903be | [
"MIT"
] | null | null | null | web_flat/settings.py | foo290/flat-webpage-api | 0b791a49b0b2ef4e06dd0a40eece8f1fd15903be | [
"MIT"
] | null | null | null | web_flat/settings.py | foo290/flat-webpage-api | 0b791a49b0b2ef4e06dd0a40eece8f1fd15903be | [
"MIT"
] | null | null | null | """
Django settings for web_flat project.
Generated by 'django-admin startproject' using Django 3.2.5.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathli... | 27.201389 | 91 | 0.715854 |
0b367159b2421888a760f5a1c967b0e2e7c8a713 | 5,693 | py | Python | mantaray_utilities/superceded.py | kieranslater/mantaray_utilities | 7c14c5a5a034e19da85556338295e507cee03eef | [
"Apache-2.0"
] | null | null | null | mantaray_utilities/superceded.py | kieranslater/mantaray_utilities | 7c14c5a5a034e19da85556338295e507cee03eef | [
"Apache-2.0"
] | null | null | null | mantaray_utilities/superceded.py | kieranslater/mantaray_utilities | 7c14c5a5a034e19da85556338295e507cee03eef | [
"Apache-2.0"
] | null | null | null |
class User():
def __init__(self, name, role, address, password=None, config_template_path=None, config_path=None):
"""
:param name: Just to keep track and personalize the simulation
:param role: Also just for personalizing
:param address: This the account address
:param pas... | 43.792308 | 127 | 0.646408 |
0f78664d9f1180dc6d40e0bb7e588a8ab8c44b84 | 1,229 | py | Python | polls/migrations/0001_initial.py | intery89/recommend_analytics | f6a1575fce259f487863067b0a6c95f240bc4ec5 | [
"Apache-2.0"
] | null | null | null | polls/migrations/0001_initial.py | intery89/recommend_analytics | f6a1575fce259f487863067b0a6c95f240bc4ec5 | [
"Apache-2.0"
] | null | null | null | polls/migrations/0001_initial.py | intery89/recommend_analytics | f6a1575fce259f487863067b0a6c95f240bc4ec5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-05-18 09:47
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Creat... | 31.512821 | 114 | 0.585028 |
924a6583e67f9bbb53df9552e25c35c8af8bfc1c | 2,482 | py | Python | pyinduct/examples/transport_system.py | cklb/pyinduct | c6678436e2bd132620aa5b9da0caa80f6f8d59d4 | [
"BSD-3-Clause"
] | 1 | 2016-01-15T18:05:34.000Z | 2016-01-15T18:05:34.000Z | pyinduct/examples/transport_system.py | pyinduct/pyinduct | f743ecfcee3b940505ec95b48fa07bb1648cfcc1 | [
"BSD-3-Clause"
] | 89 | 2017-01-31T12:52:18.000Z | 2020-12-14T23:31:53.000Z | pyinduct/examples/transport_system.py | riemarc/pyinduct | 5c407b6ae301be76639d464d43a20ba3fafd7e66 | [
"BSD-3-Clause"
] | 7 | 2016-01-15T17:33:11.000Z | 2017-04-11T18:08:07.000Z | import numpy as np
import pyinduct as pi
import pyqtgraph as pg
def run(show_plots):
sys_name = 'transport system'
v = 10
l = 5
T = 5
spat_bounds = (0, l)
spat_domain = pi.Domain(bounds=spat_bounds, num=51)
temp_domain = pi.Domain(bounds=(0, T), num=100)
init_x = pi.Function(lambda z:... | 38.184615 | 79 | 0.576551 |
361ef5d264ee211bf05c6b8db3a5993b266a07d8 | 667 | py | Python | logos_server/controller.py | elieltonkremer/logos-server | 6bb32a59b2c16b693db5d67b2a3590572f70ebd6 | [
"MIT"
] | null | null | null | logos_server/controller.py | elieltonkremer/logos-server | 6bb32a59b2c16b693db5d67b2a3590572f70ebd6 | [
"MIT"
] | null | null | null | logos_server/controller.py | elieltonkremer/logos-server | 6bb32a59b2c16b693db5d67b2a3590572f70ebd6 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from bottle import Request, Response
class AbstractController(ABC):
@abstractmethod
def handler(self, request, response, *args, **kwargs):
pass
class RestController(AbstractController):
def handler(self, request: Request, response: Response, *args, **kwargs)... | 27.791667 | 77 | 0.653673 |
47157d271779fca281d31ce3a45a1c7d193dbd1d | 5,517 | py | Python | contrib/seeds/makeseeds.py | MNPJason/MNPCoin | 2689c068a0fe5a735b08a50aed77b594adebcb35 | [
"MIT"
] | 8 | 2018-08-06T14:40:56.000Z | 2021-09-30T19:21:07.000Z | contrib/seeds/makeseeds.py | MNPJason/MNPCoin | 2689c068a0fe5a735b08a50aed77b594adebcb35 | [
"MIT"
] | 5 | 2018-08-05T21:11:05.000Z | 2019-02-26T14:12:31.000Z | contrib/seeds/makeseeds.py | MNPJason/MNPCoin | 2689c068a0fe5a735b08a50aed77b594adebcb35 | [
"MIT"
] | 14 | 2018-08-03T02:02:27.000Z | 2020-04-11T23:32:53.000Z | #!/usr/bin/env python3
# Copyright (c) 2013-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.
#
# Generate seeds.txt from Pieter's DNS seeder
#
NSEEDS=512
MAX_SEEDS_PER_ASN=2
MIN_BLOCKS = 615801
#... | 32.075581 | 186 | 0.567156 |
054c79783eb83d13b6967380a4d32202d42fc0f1 | 4,220 | py | Python | tests/app/api_v0/test_revision.py | kreelsama/server | b4179622761e6c1766a78838d0e1d0d444e8e8b0 | [
"BSD-3-Clause"
] | null | null | null | tests/app/api_v0/test_revision.py | kreelsama/server | b4179622761e6c1766a78838d0e1d0d444e8e8b0 | [
"BSD-3-Clause"
] | null | null | null | tests/app/api_v0/test_revision.py | kreelsama/server | b4179622761e6c1766a78838d0e1d0d444e8e8b0 | [
"BSD-3-Clause"
] | null | null | null | # TODO: split E2E test to unit test
import pytest
from starlette.testclient import TestClient
from tests.fixtures.mock_service import MockUserService
person_revisions_api_prefix = "/v0/revisions/persons"
@pytest.mark.env("e2e", "database")
def test_person_revision_basic(client: TestClient, mock_user_service: MockU... | 25.889571 | 87 | 0.640284 |
50e0294632aafe0fcccf1ffb58a049aa333dca64 | 2,343 | py | Python | apischema/__init__.py | wyfo/apimodel | 99e6b23504e8ca775fda9dfa93c4e350211c1b8a | [
"MIT"
] | null | null | null | apischema/__init__.py | wyfo/apimodel | 99e6b23504e8ca775fda9dfa93c4e350211c1b8a | [
"MIT"
] | 7 | 2022-02-28T02:37:58.000Z | 2022-03-31T02:31:32.000Z | apischema/__init__.py | wyfo/apimodel | 99e6b23504e8ca775fda9dfa93c4e350211c1b8a | [
"MIT"
] | null | null | null | __all__ = [
"PassThroughOptions",
"Undefined",
"UndefinedType",
"Unsupported",
"ValidationError",
"alias",
"dependent_required",
"deserialization_method",
"deserialize",
"deserializer",
"discriminator",
"identity",
"order",
"properties",
"schema",
"seriali... | 23.908163 | 88 | 0.701238 |
605ba893ff28e95b86edcf9cd86bfeac9146992b | 496 | py | Python | pyls/plugins/hover.py | amarshall/python-language-server | ded6489ad79851025c3d8b2432d36c519b6d7622 | [
"MIT"
] | 1 | 2019-10-31T00:38:10.000Z | 2019-10-31T00:38:10.000Z | pyls/plugins/hover.py | amarshall/python-language-server | ded6489ad79851025c3d8b2432d36c519b6d7622 | [
"MIT"
] | 2 | 2022-02-19T07:23:44.000Z | 2022-02-27T13:13:03.000Z | pyls/plugins/hover.py | amarshall/python-language-server | ded6489ad79851025c3d8b2432d36c519b6d7622 | [
"MIT"
] | 1 | 2019-09-03T06:40:44.000Z | 2019-09-03T06:40:44.000Z | # Copyright 2017 Palantir Technologies, Inc.
import logging
from pyls import hookimpl, _utils
log = logging.getLogger(__name__)
@hookimpl
def pyls_hover(document, position):
definitions = document.jedi_script(position).goto_definitions()
word = document.word_at_position(position)
# Find an exact match f... | 26.105263 | 77 | 0.707661 |
9c5ee43616fbbb9d9cd0defe7ed67e518d31cbf7 | 9,154 | py | Python | day9in.py | unidavemeyer/aoc2020 | eabe6cb4143ac76a5d4047143665ee3bc0335275 | [
"MIT"
] | null | null | null | day9in.py | unidavemeyer/aoc2020 | eabe6cb4143ac76a5d4047143665ee3bc0335275 | [
"MIT"
] | null | null | null | day9in.py | unidavemeyer/aoc2020 | eabe6cb4143ac76a5d4047143665ee3bc0335275 | [
"MIT"
] | null | null | null | strIn = '''35
20
15
25
47
40
62
55
65
95
102
117
150
182
127
219
299
277
309
576'''
strIn = '''3
17
32
2
19
45
22
18
38
8
16
13
41
35
23
29
11
46
12
27
49
34
20
14
47
50
10
15
17
21
57
25
19
18
22
76
24
32
26
28
23
30
29
31
33
27
35
42
34
36
91
40
37
38
43
47
44
41
45
72
49
61
80
55
66
71
56
117
141
69
135
70
73
83
74... | 8.956947 | 18 | 0.886498 |
6d03e0cc7683c08ee9b0a87f0619e6a73979ea5a | 3,773 | py | Python | app/tests/testGetDocument.py | lhorne-gavant/OpenPubArchive-Content-Server-1 | 2b7c02417a8bb37f5a627343fab7fa05dc532bf7 | [
"Apache-2.0"
] | null | null | null | app/tests/testGetDocument.py | lhorne-gavant/OpenPubArchive-Content-Server-1 | 2b7c02417a8bb37f5a627343fab7fa05dc532bf7 | [
"Apache-2.0"
] | null | null | null | app/tests/testGetDocument.py | lhorne-gavant/OpenPubArchive-Content-Server-1 | 2b7c02417a8bb37f5a627343fab7fa05dc532bf7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Third-party imports...
#from nose.tools import assert_true
# This test module is in development...
import sys
import os.path
folder = os.path.basename(os.path.dirname(os.path.abspath(__file__)))
if folder == "tests": # testing from within WingIDE, default folder is t... | 39.715789 | 142 | 0.668169 |
12e02ed6eb1ad254bdac21ae0c365bba796484a5 | 104 | py | Python | output/models/ms_data/attribute_group/attg_d022_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/ms_data/attribute_group/attg_d022_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/ms_data/attribute_group/attg_d022_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.ms_data.attribute_group.attg_d022_xsd.attg_d022 import Doc
__all__ = [
"Doc",
]
| 17.333333 | 77 | 0.759615 |
08261c6c154cbc84e17eaf560c963b6a24c47ab7 | 11,524 | py | Python | apps/projects/views.py | gannetson/sportschooldeopenlucht | 0c78e5a95b22a963244112e478119ba60c572141 | [
"BSD-3-Clause"
] | 1 | 2019-01-19T06:58:39.000Z | 2019-01-19T06:58:39.000Z | apps/projects/views.py | gannetson/sportschooldeopenlucht | 0c78e5a95b22a963244112e478119ba60c572141 | [
"BSD-3-Clause"
] | null | null | null | apps/projects/views.py | gannetson/sportschooldeopenlucht | 0c78e5a95b22a963244112e478119ba60c572141 | [
"BSD-3-Clause"
] | null | null | null | from apps.projects.models import ProjectPitch, ProjectPlan, ProjectAmbassador, ProjectBudgetLine, ProjectPhases, ProjectCampaign, ProjectTheme
from django.db.models.query_utils import Q
from django.utils.decorators import method_decorator
from django.utils.translation import ugettext as _
from apps.fund.models import D... | 35.134146 | 329 | 0.738199 |
25de77f2aa45b4cb63a95479be61f845bbb77cb2 | 22,381 | py | Python | frontend/glideinFrontendPlugins.py | bbockelm/glideinWMS | a2b39e3d4ff6c4527efad54b1eefe728a4ec9d18 | [
"BSD-3-Clause"
] | null | null | null | frontend/glideinFrontendPlugins.py | bbockelm/glideinWMS | a2b39e3d4ff6c4527efad54b1eefe728a4ec9d18 | [
"BSD-3-Clause"
] | 3 | 2015-12-02T19:37:45.000Z | 2016-01-20T03:21:48.000Z | frontend/glideinFrontendPlugins.py | bbockelm/glideinWMS | a2b39e3d4ff6c4527efad54b1eefe728a4ec9d18 | [
"BSD-3-Clause"
] | 1 | 2015-12-01T23:02:41.000Z | 2015-12-01T23:02:41.000Z | #
# Project:
# glideinWMS
#
# File Version:
#
# Description:
# This module implements plugins for the VO frontend
#
# Author:
# Igor Sfiligoi (since Mar 31st 2009)
#
import os
import time
import pickle
import random
from glideinwms.lib import logSupport
import glideinFrontendLib
import glideinFrontendInterface
... | 38.192833 | 123 | 0.575756 |
2c62747b6ff16ab9b3ba9c0db8cb72d8caf98953 | 33,594 | py | Python | masculinity_survey.py | ChmielowiecAlek/ds_intro_crisp_dm | 9c6bfcf65c1fe65f59a3069f172cad6b5c3c46bd | [
"MIT"
] | null | null | null | masculinity_survey.py | ChmielowiecAlek/ds_intro_crisp_dm | 9c6bfcf65c1fe65f59a3069f172cad6b5c3c46bd | [
"MIT"
] | null | null | null | masculinity_survey.py | ChmielowiecAlek/ds_intro_crisp_dm | 9c6bfcf65c1fe65f59a3069f172cad6b5c3c46bd | [
"MIT"
] | null | null | null | import urllib.request
import os
import shutil
import pandas
class DataSource:
""" This class is responsible for downloading original data from fivethirtyeight."""
__files = ['README.md', 'masculinity-survey.csv', 'masculinity-survey.pdf', 'raw-responses.csv']
__target_dir = os.path.join('venv', 'data', '... | 47.71875 | 100 | 0.419301 |
e5e1d2d84024f99602940f8bcfe8aac83bcc9589 | 19,215 | py | Python | tests/compilers/test_ast.py | peeley/hy | 03404e45bda2aca9aa6040e8c9fa5da5bfa598ef | [
"MIT"
] | null | null | null | tests/compilers/test_ast.py | peeley/hy | 03404e45bda2aca9aa6040e8c9fa5da5bfa598ef | [
"MIT"
] | null | null | null | tests/compilers/test_ast.py | peeley/hy | 03404e45bda2aca9aa6040e8c9fa5da5bfa598ef | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
# Copyright 2019 the authors.
# This file is part of Hy, which is free software licensed under the Expat
# license. See the LICENSE.
from __future__ import unicode_literals
from hy import HyString
from hy.compiler import hy_compile, hy_eval
from hy.errors import HyCompileError, HyLanguageErr... | 29.607088 | 87 | 0.636742 |
95bd0c7bd55d7d49e38f428fd858ef62fbc90459 | 269 | py | Python | tests/ansible/lib/modules/custom_python_external_pkg.py | webcoast-dk/mitogen | a5fe4a9fac5561511b676fe61ed127b732be5b12 | [
"BSD-3-Clause"
] | 1,526 | 2017-09-15T18:49:40.000Z | 2021-01-17T16:04:12.000Z | tests/ansible/lib/modules/custom_python_external_pkg.py | webcoast-dk/mitogen | a5fe4a9fac5561511b676fe61ed127b732be5b12 | [
"BSD-3-Clause"
] | 682 | 2017-09-11T17:43:12.000Z | 2021-01-17T05:26:26.000Z | tests/ansible/lib/modules/custom_python_external_pkg.py | webcoast-dk/mitogen | a5fe4a9fac5561511b676fe61ed127b732be5b12 | [
"BSD-3-Clause"
] | 111 | 2017-09-15T23:21:37.000Z | 2021-01-01T14:45:35.000Z | #!/usr/bin/python
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.externalpkg import extmod
def main():
module = AnsibleModule(argument_spec={})
module.exit_json(extmod_path=extmod.path())
if __name__ == '__main__':
main()
| 22.416667 | 52 | 0.750929 |
a36cb991aab6a5e6417c736dad3ee5b50e26fede | 2,196 | py | Python | kernel/examples/handler/component/fill_miss_value.py | rinceyuan/WeFe | 8482cb737cb7ba37b2856d184cd42c1bd35a6318 | [
"Apache-2.0"
] | 39 | 2021-10-12T01:43:27.000Z | 2022-03-28T04:46:35.000Z | kernel/examples/handler/component/fill_miss_value.py | rinceyuan/WeFe | 8482cb737cb7ba37b2856d184cd42c1bd35a6318 | [
"Apache-2.0"
] | 6 | 2021-10-14T02:11:47.000Z | 2022-03-23T02:41:50.000Z | kernel/examples/handler/component/fill_miss_value.py | rinceyuan/WeFe | 8482cb737cb7ba37b2856d184cd42c1bd35a6318 | [
"Apache-2.0"
] | 10 | 2021-10-14T09:36:03.000Z | 2022-02-10T11:05:12.000Z | # Copyright 2021 Tianmian Tech. 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 applicable la... | 36.6 | 74 | 0.742714 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.