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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7823003f630019300849db000e1ac5d86b1f96f1 | 10,210 | py | Python | express/parsers/apps/vasp/formats/txt.py | Exabyte-io/exabyte-express | 579cc1ad3666352848e0ac8eeec84cb410a9a9c7 | [
"Apache-2.0"
] | null | null | null | express/parsers/apps/vasp/formats/txt.py | Exabyte-io/exabyte-express | 579cc1ad3666352848e0ac8eeec84cb410a9a9c7 | [
"Apache-2.0"
] | null | null | null | express/parsers/apps/vasp/formats/txt.py | Exabyte-io/exabyte-express | 579cc1ad3666352848e0ac8eeec84cb410a9a9c7 | [
"Apache-2.0"
] | null | null | null | import re
import numpy as np
from pymatgen.io.vasp import Outcar
from express.parsers.apps.vasp import settings
from express.parsers.formats.txt import BaseTXTParser
class VaspTXTParser(BaseTXTParser):
"""
Vasp text parser class.
"""
def __init__(self, work_dir):
super(VaspTXTParser, self)._... | 35.824561 | 124 | 0.502253 |
75c42819ff9c8db36eb9e3fa9febeb0dac094748 | 4,265 | py | Python | MultirefPredict/scripts/generate_IND_density.py | hjkgrp/MultirefPredict | a3a5167ef8d032fd7ced5da4635cdc95a7f51803 | [
"BSD-3-Clause"
] | 14 | 2019-03-05T21:22:57.000Z | 2021-12-14T16:19:30.000Z | MultirefPredict/scripts/generate_IND_density.py | hjkgrp/MultirefPredict | a3a5167ef8d032fd7ced5da4635cdc95a7f51803 | [
"BSD-3-Clause"
] | 4 | 2019-03-06T04:38:19.000Z | 2021-09-17T18:20:03.000Z | MultirefPredict/scripts/generate_IND_density.py | hjkgrp/MultirefPredict | a3a5167ef8d032fd7ced5da4635cdc95a7f51803 | [
"BSD-3-Clause"
] | 5 | 2019-03-06T02:58:55.000Z | 2021-02-20T16:26:29.000Z | #######################################################################
# This script reads in the json file generated by MultirefPredict
# add generate the Gaussian Cube format output containing the
# I_ND and I_D density for visualizing the electron density related
# static and dynamic correlation
#############... | 33.062016 | 98 | 0.582884 |
6772645b692e62272f7fe03e508f4abea8047a8e | 11,716 | py | Python | data/dataset/multiwoz.py | odemasi/simpletod | 8d694bc1b09c12497488be46879dfe1dede83df3 | [
"BSD-3-Clause"
] | 167 | 2020-07-26T08:33:54.000Z | 2022-03-24T13:30:07.000Z | simpletod/data/dataset/multiwoz.py | ikhee-shin/coco-dst | c4fddd7471758aa93e327f0bdd2326bcf6c9a559 | [
"BSD-3-Clause"
] | 27 | 2020-07-27T07:07:05.000Z | 2021-11-30T11:10:36.000Z | simpletod/data/dataset/multiwoz.py | ikhee-shin/coco-dst | c4fddd7471758aa93e327f0bdd2326bcf6c9a559 | [
"BSD-3-Clause"
] | 62 | 2020-08-02T18:25:55.000Z | 2022-02-06T15:04:57.000Z | import os
import json
import random
import torch
import numpy as np
import ipdb
import warnings
import spacy
from spacy import displacy
from collections import Counter
import en_core_web_sm
import json
import pickle
# DEFINE special tokens
SOS_token = 0
EOS_token = 1
UNK_token = 2
PAD_token = 3
SEP0_token = 4
SEP1_... | 38.162866 | 136 | 0.580061 |
ede1280b72e59f9d7cfa2ccd426c52243235317d | 1,225 | py | Python | tests/testsite/apps/api/tests/json.py | koordinates/oauth2app | f8205e2146477224a666c03bf115ddf3ff7610ff | [
"MIT"
] | 36 | 2015-03-23T03:43:16.000Z | 2021-06-14T19:11:36.000Z | tests/testsite/apps/api/tests/json.py | koordinates/oauth2app | f8205e2146477224a666c03bf115ddf3ff7610ff | [
"MIT"
] | 2 | 2016-01-19T11:07:34.000Z | 2020-05-15T20:31:07.000Z | tests/testsite/apps/api/tests/json.py | koordinates/oauth2app | f8205e2146477224a666c03bf115ddf3ff7610ff | [
"MIT"
] | 20 | 2015-01-15T03:29:48.000Z | 2020-10-15T15:37:44.000Z | #-*- coding: utf-8 -*-
try: import simplejson as json
except ImportError: import json
from .base import *
class JSONTestCase(BaseTestCase):
def test_00_email(self):
client = DjangoTestClient()
token = self.get_token()
# Sufficient scope.
response = client.get(
"/api/em... | 36.029412 | 75 | 0.595102 |
e7fbe92dc5d5529f38fb41fbb3ca58c4e1995b1a | 3,064 | py | Python | sandbox/list_dir_test.py | pombredanne/sschwarzer.net-ftputil | d752244ed0ff408f003d8f84c02a9d49f0c10ade | [
"AFL-2.1"
] | 1 | 2021-08-28T08:27:11.000Z | 2021-08-28T08:27:11.000Z | sandbox/list_dir_test.py | pombredanne/sschwarzer.net-ftputil | d752244ed0ff408f003d8f84c02a9d49f0c10ade | [
"AFL-2.1"
] | 1 | 2021-08-28T16:54:13.000Z | 2021-08-28T16:54:13.000Z | sandbox/list_dir_test.py | pombredanne/sschwarzer.net-ftputil | d752244ed0ff408f003d8f84c02a9d49f0c10ade | [
"AFL-2.1"
] | 1 | 2021-08-28T08:29:07.000Z | 2021-08-28T08:29:07.000Z | #! /usr/bin/env python
# coding: iso-8859-1
# Copyright (C) 2006, Stefan Schwarzer
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# - Redistributions of source code must retain the above cop... | 30.336634 | 73 | 0.703655 |
5be0a151471d373c63f638740a2030c2a9e7a3a6 | 2,424 | py | Python | CircuitPython_qrio/repl/code.py | Therottenrobby/Adafruit_Learning_System_Guides | 0caaed5e748432498ff93f93912c82378fa1cb8c | [
"MIT"
] | null | null | null | CircuitPython_qrio/repl/code.py | Therottenrobby/Adafruit_Learning_System_Guides | 0caaed5e748432498ff93f93912c82378fa1cb8c | [
"MIT"
] | 1 | 2020-04-30T18:20:19.000Z | 2020-04-30T18:20:19.000Z | CircuitPython_qrio/repl/code.py | Therottenrobby/Adafruit_Learning_System_Guides | 0caaed5e748432498ff93f93912c82378fa1cb8c | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: Copyright (c) 2021 Jeff Epler for Adafruit Industries
#
# SPDX-License-Identifier: Unlicense
"""
This demo is designed for the Kaluga development kit version 1.3 with the
ILI9341 display.
"""
import ssl
from ulab import numpy as np
from terminalio import FONT
import board
import busio
import... | 25.25 | 79 | 0.730198 |
f68f76821f9e3b9c84fc12dd146d5b9f786f782c | 9,795 | py | Python | setup.py | deadundead/npyscreen | d00ad39c90df87ccf670a427a1dca9ad9b4a394f | [
"BSD-2-Clause"
] | 50 | 2018-10-25T03:46:41.000Z | 2022-02-05T06:56:33.000Z | setup.py | deadundead/npyscreen | d00ad39c90df87ccf670a427a1dca9ad9b4a394f | [
"BSD-2-Clause"
] | 2 | 2018-11-20T21:58:04.000Z | 2020-02-09T12:50:49.000Z | setup.py | deadundead/npyscreen | d00ad39c90df87ccf670a427a1dca9ad9b4a394f | [
"BSD-2-Clause"
] | 17 | 2018-12-23T08:01:18.000Z | 2021-12-10T00:02:47.000Z | #!/usr/bin/env python
from distutils.core import setup
setup(
name="npyscreen",
version="4.10.5",
description="Writing user interfaces without all that ugly mucking about in hyperspace",
author="Nicholas Cole",
author_email="n@npcole.com",
url="http://www.npcole.com/npyscreen/",
packages=['npyscreen', 'npyscree... | 45.347222 | 250 | 0.784686 |
2723cfd9d8bea5ba6a55454ba7cacaa0c6dd9775 | 563 | py | Python | 2018/2018_09a.py | davidxiao93/Advent-of-Code | 29503100ae4eb46b048fc3ab68ff0181c6f00ee5 | [
"MIT"
] | null | null | null | 2018/2018_09a.py | davidxiao93/Advent-of-Code | 29503100ae4eb46b048fc3ab68ff0181c6f00ee5 | [
"MIT"
] | null | null | null | 2018/2018_09a.py | davidxiao93/Advent-of-Code | 29503100ae4eb46b048fc3ab68ff0181c6f00ee5 | [
"MIT"
] | null | null | null | input = """477 players; last marble is worth 70851 points"""
words = input.split()
highest_marble = int(words[-2])
num_players = int(words[0])
def shift(v, a):
if a != 0 and a % 23 == 0:
return v[-6:] + v[:-7], {v[-7], a}
else:
return [a] + v[2:] + v[:2], set()
values = [0]
elf_scores = {}
f... | 22.52 | 60 | 0.568384 |
c0885b8e7fb63e3c1175884a389be4a56941517b | 732 | py | Python | src/SystemStatus.py | woosook0127/Coin_ATS | 5441f95b9466a0a3d1b67e238b93d1d38eb996ed | [
"MIT"
] | null | null | null | src/SystemStatus.py | woosook0127/Coin_ATS | 5441f95b9466a0a3d1b67e238b93d1d38eb996ed | [
"MIT"
] | null | null | null | src/SystemStatus.py | woosook0127/Coin_ATS | 5441f95b9466a0a3d1b67e238b93d1d38eb996ed | [
"MIT"
] | null | null | null | #-----------------------------------------------------------------------
class SystemStatus():
def __init__(self):
self.access = "xTgB4NarGyQ1hYbkFRtMGVJhskdVTsw0mRlzdyES"
self.secret = "1xk3iwoQgqyCO7uQ1ZE9Ce0fyAFrFm0w3FOUDNOr"
self.coin_type = "DEFAULT" # default [KRW-???]
self.k_... | 40.666667 | 72 | 0.42623 |
d6f54b4b8e6e00237db8e90f14fc33e791158afa | 3,564 | py | Python | bindings/python/ensmallen/datasets/string/hyphomicrobiumzavarzinii.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/hyphomicrobiumzavarzinii.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/hyphomicrobiumzavarzinii.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Hyphomicrobium zavarzinii.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--prot... | 33 | 223 | 0.679012 |
16649bcf47802d814083f059d48b9e96f7f5beef | 3,517 | py | Python | test/torrent/test_values.py | elliptical/clot | d1ee8ddc7527b170c0943b567b1cd589d5007b4d | [
"MIT"
] | null | null | null | test/torrent/test_values.py | elliptical/clot | d1ee8ddc7527b170c0943b567b1cd589d5007b4d | [
"MIT"
] | null | null | null | test/torrent/test_values.py | elliptical/clot | d1ee8ddc7527b170c0943b567b1cd589d5007b4d | [
"MIT"
] | null | null | null | import tcm
from clot.torrent.values import List
class TestCase(tcm.TestCase):
@staticmethod
def valid_item(value):
if isinstance(value, int) and value > 0:
return value
raise ValueError(f'invalid item {value}')
def test_list_can_be_created_with_zero_or_more_values_and_is_iter... | 32.266055 | 84 | 0.584873 |
df083829f77166d305b427bfc3cf31730e5211f6 | 21,743 | py | Python | src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/commands.py | JennyLawrance/azure-cli | cb9ca4b694110806b31803a95f9f315b2fde6410 | [
"MIT"
] | null | null | null | src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/commands.py | JennyLawrance/azure-cli | cb9ca4b694110806b31803a95f9f315b2fde6410 | [
"MIT"
] | null | null | null | src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/commands.py | JennyLawrance/azure-cli | cb9ca4b694110806b31803a95f9f315b2fde6410 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 46.658798 | 151 | 0.645403 |
a2ad9c17db056b40f237e3ed7899eb913a90e0af | 1,021 | py | Python | get_parser_predict.py | codeballet/image-classifier-flowers | 95263d2c482b4dd68e51994175f3703b28d86fdd | [
"MIT"
] | null | null | null | get_parser_predict.py | codeballet/image-classifier-flowers | 95263d2c482b4dd68e51994175f3703b28d86fdd | [
"MIT"
] | null | null | null | get_parser_predict.py | codeballet/image-classifier-flowers | 95263d2c482b4dd68e51994175f3703b28d86fdd | [
"MIT"
] | null | null | null | import argparse
# Initiate the parser
parser = argparse.ArgumentParser(description="get the class probability of an image using a checkpoint")
# Define the command-line arguments
parser.add_argument('-c', '--checkpoint',
default='checkpoint.pth',
help='state checkpoint filepa... | 31.90625 | 104 | 0.567091 |
b6539d98e3fa46b1b15741dddf197609ff031e3b | 2,335 | py | Python | pirates/creature/FlyTrap.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 81 | 2018-04-08T18:14:24.000Z | 2022-01-11T07:22:15.000Z | pirates/creature/FlyTrap.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 4 | 2018-09-13T20:41:22.000Z | 2022-01-08T06:57:00.000Z | pirates/creature/FlyTrap.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 26 | 2018-05-26T12:49:27.000Z | 2021-09-11T09:11:59.000Z | from pandac.PandaModules import *
from direct.directnotify import DirectNotifyGlobal
from pirates.creature.Creature import Creature
from pirates.audio import SoundGlobals
from pirates.audio.SoundGlobals import loadSfx
class FlyTrap(Creature):
ModelInfo = ('models/char/flytrap_hi', 'models/char/flytrap_')
SfxNa... | 55.595238 | 309 | 0.637259 |
345e21bd603c7264b40d59664d8eded21644323c | 224,452 | py | Python | corehq/apps/app_manager/models.py | saiprakash-v/commcare-hq | dc11d6c35aa460ee545a98f3c6c9e5e4435deb7f | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/app_manager/models.py | saiprakash-v/commcare-hq | dc11d6c35aa460ee545a98f3c6c9e5e4435deb7f | [
"BSD-3-Clause"
] | 94 | 2020-12-11T06:57:31.000Z | 2022-03-15T10:24:06.000Z | corehq/apps/app_manager/models.py | saiprakash-v/commcare-hq | dc11d6c35aa460ee545a98f3c6c9e5e4435deb7f | [
"BSD-3-Clause"
] | null | null | null | import calendar
import datetime
import hashlib
import itertools
import json
import logging
import os
import random
import re
import types
import uuid
from collections import Counter, OrderedDict, defaultdict, namedtuple
from copy import deepcopy
from distutils.version import LooseVersion
from functools import wraps
fro... | 36.789379 | 120 | 0.636684 |
0f0711606e5539442aa3bbd4bd282959909daf56 | 4,260 | py | Python | sdk/python/pulumi_azure_nextgen/datafactory/v20180601/get_managed_private_endpoint.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/datafactory/v20180601/get_managed_private_endpoint.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/datafactory/v20180601/get_managed_private_endpoint.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... | 34.08 | 164 | 0.646009 |
1ec374bc86b57f73ef11b3ad76f7dbf192c6d9d9 | 2,081 | py | Python | examples/046_assembly_example.py | gramaziokohler/workshop_munich_2020 | 9e23481b2059d49684e9a3c0770853296de24832 | [
"MIT"
] | 2 | 2020-11-05T08:09:56.000Z | 2020-11-05T21:00:04.000Z | examples/046_assembly_example.py | gramaziokohler/workshop_munich_2020 | 9e23481b2059d49684e9a3c0770853296de24832 | [
"MIT"
] | null | null | null | examples/046_assembly_example.py | gramaziokohler/workshop_munich_2020 | 9e23481b2059d49684e9a3c0770853296de24832 | [
"MIT"
] | 1 | 2020-11-05T08:11:07.000Z | 2020-11-05T08:11:07.000Z |
import os
import json
import math
from compas.geometry import Frame
from compas.geometry import Point
from compas.geometry import Vector
from compas.geometry import Transformation
from compas.geometry import Rotation
from compas.geometry import Translation
from assembly_information_model.assembly import Assembly
fro... | 30.15942 | 100 | 0.706872 |
b5186358698109f6b92662f129e253622c94f08e | 514 | py | Python | server/migrations/versions/9651589b36b5_.py | AlexandreBattut/centrale | 28d1aa53abb88e7ffb87ee1d64cb698a2c76402a | [
"MIT"
] | null | null | null | server/migrations/versions/9651589b36b5_.py | AlexandreBattut/centrale | 28d1aa53abb88e7ffb87ee1d64cb698a2c76402a | [
"MIT"
] | null | null | null | server/migrations/versions/9651589b36b5_.py | AlexandreBattut/centrale | 28d1aa53abb88e7ffb87ee1d64cb698a2c76402a | [
"MIT"
] | null | null | null | """empty message
Revision ID: 9651589b36b5
Revises: 36754465086e
Create Date: 2019-06-20 08:22:52.910047
"""
# revision identifiers, used by Alembic.
revision = '9651589b36b5'
down_revision = '36754465086e'
from alembic import op
import sqlalchemy as sa
def upgrade():
# ### commands auto generated by Alembic ... | 19.037037 | 65 | 0.678988 |
c85e175e39d09ba1c0b22b7f044a5a5eccee68ce | 638 | py | Python | Ago-Dic-2021/moncada-lara-jesus-uriel/privAdm.py | AnhellO/DAS_Sistemas | 07b4eca78357d02d225d570033d05748d91383e3 | [
"MIT"
] | 41 | 2017-09-26T09:36:32.000Z | 2022-03-19T18:05:25.000Z | Ago-Dic-2021/moncada-lara-jesus-uriel/privAdm.py | AnhellO/DAS_Sistemas | 07b4eca78357d02d225d570033d05748d91383e3 | [
"MIT"
] | 67 | 2017-09-11T05:06:12.000Z | 2022-02-14T04:44:04.000Z | Ago-Dic-2021/moncada-lara-jesus-uriel/privAdm.py | AnhellO/DAS_Sistemas | 07b4eca78357d02d225d570033d05748d91383e3 | [
"MIT"
] | 210 | 2017-09-01T00:10:08.000Z | 2022-03-19T18:05:12.000Z | from usuariosmod import Usuarios
class Admin(Usuarios):
def __init__(self, first_name, last_name, age, job, company):
super().__init__(first_name, last_name, age, job, company)
self.privileges = Privileges()
class Privileges():
def __init__(self,privileges=[]):
super().__init__()
... | 31.9 | 66 | 0.626959 |
acc7898d47cc41012fd9bf5a5dfedea17df6cd1e | 3,767 | py | Python | kubernetes_py/models/unversioned/BaseUrls.py | ubordignon/kubernetes-py | 7f73082e797ef3f09e469c277802d6162815a6a5 | [
"Apache-2.0"
] | null | null | null | kubernetes_py/models/unversioned/BaseUrls.py | ubordignon/kubernetes-py | 7f73082e797ef3f09e469c277802d6162815a6a5 | [
"Apache-2.0"
] | null | null | null | kubernetes_py/models/unversioned/BaseUrls.py | ubordignon/kubernetes-py | 7f73082e797ef3f09e469c277802d6162815a6a5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is subject to the terms and conditions defined in
# file 'LICENSE.md', which is part of this source code package.
#
class BaseUrls(object):
"""
Wrapper around a map of URL endpoints for each K8sObject type.
"""
default_api_version = 'v1'
... | 46.506173 | 141 | 0.65065 |
48076e5bc1b602010d4e5884871c683945a5d372 | 9,141 | py | Python | voigt/fit.py | caiz12/Myfit | 8faeeca3811a90b5fea70c9edf194b0a55845011 | [
"MIT"
] | 1 | 2020-05-26T00:01:46.000Z | 2020-05-26T00:01:46.000Z | voigt/fit.py | caiz12/Myfit | 8faeeca3811a90b5fea70c9edf194b0a55845011 | [
"MIT"
] | null | null | null | voigt/fit.py | caiz12/Myfit | 8faeeca3811a90b5fea70c9edf194b0a55845011 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat May 9 23:28:23 2020
@author: leezi
"""
__version__ = '0.1'
import pandas as pd
from astropy.io import fits
from astropy import units as un
import astropy.constants as const
from scipy.optimize import curve_fit
from scipy.signal import fftconvolve, gaussian
imp... | 34.625 | 131 | 0.579586 |
4e59a2c11ecc31e90bc3f0d817ac221dd4ef4a27 | 900 | py | Python | foundation/jobs/migrations/0001_initial.py | breck7/website | e1d72c3db7612aaa64c47fb6117a788b955c4ab0 | [
"MIT"
] | 74 | 2016-06-27T17:06:44.000Z | 2022-03-20T19:42:07.000Z | foundation/jobs/migrations/0001_initial.py | breck7/website | e1d72c3db7612aaa64c47fb6117a788b955c4ab0 | [
"MIT"
] | 370 | 2016-06-09T09:15:00.000Z | 2022-03-28T19:02:31.000Z | foundation/jobs/migrations/0001_initial.py | Mattlk13/website | 83abd726ae3ae377480010fd46e9c141bc76b39e | [
"MIT"
] | 104 | 2016-06-09T15:16:02.000Z | 2022-03-12T13:14:10.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Job',
fields=[
('id', models.AutoField(verbose_... | 31.034483 | 114 | 0.558889 |
f37c31393b8c0ba32226b6d375eb679b969e4373 | 92 | py | Python | gcodeparser/__init__.py | gleb-svechnikov/GcodeParser | 36a36ef935b3570f8ca7cece70a4eb0900f8c8c1 | [
"MIT"
] | null | null | null | gcodeparser/__init__.py | gleb-svechnikov/GcodeParser | 36a36ef935b3570f8ca7cece70a4eb0900f8c8c1 | [
"MIT"
] | null | null | null | gcodeparser/__init__.py | gleb-svechnikov/GcodeParser | 36a36ef935b3570f8ca7cece70a4eb0900f8c8c1 | [
"MIT"
] | null | null | null | __version__ = "0.0.6"
from .gcode_parser import GcodeParser
from .commands import Commands
| 18.4 | 37 | 0.793478 |
6427741809331db1a1e237549e9df8ad696b5f7c | 12,044 | py | Python | lib/tool_shed/util/commit_util.py | innovate-invent/galaxy | 10aa953a40e171246bdd1804c74e8019da8e8200 | [
"CC-BY-3.0"
] | 2 | 2017-03-28T12:11:41.000Z | 2017-04-22T02:58:25.000Z | lib/tool_shed/util/commit_util.py | innovate-invent/galaxy | 10aa953a40e171246bdd1804c74e8019da8e8200 | [
"CC-BY-3.0"
] | 4 | 2021-02-08T20:28:34.000Z | 2022-03-02T02:52:55.000Z | lib/tool_shed/util/commit_util.py | innovate-invent/galaxy | 10aa953a40e171246bdd1804c74e8019da8e8200 | [
"CC-BY-3.0"
] | 1 | 2018-05-30T07:38:54.000Z | 2018-05-30T07:38:54.000Z | import gzip
import json
import logging
import os
import shutil
import sys
import tempfile
from collections import namedtuple
from sqlalchemy.sql.expression import null
import tool_shed.repository_types.util as rt_util
from galaxy.util import checkers
from galaxy.util.path import safe_relpath
from tool_shed.tools.data... | 45.621212 | 157 | 0.638243 |
7518b807f6f63196fc9d2455ff4fdd4e9ae59a2d | 13,522 | py | Python | flopy/modflow/mfgage.py | pjhaest/flopy | 369893b6e58cf37bd09c95c6e7cb129c74359214 | [
"BSD-3-Clause"
] | null | null | null | flopy/modflow/mfgage.py | pjhaest/flopy | 369893b6e58cf37bd09c95c6e7cb129c74359214 | [
"BSD-3-Clause"
] | null | null | null | flopy/modflow/mfgage.py | pjhaest/flopy | 369893b6e58cf37bd09c95c6e7cb129c74359214 | [
"BSD-3-Clause"
] | null | null | null | """
mfgage module. Contains the ModflowGage class. Note that the user can access
the ModflowGage class as `flopy.modflow.ModflowGage`.
Additional information for this MODFLOW package can be found at the `Online
MODFLOW Guide
<http://water.usgs.gov/ogw/modflow/MODFLOW-2005-Guide/gage.htm>`_.
"""
import os
i... | 36.058667 | 83 | 0.502958 |
0dedb49e5634ca039ea4b199a39aa607bae833b0 | 182 | py | Python | rxbp/multicast/multicastobserverinfo.py | MichaelSchneeberger/rx_backpressure | 16173827498bf1bbee3344933cb9efbfd19699f5 | [
"Apache-2.0"
] | 24 | 2018-11-22T21:04:49.000Z | 2021-11-08T11:18:09.000Z | rxbp/multicast/multicastobserverinfo.py | MichaelSchneeberger/rx_backpressure | 16173827498bf1bbee3344933cb9efbfd19699f5 | [
"Apache-2.0"
] | 1 | 2019-02-06T15:58:46.000Z | 2019-02-12T20:31:50.000Z | rxbp/multicast/multicastobserverinfo.py | MichaelSchneeberger/rx_backpressure | 16173827498bf1bbee3344933cb9efbfd19699f5 | [
"Apache-2.0"
] | 1 | 2021-01-26T12:41:37.000Z | 2021-01-26T12:41:37.000Z | from abc import ABC
from rxbp.multicast.mixins.multicastobserverinfomixin import MultiCastObserverInfoMixin
class MultiCastObserverInfo(MultiCastObserverInfoMixin, ABC):
pass
| 22.75 | 87 | 0.857143 |
c2a6ca7ec68faf0efa4684f97ad593903be62ca9 | 61 | py | Python | schwarz/puzzle_plugins/__init__.py | FelixSchwarz/puzzle-plugin-system | 3f95420c43ff40c40309bcc58cd4414b16921a35 | [
"CC0-1.0"
] | null | null | null | schwarz/puzzle_plugins/__init__.py | FelixSchwarz/puzzle-plugin-system | 3f95420c43ff40c40309bcc58cd4414b16921a35 | [
"CC0-1.0"
] | 1 | 2020-10-29T09:31:49.000Z | 2020-10-29T09:31:49.000Z | schwarz/puzzle_plugins/__init__.py | FelixSchwarz/puzzle-plugin-system | 3f95420c43ff40c40309bcc58cd4414b16921a35 | [
"CC0-1.0"
] | null | null | null |
from .plugin_loader import *
from .signal_registry import *
| 15.25 | 30 | 0.786885 |
e7a828487cd070ddc270d61a3cc8328fd6b2cff5 | 804 | py | Python | examples/4-resistor-intermittent-adaptive.py | JacobZhao/electrical-circuit-battery-model | 6d84230c810660f654033e9ff81a458e57dad1db | [
"MIT"
] | 10 | 2019-02-27T13:37:19.000Z | 2022-03-07T04:38:12.000Z | examples/4-resistor-intermittent-adaptive.py | JacobZhao/electrical-circuit-battery-model | 6d84230c810660f654033e9ff81a458e57dad1db | [
"MIT"
] | 1 | 2019-06-24T01:38:49.000Z | 2019-06-24T18:38:39.000Z | examples/4-resistor-intermittent-adaptive.py | JacobZhao/electrical-circuit-battery-model | 6d84230c810660f654033e9ff81a458e57dad1db | [
"MIT"
] | 6 | 2018-12-18T14:37:30.000Z | 2021-05-07T05:56:48.000Z | #!/usr/bin/python3
import sys, math
import matplotlib.pyplot as plt
sys.path.append("../")
from simulator import *
if __name__ == "__main__":
# Alkaline battery
# 6 Ohm load
plt.xlabel('t [h]')
plt.ylabel('$U_{Batt}$ [V]')
# not adaptive
# -> always: T_ON = T_OFF = 50s
load = ResistorLoad(6.0, 50.0... | 23.647059 | 63 | 0.552239 |
b1204298f20c8174831bfbf82bba60dfd2d46b28 | 946 | py | Python | practice/findfile.py | JackyYuanjie/python-scripts | 490eb9668bda6db004ae87d204588fb6ffe56051 | [
"Apache-2.0"
] | 1 | 2021-07-08T05:09:38.000Z | 2021-07-08T05:09:38.000Z | practice/findfile.py | JackyYuanjie/python-scripts | 490eb9668bda6db004ae87d204588fb6ffe56051 | [
"Apache-2.0"
] | null | null | null | practice/findfile.py | JackyYuanjie/python-scripts | 490eb9668bda6db004ae87d204588fb6ffe56051 | [
"Apache-2.0"
] | 1 | 2020-01-09T07:29:17.000Z | 2020-01-09T07:29:17.000Z | # -*- coding:utf-8 -*-
import glob
# 获取指定目录下的内容
# yijian = glob.glob(r"F:\*\*\*.docx")
# print(yijian)
"""
在python中,glob模块是用来查找匹配的文件的
在查找的条件中,需要用到Unix shell中的匹配规则:
* : 匹配所有
? : 匹配一个字符
*.* : 匹配如:[hello.txt,cat.xls,xxx234s.doc]
?.* : 匹配如:[1.txt,h.py]
?.gif: ... | 20.12766 | 52 | 0.581395 |
11d5a4696d7d7888a0e049426006666e0cd93006 | 774 | py | Python | app/models/location.py | tonyngophd/instavibes | 36476445fca23a4ff179feb48330786256756b3c | [
"MIT"
] | 15 | 2021-01-25T16:37:18.000Z | 2021-02-23T16:45:16.000Z | app/models/location.py | suasllc/full-stack-flask-sqlalchemy-react-nodejs-app | 36476445fca23a4ff179feb48330786256756b3c | [
"MIT"
] | 1 | 2021-01-25T21:07:16.000Z | 2021-01-25T21:07:16.000Z | app/models/location.py | suasllc/instavibes | 36476445fca23a4ff179feb48330786256756b3c | [
"MIT"
] | 3 | 2021-06-07T17:57:16.000Z | 2021-12-11T10:18:24.000Z | from .db import db
class Location(db.Model):
__tablename__ = 'locations'
id = db.Column(db.Integer, primary_key=True)
city = db.Column(db.Text, nullable=False)
state = db.Column(db.Text, nullable=False)
country = db.Column(db.Text, nullable=False)
createdAt = db.Column(db.DateTime(timezone=Tr... | 35.181818 | 124 | 0.667959 |
0b13a2f4fe7075ed4d8157ee578cb4cd030abac2 | 21,288 | py | Python | ott/core/quad_problems.py | zoepiran/ott | 05f53501d0bee031c86bb2d29db2eacfe84dceeb | [
"Apache-2.0"
] | null | null | null | ott/core/quad_problems.py | zoepiran/ott | 05f53501d0bee031c86bb2d29db2eacfe84dceeb | [
"Apache-2.0"
] | null | null | null | ott/core/quad_problems.py | zoepiran/ott | 05f53501d0bee031c86bb2d29db2eacfe84dceeb | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2022 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 39.568773 | 80 | 0.675169 |
2ada56e1c444457bb4316e00bb3f29c03d407ac1 | 12,739 | py | Python | homeassistant/components/keyboard_remote/__init__.py | mikan-megane/core | 837220cce40890e296920d33a623adbc11bd15a6 | [
"Apache-2.0"
] | 4 | 2020-08-10T20:02:24.000Z | 2022-01-31T02:14:22.000Z | homeassistant/components/keyboard_remote/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 79 | 2020-07-23T07:13:37.000Z | 2022-03-22T06:02:37.000Z | homeassistant/components/keyboard_remote/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 4 | 2017-01-10T04:17:33.000Z | 2021-09-02T16:37:24.000Z | """Receive signals from a keyboard and use it as a remote control."""
# pylint: disable=import-error
import asyncio
from contextlib import suppress
import logging
import os
import aionotify
from evdev import InputDevice, categorize, ecodes, list_devices
import voluptuous as vol
from homeassistant.const import EVENT_H... | 38.838415 | 96 | 0.575948 |
da1fdffc7b092101e0907a0ea093a80fa36142bc | 2,442 | py | Python | cnns/deeprl/run_policy.py | adam-dziedzic/time-series-ml | 81aaa27f1dd9ea3d7d62b661dac40cac6c1ef77a | [
"Apache-2.0"
] | 1 | 2018-03-25T13:19:46.000Z | 2018-03-25T13:19:46.000Z | cnns/deeprl/run_policy.py | adam-dziedzic/time-series-ml | 81aaa27f1dd9ea3d7d62b661dac40cac6c1ef77a | [
"Apache-2.0"
] | null | null | null | cnns/deeprl/run_policy.py | adam-dziedzic/time-series-ml | 81aaa27f1dd9ea3d7d62b661dac40cac6c1ef77a | [
"Apache-2.0"
] | null | null | null | from cnns.nnlib.utils.exec_args import get_args
from cnns.deeprl.load_policy import load_policy
from cnns.deeprl.pytorch_model import pytorch_policy_fn
from cnns.deeprl import behavioral_cloning
from cnns.deeprl.models import run_model
from cnns.nnlib.utils.general_utils import PolicyType
from cnns.nnlib.utils.general_... | 46.075472 | 97 | 0.627764 |
132246d145cbc7d3869e4b0a42a373099b98f8cd | 2,196 | py | Python | keras_frcnn/losses.py | neilsen1994/keras-frcnn | 6e8451e590d970452dcde34ddf91f4e6ada0e229 | [
"Apache-2.0"
] | null | null | null | keras_frcnn/losses.py | neilsen1994/keras-frcnn | 6e8451e590d970452dcde34ddf91f4e6ada0e229 | [
"Apache-2.0"
] | null | null | null | keras_frcnn/losses.py | neilsen1994/keras-frcnn | 6e8451e590d970452dcde34ddf91f4e6ada0e229 | [
"Apache-2.0"
] | 2 | 2021-01-12T00:40:02.000Z | 2021-01-12T01:32:27.000Z | from keras import backend as K
from keras.objectives import categorical_crossentropy
if K.image_data_format() == 'channels_last':
import tensorflow as tf
lambda_rpn_regr = 1.0
lambda_rpn_class = 1.0
lambda_cls_regr = 1.0
lambda_cls_class = 1.0
epsilon = 1e-4
def rpn_loss_regr(num_anchors):
def rpn_loss_regr_fix... | 39.214286 | 206 | 0.650273 |
78cb21633110847d7358607f648f702e6fe2ff8c | 502 | py | Python | magicclass/__init__.py | hanjinliu/magic-class | 2a9d8af3d385ec3870ebcade9f2dbc03115bed22 | [
"BSD-3-Clause"
] | 15 | 2021-09-07T10:18:59.000Z | 2022-03-23T14:55:45.000Z | magicclass/__init__.py | hanjinliu/magic-class | 2a9d8af3d385ec3870ebcade9f2dbc03115bed22 | [
"BSD-3-Clause"
] | 12 | 2021-09-10T08:54:43.000Z | 2022-03-31T02:43:50.000Z | magicclass/__init__.py | hanjinliu/magic-class | 2a9d8af3d385ec3870ebcade9f2dbc03115bed22 | [
"BSD-3-Clause"
] | 1 | 2022-02-13T15:51:51.000Z | 2022-02-13T15:51:51.000Z | __version__ = "0.5.19.dev0"
from .core import (
magicclass,
magicmenu,
magiccontext,
magictoolbar,
Parameters,
Bound,
build_help
)
from .wrappers import (
set_options,
click,
set_design,
do_not_record,
bind_key,
confirm,
)
from .fields import field, vfield... | 17.928571 | 64 | 0.689243 |
508071f5b744f7506596635f7ec272ed0cf46dd8 | 10,590 | py | Python | utilities/kml_edge_copy.py | warrenjp/ohmec | 9598bc989c676edf352d901ad44263a549e5dae0 | [
"Apache-2.0"
] | 5 | 2021-07-07T18:27:37.000Z | 2022-02-28T00:33:30.000Z | utilities/kml_edge_copy.py | warrenjp/ohmec | 9598bc989c676edf352d901ad44263a549e5dae0 | [
"Apache-2.0"
] | 99 | 2021-05-15T03:48:25.000Z | 2022-02-19T21:51:01.000Z | utilities/kml_edge_copy.py | warrenjp/ohmec | 9598bc989c676edf352d901ad44263a549e5dae0 | [
"Apache-2.0"
] | 3 | 2021-06-21T22:58:39.000Z | 2022-03-01T05:20:50.000Z | #!/usr/bin/env python3
"""kml_edge_copy.py: read in two KML files and copy the boundary edge
from one polygon to the other. With only KML arguments, the
script will only print out common points between the two KML.
With 7 arguments, it combines the edge from the first lat/lon
pair to the second lat/lon pai... | 37.027972 | 179 | 0.616242 |
e3ccac521c8203bb92db25c2ad1c1bf324ab502e | 1,527 | py | Python | benchmarks/utils/plot_utils.py | datavalor/fastg3 | a0d3af54905913668060abbe60786599419b5c3e | [
"BSD-3-Clause"
] | 1 | 2021-07-21T11:55:51.000Z | 2021-07-21T11:55:51.000Z | benchmarks/utils/plot_utils.py | datavalor/fastg3 | a0d3af54905913668060abbe60786599419b5c3e | [
"BSD-3-Clause"
] | null | null | null | benchmarks/utils/plot_utils.py | datavalor/fastg3 | a0d3af54905913668060abbe60786599419b5c3e | [
"BSD-3-Clause"
] | null | null | null | # Plotting
import seaborn
import matplotlib.pyplot as plt
plt.style.use('default')
seaborn.set_palette('gray')
import inspect
from init import COLORMAP
from constants import MARKERSIZE
def plot_bench(
data_dict,
xlabels,
labels,
xlabel="",
ylabel="",
logy=False,
savefig=False
):
... | 25.032787 | 94 | 0.647675 |
1d97953f287211da54dc56e6d6b89b8cee6489fd | 1,289 | py | Python | tests/usecases/test_collect_links.py | Chanmoro/python_crawler_layered_architecture | b89e063621a18819e40d2d952b65144083d8abed | [
"MIT"
] | 1 | 2021-02-24T15:06:25.000Z | 2021-02-24T15:06:25.000Z | tests/usecases/test_collect_links.py | Chanmoro/python_layered_architected_crawler | b89e063621a18819e40d2d952b65144083d8abed | [
"MIT"
] | null | null | null | tests/usecases/test_collect_links.py | Chanmoro/python_layered_architected_crawler | b89e063621a18819e40d2d952b65144083d8abed | [
"MIT"
] | null | null | null | from unittest.mock import Mock
from crawler.domain import Url, WebPage
from crawler.repositories.json_repository import JsonRepository
from crawler.requester.web_page_requester import WebPageRequester
from crawler.usecases.collect_links import CollectLinks
class TestCollectLinks:
def test_exec(self):
req... | 42.966667 | 124 | 0.640031 |
6d6ec562bc2d9fd8522eb44ec6ae0621e551fc32 | 3,861 | py | Python | tests/python/open_data/svd/test_tsvd_bench.py | pnijhara/h2o4gpu | 6257112c134136471420b68241f57190a445b67d | [
"Apache-2.0"
] | 458 | 2017-09-20T08:32:10.000Z | 2022-02-28T18:40:57.000Z | tests/python/open_data/svd/test_tsvd_bench.py | Jun-NIBS/h2o4gpu | 9885416deb3285f5d0f33023d6c07373ac4fc0b7 | [
"Apache-2.0"
] | 461 | 2017-09-20T11:39:04.000Z | 2021-11-21T15:51:42.000Z | tests/python/open_data/svd/test_tsvd_bench.py | Jun-NIBS/h2o4gpu | 9885416deb3285f5d0f33023d6c07373ac4fc0b7 | [
"Apache-2.0"
] | 114 | 2017-09-20T12:08:07.000Z | 2021-11-29T14:15:40.000Z | import numpy as np
import time
import sys
import logging
from h2o4gpu.decomposition import TruncatedSVDSklearn as sklearnsvd
from h2o4gpu.solvers import TruncatedSVDH2O
print(sys.path)
logging.basicConfig(level=logging.DEBUG)
def func(m=5000000, n=10, k=9, convert_to_float32=False):
import os
if os.getenv("... | 38.227723 | 120 | 0.69179 |
3b8c6cd3c173fa2aa21a967f6d817139c0b67ec0 | 11,383 | py | Python | var/spack/repos/builtin/packages/hypre/package.py | HigherOrderMethods/spack | 87ed3fcc59fc25ce250042338d082925e3a3610b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2020-11-26T12:31:07.000Z | 2020-11-26T12:31:07.000Z | var/spack/repos/builtin/packages/hypre/package.py | HigherOrderMethods/spack | 87ed3fcc59fc25ce250042338d082925e3a3610b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 15 | 2021-04-14T12:34:46.000Z | 2022-03-02T19:08:00.000Z | var/spack/repos/builtin/packages/hypre/package.py | AdhocMan/spack | c8f58c5f1d660bfdb5f4f50d1d2a9f294435ee4d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import os
import sys
class Hypre(Package, CudaPackage):
"""Hypre is a library of high performanc... | 41.849265 | 97 | 0.623913 |
97bb980d0dd45bd5212223038a18a68845a91b3b | 14,403 | py | Python | robot_intelligence_student/ars_msf_state_estimator_student/source/ars_msf_state_estimator.py | Moado/Robotics-ROS | c5aca2dffa6c5c9376e1cda8624ed611ffb11ca0 | [
"MIT"
] | null | null | null | robot_intelligence_student/ars_msf_state_estimator_student/source/ars_msf_state_estimator.py | Moado/Robotics-ROS | c5aca2dffa6c5c9376e1cda8624ed611ffb11ca0 | [
"MIT"
] | null | null | null | robot_intelligence_student/ars_msf_state_estimator_student/source/ars_msf_state_estimator.py | Moado/Robotics-ROS | c5aca2dffa6c5c9376e1cda8624ed611ffb11ca0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import numpy as np
from numpy import *
import os
import threading
# ROS
import rospy
import tf_conversions as tf
import nav_msgs.msg
from nav_msgs.msg import Path
#
import ars_lib_helpers
class ArsMsfStateEstimator:
#######
# Meas position
# z_t = [m_posi_x, m_posi_y, m_p... | 29.635802 | 150 | 0.725335 |
a7248b0f18bc5345617ca1c5846916ca1eb6cfe7 | 4,312 | py | Python | compss/programming_model/bindings/python/src/pycompss/util/storages/persistent.py | mF2C/COMPSs | a74d97346121382a8a40ca15fa619e6e4cea917f | [
"Apache-2.0"
] | 2 | 2018-05-07T16:04:51.000Z | 2018-05-08T12:14:19.000Z | compss/programming_model/bindings/python/src/pycompss/util/storages/persistent.py | mF2C/COMPSs | a74d97346121382a8a40ca15fa619e6e4cea917f | [
"Apache-2.0"
] | 4 | 2017-10-25T12:20:52.000Z | 2019-03-20T14:17:40.000Z | compss/programming_model/bindings/python/src/pycompss/util/storages/persistent.py | mF2C/COMPSs | a74d97346121382a8a40ca15fa619e6e4cea917f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2002-2019 Barcelona Supercomputing Center (www.bsc.es)
#
# 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
... | 29.534247 | 79 | 0.650278 |
20803c7412ee5f28f4e7b067624986561d849b58 | 3,720 | py | Python | webscraping/tag.py | tiamica/SpicyArbs | 1a593ff434a02d987c2db1acb330bd3f53a94b67 | [
"Apache-2.0"
] | null | null | null | webscraping/tag.py | tiamica/SpicyArbs | 1a593ff434a02d987c2db1acb330bd3f53a94b67 | [
"Apache-2.0"
] | 1 | 2020-08-09T18:37:16.000Z | 2020-08-09T18:37:16.000Z | webscraping/tag.py | tiamica/SpicyArbs | 1a593ff434a02d987c2db1acb330bd3f53a94b67 | [
"Apache-2.0"
] | null | null | null | '''
Classes for holding tag webpage elements.
SpiceBucks
'''
#------------------------------------------------------------------
from bs4.element import Tag
import util.utilities as ut
from util.message import message
#------------------------------------------------------------------
class CTag():
'''
Wr... | 32.920354 | 116 | 0.515323 |
feec015958dde41e94d02b0840044aa40005d811 | 1,042 | py | Python | dags/xcoms.py | startFromBottom/docker-airflow | 9cf5efe686cb9dfd1bd78b089627a375704e5bc5 | [
"Apache-2.0"
] | null | null | null | dags/xcoms.py | startFromBottom/docker-airflow | 9cf5efe686cb9dfd1bd78b089627a375704e5bc5 | [
"Apache-2.0"
] | null | null | null | dags/xcoms.py | startFromBottom/docker-airflow | 9cf5efe686cb9dfd1bd78b089627a375704e5bc5 | [
"Apache-2.0"
] | null | null | null | import airflow
from datetime import datetime, timedelta
from airflow.models import DAG
from airflow.operators.python_operator import PythonOperator
args = {
'owner': 'Airflow',
'start_date': airflow.utils.dates.days_ago(1),
}
DAG = DAG(
dag_id='simple_xcom',
default_args=args,
schedule_interval="@... | 20.84 | 60 | 0.685221 |
9a877ce69f214bc28f04b27d55bc17d8d881803f | 1,204 | py | Python | astropy/io/misc/asdf/tags/coordinates/tests/test_frames.py | MatiasRepetto/astropy | 689f9d3b063145150149e592a879ee40af1fac06 | [
"BSD-3-Clause"
] | 1 | 2019-03-11T12:26:49.000Z | 2019-03-11T12:26:49.000Z | astropy/io/misc/asdf/tags/coordinates/tests/test_frames.py | MatiasRepetto/astropy | 689f9d3b063145150149e592a879ee40af1fac06 | [
"BSD-3-Clause"
] | 1 | 2019-10-09T18:54:27.000Z | 2019-10-09T18:54:27.000Z | astropy/io/misc/asdf/tags/coordinates/tests/test_frames.py | MatiasRepetto/astropy | 689f9d3b063145150149e592a879ee40af1fac06 | [
"BSD-3-Clause"
] | 1 | 2020-02-18T04:10:00.000Z | 2020-02-18T04:10:00.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
import pytest
asdf = pytest.importorskip('asdf')
from asdf.tests.helpers import assert_roundtrip_tree
from astropy import units
from astropy.coordinates import ICRS, FK5, Longitude, Latitude, Angle
from astropy.io.misc.asdf.exte... | 22.296296 | 69 | 0.699336 |
a71374b393890c6ff7645370c4587dd03dd754d2 | 2,236 | py | Python | example3.py | water-law/tensorFlow | 1a79609062e7d1b96b095a80605f87361fcc67db | [
"Apache-2.0"
] | 1 | 2019-10-06T18:57:52.000Z | 2019-10-06T18:57:52.000Z | example3.py | water-law/tensorflow | 1a79609062e7d1b96b095a80605f87361fcc67db | [
"Apache-2.0"
] | null | null | null | example3.py | water-law/tensorflow | 1a79609062e7d1b96b095a80605f87361fcc67db | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
sess = tf.InteractiveSession()
x = tf.placeholder(tf.float32, shape=[None, 784])
y_ = tf.placeholder(tf.float32, shape=[None, 10])
def weight_vari... | 30.216216 | 86 | 0.693649 |
97072b3c15adc7cbc1901e2979775082a70cbb78 | 14,919 | py | Python | tests/scripts/thread-cert/Cert_9_2_08_PersistentDatasets.py | sarah-iot/openthread | 8210a02400c145eb862b65e32040ed0415ba36c2 | [
"BSD-3-Clause"
] | 69 | 2021-12-16T01:34:09.000Z | 2022-03-31T08:27:39.000Z | tests/scripts/thread-cert/Cert_9_2_08_PersistentDatasets.py | xuyirio/openthread | 349041bc61e899acdccefea455c3401c05e1318b | [
"BSD-3-Clause"
] | 6 | 2022-01-12T18:22:08.000Z | 2022-03-25T10:19:27.000Z | tests/scripts/thread-cert/Cert_9_2_08_PersistentDatasets.py | xuyirio/openthread | 349041bc61e899acdccefea455c3401c05e1318b | [
"BSD-3-Clause"
] | 21 | 2021-12-20T09:05:45.000Z | 2022-03-28T02:52:28.000Z | #!/usr/bin/env python3
#
# Copyright (c) 2016, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... | 42.144068 | 395 | 0.606542 |
46d9435ec115f40f19006426eac2681bdae6060a | 439 | py | Python | corc/providers/apache/config.py | rasmunk/corc | 2d2ba92ab791f50fa46e1ff2cdc0035925032671 | [
"MIT"
] | 2 | 2020-10-31T14:55:26.000Z | 2022-02-07T19:53:33.000Z | corc/providers/apache/config.py | rasmunk/corc | 2d2ba92ab791f50fa46e1ff2cdc0035925032671 | [
"MIT"
] | 3 | 2020-08-27T14:10:16.000Z | 2021-09-23T23:31:19.000Z | corc/providers/apache/config.py | rasmunk/corc | 2d2ba92ab791f50fa46e1ff2cdc0035925032671 | [
"MIT"
] | 1 | 2022-02-07T19:53:34.000Z | 2022-02-07T19:53:34.000Z | from corc.defaults import EC2
from corc.providers.ec2.config_ec2 import (
ec2_config_groups,
ec2_default_config,
ec2_valid_config,
)
def load_config_groups(provider=None):
if provider == EC2:
return ec2_config_groups
def load_default_config(provider=None):
if provider == EC2:
ret... | 19.954545 | 43 | 0.726651 |
11de4b38e94572b0341995f2f0927ec750c25922 | 7,814 | py | Python | src/python/pants/engine/internals/parser.py | bastianwegge/pants | 43f0b90d41622bee0ed22249dbaffb3ff4ad2eb2 | [
"Apache-2.0"
] | null | null | null | src/python/pants/engine/internals/parser.py | bastianwegge/pants | 43f0b90d41622bee0ed22249dbaffb3ff4ad2eb2 | [
"Apache-2.0"
] | 14 | 2020-09-26T02:01:56.000Z | 2022-03-30T10:19:28.000Z | src/python/pants/engine/internals/parser.py | bastianwegge/pants | 43f0b90d41622bee0ed22249dbaffb3ff4ad2eb2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
import os.path
import threading
import tokenize
from dataclasses import dataclass
from difflib import get_close_matches
from io import StringIO
from pat... | 39.867347 | 99 | 0.651779 |
eb788fa404ebcf4ef7aa369588dfb907b1eccb37 | 57,234 | py | Python | scripts/ELSTM/elstm1.py | maobubu/stock-prediction | b2442ccb027c25809a33a610f010cdec077bf61a | [
"Apache-2.0"
] | 44 | 2018-10-26T23:41:59.000Z | 2022-02-23T04:29:12.000Z | scripts/ELSTM/elstm1.py | maobubu/stock-prediction | b2442ccb027c25809a33a610f010cdec077bf61a | [
"Apache-2.0"
] | 6 | 2018-12-26T23:45:58.000Z | 2021-03-31T19:36:51.000Z | scripts/ELSTM/elstm1.py | maobubu/stock-prediction | b2442ccb027c25809a33a610f010cdec077bf61a | [
"Apache-2.0"
] | 14 | 2019-03-11T17:15:20.000Z | 2021-10-04T15:49:11.000Z | import os
from collections import defaultdict
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
import numpy
numpy.random.seed(1)
import tensorflow as tf
import logging
import math
from tensorflow import logging as log
from tensorflow.python import debug as tf_debug
from collect... | 52.847645 | 147 | 0.562865 |
4e1e7f48a28625962f1bbb23ab4d7cbf1ffd92f3 | 1,885 | py | Python | PythonBaseDemo/GraphicInterfaceProgrammin/11.3/grid_test.py | CypHelp/TestNewWorldDemo | ee6f73df05756f191c1c56250fa290461fdd1b9a | [
"Apache-2.0"
] | null | null | null | PythonBaseDemo/GraphicInterfaceProgrammin/11.3/grid_test.py | CypHelp/TestNewWorldDemo | ee6f73df05756f191c1c56250fa290461fdd1b9a | [
"Apache-2.0"
] | null | null | null | PythonBaseDemo/GraphicInterfaceProgrammin/11.3/grid_test.py | CypHelp/TestNewWorldDemo | ee6f73df05756f191c1c56250fa290461fdd1b9a | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#########################################################################
# 网站: <a href="http://www.crazyit.org">疯狂Java联盟</a> #
# author yeeku.H.lee kongyeeku@163.com #
# #
# version 1.0 ... | 40.978261 | 73 | 0.307162 |
d6d0fe5c9e98119dfe9821daee06f252952fc39b | 11,717 | py | Python | code/retinex.py | muggledy/retinex | be606a6eae75a00042a87d9e0173530fbb4fa8a9 | [
"BSD-2-Clause"
] | 36 | 2020-04-11T07:39:17.000Z | 2022-03-30T03:56:13.000Z | code/retinex.py | KeepOnPan/retinex | be606a6eae75a00042a87d9e0173530fbb4fa8a9 | [
"BSD-2-Clause"
] | null | null | null | code/retinex.py | KeepOnPan/retinex | be606a6eae75a00042a87d9e0173530fbb4fa8a9 | [
"BSD-2-Clause"
] | 7 | 2020-10-14T02:49:12.000Z | 2022-03-06T11:34:02.000Z | # encoding:utf-8
'''
Retinex theory based on formula image = reflectance*luminance, what we need is to
estimate the luminance function. This technology is suitable for high dynamic range
image enhancement, underwater image enhancement, foggy image enhancement and
low-light image enhancement.
In this code, we mainly... | 40.543253 | 100 | 0.625587 |
e17eea20f6aabf847ad1fa3e22225324745e10fe | 18,545 | py | Python | python/dgl/backend/mxnet/tensor.py | seanliu96/dgl | b463c4bbd4ec531af67bc72a5495f24584fb5d08 | [
"Apache-2.0"
] | null | null | null | python/dgl/backend/mxnet/tensor.py | seanliu96/dgl | b463c4bbd4ec531af67bc72a5495f24584fb5d08 | [
"Apache-2.0"
] | null | null | null | python/dgl/backend/mxnet/tensor.py | seanliu96/dgl | b463c4bbd4ec531af67bc72a5495f24584fb5d08 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from distutils.version import LooseVersion
import numpy as np
import mxnet as mx
import mxnet.ndarray as nd
import numbers
import builtins
from ... import ndarray as dglnd
from ... import kernel as K
from ...function.base import TargetCode
MX_VERSION = LooseVersion(mx.__versio... | 33.779599 | 105 | 0.644217 |
a85b9276f2a5c78eda76b7d71b8841d169753d76 | 4,259 | py | Python | cansi-pattern-first-class-adt/w/v/cansi/adt/Order_h.py | lopesivan/cansi-pattern | d41e379e728682ed41863104984e05221d347d8e | [
"Apache-2.0"
] | null | null | null | cansi-pattern-first-class-adt/w/v/cansi/adt/Order_h.py | lopesivan/cansi-pattern | d41e379e728682ed41863104984e05221d347d8e | [
"Apache-2.0"
] | null | null | null | cansi-pattern-first-class-adt/w/v/cansi/adt/Order_h.py | lopesivan/cansi-pattern | d41e379e728682ed41863104984e05221d347d8e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatib... | 29.783217 | 102 | 0.662127 |
5362f0f5e0626ec02184da323ebd91913d3c1139 | 2,498 | py | Python | exporters/voc-exporter/pascal_voc_writer/__init__.py | N-buga/Labelbox | cbc96611c1c097117e7450e99752677846783a15 | [
"Apache-2.0"
] | null | null | null | exporters/voc-exporter/pascal_voc_writer/__init__.py | N-buga/Labelbox | cbc96611c1c097117e7450e99752677846783a15 | [
"Apache-2.0"
] | 5 | 2021-08-25T16:14:22.000Z | 2022-02-19T06:59:01.000Z | exporters/voc-exporter/pascal_voc_writer/__init__.py | N-buga/Labelbox | cbc96611c1c097117e7450e99752677846783a15 | [
"Apache-2.0"
] | 2 | 2019-12-05T14:00:26.000Z | 2020-03-10T14:44:41.000Z | """
Pascal VOC writer, forked from https://github.com/AndrewCarterUK/pascal-voc-writer
"""
import os
from jinja2 import Environment, FileSystemLoader
class Writer:
"Class for writing Pascal VOC annotation formats."
def __init__(self, path, width, height):
root = os.path.dirname(os.path.abspath(__file... | 35.685714 | 104 | 0.571257 |
9ce6edc60cce71c1bddbc9a72a17657a7ce256eb | 1,315 | py | Python | 01 - Importing Tabular Data/2. importing_excel.py | nevaan9/Python-Data-Cleaning-Cookbook | c40322673ad93f59a3fe183fcd881e61053001f2 | [
"MIT"
] | 96 | 2020-07-18T08:33:23.000Z | 2022-03-27T15:52:40.000Z | 01 - Importing Tabular Data/2. importing_excel.py | nevaan9/Python-Data-Cleaning-Cookbook | c40322673ad93f59a3fe183fcd881e61053001f2 | [
"MIT"
] | 2 | 2020-12-18T17:35:50.000Z | 2021-01-12T07:14:31.000Z | 01 - Importing Tabular Data/2. importing_excel.py | nevaan9/Python-Data-Cleaning-Cookbook | c40322673ad93f59a3fe183fcd881e61053001f2 | [
"MIT"
] | 104 | 2020-07-22T13:48:44.000Z | 2022-03-31T14:22:48.000Z | # import pandas
import pandas as pd
pd.options.display.float_format = '{:.0f}'.format
pd.set_option('display.width', 85)
pd.set_option('display.max_columns', 5)
# import the land temperature data
percapitaGDP = pd.read_excel("data/GDPpercapita.xlsx",
sheet_name="OECD.Stat export",
skiprows=4,
skipfooter=1,
... | 29.886364 | 77 | 0.7673 |
364a337428e368a106b0a9403f256dcd4a430144 | 3,589 | py | Python | poi/poi/middlewares.py | HelloMrShu/scrapy_artisan | a47f04b275783df4f34d75b28758d3e39dc3cbd6 | [
"MIT"
] | 1 | 2021-11-26T10:41:59.000Z | 2021-11-26T10:41:59.000Z | poi/poi/middlewares.py | HelloMrShu/scrapy_bp | a47f04b275783df4f34d75b28758d3e39dc3cbd6 | [
"MIT"
] | null | null | null | poi/poi/middlewares.py | HelloMrShu/scrapy_bp | a47f04b275783df4f34d75b28758d3e39dc3cbd6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define here the models for your spider middleware
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/spider-middleware.html
from scrapy import signals
class PoiSpiderMiddleware(object):
# Not all methods need to be defined. If a method is not defined,
# scrapy acts... | 34.509615 | 78 | 0.665366 |
8556d1ec3a446fee30d9a67e24e144265210c215 | 69,368 | py | Python | main.py | RSabet/wxGlade | 8b62eb8397308e60977857455b2765727b1b940f | [
"MIT"
] | 225 | 2018-03-26T11:23:22.000Z | 2022-03-24T09:44:08.000Z | main.py | RSabet/wxGlade | 8b62eb8397308e60977857455b2765727b1b940f | [
"MIT"
] | 403 | 2018-01-03T19:47:28.000Z | 2018-03-23T17:43:39.000Z | main.py | DietmarSchwertberger/wxGlade | 8e78cdc509d458cc896d47315e19f3daa6c09213 | [
"MIT"
] | 47 | 2018-04-08T16:48:38.000Z | 2021-12-21T20:08:44.000Z | """\
Main wxGlade module: defines wxGladeFrame which contains the buttons to add
widgets and initializes all the stuff (tree, frame_property, etc.)
@copyright: 2002-2007 Alberto Griggio
@copyright: 2011-2016 Carsten Grohmann
@copyright: 2016-2021 Dietmar Schwertberger
@license: MIT (see LICENSE.txt) - THIS PROGRAM COM... | 43.572864 | 121 | 0.597711 |
e5cc958bc025208e162e54b723e2fd889b483409 | 11,815 | py | Python | config.py | x-zho14/Swin-Transformer | 577cac5b94281dcf773e8f4ea97fd2162f1ed060 | [
"MIT"
] | null | null | null | config.py | x-zho14/Swin-Transformer | 577cac5b94281dcf773e8f4ea97fd2162f1ed060 | [
"MIT"
] | null | null | null | config.py | x-zho14/Swin-Transformer | 577cac5b94281dcf773e8f4ea97fd2162f1ed060 | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Swin Transformer
# Copyright (c) 2021 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ze Liu
# --------------------------------------------------------'
import os
import yaml
from yacs.config import CfgNode as CN
import argp... | 36.353846 | 117 | 0.645705 |
eb1413fc279da3b3482bb012e94380d825c6b715 | 605 | py | Python | db.py | RodolfoFerro/mind-my-song | cbddac368b69ca3a6a18fd2561f2da4be72f2d29 | [
"MIT"
] | null | null | null | db.py | RodolfoFerro/mind-my-song | cbddac368b69ca3a6a18fd2561f2da4be72f2d29 | [
"MIT"
] | null | null | null | db.py | RodolfoFerro/mind-my-song | cbddac368b69ca3a6a18fd2561f2da4be72f2d29 | [
"MIT"
] | 1 | 2019-10-12T05:50:05.000Z | 2019-10-12T05:50:05.000Z | from pymongo import MongoClient
MONGO_URI = ""
def db_connect(MONGO_URI, db_name, col_name):
client = MongoClient(MONGO_URI)
database = client[db_name]
collection = database[col_name]
return collection
def db_fetch_all(collection, conditions={}):
cursor = collection.find(conditions)
return... | 20.166667 | 45 | 0.73719 |
22aafa2799e23c4784283e3675bcbfbb6b222afd | 64 | py | Python | configs/repvgg/repvggA0_b256x8_imagenet.py | DequanWang/actnn-mmcls | 913833214303e6d5d1bf1b0319f1468b034eecb9 | [
"Apache-2.0"
] | null | null | null | configs/repvgg/repvggA0_b256x8_imagenet.py | DequanWang/actnn-mmcls | 913833214303e6d5d1bf1b0319f1468b034eecb9 | [
"Apache-2.0"
] | null | null | null | configs/repvgg/repvggA0_b256x8_imagenet.py | DequanWang/actnn-mmcls | 913833214303e6d5d1bf1b0319f1468b034eecb9 | [
"Apache-2.0"
] | null | null | null | _base_ = ['../actnn/repvggA0_b256x8_imagenet.py']
actnn = False
| 21.333333 | 49 | 0.734375 |
c55ad508eb2b1e1ca12f05e5ce04aef3f348f3ae | 3,174 | py | Python | utils/utils.py | BetterTomorrowPy/luxury_api | 1066e5f7a326e19da2bd525358c5dd9e3e1d15e1 | [
"Apache-2.0"
] | 1 | 2017-06-29T07:12:54.000Z | 2017-06-29T07:12:54.000Z | utils/utils.py | BetterTomorrowPy/luxury_api | 1066e5f7a326e19da2bd525358c5dd9e3e1d15e1 | [
"Apache-2.0"
] | null | null | null | utils/utils.py | BetterTomorrowPy/luxury_api | 1066e5f7a326e19da2bd525358c5dd9e3e1d15e1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import logging
import functools
from datetime import datetime
from django.utils import six
from django.db import models
from voluptuous import MultipleInvalid, Schema
from utils.exceptions import JsonResponse, ApiBadRequest
def gen_sub_dict(original={}, fields=[]):
"""
:p... | 27.6 | 88 | 0.532766 |
4749f57a47abbdc9d71696d94e70c70cf6f20d54 | 2,260 | py | Python | clivia/terminal.py | chunkhang/clivia | 00822e6c0edac9be30e431908e4981acc56dd839 | [
"Unlicense"
] | 1 | 2017-11-26T03:04:21.000Z | 2017-11-26T03:04:21.000Z | clivia/terminal.py | chunkhang/clivia | 00822e6c0edac9be30e431908e4981acc56dd839 | [
"Unlicense"
] | 2 | 2017-11-24T15:20:29.000Z | 2021-06-01T21:56:10.000Z | clivia/terminal.py | chunkhang/clivia | 00822e6c0edac9be30e431908e4981acc56dd839 | [
"Unlicense"
] | null | null | null | # clivia.terminal
# Utility functions related to the terminal
import os
import shlex
import struct
import platform
import subprocess
def size():
'''
-> (int, int): (width, height)
-> None - terminal size cannot be determined
Source obtained and modified from: https://gist.github.com/jtriley/1108174
'''... | 30.958904 | 77 | 0.577876 |
ef9fd7675b1a2ad0a387eb8e330d910a40ed485e | 547 | py | Python | build/fbcode_builder/specs/rsocket.py | facebookxx/folly | 2da5b6427c302c34e72c4f0aedaa1d9ed892f6fe | [
"Apache-2.0"
] | 9 | 2016-09-28T18:25:24.000Z | 2019-05-09T12:28:29.000Z | build/fbcode_builder/specs/rsocket.py | facebookxx/folly | 2da5b6427c302c34e72c4f0aedaa1d9ed892f6fe | [
"Apache-2.0"
] | 28 | 2020-03-04T22:01:48.000Z | 2022-03-12T00:59:47.000Z | build/fbcode_builder/specs/rsocket.py | facebookxx/folly | 2da5b6427c302c34e72c4f0aedaa1d9ed892f6fe | [
"Apache-2.0"
] | 2 | 2020-11-04T04:12:06.000Z | 2021-12-07T07:01:08.000Z | #!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import specs.gmock as gmock
import specs.fmt as fmt
import specs.folly as folly
def fbcode_buil... | 24.863636 | 50 | 0.680073 |
bf94da97a7dc7818bd385f1bb34863f28434824d | 1,689 | py | Python | shadowlands/tui/effects/credstick_watcher.py | georgerobescu/shadowlands | d949c2afa50c3fe062e230e535c44dc9c02385c9 | [
"MIT"
] | null | null | null | shadowlands/tui/effects/credstick_watcher.py | georgerobescu/shadowlands | d949c2afa50c3fe062e230e535c44dc9c02385c9 | [
"MIT"
] | null | null | null | shadowlands/tui/effects/credstick_watcher.py | georgerobescu/shadowlands | d949c2afa50c3fe062e230e535c44dc9c02385c9 | [
"MIT"
] | null | null | null | from asciimatics.effects import Effect
from asciimatics.exceptions import NextScene
from shadowlands.credstick import Credstick
# This effect does nothing but watch the credstick
# to see when it is defined.
# There is almost certainly a better way to do this,
# but it's not possible to raise an error from a
# separ... | 33.78 | 117 | 0.670811 |
039221e653906d9b706f4d60292eb2bb2ae62571 | 4,760 | py | Python | sdk/cognitiveservices/azure-cognitiveservices-search-websearch/azure/cognitiveservices/search/websearch/models/__init__.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/cognitiveservices/azure-cognitiveservices-search-websearch/azure/cognitiveservices/search/websearch/models/__init__.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | sdk/cognitiveservices/azure-cognitiveservices-search-websearch/azure/cognitiveservices/search/websearch/models/__init__.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 35 | 94 | 0.736345 |
c85bc44d20d1199766c90d613568764574d8d69d | 700 | py | Python | docarray/array/mixins/io/pbar.py | startakovsky/docarray | 78dd3199d25b3e533cd09643b97359783c193397 | [
"Apache-2.0"
] | null | null | null | docarray/array/mixins/io/pbar.py | startakovsky/docarray | 78dd3199d25b3e533cd09643b97359783c193397 | [
"Apache-2.0"
] | null | null | null | docarray/array/mixins/io/pbar.py | startakovsky/docarray | 78dd3199d25b3e533cd09643b97359783c193397 | [
"Apache-2.0"
] | null | null | null | from rich.progress import (
Progress,
BarColumn,
SpinnerColumn,
MofNCompleteColumn,
TextColumn,
TimeRemainingColumn,
)
def get_progressbar(description, disable, total):
progress = Progress(
SpinnerColumn(),
TextColumn(description),
BarColumn(),
MofNCompleteC... | 23.333333 | 81 | 0.591429 |
cc203758ad0e3d8f0297b7317d1a84978a00225b | 4,050 | bzl | Python | bazel/envoy_mobile_dependencies.bzl | kathan24/envoy-mobile | e41c2b65c7d1c523b99675174a60c8f77393841a | [
"Apache-2.0"
] | 86 | 2020-11-16T23:40:04.000Z | 2022-03-15T20:36:21.000Z | bazel/envoy_mobile_dependencies.bzl | kathan24/envoy-mobile | e41c2b65c7d1c523b99675174a60c8f77393841a | [
"Apache-2.0"
] | 497 | 2020-11-14T02:53:19.000Z | 2022-03-31T20:26:11.000Z | bazel/envoy_mobile_dependencies.bzl | kathan24/envoy-mobile | e41c2b65c7d1c523b99675174a60c8f77393841a | [
"Apache-2.0"
] | 36 | 2020-11-14T00:06:50.000Z | 2022-03-03T19:27:50.000Z | load("@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies")
load("@build_bazel_rules_apple//apple:repositories.bzl", "apple_rules_dependencies")
load("@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependencies")
load("@rules_jvm_external//:defs.bzl", "maven_install")
load("@... | 34.913793 | 92 | 0.66642 |
2d5f94b353a49e4ffa1f8d64b942909954a9b391 | 1,394 | py | Python | main.py | sebastian-quintero/school-bus-router | f26787c2abd386a5929d259b9296147a7bcbe247 | [
"MIT"
] | 2 | 2021-08-25T09:10:53.000Z | 2021-09-24T04:56:12.000Z | main.py | sebastian-quintero/school-bus-router | f26787c2abd386a5929d259b9296147a7bcbe247 | [
"MIT"
] | null | null | null | main.py | sebastian-quintero/school-bus-router | f26787c2abd386a5929d259b9296147a7bcbe247 | [
"MIT"
] | null | null | null | import argparse
from constraints.capacity_constraint import CapacityConstraint
from estimators.linear_estimator import LinearEstimator
from optimization_model.optimization_model_builder import \
OptimizationModelBuilder
from problem.problem_builder import ProblemBuilder
from router import Router
from utils.file_ut... | 30.304348 | 72 | 0.7934 |
21c047459ebf148f44fd130331cdcfe78d4743cc | 1,032 | py | Python | bootleg/utils/classes/loss_package.py | mleszczy/bootleg | 162d74001cdfbbe146753393641d549e0328acb1 | [
"Apache-2.0"
] | 1 | 2021-01-11T18:40:09.000Z | 2021-01-11T18:40:09.000Z | bootleg/utils/classes/loss_package.py | mleszczy/bootleg | 162d74001cdfbbe146753393641d549e0328acb1 | [
"Apache-2.0"
] | null | null | null | bootleg/utils/classes/loss_package.py | mleszczy/bootleg | 162d74001cdfbbe146753393641d549e0328acb1 | [
"Apache-2.0"
] | null | null | null | """Defines the package of information that is passed back from the scorer"""
from collections import defaultdict
import torch
class LossPackage:
def __init__(self, device):
self.loss_dict = {}
self.loss = torch.zeros(1,1).to(device)
# add loss to total loss and sets the loss to the associate... | 35.586207 | 135 | 0.656008 |
9b18522717017468082bf051d199c84ad54d2010 | 838 | py | Python | src/utils/__init__.py | nghiattran/python-parse | 3874558d5579d21cfc3a87c6f0ec0c368682f086 | [
"MIT"
] | 6 | 2015-12-05T08:00:55.000Z | 2017-04-04T12:14:51.000Z | src/utils/__init__.py | nghiattran/python-parse | 3874558d5579d21cfc3a87c6f0ec0c368682f086 | [
"MIT"
] | 2 | 2015-11-29T22:39:01.000Z | 2015-11-30T04:27:43.000Z | src/utils/__init__.py | nghiattran/python-parse | 3874558d5579d21cfc3a87c6f0ec0c368682f086 | [
"MIT"
] | null | null | null | # @name <%= app_name %>
# @description
# Utility functions for reading config files
import json
import os
import random
import string
CONFIG = None
CONFIG_SCHEMA= None
def get_config(
config_env='API_CONFIG',
key= None):
global CONFIG
if CONFIG is None:
if config_env in os.environ:
... | 24.647059 | 77 | 0.640811 |
c3fac44486c1f3134e3db59415558a6267269249 | 18,831 | py | Python | homeassistant/components/homekit/accessories.py | RavensburgOP/core | 0ea76e848b182ca0ebb0fdb54558f7f733898ad7 | [
"Apache-2.0"
] | 2 | 2021-01-29T02:52:01.000Z | 2021-05-15T04:23:18.000Z | homeassistant/components/homekit/accessories.py | RavensburgOP/core | 0ea76e848b182ca0ebb0fdb54558f7f733898ad7 | [
"Apache-2.0"
] | 71 | 2020-07-14T09:08:56.000Z | 2022-03-31T06:01:47.000Z | homeassistant/components/homekit/accessories.py | RavensburgOP/core | 0ea76e848b182ca0ebb0fdb54558f7f733898ad7 | [
"Apache-2.0"
] | 7 | 2021-03-20T12:34:01.000Z | 2021-12-02T10:13:52.000Z | """Extend the basic Accessory and Bridge functions."""
import logging
from pyhap.accessory import Accessory, Bridge
from pyhap.accessory_driver import AccessoryDriver
from pyhap.const import CATEGORY_OTHER
from homeassistant.components import cover
from homeassistant.components.cover import (
DEVICE_CLASS_GARAGE,... | 34.42596 | 88 | 0.643779 |
89f1aff0b6e42cb91b9c5f6355b971d3ba3ffcaa | 395 | py | Python | algorithms/697. Degree of an Array.py | vuzway9132/leetcode | e51a9ce7a6bb3e35c0fcb8c8f4f6cd5763708dbf | [
"MIT"
] | 1 | 2020-12-02T13:54:30.000Z | 2020-12-02T13:54:30.000Z | algorithms/697. Degree of an Array.py | vuzway9132/leetcode | e51a9ce7a6bb3e35c0fcb8c8f4f6cd5763708dbf | [
"MIT"
] | null | null | null | algorithms/697. Degree of an Array.py | vuzway9132/leetcode | e51a9ce7a6bb3e35c0fcb8c8f4f6cd5763708dbf | [
"MIT"
] | null | null | null | class Solution:
def findShortestSubArray(self, nums: List[int]) -> int:
left, right, count = {}, {}, {}
for i, x in enumerate(nums):
if x not in left: left[x] = i
right[x] = i
count[x] = count.get(x, 0) + 1
ans = len(nums)
degree = max(count.values())
for x in count:
if cou... | 28.214286 | 57 | 0.544304 |
9dfb16dd5265e5952466fe5ee7728b3b11144a7e | 2,304 | py | Python | dataprep/s0_xlsx2csv.py | syin3/CET521-crash-inference | 5783c47758019d2e207f43d68e88d27b51afb9f3 | [
"MIT"
] | null | null | null | dataprep/s0_xlsx2csv.py | syin3/CET521-crash-inference | 5783c47758019d2e207f43d68e88d27b51afb9f3 | [
"MIT"
] | null | null | null | dataprep/s0_xlsx2csv.py | syin3/CET521-crash-inference | 5783c47758019d2e207f43d68e88d27b51afb9f3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
'''
s1_xslx2csv.py
Converts datasets in xslx format to csv in the given directory
'''
import os
import pandas as pd
def find_excel(direct):
"""
Find all xlsx files in a given directory
input
-----
direct : string
directory where search will be perfor... | 25.318681 | 91 | 0.608073 |
f608f900b05c3e706c26b16d61de2bc7bf7c7074 | 13,960 | py | Python | conans/test/functional/system_reqs_test.py | ssaavedra/conan | e15dc7902fbbeaf469798a3b9948ead1ecfc8e3c | [
"MIT"
] | 1 | 2021-08-05T15:33:08.000Z | 2021-08-05T15:33:08.000Z | conans/test/functional/system_reqs_test.py | ssaavedra/conan | e15dc7902fbbeaf469798a3b9948ead1ecfc8e3c | [
"MIT"
] | 9 | 2017-10-07T06:23:10.000Z | 2021-06-29T15:22:27.000Z | conans/test/functional/system_reqs_test.py | ssaavedra/conan | e15dc7902fbbeaf469798a3b9948ead1ecfc8e3c | [
"MIT"
] | 1 | 2022-03-23T18:07:31.000Z | 2022-03-23T18:07:31.000Z | import os
import stat
import unittest
import six
from conans.model.ref import ConanFileReference, PackageReference
from conans.test.utils.tools import NO_SETTINGS_PACKAGE_ID, TestClient
from conans.util.files import load
base_conanfile = '''
from conans import ConanFile
class TestSystemReqs(ConanFile):
name = "... | 48.641115 | 103 | 0.665258 |
ffe1ce1a10d700153590f394e10835c3341b0b64 | 976 | py | Python | venv/lib/python3.8/site-packages/azure/mgmt/authorization/v2020_04_01_preview/models/_paged_models.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/azure/mgmt/authorization/v2020_04_01_preview/models/_paged_models.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/azure/mgmt/authorization/v2020_04_01_preview/models/_paged_models.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"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 ... | 34.857143 | 151 | 0.591189 |
dbd565a610d3bb9925ca519941600c839371aff9 | 1,768 | py | Python | build/release/bin/xor_to_cnf.py | vuphan314/gaussmaxhs | 4725241bb0075bbfd22d822a04587f311ad69202 | [
"MIT"
] | 2 | 2021-12-30T07:34:21.000Z | 2022-03-02T21:06:15.000Z | build/release/bin/xor_to_cnf.py | vuphan314/gaussmaxhs | 4725241bb0075bbfd22d822a04587f311ad69202 | [
"MIT"
] | 2 | 2021-12-23T02:23:22.000Z | 2022-03-03T23:33:25.000Z | build/release/bin/xor_to_cnf.py | vuphan314/gaussmaxhs | 4725241bb0075bbfd22d822a04587f311ad69202 | [
"MIT"
] | 1 | 2022-03-02T07:18:39.000Z | 2022-03-02T07:18:39.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2018 Mate Soos
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 2
# of the License.
#
# This program is distributed in t... | 36.833333 | 224 | 0.724548 |
3b659ba61a59ac7c2f171d21e4d76e8e884d0b2b | 14,900 | py | Python | atom/nucleus/python/nucleus_api/models/stage.py | ShekharPaatni/SDK | 6534ffdb63af87c02c431df9add05a90370183cb | [
"Apache-2.0"
] | 11 | 2019-04-16T02:11:17.000Z | 2021-12-16T22:51:40.000Z | atom/nucleus/python/nucleus_api/models/stage.py | ShekharPaatni/SDK | 6534ffdb63af87c02c431df9add05a90370183cb | [
"Apache-2.0"
] | 81 | 2019-11-19T23:24:28.000Z | 2022-03-28T11:35:47.000Z | atom/nucleus/python/nucleus_api/models/stage.py | ShekharPaatni/SDK | 6534ffdb63af87c02c431df9add05a90370183cb | [
"Apache-2.0"
] | 11 | 2020-07-08T02:29:56.000Z | 2022-03-28T10:05:33.000Z | # coding: utf-8
"""
Hydrogen Nucleus API
The Hydrogen Nucleus API # noqa: E501
OpenAPI spec version: 1.9.4
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from nucleus_api.configuration i... | 26.371681 | 340 | 0.574094 |
49eaa171fdcbcf7471553463622f2d33f8e680c8 | 2,005 | py | Python | demo/senta/senta_finetune.py | jayhenry/PaddleHub | c1f0e6ae85b85d4804210129ef6286914bb085aa | [
"Apache-2.0"
] | 1 | 2019-12-04T00:14:01.000Z | 2019-12-04T00:14:01.000Z | demo/senta/senta_finetune.py | jayhenry/PaddleHub | c1f0e6ae85b85d4804210129ef6286914bb085aa | [
"Apache-2.0"
] | null | null | null | demo/senta/senta_finetune.py | jayhenry/PaddleHub | c1f0e6ae85b85d4804210129ef6286914bb085aa | [
"Apache-2.0"
] | null | null | null | #coding:utf-8
import argparse
import ast
import paddle.fluid as fluid
import paddlehub as hub
# yapf: disable
parser = argparse.ArgumentParser(__doc__)
parser.add_argument("--num_epoch", type=int, default=3, help="Number of epoches for fine-tuning.")
parser.add_argument("--use_gpu", type=ast.literal_eval, default=Tru... | 35.803571 | 139 | 0.724688 |
0ff6c7d6205c9687e375cb8ec02ec4cbd9beeb5b | 756 | py | Python | symlib/bit.py | kozbot/kecb | a60a2bb2754098cac127e258e1066cc838264399 | [
"MIT"
] | 4 | 2017-05-27T19:08:10.000Z | 2021-07-12T06:29:14.000Z | symlib/bit.py | kozbot/kecb | a60a2bb2754098cac127e258e1066cc838264399 | [
"MIT"
] | 23 | 2017-05-26T01:03:06.000Z | 2018-05-22T03:35:51.000Z | symlib/bit.py | kozbot/kecb | a60a2bb2754098cac127e258e1066cc838264399 | [
"MIT"
] | 2 | 2019-08-23T14:40:40.000Z | 2020-07-06T08:09:08.000Z | import entity
class MAGNETIC(entity.CodedSymbol):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def generate(self):
return [
entity.PolyLine(points=[
entity.Point(0, 0),
entity.Point(10, 10),
entity.Point(10,... | 27 | 92 | 0.547619 |
cdaba12b4b10707149d51fd983b42fe9556dd6aa | 5,431 | py | Python | zeus/networks/resnet_general.py | wnov/vega | bf51cbe389d41033c4ae4bc02e5078c3c247c845 | [
"MIT"
] | 6 | 2020-11-13T15:44:47.000Z | 2021-12-02T08:14:06.000Z | zeus/networks/resnet_general.py | JacobLee121/vega | 19256aca4d047bfad3b461f0a927e1c2abb9eb03 | [
"MIT"
] | null | null | null | zeus/networks/resnet_general.py | JacobLee121/vega | 19256aca4d047bfad3b461f0a927e1c2abb9eb03 | [
"MIT"
] | 2 | 2021-06-25T09:42:32.000Z | 2021-08-06T18:00:09.000Z | # -*- coding:utf-8 -*-
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the MIT License.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the ... | 38.246479 | 115 | 0.641871 |
31a2f3ed639d4db1edb6f5e3aa9517148165446f | 15,365 | py | Python | packit/distgit.py | dgkncelik/packit | c469f62fceda401c25813fac05ea0526737a8fef | [
"MIT"
] | null | null | null | packit/distgit.py | dgkncelik/packit | c469f62fceda401c25813fac05ea0526737a8fef | [
"MIT"
] | null | null | null | packit/distgit.py | dgkncelik/packit | c469f62fceda401c25813fac05ea0526737a8fef | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2018-2019 Red Hat, Inc.
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, m... | 39.600515 | 100 | 0.619785 |
840de5e3e5aa8054cf75ac8163673c66cb8631b5 | 1,327 | py | Python | Leetcode/0001-0050/0015-3sum.py | harshbhandari7/Data-Structures-and-Algorithms | 0ce0a5bc64d112ff38ae0de51d19ce3751b70eca | [
"MIT"
] | null | null | null | Leetcode/0001-0050/0015-3sum.py | harshbhandari7/Data-Structures-and-Algorithms | 0ce0a5bc64d112ff38ae0de51d19ce3751b70eca | [
"MIT"
] | null | null | null | Leetcode/0001-0050/0015-3sum.py | harshbhandari7/Data-Structures-and-Algorithms | 0ce0a5bc64d112ff38ae0de51d19ce3751b70eca | [
"MIT"
] | 1 | 2019-10-06T15:46:14.000Z | 2019-10-06T15:46:14.000Z | '''
Author : MiKueen
Level : Medium
Problem Statement : 3Sum
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
Note: The solution set must not contain duplicate triplets.
Example:
Given array nums = [-1, 0,... | 27.645833 | 161 | 0.401658 |
12578247927b44802907885541d136278e66c710 | 812 | py | Python | backend/taxi_profile/api/v1/serializers.py | crowdbotics-apps/aait-30147 | 23f8c2eefdbb7a0cc40eba6fded2e799a47f6eb6 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/taxi_profile/api/v1/serializers.py | crowdbotics-apps/aait-30147 | 23f8c2eefdbb7a0cc40eba6fded2e799a47f6eb6 | [
"FTL",
"AML",
"RSA-MD"
] | 8 | 2021-08-30T07:23:39.000Z | 2021-10-05T13:42:25.000Z | backend/taxi_profile/api/v1/serializers.py | crowdbotics-apps/aait-30147 | 23f8c2eefdbb7a0cc40eba6fded2e799a47f6eb6 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | from rest_framework import serializers
from taxi_profile.models import (
Document,
UserProfile,
DriverProfile,
InviteCode,
Notification,
)
class NotificationSerializer(serializers.ModelSerializer):
class Meta:
model = Notification
fields = "__all__"
class UserProfileSerialize... | 20.820513 | 59 | 0.695813 |
79226db3de8e3ac8194871e1bb5d23c36d83e86a | 2,431 | py | Python | gr-doa/python/qa_full_capon_ccf.py | SamuelSkinner/Coherent-Radio-Project | 2684f235261b2c0d75bb5c5d2ba39d7497cf970a | [
"MIT"
] | 47 | 2017-09-11T20:54:51.000Z | 2022-03-15T06:12:06.000Z | gr-doa/python/qa_full_capon_ccf.py | SamuelSkinner/Coherent-Radio-Project | 2684f235261b2c0d75bb5c5d2ba39d7497cf970a | [
"MIT"
] | 5 | 2017-12-08T02:43:21.000Z | 2020-04-14T14:09:58.000Z | gr-doa/python/qa_full_capon_ccf.py | SamuelSkinner/Coherent-Radio-Project | 2684f235261b2c0d75bb5c5d2ba39d7497cf970a | [
"MIT"
] | 24 | 2017-09-20T07:53:58.000Z | 2021-12-11T06:00:43.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2017 <+YOU OR YOUR COMPANY+>.
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#... | 37.4 | 122 | 0.651995 |
ebc6b48b442c79b11593fae424da8c8dcfde7c4c | 4,596 | py | Python | copper/shout/parsers/rib/parser_rib.py | cinepost/Copperfield_FX | 1900b506d0a407a3fb5774ab129b984a547ee0b5 | [
"Unlicense"
] | 6 | 2016-07-28T13:59:34.000Z | 2021-12-28T05:44:15.000Z | copper/shout/parsers/rib/parser_rib.py | cinepost/Copperfield_FX | 1900b506d0a407a3fb5774ab129b984a547ee0b5 | [
"Unlicense"
] | 5 | 2016-06-30T10:19:25.000Z | 2022-03-11T23:19:01.000Z | copper/shout/parsers/rib/parser_rib.py | cinepost/Copperfield_FX | 1900b506d0a407a3fb5774ab129b984a547ee0b5 | [
"Unlicense"
] | 3 | 2019-03-18T05:17:10.000Z | 2020-02-14T06:56:40.000Z | import logging
from pyparsing import *
from ..base import ParserBase
logger = logging.getLogger(__name__)
rib_grammar = None
class ParserRIB(ParserBase):
def __init__(self):
super(ParserRIB, self).__init__()
@classmethod
def registerMIMETypes(cls):
return (
('renderman/rib', 'rib'),
)
@property
def k... | 32.595745 | 188 | 0.729983 |
60f67d6cc6cb0af4843aa7d6591ef4c2fbb57bd2 | 435 | py | Python | kinlin/core/__init__.py | the-lay/kinlin | ce7c95d46d130049e356104ba77fad51bc59fb3f | [
"MIT"
] | null | null | null | kinlin/core/__init__.py | the-lay/kinlin | ce7c95d46d130049e356104ba77fad51bc59fb3f | [
"MIT"
] | null | null | null | kinlin/core/__init__.py | the-lay/kinlin | ce7c95d46d130049e356104ba77fad51bc59fb3f | [
"MIT"
] | null | null | null | from .project import Project
from .experiment import Experiment
from .model import Model
from .metric import Metric, RunningEpochMetric
from .strategy import TrainingEvents, SupervisedTraining
from .callback import Callback
from .dataset import Dataset
# Exports
__all__ = [
'Project',
'Experiment',
'Model'... | 22.894737 | 56 | 0.737931 |
4109f9813e9becc1da0f35d06fa27a28924f4ad4 | 1,892 | py | Python | test/pyaz/local_context/__init__.py | bigdatamoore/py-az-cli | 54383a4ee7cc77556f6183e74e992eec95b28e01 | [
"MIT"
] | null | null | null | test/pyaz/local_context/__init__.py | bigdatamoore/py-az-cli | 54383a4ee7cc77556f6183e74e992eec95b28e01 | [
"MIT"
] | 9 | 2021-09-24T16:37:24.000Z | 2021-12-24T00:39:19.000Z | test/pyaz/local_context/__init__.py | bigdatamoore/py-az-cli | 54383a4ee7cc77556f6183e74e992eec95b28e01 | [
"MIT"
] | null | null | null | import json, subprocess
from .. pyaz_utils import get_cli_name, get_params
def on():
params = get_params(locals())
command = "az local-context on " + params
print(command)
output = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout = output.stdout.decode... | 31.533333 | 96 | 0.646934 |
65c48181188384941ac7506482d2b1eff69b2d75 | 3,471 | py | Python | bindings/python/ensmallen/datasets/string/legionellajordanis.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/legionellajordanis.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/legionellajordanis.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Legionella jordanis.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--protein as... | 33.057143 | 223 | 0.677615 |
1ee33d9127a1c998e1b4fe78f0ae2a1869e1941f | 3,411 | py | Python | src/OTLMOW/OTLModel/Classes/Cabine.py | davidvlaminck/OTLClassPython | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | 2 | 2022-02-01T08:58:11.000Z | 2022-02-08T13:35:17.000Z | src/OTLMOW/OTLModel/Classes/Cabine.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | src/OTLMOW/OTLModel/Classes/Cabine.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | # coding=utf-8
from OTLMOW.OTLModel.BaseClasses.OTLAttribuut import OTLAttribuut
from OTLMOW.OTLModel.Classes.Inloopbehuizing import Inloopbehuizing
from OTLMOW.OTLModel.Datatypes.KlCabineAardingsstelsel import KlCabineAardingsstelsel
from OTLMOW.OTLModel.Datatypes.KlCabineStandaardtype import KlCabineStandaardtype
fro... | 50.161765 | 182 | 0.625916 |
ec9ae3ddf49cfa9a3a09c8c9e61a14b577069277 | 180 | py | Python | src/frontend/urls_public.py | mava-ar/sgk | cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4 | [
"Apache-2.0"
] | null | null | null | src/frontend/urls_public.py | mava-ar/sgk | cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4 | [
"Apache-2.0"
] | 32 | 2016-05-09T19:37:08.000Z | 2022-01-13T01:00:52.000Z | src/frontend/urls_public.py | mava-ar/sgk | cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4 | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import url, include
from django.conf import settings
from frontend import views_public
urlpatterns = [
url(r'^$', views_public.index, name='index'),
]
| 18 | 49 | 0.738889 |
7bbc4963eacdc8cf3d7abaecc6bba6f46087f163 | 15 | py | Python | q2_network/__init__.py | shafferm/q2-network | c3d12e95f463c90b1ce635d57688e81031ea8e82 | [
"BSD-3-Clause"
] | 2 | 2018-05-12T22:38:47.000Z | 2019-09-17T15:24:42.000Z | q2_network/__init__.py | shafferm/q2-network | c3d12e95f463c90b1ce635d57688e81031ea8e82 | [
"BSD-3-Clause"
] | null | null | null | q2_network/__init__.py | shafferm/q2-network | c3d12e95f463c90b1ce635d57688e81031ea8e82 | [
"BSD-3-Clause"
] | null | null | null | __version__ = 0 | 15 | 15 | 0.8 |
534c698ee1e0cea6bd46065c32d3b4b9e209d1d9 | 57,838 | py | Python | odin/networks/base_networks.py | trungnt13/odin-ai | 9c6986a854e62da39637ea463667841378b7dd84 | [
"MIT"
] | 7 | 2020-12-29T19:35:58.000Z | 2022-01-31T21:01:30.000Z | odin/networks/base_networks.py | imito/odin-ai | 9c6986a854e62da39637ea463667841378b7dd84 | [
"MIT"
] | 3 | 2020-02-06T16:44:17.000Z | 2020-09-26T05:26:14.000Z | odin/networks/base_networks.py | trungnt13/odin-ai | 9c6986a854e62da39637ea463667841378b7dd84 | [
"MIT"
] | 6 | 2019-02-14T01:36:28.000Z | 2020-10-30T13:16:32.000Z | from __future__ import absolute_import, division, print_function
import collections
import copy
import dataclasses
import glob
import inspect
import os
import pickle
import sys
import types
from dataclasses import field
from functools import partial
from numbers import Number
from typing import (Any, Callable, Dict, I... | 37.581546 | 82 | 0.624382 |
82a51a6c584927d52d8f062e5553f096861158a1 | 17,835 | py | Python | tests/integration-tests/utils.py | eshpc/aws-parallelcluster | 8cc6169a12661ce1c0025c93ebd9019c26e7219e | [
"Apache-2.0"
] | null | null | null | tests/integration-tests/utils.py | eshpc/aws-parallelcluster | 8cc6169a12661ce1c0025c93ebd9019c26e7219e | [
"Apache-2.0"
] | 108 | 2021-10-11T09:12:06.000Z | 2022-03-28T09:28:39.000Z | tests/integration-tests/utils.py | yuleiwan/aws-parallelcluster | aad2a3019ef4ad08d702f5acf41b152b3f7a0b46 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "LICENSE.txt" file acc... | 39.284141 | 120 | 0.696832 |
be45f2262443e5cdbd1785c281a2d2b7077968e0 | 2,210 | py | Python | tasks.py | davidmgvaz/allauth_saml2 | 0a797b66831fedb0a5bce7ba2bdde001efbf6956 | [
"MIT"
] | 1 | 2021-07-29T00:56:27.000Z | 2021-07-29T00:56:27.000Z | tasks.py | davidmgvaz/allauth_saml2 | 0a797b66831fedb0a5bce7ba2bdde001efbf6956 | [
"MIT"
] | 1 | 2022-03-01T21:17:54.000Z | 2022-03-14T07:51:09.000Z | tasks.py | davidmgvaz/allauth_saml2 | 0a797b66831fedb0a5bce7ba2bdde001efbf6956 | [
"MIT"
] | 2 | 2021-11-18T21:05:34.000Z | 2022-03-11T23:31:44.000Z | import os
import webbrowser
from invoke import task
def open_browser(path):
try:
from urllib import pathname2url
except:
from urllib.request import pathname2url
webbrowser.open("file://" + pathname2url(os.path.abspath(path)))
@task
def clean_build(c):
"""
Remove build artifacts
... | 20.090909 | 103 | 0.60362 |
94c1a72d701d5bd71a9ef3804a40b0537bfbfef3 | 3,623 | py | Python | botologist/protocol/__init__.py | x89/raziel-irc-bot | 122a5de858a84e018549e0a7fd0be11bb33f2eb3 | [
"MIT"
] | null | null | null | botologist/protocol/__init__.py | x89/raziel-irc-bot | 122a5de858a84e018549e0a7fd0be11bb33f2eb3 | [
"MIT"
] | null | null | null | botologist/protocol/__init__.py | x89/raziel-irc-bot | 122a5de858a84e018549e0a7fd0be11bb33f2eb3 | [
"MIT"
] | null | null | null | import logging
log = logging.getLogger(__name__)
import botologist.plugin
class Client:
def __init__(self, name):
self.name = name
self.channels = {}
self.error_handler = None
self.on_connect = []
self.on_disconnect = []
self.on_join = []
self.on_privmsg = []
self.on_kick = []
@property
def nick... | 24.153333 | 73 | 0.710185 |
8452d45bf7129a3f9e0627f6c2496f60f5b4e9c6 | 2,882 | py | Python | modules/sdnpwn_common.py | shizzz477/sdnpwn | 0c532633b897808518548b3d9162aed40aa1c5b3 | [
"MIT"
] | 1 | 2020-03-20T10:51:29.000Z | 2020-03-20T10:51:29.000Z | modules/sdnpwn_common.py | shizzz477/sdnpwn | 0c532633b897808518548b3d9162aed40aa1c5b3 | [
"MIT"
] | null | null | null | modules/sdnpwn_common.py | shizzz477/sdnpwn | 0c532633b897808518548b3d9162aed40aa1c5b3 | [
"MIT"
] | 1 | 2018-09-13T13:59:11.000Z | 2018-09-13T13:59:11.000Z |
import netifaces
from scapy.all import *
from random import randint
from subprocess import check_output
from tabulate import tabulate
SUCCESS = "\033[32m[*]\033[0m "
WARNING = "\033[93m[!]\033[0m "
ERROR = "\033[91m[!]\033[0m "
NORMAL = "\033[0m[+]\033[0m "
VERBOSE = " "
SDNPWN_MODULE_USAGE = []
# sdnpwn genera... | 24.632479 | 85 | 0.64365 |
1ae7c98dd8d43371cbe1c530332e34e0e2cfc8ca | 773 | py | Python | models/Round4-/Xo-0.5xBC_Yo-min_V-0.5xBC_L-2xBC_t-2xBC_tstep-0.5xBC.py | gehilley/NondimensionalWeathering | 8b59a00d59c026e1b3a3b8f7c3c6fe51a272c21a | [
"MIT"
] | null | null | null | models/Round4-/Xo-0.5xBC_Yo-min_V-0.5xBC_L-2xBC_t-2xBC_tstep-0.5xBC.py | gehilley/NondimensionalWeathering | 8b59a00d59c026e1b3a3b8f7c3c6fe51a272c21a | [
"MIT"
] | null | null | null | models/Round4-/Xo-0.5xBC_Yo-min_V-0.5xBC_L-2xBC_t-2xBC_tstep-0.5xBC.py | gehilley/NondimensionalWeathering | 8b59a00d59c026e1b3a3b8f7c3c6fe51a272c21a | [
"MIT"
] | null | null | null | filename = 'models/Xo-0.5xBC_Yo-min_V-0.5xBC_L-2xBC_t-2xBC_tstep-0.5xBC.p'
from weathering_model.weathering_model import run_weathering_model
import numpy as np
import pickle as p
# Run model:
L_star = 15.2
X0_star = 2.63
Y0_star = 0.000171
v_star = 340
nx = 101
t_star = np.array([0, 0.97, 1.94, 2.92, 3.89, 4.86, 5.8... | 40.684211 | 292 | 0.672704 |
31a3972354fe0fd397ac4f1199e920035824cc1a | 474 | py | Python | src/config/gunicorn.py | baboon-king/2c | 2b1093c9f15c713dac51aec5c1244ec285e49782 | [
"Apache-2.0"
] | null | null | null | src/config/gunicorn.py | baboon-king/2c | 2b1093c9f15c713dac51aec5c1244ec285e49782 | [
"Apache-2.0"
] | null | null | null | src/config/gunicorn.py | baboon-king/2c | 2b1093c9f15c713dac51aec5c1244ec285e49782 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Created by howie.hu at 2021/4/10.
Description:
Changelog: all notable changes to this file will be documented
"""
import os
HOST = os.getenv("CC_HOST", "127.0.0.1")
HTTP_PORT = os.getenv("CC_HTTP_PORT", 8060)
WORKERS = os.getenv("CC_WORKERS", 1)
MAX_REQUEST = int(os.getenv("MAX_R... | 21.545455 | 66 | 0.706751 |
0a97fd2b45f12473a74b2c796af76b93b308bc31 | 4,396 | py | Python | ux/__init__.py | susemm/PyVin | acf0a605dc2dc04cf789451b6e5eaa06730be071 | [
"Apache-2.0"
] | null | null | null | ux/__init__.py | susemm/PyVin | acf0a605dc2dc04cf789451b6e5eaa06730be071 | [
"Apache-2.0"
] | null | null | null | ux/__init__.py | susemm/PyVin | acf0a605dc2dc04cf789451b6e5eaa06730be071 | [
"Apache-2.0"
] | 1 | 2018-09-19T13:36:05.000Z | 2018-09-19T13:36:05.000Z | __author__ = 'vin@misday.com'
import wx, webbrowser
from pyvin.core import Callbacks
(IDX_LABEL, IDX_HELP, IDX_ID, IDX_BITMAP, IDX_KIND, IDX_HANDLER, IDX_ID2) = range(0, 7)
def createMenubar(wnd, menuDef):
'''menuDef = [('FILE', (
('Open', 'Open a file', MainWindow.ID_MENUITE... | 30.527778 | 132 | 0.529117 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.