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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1c94dda0976d23139bf577b23ee4cbcdf42f78e0 | 843 | py | Python | inout/las/reader/ui/notepad.py | adriangrepo/qreservoir | 20fba1b1fd1a42add223d9e8af2d267665bec493 | [
"MIT"
] | 2 | 2019-10-04T13:54:51.000Z | 2021-05-21T19:36:15.000Z | inout/las/reader/ui/notepad.py | adriangrepo/qreservoir | 20fba1b1fd1a42add223d9e8af2d267665bec493 | [
"MIT"
] | 3 | 2019-11-19T17:06:09.000Z | 2020-01-18T20:39:54.000Z | inout/las/reader/ui/notepad.py | adriangrepo/qreservoir | 20fba1b1fd1a42add223d9e8af2d267665bec493 | [
"MIT"
] | 2 | 2020-07-02T13:20:48.000Z | 2020-11-11T00:18:51.000Z | import sys
import os
import logging
from PyQt4 import QtGui
logger = logging.getLogger('console')
class Notepad(QtGui.QDialog):
def __init__(self, parent, filename):
super(Notepad, self).__init__(parent)
self.filename = filename
self.initUI()
self.showFile()
def init... | 24.085714 | 61 | 0.578885 |
370999ec182ade9b348240c5fe5b6a0d69df3428 | 1,550 | py | Python | desktop/core/ext-py/eventlet-0.24.1/setup.py | kokosing/hue | 2307f5379a35aae9be871e836432e6f45138b3d9 | [
"Apache-2.0"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | desktop/core/ext-py/eventlet-0.24.1/setup.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 1,623 | 2015-01-01T08:06:24.000Z | 2022-03-30T19:48:52.000Z | desktop/core/ext-py/eventlet-0.24.1/setup.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | #!/usr/bin/env python
import os
import setuptools
os.environ.setdefault('EVENTLET_IMPORT_VERSION_ONLY', '1')
import eventlet
setuptools.setup(
name='eventlet',
version=eventlet.__version__,
description='Highly concurrent networking library',
author='Linden Lab',
author_email='eventletdev@lists.se... | 31 | 82 | 0.591613 |
1bbedd9da2f3ae8727794785e7ae01600bb03d00 | 1,575 | py | Python | scripts/extract/extractor/extract_keras.py | liuyihuicaicloud/klever-model-registry | 02cf87fa9313c1ed7bfbf39bd65ae5bb4b8ecf38 | [
"Apache-2.0"
] | 73 | 2020-07-16T03:37:25.000Z | 2022-03-24T07:07:14.000Z | scripts/extract/extractor/extract_keras.py | liuyihuicaicloud/klever-model-registry | 02cf87fa9313c1ed7bfbf39bd65ae5bb4b8ecf38 | [
"Apache-2.0"
] | 215 | 2020-07-15T06:53:02.000Z | 2021-08-21T14:44:32.000Z | scripts/extract/extractor/extract_keras.py | liuyihuicaicloud/klever-model-registry | 02cf87fa9313c1ed7bfbf39bd65ae5bb4b8ecf38 | [
"Apache-2.0"
] | 21 | 2020-07-23T10:18:34.000Z | 2022-03-18T14:17:14.000Z | import os
import json
import collections
from tensorflow import keras
from .base_extract import BaseExtrctor
MODEL_TYPE = 'Keras'
EXTENSION = '.h5'
class KerasExtractor(BaseExtrctor):
def _extract_inputs(self):
inputs = []
for tensor in self.models.inputs:
origin_inputs = {}
... | 30.288462 | 74 | 0.599365 |
bf2cac3b6fa8d78a28d7cfbc6ddfa4b6019af121 | 3,565 | py | Python | cervmongo/vars.py | antcer1213/cervmongo | d0267cc43d8ecd073f4e503ff0f8d23d65f211d1 | [
"MIT"
] | 1 | 2020-08-06T05:30:05.000Z | 2020-08-06T05:30:05.000Z | cervmongo/vars.py | antcer1213/cervmongo | d0267cc43d8ecd073f4e503ff0f8d23d65f211d1 | [
"MIT"
] | null | null | null | cervmongo/vars.py | antcer1213/cervmongo | d0267cc43d8ecd073f4e503ff0f8d23d65f211d1 | [
"MIT"
] | null | null | null | # vars.py
#
# Copyright 2020 Anthony "antcer1213" Cervantes <anthony.cervantes@cerver.info>
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, includ... | 33.009259 | 143 | 0.720337 |
538ba6a00012a6bb9d5e7987a59289f1e81c8c34 | 3,857 | py | Python | src/cryptography/hazmat/primitives/smime.py | wellingtonf-souza/cryptography | 4e24d9b9f3d17bcd5c0fd9096a05f3d8f49bc963 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2021-01-07T00:45:45.000Z | 2021-05-16T23:47:52.000Z | src/cryptography/hazmat/primitives/smime.py | wellingtonf-souza/cryptography | 4e24d9b9f3d17bcd5c0fd9096a05f3d8f49bc963 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/cryptography/hazmat/primitives/smime.py | wellingtonf-souza/cryptography | 4e24d9b9f3d17bcd5c0fd9096a05f3d8f49bc963 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2021-01-07T00:45:46.000Z | 2021-01-07T00:45:46.000Z | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
from enum import Enum
from cryptography import x509
from cryptography.ha... | 35.063636 | 79 | 0.621727 |
8ee2289bcd50d8a7d14073e0cef1825172de6d43 | 728 | py | Python | src/collectors/vmsdoms/test/testvmsdoms.py | hermdog/Diamond | 0f3eb04327d6d3ed5e53a9967d6c9d2c09714a47 | [
"MIT"
] | 1,795 | 2015-01-05T11:14:55.000Z | 2022-03-25T12:07:15.000Z | src/collectors/vmsdoms/test/testvmsdoms.py | hermdog/Diamond | 0f3eb04327d6d3ed5e53a9967d6c9d2c09714a47 | [
"MIT"
] | 671 | 2015-01-02T05:57:27.000Z | 2022-03-29T22:39:05.000Z | src/collectors/vmsdoms/test/testvmsdoms.py | hermdog/Diamond | 0f3eb04327d6d3ed5e53a9967d6c9d2c09714a47 | [
"MIT"
] | 793 | 2015-01-03T01:39:02.000Z | 2022-02-18T05:12:27.000Z | #!/usr/bin/python
# coding=utf-8
###############################################################################
from test import CollectorTestCase
from test import get_collector_config
from test import unittest
from vmsdoms import VMSDomsCollector
###################################################################... | 26.962963 | 79 | 0.487637 |
22eb6f0a9180d90f977b1672f2de365dbc693d69 | 5,523 | py | Python | databrowse/plugins/db_generic_WSGI_application/db_generic_WSGI_application.py | limatix/Databrowse | af33bc6cca930e59acc3762beeec2409d8fd8634 | [
"BSD-3-Clause"
] | 3 | 2016-09-20T07:04:09.000Z | 2018-07-17T17:31:21.000Z | databrowse/plugins/db_generic_WSGI_application/db_generic_WSGI_application.py | limatix/Databrowse | af33bc6cca930e59acc3762beeec2409d8fd8634 | [
"BSD-3-Clause"
] | 19 | 2016-10-25T07:05:28.000Z | 2018-08-07T23:18:16.000Z | databrowse/plugins/db_generic_WSGI_application/db_generic_WSGI_application.py | limatix/Databrowse | af33bc6cca930e59acc3762beeec2409d8fd8634 | [
"BSD-3-Clause"
] | 2 | 2016-10-28T00:12:42.000Z | 2016-10-28T00:18:03.000Z | #!/usr/bin/env python
###############################################################################
## Databrowse: An Extensible Data Management Platform ##
## Copyright (C) 2012-2016 Iowa State University Research Foundation, Inc. ##
## All rights reserved. ... | 54.683168 | 94 | 0.579395 |
044cb8f7a656e23c2e49a4ca31a95877029b18d3 | 29,985 | py | Python | twitch_onair_neopixel.py | europaYuu/RaspiTwitchONAIR | 8fa7a5f457a297e9b06fb946e89c33a0d49e335f | [
"MIT"
] | null | null | null | twitch_onair_neopixel.py | europaYuu/RaspiTwitchONAIR | 8fa7a5f457a297e9b06fb946e89c33a0d49e335f | [
"MIT"
] | null | null | null | twitch_onair_neopixel.py | europaYuu/RaspiTwitchONAIR | 8fa7a5f457a297e9b06fb946e89c33a0d49e335f | [
"MIT"
] | null | null | null | # Get Stream Status from Twitch
#
# Requires registration of a Twitch Application. For more information, go to https://dev.twitch.tv/docs/api/ "Getting Started with the Twitch API". Leaving OAuth Redirect URL to http://localhost seems to work, but please let me know on twitter if this is bad practice.
# This script use... | 27.841226 | 295 | 0.681641 |
dd6d712ed28f972c5124634fc5f7cb3d787ec074 | 10,391 | py | Python | morpho_segm/prefix.py | GiulioZhou/Morpho_Zero-Shot_NMT | be9eb5915569030de763cee1aa20e663ebdc201c | [
"MIT"
] | 1 | 2019-07-22T19:18:32.000Z | 2019-07-22T19:18:32.000Z | morpho_segm/prefix.py | GiulioZhou/Morpho_Zero-Shot_NMT | be9eb5915569030de763cee1aa20e663ebdc201c | [
"MIT"
] | null | null | null | morpho_segm/prefix.py | GiulioZhou/Morpho_Zero-Shot_NMT | be9eb5915569030de763cee1aa20e663ebdc201c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from nltk.corpus import stopwords
tok_p = "##"
special = "?!\"(=:;,.\'[{"
#https://en.wiktionary.org/wiki/Category:Italian_prefixes
ita_prefix = ['epistolo', 'spermato', 'allergo', 'antropo', 'carcino',
'cherato', 'cinesio', 'cistico', 'cortico', 'dattilo', 'dermato',
'deutero', 'elettro'... | 53.287179 | 91 | 0.534212 |
49db462d664583435f0f84f33e94817c42c81810 | 461 | py | Python | db/seed-cassandra/seedCassandra.py | stephaniesara/highlights | a3a610c656d8cdae582377f53a2ca4b526b69751 | [
"MIT"
] | null | null | null | db/seed-cassandra/seedCassandra.py | stephaniesara/highlights | a3a610c656d8cdae582377f53a2ca4b526b69751 | [
"MIT"
] | null | null | null | db/seed-cassandra/seedCassandra.py | stephaniesara/highlights | a3a610c656d8cdae582377f53a2ca4b526b69751 | [
"MIT"
] | 1 | 2018-04-11T19:32:03.000Z | 2018-04-11T19:32:03.000Z | # UNABLE TO CONNECT
import csv
from pycassa.pool import ConnectionPool
from pycassa.columnfamily import ColumnFamily
pool = ConnectionPool('test', ['127.0.0.1:9042'])
cf = ColumnFamily(pool, "testtable")
with open('test.csv', 'rb') as csvfile:
reader = csv.DictReader(csvfile)
for row in reader:
print str(row... | 20.954545 | 49 | 0.694143 |
979374f69ed4c98d92b19a9c66e6b3281ce3738b | 2,207 | py | Python | Scripts/simulation/narrative/narrative_environment_support.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/simulation/narrative/narrative_environment_support.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/simulation/narrative/narrative_environment_support.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | # uncompyle6 version 3.7.4
# Python bytecode 3.7 (3394)
# Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
# Embedded file name: T:\InGame\Gameplay\Scripts\Server\narrative\narrative_environment_support.py
# Compiled at: 2018-10-30 03:32:06
# Size of source mod 2... | 73.566667 | 234 | 0.696874 |
bb2d186060adcd7ad177172d005fd2cacc951f81 | 592 | py | Python | hrsalespipes/contacts/migrations/0021_auto_20200326_0301.py | hanztura/hrsalespipes | 77accf3132726ced05d84fa2a41891b841f310b8 | [
"Apache-2.0"
] | 3 | 2020-03-26T12:43:43.000Z | 2021-05-10T14:35:51.000Z | hrsalespipes/contacts/migrations/0021_auto_20200326_0301.py | hanztura/hrsalespipes | 77accf3132726ced05d84fa2a41891b841f310b8 | [
"Apache-2.0"
] | 5 | 2021-04-08T21:15:15.000Z | 2022-02-10T11:03:12.000Z | hrsalespipes/contacts/migrations/0021_auto_20200326_0301.py | hanztura/hrsalespipes | 77accf3132726ced05d84fa2a41891b841f310b8 | [
"Apache-2.0"
] | 1 | 2022-01-30T19:24:48.000Z | 2022-01-30T19:24:48.000Z | # Generated by Django 2.2.10 on 2020-03-26 03:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contacts', '0020_auto_20200325_2355'),
]
operations = [
migrations.AlterField(
model_name='candidate',
name='curren... | 24.666667 | 72 | 0.603041 |
218e496bc3e603d339fbd6b2cfa3e7a2eca5e4d0 | 1,812 | py | Python | examples/intersecting_iterator/search.py | volmasoft/pyaccumulo | 8adcf535bb82ba69c749efce785c9efc487e85de | [
"Apache-2.0"
] | 7 | 2015-04-04T07:17:58.000Z | 2016-02-10T03:33:29.000Z | examples/intersecting_iterator/search.py | volmasoft/pyaccumulo | 8adcf535bb82ba69c749efce785c9efc487e85de | [
"Apache-2.0"
] | 6 | 2015-01-22T16:41:29.000Z | 2016-06-06T04:52:46.000Z | examples/intersecting_iterator/search.py | volmasoft/pyaccumulo | 8adcf535bb82ba69c749efce785c9efc487e85de | [
"Apache-2.0"
] | 6 | 2015-06-23T19:06:11.000Z | 2016-08-10T19:53:11.000Z | #!/usr/bin/env python
# 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 "Licen... | 36.24 | 139 | 0.748344 |
32c5e4552046dffc86137cbd7c3f976a3be731db | 2,026 | py | Python | dislib/model_selection/_validation.py | alexbarcelo/dislib | 989f81f235ae30b17410a8d805df258c7d931b38 | [
"Apache-2.0"
] | 36 | 2018-10-22T19:21:14.000Z | 2022-03-22T12:10:01.000Z | dislib/model_selection/_validation.py | alexbarcelo/dislib | 989f81f235ae30b17410a8d805df258c7d931b38 | [
"Apache-2.0"
] | 329 | 2018-11-22T18:04:57.000Z | 2022-03-18T01:26:55.000Z | dislib/model_selection/_validation.py | alexbarcelo/dislib | 989f81f235ae30b17410a8d805df258c7d931b38 | [
"Apache-2.0"
] | 21 | 2019-01-10T11:46:39.000Z | 2022-03-17T12:59:45.000Z | import numbers
import numpy as np
def fit_and_score(estimator, train_ds, validation_ds, scorer, parameters,
fit_params):
if parameters is not None:
estimator.set_params(**parameters)
x_train, y_train = train_ds
estimator.fit(x_train, y_train, **fit_params)
x_test, y_test = v... | 31.169231 | 74 | 0.581935 |
825b36df98febaac082c254729e2c258f9747936 | 2,390 | py | Python | cripts/email_addresses/email_address.py | lakiw/cripts | 43f62891a3724e1ec60629887d97c421fb302163 | [
"MIT"
] | 2 | 2017-04-06T12:26:11.000Z | 2018-11-05T19:17:15.000Z | cripts/email_addresses/email_address.py | lakiw/cripts | 43f62891a3724e1ec60629887d97c421fb302163 | [
"MIT"
] | 9 | 2016-09-28T10:19:10.000Z | 2017-02-24T17:58:43.000Z | cripts/email_addresses/email_address.py | lakiw/cripts | 43f62891a3724e1ec60629887d97c421fb302163 | [
"MIT"
] | null | null | null | import uuid
from mongoengine import Document, StringField, UUIDField, ListField
from django.conf import settings
from cripts.core.cripts_mongoengine import CriptsBaseAttributes, CriptsSourceDocument
from cripts.core.cripts_mongoengine import CriptsActionsDocument
class EmailAddress(CriptsBaseAttributes, CriptsSourc... | 41.929825 | 94 | 0.506276 |
b793b2a92123816b56d6a56290c56dce0a858fa0 | 914 | py | Python | pkgs/conda-env-2.4.5-py27_0/lib/python2.7/site-packages/conda_env/installers/conda.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | pkgs/conda-env-2.4.5-py27_0/lib/python2.7/site-packages/conda_env/installers/conda.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | pkgs/conda-env-2.4.5-py27_0/lib/python2.7/site-packages/conda_env/installers/conda.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from conda.cli import common
from conda import plan
def install(prefix, specs, args, env):
# TODO: do we need this?
common.check_specs(prefix, specs, json=args.json)
# TODO: support all various ways this happens
index = common.get_index_trap(channel_urls=env.ch... | 35.153846 | 79 | 0.667396 |
e9bc844593333749cae0c7e5f641429c09b73f87 | 1,651 | py | Python | file_handlers/fh_robotracine.py | tpmp-inra/ipapi | b0f6be8960a20dbf95ef9df96efdd22bd6e031c5 | [
"MIT"
] | 1 | 2020-06-30T06:53:36.000Z | 2020-06-30T06:53:36.000Z | file_handlers/fh_robotracine.py | tpmp-inra/ipapi | b0f6be8960a20dbf95ef9df96efdd22bd6e031c5 | [
"MIT"
] | null | null | null | file_handlers/fh_robotracine.py | tpmp-inra/ipapi | b0f6be8960a20dbf95ef9df96efdd22bd6e031c5 | [
"MIT"
] | null | null | null | import os
from datetime import datetime as dt
from ipso_phen.ipapi.file_handlers.fh_base import FileHandlerBase
import logging
logger = logging.getLogger(__name__)
class FileHandlerRobotRacine(FileHandlerBase):
def __init__(self, **kwargs):
"""Fill plant, date, time, experiment, camera and ... | 33.693878 | 89 | 0.602665 |
d7ea7677b7f28f0a29a3a5713916e4419729d659 | 112 | py | Python | archivesapi/archives/admin.py | SubcityRadio/archives-api | a6e4fe6bda8ce4a37c37c4a648f8514ec7919a9f | [
"MIT"
] | null | null | null | archivesapi/archives/admin.py | SubcityRadio/archives-api | a6e4fe6bda8ce4a37c37c4a648f8514ec7919a9f | [
"MIT"
] | 3 | 2020-06-05T19:59:01.000Z | 2021-06-10T21:13:42.000Z | archivesapi/archives/admin.py | SubcityRadio/archives-api | a6e4fe6bda8ce4a37c37c4a648f8514ec7919a9f | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import ArchivePost, ArchiveYear
admin.site.register(ArchivePost) | 22.4 | 44 | 0.839286 |
307656bd63e432328e027969a57aa890cd054374 | 7,068 | py | Python | google/ads/google_ads/v2/proto/enums/real_estate_placeholder_field_pb2.py | jiulongw/google-ads-python | 6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e | [
"Apache-2.0"
] | 1 | 2019-11-30T23:42:39.000Z | 2019-11-30T23:42:39.000Z | google/ads/google_ads/v2/proto/enums/real_estate_placeholder_field_pb2.py | jiulongw/google-ads-python | 6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v2/proto/enums/real_estate_placeholder_field_pb2.py | jiulongw/google-ads-python | 6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e | [
"Apache-2.0"
] | 1 | 2020-03-13T00:14:31.000Z | 2020-03-13T00:14:31.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/ads/googleads_v2/proto/enums/real_estate_placeholder_field.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.pr... | 42.071429 | 1,255 | 0.765139 |
f89432ff01cf435be15b34bed84d187aec8743de | 8,933 | py | Python | tutorials/micro/micro_autotune.py | Light-of-Hers/tvm | dc2f70e3c8a9b14b9e414ecf768ad32e6c3c3960 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | null | null | null | tutorials/micro/micro_autotune.py | Light-of-Hers/tvm | dc2f70e3c8a9b14b9e414ecf768ad32e6c3c3960 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | null | null | null | tutorials/micro/micro_autotune.py | Light-of-Hers/tvm | dc2f70e3c8a9b14b9e414ecf768ad32e6c3c3960 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 35.589641 | 111 | 0.653196 |
44c3e791353670c5db679b0584f87612f36db544 | 847 | py | Python | apps/dr_tb_malancha/plots/__init__.py | malanchak/AuTuMN | 0cbd006d1f15da414d02eed44e48bb5c06f0802e | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | apps/dr_tb_malancha/plots/__init__.py | malanchak/AuTuMN | 0cbd006d1f15da414d02eed44e48bb5c06f0802e | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | apps/dr_tb_malancha/plots/__init__.py | malanchak/AuTuMN | 0cbd006d1f15da414d02eed44e48bb5c06f0802e | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | """
Used to load model parameters from file
"""
import os
import yaml
from os import path
from autumn.constants import APPS_PATH
from autumn.tool_kit.utils import merge_dicts
def load_plot_config(region_name: str):
"""
Load plot config requested COVID region.
This is for loading only, please do not put ... | 28.233333 | 75 | 0.714286 |
2800062b0c7d2fabdc1d0dd80619a43098c75675 | 5,572 | py | Python | userbot/modules/updater.py | mkaraniya/PaperplaneExtended | 5df22fa54cfc432b01901d6313aacc7ecd2fb318 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 5 | 2019-10-18T12:03:37.000Z | 2020-10-10T03:23:48.000Z | userbot/modules/updater.py | mkaraniya/PaperplaneExtended | 5df22fa54cfc432b01901d6313aacc7ecd2fb318 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/updater.py | mkaraniya/PaperplaneExtended | 5df22fa54cfc432b01901d6313aacc7ecd2fb318 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 42 | 2019-11-02T13:55:41.000Z | 2020-05-29T00:55:11.000Z | # Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.c (the "License");
# you may not use this file except in compliance with the License.
#
"""
This module updates the userbot based on Upstream revision
"""
from os import remove, execl, path
import asyncio
i... | 35.717949 | 127 | 0.600682 |
1a010b7675f9a5608c3809beb1b851f606daba40 | 11,084 | py | Python | Doc/api/conf.py | uci-ics-32/biopython | ff7d3703d442192a1f6d84c52e028d566d44ff1c | [
"BSD-3-Clause"
] | 1 | 2022-01-04T21:38:03.000Z | 2022-01-04T21:38:03.000Z | Doc/api/conf.py | uci-ics-32/biopython | ff7d3703d442192a1f6d84c52e028d566d44ff1c | [
"BSD-3-Clause"
] | 1 | 2019-02-24T18:24:56.000Z | 2019-02-27T02:31:56.000Z | Doc/api/conf.py | uci-ics-32/biopython | ff7d3703d442192a1f6d84c52e028d566d44ff1c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""Biopython Sphinx documentation build configuration file.
After generating ``*.rst`` files from the source code, this
file controls running ``sphinx-build`` to turn these into
human readable documentation.
"""
import os
import shutil
import sys
import tempfile
from sphinx.ext import autodoc
... | 31.759312 | 88 | 0.655179 |
13193f19af9bcecbaccdf223ed23b3e4f733945a | 1,760 | py | Python | core/migrations/0001_initial.py | vitorpvcampos/gomenu | e61d9d843a191dfca9c8ce0f587075cbd84319fe | [
"MIT"
] | 4 | 2020-08-13T12:07:33.000Z | 2022-02-20T11:18:54.000Z | core/migrations/0001_initial.py | vitorpvcampos/gomenu | e61d9d843a191dfca9c8ce0f587075cbd84319fe | [
"MIT"
] | 246 | 2020-06-30T14:28:22.000Z | 2022-03-27T14:51:58.000Z | core/migrations/0001_initial.py | vitorpvcampos/gomenu | e61d9d843a191dfca9c8ce0f587075cbd84319fe | [
"MIT"
] | 1 | 2020-08-13T12:06:50.000Z | 2020-08-13T12:06:50.000Z | # Generated by Django 3.0.7 on 2020-06-29 21:54
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 38.26087 | 121 | 0.583523 |
d26e6e565b59a0e99d8b110031c2a5c6d24c53dc | 267 | py | Python | server/users/models.py | dmitrytk/horizon | 8fc130d9d619de0e7ad7aad24d1e6f457bc68df0 | [
"MIT"
] | null | null | null | server/users/models.py | dmitrytk/horizon | 8fc130d9d619de0e7ad7aad24d1e6f457bc68df0 | [
"MIT"
] | null | null | null | server/users/models.py | dmitrytk/horizon | 8fc130d9d619de0e7ad7aad24d1e6f457bc68df0 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import User
from django.db import models
class Employee(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
department = models.CharField(max_length=255)
position = models.CharField(max_length=255)
| 29.666667 | 63 | 0.779026 |
05aa5b3775b0b70a1b82a56acbb6b31f9be13b4a | 17,837 | py | Python | Bio/motifs/__init__.py | phillord/biopython | c8dfe46f192d6ccfac94b156cef024776545638e | [
"PostgreSQL"
] | 1 | 2020-12-03T12:13:58.000Z | 2020-12-03T12:13:58.000Z | Bio/motifs/__init__.py | phillord/biopython | c8dfe46f192d6ccfac94b156cef024776545638e | [
"PostgreSQL"
] | null | null | null | Bio/motifs/__init__.py | phillord/biopython | c8dfe46f192d6ccfac94b156cef024776545638e | [
"PostgreSQL"
] | null | null | null | # Copyright 2003-2009 by Bartek Wilczynski. All rights reserved.
# Copyright 2012-2013 by Michiel JL de Hoon. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tools for sequen... | 34.105163 | 159 | 0.574088 |
35d49516960617ed71b4063b404ceb027d5b016e | 507 | py | Python | 0x0A-python-inheritance/100-my_int.py | oluwaseun-ebenezer/holbertonschool-higher_level_programming | e830f969d3ca71abf0a2f6d4f7c64a82337eccd7 | [
"MIT"
] | null | null | null | 0x0A-python-inheritance/100-my_int.py | oluwaseun-ebenezer/holbertonschool-higher_level_programming | e830f969d3ca71abf0a2f6d4f7c64a82337eccd7 | [
"MIT"
] | null | null | null | 0x0A-python-inheritance/100-my_int.py | oluwaseun-ebenezer/holbertonschool-higher_level_programming | e830f969d3ca71abf0a2f6d4f7c64a82337eccd7 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""
Contains the class MyInt
"""
class MyInt(int):
"""rebel version of an integer, perfect for opposite day!"""
def __new__(cls, *args, **kwargs):
"""create a new instance of the class"""
return super(MyInt, cls).__new__(cls, *args, **kwargs)
def __eq__(self... | 25.35 | 65 | 0.546351 |
40c8ce0e49eace382dfcf7a452c82520719ffca7 | 1,953 | py | Python | scripts/bin_to_mem.py | appotry/openofdm | 0ab83ce22385c132f055ef85dcbcea8eeffd77f0 | [
"Apache-2.0"
] | 200 | 2017-05-03T19:17:11.000Z | 2022-03-22T00:19:50.000Z | scripts/bin_to_mem.py | jools76/openofdm | 229da948ae4df55fb3b6d9a055ca3e75079e50b1 | [
"Apache-2.0"
] | 8 | 2018-05-08T12:01:56.000Z | 2021-12-09T13:54:44.000Z | scripts/bin_to_mem.py | jools76/openofdm | 229da948ae4df55fb3b6d9a055ca3e75079e50b1 | [
"Apache-2.0"
] | 78 | 2017-05-12T09:36:17.000Z | 2022-03-28T14:38:07.000Z | #!/usr/bin/env python
"""
Convert a binary data file (generated by rx_samples_to_file) to a memroy text
file that can be read by Verilog's $readmemh.
"""
import argparse
import os
import time
import sys
CHUNK_SIZE = 2**20
def le_bin_str_to_signed_short(b):
v = ord(b[1])*(1<<8) + ord(b[0])
if v > (1<<15):
... | 29.149254 | 85 | 0.549923 |
e6ab7cf1144de7c27f13fc811aea68227ac1866e | 3,378 | py | Python | configgen/generators/reicast/reicastControllers.py | pmoran13800/rhgamestation-configgen | 72cf636adeb6fa83abea66e0a85fe574405a0ede | [
"MIT"
] | null | null | null | configgen/generators/reicast/reicastControllers.py | pmoran13800/rhgamestation-configgen | 72cf636adeb6fa83abea66e0a85fe574405a0ede | [
"MIT"
] | null | null | null | configgen/generators/reicast/reicastControllers.py | pmoran13800/rhgamestation-configgen | 72cf636adeb6fa83abea66e0a85fe574405a0ede | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
import ConfigParser
import rhgamestationFiles
sys.path.append(
os.path.abspath(os.path.join(os.path.dirname(__file__), '../..')))
import settings.unixSettings as unixSettings
import rhgamestationFiles
reicastMapping = { 'a' : {'butto... | 40.214286 | 309 | 0.585554 |
e51fdde13475a2fdbbc5e07b8090d6fafa405e6f | 1,074 | py | Python | Tester.py | betisb/WebProgrammin_I | 6e2e4525c8d7766d65785e30bb43234cd7d829ef | [
"MIT"
] | null | null | null | Tester.py | betisb/WebProgrammin_I | 6e2e4525c8d7766d65785e30bb43234cd7d829ef | [
"MIT"
] | null | null | null | Tester.py | betisb/WebProgrammin_I | 6e2e4525c8d7766d65785e30bb43234cd7d829ef | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
def test_assignment_0_hello(student_id,url):
response = requests.get(url+"/index")
assert response.status_code == 200
assert "h1" in response.text.lower()
#assert student_id in response.text
print("Pass")
def test_assignment_0_login(student_id,url):
... | 30.685714 | 53 | 0.679702 |
483cc02f32cb024bb83b5eec5cec7432cd8defe0 | 164 | py | Python | case_bootloader/def_bootloader.py | eaglelaw/runcase | 87c88b592d2c4a1a68e3af069ebbd1c91367c91c | [
"Apache-2.0"
] | null | null | null | case_bootloader/def_bootloader.py | eaglelaw/runcase | 87c88b592d2c4a1a68e3af069ebbd1c91367c91c | [
"Apache-2.0"
] | null | null | null | case_bootloader/def_bootloader.py | eaglelaw/runcase | 87c88b592d2c4a1a68e3af069ebbd1c91367c91c | [
"Apache-2.0"
] | null | null | null | #the key word for info: desc, name, abbr
INFO = {
'desc':'MCU bootloader test',
'name':'case_bootloader',
'abbr':'boot'#Abbreviation of case module name
}
| 23.428571 | 48 | 0.664634 |
84bcc95a1dc44f385e792834925146625bdb3c09 | 4,584 | py | Python | os_dhcp_server/server.py | dsneddon/os-dhcp-server | b35bca9b15f1fb8ec164273f2052a5b37669dec2 | [
"Apache-2.0"
] | null | null | null | os_dhcp_server/server.py | dsneddon/os-dhcp-server | b35bca9b15f1fb8ec164273f2052a5b37669dec2 | [
"Apache-2.0"
] | null | null | null | os_dhcp_server/server.py | dsneddon/os-dhcp-server | b35bca9b15f1fb8ec164273f2052a5b37669dec2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2014-2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 37.884298 | 79 | 0.566099 |
4b2b65216df63ff40c34618b12012582b178271d | 2,148 | py | Python | examples/full-screen/simple-demos/margins.py | wichmann/python-prompt-toolkit | e2bb3a9f2062327a6203024c75aec29ea7a110de | [
"BSD-3-Clause"
] | 1 | 2020-08-08T22:00:16.000Z | 2020-08-08T22:00:16.000Z | examples/full-screen/simple-demos/margins.py | wichmann/python-prompt-toolkit | e2bb3a9f2062327a6203024c75aec29ea7a110de | [
"BSD-3-Clause"
] | 1 | 2021-04-08T11:26:23.000Z | 2021-04-08T11:26:23.000Z | examples/full-screen/simple-demos/margins.py | wichmann/python-prompt-toolkit | e2bb3a9f2062327a6203024c75aec29ea7a110de | [
"BSD-3-Clause"
] | 1 | 2021-04-08T11:25:43.000Z | 2021-04-08T11:25:43.000Z | #!/usr/bin/env python
"""
Example of Window margins.
This is mainly used for displaying line numbers and scroll bars, but it could
be used to display any other kind of information as well.
"""
from prompt_toolkit.application import Application
from prompt_toolkit.buffer import Buffer
from prompt_toolkit.key_binding im... | 30.253521 | 82 | 0.75838 |
8bc29419ecfb1ab181836aa15e6c694677337b43 | 1,202 | py | Python | tests/support/factories/distribution_errors.py | leobelen/pydatajson | bcc6bbbb9d6554c82a658542522330d8e6337731 | [
"MIT"
] | null | null | null | tests/support/factories/distribution_errors.py | leobelen/pydatajson | bcc6bbbb9d6554c82a658542522330d8e6337731 | [
"MIT"
] | null | null | null | tests/support/factories/distribution_errors.py | leobelen/pydatajson | bcc6bbbb9d6554c82a658542522330d8e6337731 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from tests.support.utils import jsonschema_str
def distribution_error():
return {
"status": "ERROR",
"error": {
"catalog": {
"status": "OK",
"errors": [],
"title": "Datos Argentina"
},
"dat... | 27.318182 | 74 | 0.383527 |
6d7859a328e5aa822cee03f20f4e38c861fb93c9 | 115,590 | py | Python | simulator/dpsched/DP_simulator.py | DelphianCalamity/PrivateKube | 14f575e77021ab7baca30f4061140ec83bdc96a7 | [
"Apache-2.0"
] | 9 | 2021-06-16T00:22:45.000Z | 2021-11-25T07:19:11.000Z | simulator/dpsched/DP_simulator.py | DelphianCalamity/PrivateKube | 14f575e77021ab7baca30f4061140ec83bdc96a7 | [
"Apache-2.0"
] | 2 | 2021-11-14T10:42:43.000Z | 2022-03-16T03:43:22.000Z | simulator/dpsched/DP_simulator.py | DelphianCalamity/PrivateKube | 14f575e77021ab7baca30f4061140ec83bdc96a7 | [
"Apache-2.0"
] | 3 | 2021-04-08T08:08:48.000Z | 2021-12-24T01:42:20.000Z | # Copyright (c) 2021. Tao Luo <tao.luo@columbia.edu>
#
#
# 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 re... | 41.062167 | 170 | 0.542184 |
4fed117ac54f9b521524c5ef09947e9ded37706b | 7,379 | py | Python | donkeycar/templates/donkey2.py | 991693552/donkeycar-pi | f629f69c4a2c3d167e59525e3eedc4c0a7991cba | [
"MIT"
] | 6 | 2019-06-05T02:25:55.000Z | 2021-06-21T13:48:58.000Z | donkeycar/templates/donkey2.py | 991693552/donkeycar_jetson_nano | 0656898c14099f105f82945dd481cc6ce606b103 | [
"MIT"
] | null | null | null | donkeycar/templates/donkey2.py | 991693552/donkeycar_jetson_nano | 0656898c14099f105f82945dd481cc6ce606b103 | [
"MIT"
] | 4 | 2019-06-19T07:04:10.000Z | 2020-03-12T08:10:57.000Z | #!/usr/bin/env python3
"""
Scripts to drive a donkey 2 car and train a model for it.
Usage:
manage.py (drive) [--model=<model>] [--js] [--chaos]
manage.py (train) [--tub=<tub1,tub2,..tubn>] (--model=<model>) [--base_model=<base_model>] [--no_cache]
Options:
-h --help Show this screen.
--tub TU... | 36.349754 | 108 | 0.648733 |
b8cb6f9227f04100d3554b00dee434f0aa99caea | 3,080 | py | Python | app/app/settings.py | mufasasa/recipe-app-api | d602137fc9e198a3fc847828abbc0751b280a8af | [
"MIT"
] | null | null | null | app/app/settings.py | mufasasa/recipe-app-api | d602137fc9e198a3fc847828abbc0751b280a8af | [
"MIT"
] | null | null | null | app/app/settings.py | mufasasa/recipe-app-api | d602137fc9e198a3fc847828abbc0751b280a8af | [
"MIT"
] | null | null | null | """
Django settings for app project.
Generated by 'django-admin startproject' using Django 2.1.15.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
# Bu... | 25.454545 | 91 | 0.692857 |
ab5d4740ab21032b6601106c1950fd36e0bc526e | 8,727 | py | Python | PyFunceble/abstracts/package.py | NeolithEra/PyFunceble | 58db861d36224f279a460f4959aaa2e140ce749f | [
"MIT"
] | null | null | null | PyFunceble/abstracts/package.py | NeolithEra/PyFunceble | 58db861d36224f279a460f4959aaa2e140ce749f | [
"MIT"
] | null | null | null | PyFunceble/abstracts/package.py | NeolithEra/PyFunceble | 58db861d36224f279a460f4959aaa2e140ce749f | [
"MIT"
] | null | null | null | """
The tool to check the availability or syntax of domains, IPv4, IPv6 or URL.
::
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ ... | 31.967033 | 88 | 0.573278 |
6d56e05974286be0cd48530301910dae464674af | 553 | py | Python | hospital/admin.py | favourch/hospitalmanagement | 7dcf4d9f548b7808d54b758a1769a3de07280227 | [
"MIT"
] | 3 | 2021-03-08T17:41:12.000Z | 2022-01-10T13:01:20.000Z | hospital/admin.py | sharon-06/hospitalmanagement | 853135de381be15797a219b33b7d383ae2a5c62b | [
"MIT"
] | null | null | null | hospital/admin.py | sharon-06/hospitalmanagement | 853135de381be15797a219b33b7d383ae2a5c62b | [
"MIT"
] | 2 | 2021-12-25T20:01:05.000Z | 2022-01-09T14:12:20.000Z | from django.contrib import admin
from .models import Doctor,Patient,Appointment,PatientDischargeDetails
# Register your models here.
class DoctorAdmin(admin.ModelAdmin):
pass
admin.site.register(Doctor, DoctorAdmin)
class PatientAdmin(admin.ModelAdmin):
pass
admin.site.register(Patient, PatientAdmin)
class Ap... | 29.105263 | 74 | 0.82821 |
77bbabdabcf6089f1c91b26d0e6f1291a4653e9a | 2,712 | py | Python | neighbourhood/migrations/0001_initial.py | NIelsen-Mudaki/neighbourhood | 12e7a38188e00c1cbc7810745eda4d9d205ae0e1 | [
"Unlicense"
] | null | null | null | neighbourhood/migrations/0001_initial.py | NIelsen-Mudaki/neighbourhood | 12e7a38188e00c1cbc7810745eda4d9d205ae0e1 | [
"Unlicense"
] | null | null | null | neighbourhood/migrations/0001_initial.py | NIelsen-Mudaki/neighbourhood | 12e7a38188e00c1cbc7810745eda4d9d205ae0e1 | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2022-03-21 11:24
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django_countries.fields
class Migration(migrations.Migration):
initial = True
depe... | 43.741935 | 155 | 0.618363 |
e5df08784497c33e9ee631f885177aba1f349362 | 42,274 | py | Python | run_generator.py | PDillis/stylegan2-fun | 420a2819c12dbe3c0c4704a722e292d541f6b006 | [
"BSD-Source-Code"
] | 40 | 2020-02-18T04:43:45.000Z | 2022-03-14T13:44:36.000Z | run_generator.py | PDillis/stylegan2-fun | 420a2819c12dbe3c0c4704a722e292d541f6b006 | [
"BSD-Source-Code"
] | null | null | null | run_generator.py | PDillis/stylegan2-fun | 420a2819c12dbe3c0c4704a722e292d541f6b006 | [
"BSD-Source-Code"
] | 4 | 2020-11-07T08:35:00.000Z | 2021-09-12T08:54:13.000Z | # Copyright (c) 2019, NVIDIA Corporation. All rights reserved.
#
# This work is made available under the Nvidia Source Code License-NC.
# To view a copy of this license, visit
# https://nvlabs.github.io/stylegan2/license.html
import argparse
import scipy
import numpy as np
import PIL.Image
import dnnlib
import dnnli... | 50.147094 | 204 | 0.621422 |
8650f877a14772e01c1ad0bd43caf878fa1f18ce | 1,741 | py | Python | setup.py | zkneupper/codecolor | a0794d5b43da367c700d1c9421f9e607ac50ff5a | [
"Apache-2.0"
] | 1 | 2022-03-23T23:41:19.000Z | 2022-03-23T23:41:19.000Z | setup.py | zkneupper/codecolor | a0794d5b43da367c700d1c9421f9e607ac50ff5a | [
"Apache-2.0"
] | 1 | 2021-05-10T00:42:57.000Z | 2021-05-10T00:42:57.000Z | setup.py | zkneupper/codecolor | a0794d5b43da367c700d1c9421f9e607ac50ff5a | [
"Apache-2.0"
] | 1 | 2021-07-31T23:17:13.000Z | 2021-07-31T23:17:13.000Z | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
with open("README.rst") as readme_file:
readme = readme_file.read()
with open("HISTORY.rst") as history_file:
history = history_file.read()
requirements = [
"Click>=7.0",
]
setup_require... | 27.634921 | 79 | 0.657668 |
c5afb50a98cd27f25f723935d438388ff6ad94d1 | 929 | py | Python | axelrod/__init__.py | rjsu26/Axelrod | 677f6da86d7ba56d3b2ec031de558c4f2a0675b0 | [
"MIT"
] | null | null | null | axelrod/__init__.py | rjsu26/Axelrod | 677f6da86d7ba56d3b2ec031de558c4f2a0675b0 | [
"MIT"
] | null | null | null | axelrod/__init__.py | rjsu26/Axelrod | 677f6da86d7ba56d3b2ec031de558c4f2a0675b0 | [
"MIT"
] | null | null | null | DEFAULT_TURNS = 200
# The order of imports matters!
from axelrod.version import __version__
from axelrod.load_data_ import load_pso_tables, load_weights
from axelrod import graph
from axelrod.action import Action
from axelrod.random_ import random_choice, random_flip, seed, Pdf
from axelrod.plot import Plot
from axelr... | 40.391304 | 73 | 0.861141 |
44b52493a87601a0e46434efc966d170111c03a7 | 569 | py | Python | dailyReset.py | eugman/eugeneQuest | 39b2a3d0d20336e18b30da372f62765aa1b6282a | [
"MIT"
] | 1 | 2019-10-01T00:04:33.000Z | 2019-10-01T00:04:33.000Z | dailyReset.py | eugman/eugeneQuest | 39b2a3d0d20336e18b30da372f62765aa1b6282a | [
"MIT"
] | null | null | null | dailyReset.py | eugman/eugeneQuest | 39b2a3d0d20336e18b30da372f62765aa1b6282a | [
"MIT"
] | null | null | null | from app import db
from app.models import *
player = db.session.query(Player).get(1)
ntl = NegThoughtsLog(thoughts = player.negThoughts)
db.session.add(ntl)
player.prevNegThoughts = player.negThoughts
player.negThoughts = 0
player.prevPointsGained = player.pointsGained
player.pointsGained = 0
Daily.query.update({D... | 23.708333 | 73 | 0.752197 |
af4668411d9df1b93af981ffa05f6cd5ea990371 | 1,871 | py | Python | spatial.py | mbrc27/lasREST | 24246c78affafc6ddeece35af5ae7cec2243e9ea | [
"MIT"
] | null | null | null | spatial.py | mbrc27/lasREST | 24246c78affafc6ddeece35af5ae7cec2243e9ea | [
"MIT"
] | null | null | null | spatial.py | mbrc27/lasREST | 24246c78affafc6ddeece35af5ae7cec2243e9ea | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.path as mpl_path
# Uwaga nie wspiera roznych ukladow odniesienia
def validate_geom(geometry):
try:
sr = geometry["spatialReference"]
rings = geometry["rings"]
return True
except:
return False
def las_within(points_file, polygon, parameter... | 30.177419 | 85 | 0.644041 |
c5ba5cb6295784d196ccb2f3123c32531a46dcb1 | 3,747 | py | Python | bin.py | MananSoni42/fantasy-predictions | f511c46b5f5896fa3ba709d5de517116ab8a30ce | [
"MIT"
] | null | null | null | bin.py | MananSoni42/fantasy-predictions | f511c46b5f5896fa3ba709d5de517116ab8a30ce | [
"MIT"
] | null | null | null | bin.py | MananSoni42/fantasy-predictions | f511c46b5f5896fa3ba709d5de517116ab8a30ce | [
"MIT"
] | null | null | null | import csv
from pprint import pprint
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
from sklearn.preprocessing import KBinsDiscretizer
from math import floor,ceil
from tqdm import tqdm
df = pd.read_csv('final_data/final-data-v2.csv')
points = np.array(df['points']).reshape... | 33.159292 | 102 | 0.710435 |
0056e236008e8a449e7b3eac7c2f4672f5d10d12 | 134 | py | Python | app/admin/__init__.py | CAUCHY2932/Northern_Hemisphere | 06e5b3e3f0b47940d5b4549899d062373b019579 | [
"BSD-3-Clause"
] | null | null | null | app/admin/__init__.py | CAUCHY2932/Northern_Hemisphere | 06e5b3e3f0b47940d5b4549899d062373b019579 | [
"BSD-3-Clause"
] | 8 | 2021-03-19T03:28:32.000Z | 2022-03-11T23:59:00.000Z | app/admin/__init__.py | CAUCHY2932/Northern_Hemisphere | 06e5b3e3f0b47940d5b4549899d062373b019579 | [
"BSD-3-Clause"
] | null | null | null | # coding:utf-8
from flask import Blueprint
admin = Blueprint("admin", __name__)
import app.admin.views
from app.models import site
| 14.888889 | 36 | 0.768657 |
3300e32850b7050f8ceffbc6a33f1b88ed6a76cc | 2,413 | py | Python | physics/colliders.py | jonntd/ragdolize | 903d9e95e2f5e3a16057aa15fc0a4e4e9c2d9efa | [
"MIT"
] | 16 | 2020-08-20T21:51:05.000Z | 2022-03-26T18:31:28.000Z | physics/colliders.py | Braveel/ragdolize | 903d9e95e2f5e3a16057aa15fc0a4e4e9c2d9efa | [
"MIT"
] | null | null | null | physics/colliders.py | Braveel/ragdolize | 903d9e95e2f5e3a16057aa15fc0a4e4e9c2d9efa | [
"MIT"
] | 5 | 2020-08-24T03:02:43.000Z | 2022-01-06T09:17:39.000Z | # -*- coding: utf-8 -*-
"""Particle system colliders objects
MIT License
Copyright (c) 2020 Mauro Lopez
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 lim... | 39.557377 | 94 | 0.688355 |
97903bfa7b40b8eaa37db469f17ceb6b6c82fffe | 12,095 | py | Python | tests/test_04_PGP_objects.py | sharuzzaman/PGPy | 4ae5cab8306d3911a377fc9e975bbb31e703be23 | [
"BSD-3-Clause"
] | 248 | 2015-01-12T22:52:02.000Z | 2022-03-20T22:01:36.000Z | tests/test_04_PGP_objects.py | sharuzzaman/PGPy | 4ae5cab8306d3911a377fc9e975bbb31e703be23 | [
"BSD-3-Clause"
] | 224 | 2015-01-27T13:41:56.000Z | 2022-03-31T13:21:47.000Z | tests/test_04_PGP_objects.py | sharuzzaman/PGPy | 4ae5cab8306d3911a377fc9e975bbb31e703be23 | [
"BSD-3-Clause"
] | 83 | 2015-03-18T00:11:21.000Z | 2022-03-09T20:24:23.000Z | """ test the functionality of PGPKeyring
"""
import pytest
import glob
import os
import six
from pgpy import PGPKey
from pgpy import PGPKeyring
from pgpy import PGPMessage
from pgpy import PGPSignature
from pgpy import PGPUID
from pgpy.types import Fingerprint
@pytest.fixture
def abe_image():
with open('tests/te... | 38.275316 | 127 | 0.633154 |
8b2fce3d14d4d9903b54bcd22d206eed4873dd46 | 164 | py | Python | tests/view_tree/with_template/view_tree_node.py | quadrant-newmedia/django_tree_view | ef2bd36c8af870c8612c601510e35f2dad0b7538 | [
"MIT"
] | 1 | 2020-09-30T08:51:55.000Z | 2020-09-30T08:51:55.000Z | tests/view_tree/with_template/view_tree_node.py | quadrant-newmedia/django_tree_view | ef2bd36c8af870c8612c601510e35f2dad0b7538 | [
"MIT"
] | 8 | 2020-03-24T21:59:53.000Z | 2021-09-22T18:48:09.000Z | tests/view_tree/with_template/view_tree_node.py | quadrant-newmedia/django_tree_view | ef2bd36c8af870c8612c601510e35f2dad0b7538 | [
"MIT"
] | null | null | null | from django.template.response import TemplateResponse
def get(request, **kwargs):
return TemplateResponse(request, request.view_tree_path+'/template.html', {}) | 41 | 81 | 0.786585 |
06fe8404227d64dea4fea8fbbe6e2191fb5f3c40 | 671 | py | Python | Python/StonePaperScissors.py | Resolution-1/Python-tryout | 44cdd124e1b8865d907f57e0ca75bf620f7167b8 | [
"MIT"
] | 21 | 2020-10-01T16:19:16.000Z | 2021-11-08T13:01:47.000Z | Python/StonePaperScissors.py | Resolution-1/Python-tryout | 44cdd124e1b8865d907f57e0ca75bf620f7167b8 | [
"MIT"
] | 13 | 2020-10-01T13:10:25.000Z | 2021-10-01T06:27:44.000Z | Python/StonePaperScissors.py | Resolution-1/Python-tryout | 44cdd124e1b8865d907f57e0ca75bf620f7167b8 | [
"MIT"
] | 77 | 2020-10-01T11:28:37.000Z | 2021-10-16T09:27:37.000Z | from random import*
print("wanna play?(y/n)")
c=str(input())
if(c=="y"):
m_c=0
m_u=0
print("Let's play stone paper scissor\nhere\n1 for stone\n2 for paper\n3 for scissor\nNOW LET'S PLAY")
for i in range(5):
print("your turn:")
n=int(input())
a=randint(1,3)
print("I chose %d" %(a))
if(n==1 and a==2):
m_... | 19.735294 | 103 | 0.5693 |
1867a903fef0303b1ca211cc5c3e8140178bb442 | 738 | py | Python | core/migrations/0004_auto_20200727_1738.py | amcquistan/project-time-tracker-api-django | da8a4129964fa4e330939178f12f24097527e77d | [
"MIT"
] | null | null | null | core/migrations/0004_auto_20200727_1738.py | amcquistan/project-time-tracker-api-django | da8a4129964fa4e330939178f12f24097527e77d | [
"MIT"
] | null | null | null | core/migrations/0004_auto_20200727_1738.py | amcquistan/project-time-tracker-api-django | da8a4129964fa4e330939178f12f24097527e77d | [
"MIT"
] | 1 | 2021-01-01T14:58:11.000Z | 2021-01-01T14:58:11.000Z | # Generated by Django 3.0.8 on 2020-07-27 17:38
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0003_project'),
]
operations = [
migrations.AddField(
... | 28.384615 | 121 | 0.644986 |
3ca621bcbdb1471b5eb70ce18cb04ed008c7aa41 | 306 | py | Python | live.py | ritza-co/nix.dev | 85e23ca44bd4b049beff54fda9013bdaedd61c1c | [
"CC0-1.0"
] | 623 | 2020-07-07T09:10:57.000Z | 2022-03-31T15:01:42.000Z | live.py | ritza-co/nix.dev | 85e23ca44bd4b049beff54fda9013bdaedd61c1c | [
"CC0-1.0"
] | 160 | 2020-07-07T09:06:26.000Z | 2022-03-31T10:24:03.000Z | live.py | ritza-co/nix.dev | 85e23ca44bd4b049beff54fda9013bdaedd61c1c | [
"CC0-1.0"
] | 52 | 2020-07-09T18:07:15.000Z | 2022-03-21T22:33:42.000Z | from livereload import Server, shell
server = Server()
build_docs = shell("make html")
print("Doing an initial build of the docs...")
build_docs()
server.watch("source/*", build_docs)
server.watch("source/**/*", build_docs)
server.watch("_templates/*.html", build_docs)
server.serve(root="build/html")
| 21.857143 | 46 | 0.72549 |
5a8626a7843430db0fc7512e57eeeb45e861d9b9 | 2,253 | py | Python | code/GUI/picker.py | Lagostra/tictactoe | 17cdbc4e3e31f06dd7bd9fb6fd2a296ef279762f | [
"MIT"
] | null | null | null | code/GUI/picker.py | Lagostra/tictactoe | 17cdbc4e3e31f06dd7bd9fb6fd2a296ef279762f | [
"MIT"
] | null | null | null | code/GUI/picker.py | Lagostra/tictactoe | 17cdbc4e3e31f06dd7bd9fb6fd2a296ef279762f | [
"MIT"
] | null | null | null | import pygame
class Picker(pygame.Surface):
BUTTON_WIDTH = 20
def __init__(self, x, y, width, height, options, selection=0):
super().__init__((width, height))
self.x = x
self.y = y
self.options = options
self.selected_option = selection
def update(self, events):
... | 45.979592 | 105 | 0.548602 |
a616a64521c471189db35a18ad4e6db7839ad338 | 2,574 | py | Python | ecomstore/models.py | hmamirchishti/Technotions | e3becd5fcd626eb8fcc514d00e53626f4d7aea1f | [
"MIT"
] | null | null | null | ecomstore/models.py | hmamirchishti/Technotions | e3becd5fcd626eb8fcc514d00e53626f4d7aea1f | [
"MIT"
] | null | null | null | ecomstore/models.py | hmamirchishti/Technotions | e3becd5fcd626eb8fcc514d00e53626f4d7aea1f | [
"MIT"
] | null | null | null | from django.db import models
from django.urls import reverse
class Category(models.Model):
name = models.CharField(max_length=50)
slug = models.SlugField(max_length=50, unique=True, help_text='unique value for product page URL, create from name.')
description = models.TextField()
is_active = models.Boo... | 45.157895 | 132 | 0.684926 |
c30087c7430c7c398cd0cf092c153e6cf9031fd9 | 1,182 | py | Python | app/app_config.py | AustinVirts/origin-website | 257a8c3fdfbdc0bdd03904a3620019501de3f170 | [
"MIT"
] | 1 | 2020-05-21T04:44:45.000Z | 2020-05-21T04:44:45.000Z | app/app_config.py | AustinVirts/origin-website | 257a8c3fdfbdc0bdd03904a3620019501de3f170 | [
"MIT"
] | null | null | null | app/app_config.py | AustinVirts/origin-website | 257a8c3fdfbdc0bdd03904a3620019501de3f170 | [
"MIT"
] | null | null | null | import logging
from config import constants
from database import db
from raven.contrib.flask import Sentry
sentry = Sentry()
class AppConfig(object):
SECRET_KEY = constants.FLASK_SECRET_KEY
CSRF_ENABLED = True
SQLALCHEMY_DATABASE_URI = constants.SQLALCHEMY_DATABASE_URI
SQLALCHEMY_TRACK_MODIFICATIO... | 25.148936 | 78 | 0.725888 |
67226f9db1490c4bcd91ea525b44b69b42935d90 | 1,424 | py | Python | MLlib/utils/misc_utils.py | quadri-haider-ali/ML-DL-implementation | 1abbd0104a261ed8e21d6bed3d52f8ce62cdafde | [
"BSD-3-Clause"
] | null | null | null | MLlib/utils/misc_utils.py | quadri-haider-ali/ML-DL-implementation | 1abbd0104a261ed8e21d6bed3d52f8ce62cdafde | [
"BSD-3-Clause"
] | null | null | null | MLlib/utils/misc_utils.py | quadri-haider-ali/ML-DL-implementation | 1abbd0104a261ed8e21d6bed3d52f8ce62cdafde | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pickle
def read_data(file):
'''
Read the training data from a file in the specified directory.
Parameters
==========
file:
data type : str
Name of the file to be read with extension.
Example
=======
If the training data is stored in "dataset... | 19.777778 | 66 | 0.579354 |
4a3dc22cead938f4dcefbc7031390cb27397f82a | 7,179 | py | Python | nonebot/message.py | zxz0415/nonebot2 | 0c35449d08dfd603ee0edd46befffe0a5fd22632 | [
"MIT"
] | null | null | null | nonebot/message.py | zxz0415/nonebot2 | 0c35449d08dfd603ee0edd46befffe0a5fd22632 | [
"MIT"
] | null | null | null | nonebot/message.py | zxz0415/nonebot2 | 0c35449d08dfd603ee0edd46befffe0a5fd22632 | [
"MIT"
] | null | null | null | """
事件处理
========
NoneBot 内部处理并按优先级分发事件给所有事件响应器,提供了多个插槽以进行事件的预处理等。
"""
import asyncio
from datetime import datetime
from typing import Set, Type, Optional, TYPE_CHECKING
from nonebot.log import logger
from nonebot.rule import TrieRule
from nonebot.matcher import matchers, Matcher
from nonebot.exception import Ignore... | 27.400763 | 116 | 0.593676 |
588682a472abcb5793b362514da3279f77e44ed3 | 418 | py | Python | animeMusic_server/anime_music/main.py | waahah/animeMusic | 1a4c9e0859ec7ee42f5aa70cea293ae46787d0c8 | [
"MIT"
] | 287 | 2018-08-30T07:43:44.000Z | 2022-03-26T05:43:56.000Z | animeMusic_server/anime_music/main.py | waahah/animeMusic | 1a4c9e0859ec7ee42f5aa70cea293ae46787d0c8 | [
"MIT"
] | 4 | 2018-10-21T04:32:46.000Z | 2020-09-05T19:13:18.000Z | animeMusic_server/anime_music/main.py | waahah/animeMusic | 1a4c9e0859ec7ee42f5aa70cea293ae46787d0c8 | [
"MIT"
] | 43 | 2018-08-30T07:43:44.000Z | 2021-08-19T11:01:26.000Z | #-*- coding:utf-8 -*-
from tornado.options import define, options
import tornado.options
import setting
import turbo.register
import turbo.app
turbo.register.register_app(setting.SERVER_NAME, setting.TURBO_APP_SETTING, setting.WEB_APPLICATION_SETTING, __file__, globals())
define("port", default=8885, type=int)
if ... | 26.125 | 129 | 0.782297 |
035a8470a56794d1b3d19f8e0a67c84d2456d969 | 4,483 | py | Python | controller/structure/concrete.py | QuantumNovice/civil-engineering-toolbox | b759df2ed32614fa237ed7e4fccaf79f78c3eee4 | [
"BSD-3-Clause"
] | 32 | 2015-11-12T08:36:26.000Z | 2021-12-28T19:48:04.000Z | controller/structure/concrete.py | QuantumNovice/civil-engineering-toolbox | b759df2ed32614fa237ed7e4fccaf79f78c3eee4 | [
"BSD-3-Clause"
] | 2 | 2020-09-17T05:47:07.000Z | 2021-09-05T10:50:24.000Z | controller/structure/concrete.py | QuantumNovice/civil-engineering-toolbox | b759df2ed32614fa237ed7e4fccaf79f78c3eee4 | [
"BSD-3-Clause"
] | 12 | 2016-04-27T06:51:48.000Z | 2021-09-05T10:30:04.000Z | from src import view
from model.material import concrete
from model.structure import concrete_slab
import cherrypy
class Concrete:
def index(self):
pass
def flexural_analysis(self, **var):
# Prepare view & model object
template = view.lookup.get_template('structure/concrete_... | 37.672269 | 100 | 0.516172 |
f4abd2a81cb679e8ece31d75602cca14d6d60f24 | 9,676 | py | Python | Lib/test/audiotests.py | rbuzatu90/hyperv-python | 82bf5a72b4d956ea05affe1644b47e378dec0f4e | [
"bzip2-1.0.6"
] | 195 | 2016-01-14T16:03:02.000Z | 2021-12-29T09:15:02.000Z | Lib/test/audiotests.py | odsod/cpython-internals-course | 55fffca28e83ac0f30029c60113a3110451dfa08 | [
"PSF-2.0"
] | 75 | 2016-01-14T16:03:02.000Z | 2020-04-29T22:51:53.000Z | Lib/test/audiotests.py | odsod/cpython-internals-course | 55fffca28e83ac0f30029c60113a3110451dfa08 | [
"PSF-2.0"
] | 24 | 2016-02-29T11:45:47.000Z | 2021-12-24T08:41:37.000Z | from test.test_support import findfile, TESTFN, unlink
import unittest
import array
import io
import pickle
import sys
import base64
class UnseekableIO(file):
def tell(self):
raise io.UnsupportedOperation
def seek(self, *args, **kwargs):
raise io.UnsupportedOperation
def fromhex(s):
retur... | 34.070423 | 81 | 0.59384 |
0b0c81981471c0f0330025b49952785f336dc29b | 1,953 | py | Python | mzdeepnet/base.py | MobtgZhang/mzdeepnet | 7856461444d9874de2fce9883e23bcd571834364 | [
"MIT"
] | null | null | null | mzdeepnet/base.py | MobtgZhang/mzdeepnet | 7856461444d9874de2fce9883e23bcd571834364 | [
"MIT"
] | null | null | null | mzdeepnet/base.py | MobtgZhang/mzdeepnet | 7856461444d9874de2fce9883e23bcd571834364 | [
"MIT"
] | null | null | null | import logging
import pickle
logging.basicConfig(
level=logging.INFO,
format='%(levelname)-8s %(message)s',
)
class ParamMixin(object):
@property
def params(self):
""" List of Parameter objects. """
raise NotImplementedError()
@params.setter
def params(self, params):
rai... | 23.25 | 68 | 0.586278 |
9022c4f31c87af15982a675ff14634791bf74083 | 10,121 | py | Python | deeprankcore/Metrics.py | DeepRank/deeprank-gnn-2 | 9d1b5f254ae25364bec88ba6e82a6aa1022fc699 | [
"Apache-2.0"
] | null | null | null | deeprankcore/Metrics.py | DeepRank/deeprank-gnn-2 | 9d1b5f254ae25364bec88ba6e82a6aa1022fc699 | [
"Apache-2.0"
] | 17 | 2022-03-22T16:07:45.000Z | 2022-03-31T08:09:52.000Z | deeprankcore/Metrics.py | DeepRank/deeprank-gnn-2 | 9d1b5f254ae25364bec88ba6e82a6aa1022fc699 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from sklearn import metrics
from sklearn.metrics import confusion_matrix
from sklearn.metrics import roc_auc_score
def get_binary(values, threshold, target):
"""
Transforms continuous or multiclass values into binary values (0/1)
Args:
values (list): vector of the target value... | 36.017794 | 122 | 0.605375 |
9db30c7d59babb0b73b18883ea0d9fcb0b390fe1 | 19,592 | py | Python | stable_baselines3/common/callbacks.py | Practical-Formal-Methods/mod_stable_baselines3 | 08bdb0a529c8ab446ac7973f2a02f832c0c3f454 | [
"MIT"
] | null | null | null | stable_baselines3/common/callbacks.py | Practical-Formal-Methods/mod_stable_baselines3 | 08bdb0a529c8ab446ac7973f2a02f832c0c3f454 | [
"MIT"
] | null | null | null | stable_baselines3/common/callbacks.py | Practical-Formal-Methods/mod_stable_baselines3 | 08bdb0a529c8ab446ac7973f2a02f832c0c3f454 | [
"MIT"
] | null | null | null | import os
import warnings
from abc import ABC, abstractmethod
from typing import Any, Callable, Dict, List, Optional, Union
import mod_gym
import numpy as np
from mod_stable_baselines3.stable_baselines3.common import base_class # pytype: disable=pyi-error
from mod_stable_baselines3.stable_baselines3.common.evaluatio... | 36.620561 | 124 | 0.638934 |
11f36f60faafc820eca1bc27b4fe4c5f54aaa139 | 917 | py | Python | services/recommendsystem/recomv1/v1/service.py | X5GON/lamapi | 0558c3b7af520ab83bdbd29e1b1b9b87bdc147b0 | [
"BSD-2-Clause"
] | null | null | null | services/recommendsystem/recomv1/v1/service.py | X5GON/lamapi | 0558c3b7af520ab83bdbd29e1b1b9b87bdc147b0 | [
"BSD-2-Clause"
] | null | null | null | services/recommendsystem/recomv1/v1/service.py | X5GON/lamapi | 0558c3b7af520ab83bdbd29e1b1b9b87bdc147b0 | [
"BSD-2-Clause"
] | null | null | null | from flask import request
from flask_restx import Resource, Namespace
from .core import get_resource_recommend_v1
from ....iomodels import input_def_recommend_v1, output_def
ns_recomv1 = Namespace('recommendsystem',
description='First version of the recommendation system based on KNN models')
i... | 35.269231 | 100 | 0.725191 |
4aacf3a95f0971856b7956ab982174f5ee2da027 | 16,716 | py | Python | hoomd/data/local_access.py | yurivict/hoomd-blue | 52bbbb5202ad73c576a83b47633d15f3b052af77 | [
"BSD-3-Clause"
] | null | null | null | hoomd/data/local_access.py | yurivict/hoomd-blue | 52bbbb5202ad73c576a83b47633d15f3b052af77 | [
"BSD-3-Clause"
] | null | null | null | hoomd/data/local_access.py | yurivict/hoomd-blue | 52bbbb5202ad73c576a83b47633d15f3b052af77 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2009-2022 The Regents of the University of Michigan.
# Part of HOOMD-blue, released under the BSD 3-Clause License.
"""Access simulation state data directly."""
from abc import ABC, abstractmethod
from hoomd import Box
from hoomd import _hoomd
class _LocalAccess(ABC):
__slots__ = ('_entered', '_... | 40.279518 | 80 | 0.623475 |
eca7adcece891360f3f3467587d14e1c9fece2ab | 1,046 | py | Python | profile.py | Sergio0896/csc496 | f9d2a50daed9155daa93588230bd6554c7a27145 | [
"MIT"
] | null | null | null | profile.py | Sergio0896/csc496 | f9d2a50daed9155daa93588230bd6554c7a27145 | [
"MIT"
] | null | null | null | profile.py | Sergio0896/csc496 | f9d2a50daed9155daa93588230bd6554c7a27145 | [
"MIT"
] | 3 | 2019-10-29T16:59:08.000Z | 2019-12-05T03:37:20.000Z | import geni.portal as portal
import geni.rspec.pg as pg
import geni.rspec.igext as IG
# Create a portal context.
pc = portal.Context()
# Create a Request object to start building the RSpec.
request = pc.makeRequestRSpec()
tourDescription = \
"""
This profile provides the template for a full research cluster with hea... | 30.764706 | 129 | 0.763862 |
66353880b325202dce9dcb4361c0f7b85af65dd5 | 126 | py | Python | chapter04/4-10.py | alberthao/Python-Crash-Course-Homework | 105ffb3075db075425d6cf0d08d9837ef0548866 | [
"MIT"
] | 1 | 2021-07-13T09:05:18.000Z | 2021-07-13T09:05:18.000Z | chapter04/4-10.py | alberthao/Python-Crash-Course-Homework | 105ffb3075db075425d6cf0d08d9837ef0548866 | [
"MIT"
] | null | null | null | chapter04/4-10.py | alberthao/Python-Crash-Course-Homework | 105ffb3075db075425d6cf0d08d9837ef0548866 | [
"MIT"
] | 2 | 2021-02-16T09:43:20.000Z | 2021-11-27T07:02:48.000Z | msg1 = ['The','first','three','items','in','the','list','are:']
print(msg1)
print(msg1[0:3])
print(msg1[2:6])
print(msg1[-3:]) | 25.2 | 63 | 0.595238 |
a3f6bedfc3fd34f0b98647d1d7ebf9f9321a3509 | 2,166 | py | Python | py/dcp/problems/graph/word_ladder.py | bmoretz/Daily-Coding-Problem | f79e062e9f6e7b18b7e95c071fbe71ad104affcb | [
"MIT"
] | 1 | 2020-06-26T13:28:43.000Z | 2020-06-26T13:28:43.000Z | py/dcp/problems/graph/word_ladder.py | bmoretz/Daily-Coding-Problem | f79e062e9f6e7b18b7e95c071fbe71ad104affcb | [
"MIT"
] | 7 | 2021-11-18T19:46:08.000Z | 2022-03-12T01:03:01.000Z | py/dcp/problems/graph/word_ladder.py | bmoretz/Daily-Coding-Problem | f79e062e9f6e7b18b7e95c071fbe71ad104affcb | [
"MIT"
] | null | null | null | """
Create stepword chain.
Given a start word, an end word, and a dictionary of valid words, find the shortest transformation sequence from start to end
such that only one letter is changed at each step of the sequence, and each transformed word exists in the dictionary. If
there is no possible transformation, return ... | 27.417722 | 132 | 0.595568 |
ec988c5ebbcc7e6e1b4f62a5708e3a4a526d9754 | 1,399 | py | Python | populate/ropensci_libraries/throughputpy/goodHit.py | throughput-ec/throughputdb | cd59844e6bac8d3e9992274c659343d305986f93 | [
"MIT"
] | 4 | 2017-11-09T19:57:09.000Z | 2021-11-09T18:15:23.000Z | populate/ropensci_libraries/throughputpy/goodHit.py | throughput-ec/throughputdb | cd59844e6bac8d3e9992274c659343d305986f93 | [
"MIT"
] | 2 | 2018-09-03T19:11:25.000Z | 2019-06-10T17:39:12.000Z | populate/ropensci_libraries/throughputpy/goodHit.py | throughput-ec/throughputdb | cd59844e6bac8d3e9992274c659343d305986f93 | [
"MIT"
] | 6 | 2017-11-21T21:14:19.000Z | 2020-12-04T21:02:30.000Z | from re import search
import json
def goodHit(query, text):
"""Check for expected query call in file content.
Parameters
----------
query : str
Text string passed to the original GitHub code search query.
text : list
The File contents, including highlighted fragments.
Returns... | 31.795455 | 77 | 0.566119 |
b0e18aa9213a6d10a41229e1af33c28ac1597fe9 | 268 | py | Python | tests/artificial/transf_Difference/trend_LinearTrend/cycle_12/ar_/test_artificial_1024_Difference_LinearTrend_12__0.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/artificial/transf_Difference/trend_LinearTrend/cycle_12/ar_/test_artificial_1024_Difference_LinearTrend_12__0.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/artificial/transf_Difference/trend_LinearTrend/cycle_12/ar_/test_artificial_1024_Difference_LinearTrend_12__0.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "LinearTrend", cycle_length = 12, transform = "Difference", sigma = 0.0, exog_count = 0, ar_order = 0); | 38.285714 | 168 | 0.735075 |
a8c713e844c8a7567ade5cf8ff44e2474d228370 | 52,115 | py | Python | pyNastran/bdf/cards/nodes.py | 214929177/pyNastran | 73032d6ffd445ef085c124dde6b5e90a516a5b6a | [
"BSD-3-Clause"
] | null | null | null | pyNastran/bdf/cards/nodes.py | 214929177/pyNastran | 73032d6ffd445ef085c124dde6b5e90a516a5b6a | [
"BSD-3-Clause"
] | null | null | null | pyNastran/bdf/cards/nodes.py | 214929177/pyNastran | 73032d6ffd445ef085c124dde6b5e90a516a5b6a | [
"BSD-3-Clause"
] | 1 | 2021-10-14T03:52:44.000Z | 2021-10-14T03:52:44.000Z | """
All nodes are defined in this file. This includes:
* Node
* XPoint
* EPOINT
* SPOINT
* XPoints
* EPOINTs
* SPOINTs
* GRID
* GRDSET
* GRIDB
* POINT
* Ring
* RINGAX
* SEQGP
All ungrouped elements are Node objects.
The EPOINT/SPOINT classes refer to a single EPOINT/SPOINT.... | 27.824346 | 90 | 0.5045 |
bb7c2f1c12ee413207a6618a690e45605f753f3c | 870 | py | Python | lib/systems/benzoyl_chloride.py | pulsar-chem/BPModule | f8e64e04fdb01947708f098e833600c459c2ff0e | [
"BSD-3-Clause"
] | null | null | null | lib/systems/benzoyl_chloride.py | pulsar-chem/BPModule | f8e64e04fdb01947708f098e833600c459c2ff0e | [
"BSD-3-Clause"
] | null | null | null | lib/systems/benzoyl_chloride.py | pulsar-chem/BPModule | f8e64e04fdb01947708f098e833600c459c2ff0e | [
"BSD-3-Clause"
] | null | null | null | import pulsar as psr
def load_ref_system():
""" Returns benzoyl_chloride as found in the IQMol fragment library.
All credit to https://github.com/nutjunkie/IQmol
"""
return psr.make_system("""
C 1.3835 1.0239 -0.0000
C 2.6581 0.4699 -0.0000
C ... | 39.545455 | 72 | 0.429885 |
53c5b4034ea7518ef8968748a6b03865186ad073 | 4,457 | py | Python | app/run.py | sidheswar12/Disaster-Response-Pipeline | 1812bd5452d445c4b04bbdb77a61efe4307d50e6 | [
"MIT"
] | 2 | 2019-04-15T22:25:13.000Z | 2020-04-15T21:39:40.000Z | app/run.py | sidheswar12/Disaster-Response-Pipeline | 1812bd5452d445c4b04bbdb77a61efe4307d50e6 | [
"MIT"
] | null | null | null | app/run.py | sidheswar12/Disaster-Response-Pipeline | 1812bd5452d445c4b04bbdb77a61efe4307d50e6 | [
"MIT"
] | null | null | null | import json
import plotly
import pandas as pd
from nltk.stem import WordNetLemmatizer
from nltk.tokenize import word_tokenize, WhitespaceTokenizer
from flask import Flask
from flask import render_template, request, jsonify
from plotly.graph_objs import Bar, Heatmap, Histogram
from sklearn.externals import joblib
from... | 27.012121 | 95 | 0.533767 |
c522348ab6be19ed3923f03fea5f689c83d31211 | 446 | py | Python | data/scripts/templates/object/tangible/loot/quest/shared_wind_crystal.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/tangible/loot/quest/shared_wind_crystal.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/tangible/loot/quest/shared_wind_crystal.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Tangible()
result.template = "object/tangible/loot/quest/shared_wind_crystal.iff"
result.attribute_template_id = ... | 26.235294 | 71 | 0.724215 |
b65b92acb4c1bfde884552a272de14af0ab933d7 | 490 | py | Python | features/steps/roman.py | TestowanieAutomatyczneUG/laboratorium_14-bozimkiewicz | a77b186acbf20357dde87b517c4bb9bcf0b56fea | [
"MIT"
] | null | null | null | features/steps/roman.py | TestowanieAutomatyczneUG/laboratorium_14-bozimkiewicz | a77b186acbf20357dde87b517c4bb9bcf0b56fea | [
"MIT"
] | null | null | null | features/steps/roman.py | TestowanieAutomatyczneUG/laboratorium_14-bozimkiewicz | a77b186acbf20357dde87b517c4bb9bcf0b56fea | [
"MIT"
] | null | null | null | from behave import *
from src.Roman import Roman
use_step_matcher("re")
@given('we have (?P<arabic>.+) number and number convertion program')
def step_impl(context, arabic):
context.arabic = int(arabic)
context.roman_convert = Roman()
@when('we have (?P<roman>.+) number')
def step_impl(context, roman):
... | 23.333333 | 71 | 0.720408 |
fc1378f5a6d51e79b69caca0cf05003c1e16e5db | 64 | py | Python | pj-examples/mylib/js/mylib/misc.py | andrewschaaf/pyxc-pj | aa00298c9fcc62b4e3b7c5b8a8114c7545108cbc | [
"MIT"
] | 17 | 2015-10-26T22:51:30.000Z | 2021-07-08T02:45:51.000Z | pj-examples/mylib/js/mylib/misc.py | andrewschaaf/pyxc-pj | aa00298c9fcc62b4e3b7c5b8a8114c7545108cbc | [
"MIT"
] | 1 | 2016-08-18T18:17:19.000Z | 2018-05-09T04:04:05.000Z | pj-examples/mylib/js/mylib/misc.py | andrewschaaf/pyxc-pj | aa00298c9fcc62b4e3b7c5b8a8114c7545108cbc | [
"MIT"
] | 2 | 2015-05-15T23:45:49.000Z | 2016-02-20T21:00:06.000Z |
def bind(f, obj):
return lambda: f.apply(obj, arguments)
| 10.666667 | 42 | 0.640625 |
7fd1024dcb00be25a1cc7b882090298d7fce9628 | 2,211 | py | Python | GM2AUTOSAR_MM/Properties/unit_contracts/HUnitR02_ConnectedLHS.py | levilucio/SyVOLT | 7526ec794d21565e3efcc925a7b08ae8db27d46a | [
"MIT"
] | 3 | 2017-06-02T19:26:27.000Z | 2021-06-14T04:25:45.000Z | GM2AUTOSAR_MM/Properties/unit_contracts/HUnitR02_ConnectedLHS.py | levilucio/SyVOLT | 7526ec794d21565e3efcc925a7b08ae8db27d46a | [
"MIT"
] | 8 | 2016-08-24T07:04:07.000Z | 2017-05-26T16:22:47.000Z | GM2AUTOSAR_MM/Properties/unit_contracts/HUnitR02_ConnectedLHS.py | levilucio/SyVOLT | 7526ec794d21565e3efcc925a7b08ae8db27d46a | [
"MIT"
] | 1 | 2019-10-31T06:00:23.000Z | 2019-10-31T06:00:23.000Z | from core.himesis import Himesis, HimesisPreConditionPatternLHS
import uuid
class HUnitR02_ConnectedLHS(HimesisPreConditionPatternLHS):
def __init__(self):
"""
Creates the himesis graph representing the AToM3 model HUnitR02_ConnectedLHS
"""
# Flag this instance as compiled now
self.is_compiled = True
sup... | 31.585714 | 99 | 0.698779 |
bbe10260bf05a2f46f3cb8540d76e6a5abcf4857 | 936 | py | Python | generators/sidewinder.py | kwyckmans/python-mazes | be992077b3d802c6b8618b15c14c20bb30ed0ad9 | [
"Unlicense"
] | null | null | null | generators/sidewinder.py | kwyckmans/python-mazes | be992077b3d802c6b8618b15c14c20bb30ed0ad9 | [
"Unlicense"
] | null | null | null | generators/sidewinder.py | kwyckmans/python-mazes | be992077b3d802c6b8618b15c14c20bb30ed0ad9 | [
"Unlicense"
] | null | null | null | from random import randrange, choice
from typing import List
from core.cell import Cell
from core.grid import Grid
class Sidewinder:
@staticmethod
def on(grid: Grid):
for row in grid.cells:
run: List[Cell] = []
for _, cell in grid.cells[row].items():
run.append... | 28.363636 | 66 | 0.521368 |
6cda078e6f582eb6ed7ec4d2db81549f47295beb | 5,666 | py | Python | merlinsar/test/model.py | ykemiche/merlin | f0980d7ee5dbe04ac083ba1f2bb34a9c2d3aa343 | [
"MIT"
] | null | null | null | merlinsar/test/model.py | ykemiche/merlin | f0980d7ee5dbe04ac083ba1f2bb34a9c2d3aa343 | [
"MIT"
] | null | null | null | merlinsar/test/model.py | ykemiche/merlin | f0980d7ee5dbe04ac083ba1f2bb34a9c2d3aa343 | [
"MIT"
] | null | null | null | import time
import numpy as np
import os
from merlinsar.test.utils import *
from scipy import special
import argparse
# DEFINE PARAMETERS OF SPECKLE AND NORMALIZATION FACTOR
M = 10.089038980848645
m = -1.429329123112601
L = 1
c = (1 / 2) * (special.psi(L) - np.log(L))
cn = c / (M - m) # normalized (0,1) mean of log... | 36.554839 | 104 | 0.537593 |
71cc46a97f680b3a03074717df10752a7f040143 | 1,457 | py | Python | tests/test_banco_banrisul.py | marciorpbradoo/python-boleto | 8cb96acb6cf8f69b5734a42077de2b3468cc682d | [
"BSD-3-Clause"
] | 106 | 2015-02-25T13:38:56.000Z | 2022-02-15T23:19:14.000Z | tests/test_banco_banrisul.py | marciorpbradoo/python-boleto | 8cb96acb6cf8f69b5734a42077de2b3468cc682d | [
"BSD-3-Clause"
] | 31 | 2019-08-21T16:38:01.000Z | 2022-03-17T20:09:37.000Z | tests/test_banco_banrisul.py | marciorpbradoo/python-boleto | 8cb96acb6cf8f69b5734a42077de2b3468cc682d | [
"BSD-3-Clause"
] | 83 | 2015-01-28T15:06:18.000Z | 2021-12-15T18:16:55.000Z | # -*- coding: utf-8 -*-
import datetime
import unittest
from pyboleto.bank.banrisul import BoletoBanrisul
from .testutils import BoletoTestCase
class TestBancoBanrisul(BoletoTestCase):
def setUp(self):
self.dados = []
for i in range(3):
d = BoletoBanrisul()
d.data_documen... | 30.354167 | 72 | 0.628689 |
fb32d5f002fba846beab62078e936e60ae8102f8 | 12,924 | py | Python | olive/wallet/wallet_block_store.py | Jsewill/Olive-blockchain | ba0169a56d7e67cefd95dc1f1f60e9a19d5cd2c5 | [
"Apache-2.0"
] | 10 | 2021-08-01T17:15:15.000Z | 2021-09-16T08:04:46.000Z | olive/wallet/wallet_block_store.py | Jsewill/Olive-blockchain | ba0169a56d7e67cefd95dc1f1f60e9a19d5cd2c5 | [
"Apache-2.0"
] | 8 | 2021-08-06T08:11:13.000Z | 2021-11-03T20:49:37.000Z | olive/wallet/wallet_block_store.py | Jsewill/Olive-blockchain | ba0169a56d7e67cefd95dc1f1f60e9a19d5cd2c5 | [
"Apache-2.0"
] | 7 | 2021-08-07T06:45:36.000Z | 2022-03-15T08:43:24.000Z | from dataclasses import dataclass
from typing import Dict, List, Optional, Tuple
import aiosqlite
from olive.consensus.block_record import BlockRecord
from olive.types.blockchain_format.sized_bytes import bytes32
from olive.types.blockchain_format.sub_epoch_summary import SubEpochSummary
from olive.types.coin_spend i... | 39.766154 | 116 | 0.640669 |
f527196844715fa6a8a6522aeb82c419ed53b5ff | 232 | py | Python | tests/test_cmatmul.py | Marcel-Rodekamp/MLP | 349ac8e10679e2ec53980908c580902996a493e7 | [
"MIT"
] | 1 | 2021-06-15T09:01:09.000Z | 2021-06-15T09:01:09.000Z | tests/test_cmatmul.py | Marcel-Rodekamp/MLP | 349ac8e10679e2ec53980908c580902996a493e7 | [
"MIT"
] | null | null | null | tests/test_cmatmul.py | Marcel-Rodekamp/MLP | 349ac8e10679e2ec53980908c580902996a493e7 | [
"MIT"
] | null | null | null | import torch
from MLP.complexifyTorch import cmatmul
def test_forward():
x = (2+1j)*torch.eye(2,2,dtype = torch.cdouble)
y = (2+2j)*torch.eye(2,2,dtype = torch.cdouble)
print(x)
print(cmatmul(x,y))
test_forward()
| 19.333333 | 51 | 0.668103 |
4fd9001fd614691e174098e899b761206568c22a | 2,652 | py | Python | tests/operators/gpu/gk_fused/test_concat_prim.py | xqdan/akg | e28501611d73d3957a1f3c58eeb6b028f2f2765d | [
"Apache-2.0"
] | null | null | null | tests/operators/gpu/gk_fused/test_concat_prim.py | xqdan/akg | e28501611d73d3957a1f3c58eeb6b028f2f2765d | [
"Apache-2.0"
] | null | null | null | tests/operators/gpu/gk_fused/test_concat_prim.py | xqdan/akg | e28501611d73d3957a1f3c58eeb6b028f2f2765d | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Huawei Technologies 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... | 47.357143 | 114 | 0.74095 |
d9b677565d8a3bbf1367af953fc4a149823b6928 | 783 | py | Python | smartbot/plugins/autojoin.py | Muzer/smartbot | c18daac6b066a7d368ef3dd0848a21c16a076604 | [
"MIT"
] | null | null | null | smartbot/plugins/autojoin.py | Muzer/smartbot | c18daac6b066a7d368ef3dd0848a21c16a076604 | [
"MIT"
] | 11 | 2015-01-01T21:34:05.000Z | 2015-06-03T11:13:44.000Z | smartbot/plugins/autojoin.py | Muzer/smartbot | c18daac6b066a7d368ef3dd0848a21c16a076604 | [
"MIT"
] | null | null | null | import smartbot.plugin
from smartbot.formatting import Style
class Plugin(smartbot.plugin.Plugin):
"""
A plugin which automatically joins channels/rooms when the bot connects to
the server.
You should provide a list of channels to join in the plugin configuration,
under the name 'channels'.
"... | 27 | 78 | 0.64751 |
99e2ccff828adc948c31653ea9ea94def5b7a4fb | 759 | py | Python | docs/_themes/faculty_sphinx_theme/__init__.py | alshapton/Pyntel4004-CLI | d3b0a6ef14ee8b3b90fc01ed3ee489e8804784e6 | [
"MIT"
] | 6 | 2021-02-12T21:37:53.000Z | 2022-02-24T23:09:37.000Z | docs/_themes/faculty_sphinx_theme/__init__.py | alshapton/Pyntel4004-CLI | d3b0a6ef14ee8b3b90fc01ed3ee489e8804784e6 | [
"MIT"
] | 43 | 2021-04-23T09:32:24.000Z | 2022-02-01T15:17:09.000Z | docs/_themes/faculty_sphinx_theme/__init__.py | alshapton/Pyntel4004-cli | d3b0a6ef14ee8b3b90fc01ed3ee489e8804784e6 | [
"MIT"
] | 2 | 2021-06-11T01:12:44.000Z | 2021-09-14T22:44:11.000Z | # Copyright 2020 Faculty Science Limited
#
# 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... | 31.625 | 74 | 0.737813 |
374853c846f971d0ee76c06f63789599ee085374 | 2,660 | py | Python | data/p3BR/R2/benchmark/startCirq164.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R2/benchmark/startCirq164.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R2/benchmark/startCirq164.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=3
# total number=31
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
from cirq.contrib.svg import SVGCircuit
# Symbols for... | 33.670886 | 77 | 0.684962 |
bdd8962a8b6d942921a7221b59cf9e72c2939681 | 5,676 | py | Python | models/losses/loss.py | shinya7y/gangealing | 6e6897640145544496c3115bf3f5b6209c89c7a0 | [
"BSD-2-Clause"
] | 605 | 2021-12-10T00:56:58.000Z | 2022-03-31T03:34:08.000Z | models/losses/loss.py | guoyang-xie/gangealing | 353e059d322105dbc0389409b3579772c0673839 | [
"BSD-2-Clause"
] | 7 | 2021-12-10T11:40:19.000Z | 2022-03-31T07:05:29.000Z | models/losses/loss.py | guoyang-xie/gangealing | 353e059d322105dbc0389409b3579772c0673839 | [
"BSD-2-Clause"
] | 71 | 2021-12-10T01:00:55.000Z | 2022-03-30T04:57:16.000Z | import torch
def total_variation_loss(delta_flow, reduce_batch=True):
# flow should be size (N, H, W, 2)
reduce_dims = (0, 1, 2, 3) if reduce_batch else (1, 2, 3)
distance_fn = lambda a: torch.where(a <= 1.0, 0.5 * a.pow(2), a - 0.5).mean(dim=reduce_dims)
assert delta_flow.size(-1) == 2
diff_y = d... | 61.032258 | 151 | 0.679175 |
bf2c07f85b73f9702f647031f5a8197affe68335 | 1,390 | py | Python | launchpad/pip_package/launchpad_version.py | leloykun/launchpad | f591b5931cbba89bc94050a126d86cd1bda312f5 | [
"Apache-2.0"
] | 1 | 2021-05-02T22:03:23.000Z | 2021-05-02T22:03:23.000Z | launchpad/pip_package/launchpad_version.py | leloykun/launchpad | f591b5931cbba89bc94050a126d86cd1bda312f5 | [
"Apache-2.0"
] | null | null | null | launchpad/pip_package/launchpad_version.py | leloykun/launchpad | f591b5931cbba89bc94050a126d86cd1bda312f5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 DeepMind Technologies Limited. 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 ... | 35.641026 | 80 | 0.741007 |
53e9eddf52b295d38d8dfbc4bb07fb6db4f6d0a0 | 3,238 | py | Python | semester-6/Python Practice/matrix.py | saranshbht/bsc-codes | 7386c09cc986de9c84947f7dea7db3dc42219a35 | [
"MIT"
] | 3 | 2021-03-22T12:07:14.000Z | 2021-08-30T17:28:23.000Z | semester-6/Python Practice/matrix.py | saranshbht/bsc-codes | 7386c09cc986de9c84947f7dea7db3dc42219a35 | [
"MIT"
] | null | null | null | semester-6/Python Practice/matrix.py | saranshbht/bsc-codes | 7386c09cc986de9c84947f7dea7db3dc42219a35 | [
"MIT"
] | null | null | null | def addition(a, b):
if len(a) != len(b) or len(a[0]) != len(b[0]):
return "Addition not possible"
c = []
for i in range(0, len(a)):
temp = []
for j in range(len(a[0])):
temp.append(a[i][j] + b[i][j])
c.append(temp)
return c
def subtraction(a, b):
if len(a... | 26.112903 | 81 | 0.440395 |
618e373b307aec4ad37a1bab18debf26f7b04ca9 | 3,978 | py | Python | src/project/settings/base.py | fahadalmutairi/edgetest | cc37a9cd53da74bd32f69f7a099679bccf0268a7 | [
"MIT"
] | null | null | null | src/project/settings/base.py | fahadalmutairi/edgetest | cc37a9cd53da74bd32f69f7a099679bccf0268a7 | [
"MIT"
] | null | null | null | src/project/settings/base.py | fahadalmutairi/edgetest | cc37a9cd53da74bd32f69f7a099679bccf0268a7 | [
"MIT"
] | null | null | null | """
Django settings for project project.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
from django.core.urlresolvers import reverse_lazy
from os.path import dirna... | 27.818182 | 74 | 0.708145 |
e8a4d387e5f36fade29840902f5eb0269290694e | 47 | py | Python | tensortrade/base/__init__.py | andrewczgithub/tensortrade | b5f5d14c220bcab3394b02286ffd0f52853f519e | [
"Apache-2.0"
] | null | null | null | tensortrade/base/__init__.py | andrewczgithub/tensortrade | b5f5d14c220bcab3394b02286ffd0f52853f519e | [
"Apache-2.0"
] | 1 | 2019-12-14T23:25:00.000Z | 2019-12-14T23:25:00.000Z | tensortrade/base/__init__.py | andrewczgithub/tensortrade | b5f5d14c220bcab3394b02286ffd0f52853f519e | [
"Apache-2.0"
] | null | null | null | from .component import *
from .context import * | 23.5 | 24 | 0.765957 |
4d49958f5d35385dcc9a96dee660be7f3fbd6426 | 1,119 | py | Python | test/integration/test_e2e.py | fredhallgren/nystrompca | 7f8923af08551ad477a446c383822b555326f4bf | [
"Apache-2.0"
] | 4 | 2021-09-14T08:46:10.000Z | 2021-10-31T09:44:06.000Z | test/integration/test_e2e.py | fredhallgren/nystrompca | 7f8923af08551ad477a446c383822b555326f4bf | [
"Apache-2.0"
] | null | null | null | test/integration/test_e2e.py | fredhallgren/nystrompca | 7f8923af08551ad477a446c383822b555326f4bf | [
"Apache-2.0"
] | null | null | null |
# Copyright 2021 Fredrik Hallgren
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 27.292683 | 75 | 0.76765 |
fd788604d501569a4b155e20da962186a56d7569 | 27,216 | py | Python | shutterstock_api/models/audio.py | Lumen5/shutterstock-api | d26db2c9cd6688cf828ad15478bf1b4701150a3f | [
"Adobe-Glyph"
] | 1 | 2021-02-23T16:15:16.000Z | 2021-02-23T16:15:16.000Z | shutterstock_api/models/audio.py | Lumen5/shutterstock-api | d26db2c9cd6688cf828ad15478bf1b4701150a3f | [
"Adobe-Glyph"
] | 17 | 2019-07-13T01:23:08.000Z | 2022-03-21T07:17:35.000Z | shutterstock_api/models/audio.py | Lumen5/shutterstock-api | d26db2c9cd6688cf828ad15478bf1b4701150a3f | [
"Adobe-Glyph"
] | 1 | 2021-03-07T19:16:27.000Z | 2021-03-07T19:16:27.000Z | # coding: utf-8
"""
Shutterstock API Reference
The Shutterstock API provides access to Shutterstock's library of media, as well as information about customers' accounts and the contributors that provide the media. # noqa: E501
OpenAPI spec version: 1.0.11
Generated by: https://github.com/swagge... | 28.379562 | 542 | 0.588882 |
b7b45546b8dbe8c366b294795e071034004d54e3 | 7,625 | py | Python | Bell_EBM/Map.py | ZYVE255/ebm-optimizer | 9b1cf6014f987ef4b8d65d4a5659c704b6ea15c4 | [
"MIT"
] | 1 | 2021-03-22T06:48:54.000Z | 2021-03-22T06:48:54.000Z | Bell_EBM/Map.py | taylorbell57/Bell_EBM | 2468251d91c18f6dc2a9e8f2bebdc60988ec9303 | [
"MIT"
] | 10 | 2018-11-02T18:57:03.000Z | 2019-11-28T18:02:33.000Z | Bell_EBM/Map.py | ZYVE255/ebm-optimizer | 9b1cf6014f987ef4b8d65d4a5659c704b6ea15c4 | [
"MIT"
] | 3 | 2019-01-28T21:21:51.000Z | 2021-12-14T08:50:35.000Z | # Author: Taylor Bell
# Last Update: 2019-02-15
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from . import H2_Dissociation_Routines as h2
class Map(object):
"""A map.
Attributes:
dissValues (ndarray): The H2 dissociation fraction values for the map.
lat (ndarray, opti... | 39.304124 | 109 | 0.56918 |
25f9ccc110f52f1529e2b063d4116c228c8a85e1 | 39 | py | Python | tests/__init__.py | TaylorMonacelli/clinepunk | d9a354ad5b03305f9283fb39895f69c01b67d6f6 | [
"MIT"
] | null | null | null | tests/__init__.py | TaylorMonacelli/clinepunk | d9a354ad5b03305f9283fb39895f69c01b67d6f6 | [
"MIT"
] | null | null | null | tests/__init__.py | TaylorMonacelli/clinepunk | d9a354ad5b03305f9283fb39895f69c01b67d6f6 | [
"MIT"
] | null | null | null | """Unit test package for clinepunk."""
| 19.5 | 38 | 0.692308 |
a0295b02105d06e12d2db9d176d19d29d0acb874 | 4,141 | py | Python | code/utils/util_eval.py | Maclory/Deep-Iterative-Collaboration | 3ff19f1e4232e11b33fcd4c035aadaadf9d445f0 | [
"MIT"
] | 276 | 2020-03-16T05:23:24.000Z | 2022-03-31T02:44:10.000Z | code/utils/util_eval.py | Maclory/Deep-Iterative-Collaboration | 3ff19f1e4232e11b33fcd4c035aadaadf9d445f0 | [
"MIT"
] | 47 | 2020-04-20T15:59:12.000Z | 2022-03-30T03:33:52.000Z | code/utils/util_eval.py | Maclory/Deep-Iterative-Collaboration | 3ff19f1e4232e11b33fcd4c035aadaadf9d445f0 | [
"MIT"
] | 64 | 2020-04-03T12:34:33.000Z | 2021-12-20T15:45:58.000Z | import torch
import numpy as np
# Landmarks
def get_peak_2(heatmap_one):
'''
heatmap_one: 32 * 32
'''
h, w = heatmap_one.shape
idx = torch.argsort(heatmap_one.view(-1), descending=True)
top1 = (idx[0].item() // h, idx[0].item() % w)
top2 = (idx[1].item() // h, idx[1].item() % w)
retur... | 30.007246 | 92 | 0.573774 |
6bc74e56d2fc72a2f1c2303470bcefeab4ebd665 | 7,540 | py | Python | HW3/crossover2.py | Luceven/ANLY_DataStruct_Algorithms | 7cedd93124ebb25c9991bfa8e2c025354bf2ae87 | [
"MIT"
] | null | null | null | HW3/crossover2.py | Luceven/ANLY_DataStruct_Algorithms | 7cedd93124ebb25c9991bfa8e2c025354bf2ae87 | [
"MIT"
] | null | null | null | HW3/crossover2.py | Luceven/ANLY_DataStruct_Algorithms | 7cedd93124ebb25c9991bfa8e2c025354bf2ae87 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Mar 29 14:29:23 2019
@author: katezeng
"""
import random, sys, datetime, argparse
######### TEST ##########
test1 = [[1, 7], [2, 4]]
test2 = [[3, 3], [5, 2]]
######### TEST ##########
# addisiont of square matrices (a + b = c)
def matrix_add(A, B):
... | 31.949153 | 125 | 0.476127 |
7eae8db0ba67a87a1337bd4a289d505aee365aaa | 113,193 | py | Python | ppdet/data/transform/operators.py | hch-NLP/PaddleDetection | 08ace36a0f995f935ad334b5d7fba80a5ae67cc7 | [
"Apache-2.0"
] | 1 | 2022-03-30T02:39:57.000Z | 2022-03-30T02:39:57.000Z | ppdet/data/transform/operators.py | hch-NLP/PaddleDetection | 08ace36a0f995f935ad334b5d7fba80a5ae67cc7 | [
"Apache-2.0"
] | null | null | null | ppdet/data/transform/operators.py | hch-NLP/PaddleDetection | 08ace36a0f995f935ad334b5d7fba80a5ae67cc7 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 37.468719 | 131 | 0.533655 |
a40c6c5d7efdb0e4eb16d93567de08dab37eab12 | 1,867 | py | Python | modules/python/test/test.py | xipingyan/opencv | 39c3334147ec02761b117f180c9c4518be18d1fa | [
"Apache-2.0"
] | 56,632 | 2016-07-04T16:36:08.000Z | 2022-03-31T18:38:14.000Z | modules/python/test/test.py | yusufm423/opencv | 6a2077cbd8a8a0d8cbd3e0e8c3ca239f17e6c067 | [
"Apache-2.0"
] | 13,593 | 2016-07-04T13:59:03.000Z | 2022-03-31T21:04:51.000Z | modules/python/test/test.py | yusufm423/opencv | 6a2077cbd8a8a0d8cbd3e0e8c3ca239f17e6c067 | [
"Apache-2.0"
] | 54,986 | 2016-07-04T14:24:38.000Z | 2022-03-31T22:51:18.000Z | #!/usr/bin/env python
'''
Location of tests:
- <opencv_src>/modules/python/test
- <opencv_src>/modules/<module>/misc/python/test/
'''
from __future__ import print_function
import sys
sys.dont_write_bytecode = True # Don't generate .pyc files / __pycache__ directories
import os
import unittest
# Python 3 moved urlo... | 30.606557 | 111 | 0.668452 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.