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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
301116e135cdc96e7513a7feeafc579b995a7df4 | 48,460 | py | Python | Autocoders/Python/bin/codegen.py | sthagen/nasa-fprime | 7762d633d1c0728e68ef9217fb12a7c3070b61ac | [
"Apache-2.0"
] | 1 | 2022-03-15T16:17:15.000Z | 2022-03-15T16:17:15.000Z | Autocoders/Python/bin/codegen.py | sthagen/nasa-fprime | 7762d633d1c0728e68ef9217fb12a7c3070b61ac | [
"Apache-2.0"
] | null | null | null | Autocoders/Python/bin/codegen.py | sthagen/nasa-fprime | 7762d633d1c0728e68ef9217fb12a7c3070b61ac | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# ===============================================================================
# NAME: codegen.py
#
# DESCRIPTION: This script is used to generate components, ports and connectors
# from XML definition files.
#
# ===============================================================================
i... | 36.245325 | 198 | 0.640631 |
30455c24d40d043c2b2e52a29833a6122193cce5 | 3,062 | py | Python | src/pycomposite/composite_decorator.py | BstLabs/py-composite | d839303de51000c9afd1568f63ba02e7bdebbc8c | [
"MIT"
] | 4 | 2022-03-10T12:43:53.000Z | 2022-03-11T21:22:16.000Z | src/pycomposite/composite_decorator.py | BstLabs/py-composite | d839303de51000c9afd1568f63ba02e7bdebbc8c | [
"MIT"
] | null | null | null | src/pycomposite/composite_decorator.py | BstLabs/py-composite | d839303de51000c9afd1568f63ba02e7bdebbc8c | [
"MIT"
] | null | null | null | from collections import deque
from functools import reduce
from inspect import getmembers, isfunction, signature
from typing import Any, Iterable, List
from deepmerge import always_merger
def _constructor(self, *parts: List[Iterable[Any]]) -> None:
self._parts = parts
def _make_iterator(cls):
def _iterator... | 34.022222 | 113 | 0.635206 |
aebde630ab31c710b410f433d55102e723b65ac3 | 266 | py | Python | nipype/interfaces/dipy/__init__.py | Conxz/nipype | 1281723ae56eacd103597ff4081a205583706e62 | [
"Apache-2.0"
] | 2 | 2019-01-25T18:20:51.000Z | 2019-07-30T20:51:51.000Z | nipype/interfaces/dipy/__init__.py | Conxz/nipype | 1281723ae56eacd103597ff4081a205583706e62 | [
"Apache-2.0"
] | null | null | null | nipype/interfaces/dipy/__init__.py | Conxz/nipype | 1281723ae56eacd103597ff4081a205583706e62 | [
"Apache-2.0"
] | 2 | 2018-01-25T19:48:17.000Z | 2019-01-25T18:20:52.000Z | # -*- coding: utf-8 -*-
from .tracks import StreamlineTractography, TrackDensityMap
from .tensors import TensorMode, DTI
from .preprocess import Resample, Denoise
from .reconstruction import RESTORE, EstimateResponseSH, CSD
from .simulate import SimulateMultiTensor
| 38 | 60 | 0.815789 |
a3ff04e397d6dd6eb121fc0a85e3d479498c7f58 | 1,553 | py | Python | src/endplay/types/rank.py | dominicprice/endplay | 9c57a68f83c2044ac0d9863dc2814dcaf4a46664 | [
"MIT"
] | 4 | 2021-12-07T12:30:44.000Z | 2022-03-26T13:38:25.000Z | src/endplay/types/rank.py | dominicprice/endplay | 9c57a68f83c2044ac0d9863dc2814dcaf4a46664 | [
"MIT"
] | 12 | 2021-11-15T23:06:27.000Z | 2022-03-28T15:46:55.000Z | src/endplay/types/rank.py | dominicprice/endplay | 9c57a68f83c2044ac0d9863dc2814dcaf4a46664 | [
"MIT"
] | 1 | 2021-12-07T13:28:40.000Z | 2021-12-07T13:28:40.000Z | __all__ = ["Rank", "AlternateRank"]
from enum import IntEnum
class Rank(IntEnum):
"""
Encodes the rank of a suit. The standard values use
powers of two, however some internal functions use
an alternative encoding AlternateRank using the
values 2-14.
"""
R2 = 0x0004
R3 = 0x0008
R4 = 0x0010
R5 ... | 19.4125 | 69 | 0.611719 |
80660b42663f5c6e837b367e9a02a7fc35cf414e | 19,971 | py | Python | car/driver/py/drive.py | markcrump/jf | 7204abdbc09278fd208a448024c5bc0a60f3bda8 | [
"Apache-2.0"
] | 19 | 2019-03-04T21:35:00.000Z | 2021-10-09T14:48:36.000Z | car/driver/py/drive.py | markcrump/jf | 7204abdbc09278fd208a448024c5bc0a60f3bda8 | [
"Apache-2.0"
] | 14 | 2019-05-30T22:38:20.000Z | 2019-10-23T22:29:57.000Z | car/driver/py/drive.py | markcrump/jf | 7204abdbc09278fd208a448024c5bc0a60f3bda8 | [
"Apache-2.0"
] | 27 | 2019-03-05T18:01:19.000Z | 2021-03-19T11:50:31.000Z | #!/usr/bin/env python
#
# Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 43.321041 | 207 | 0.597066 |
d6105bebddd0a1e3d60928ac6f5e32f990b5c7f7 | 8,603 | py | Python | main.py | BluBean/inky-impression-57-display | abb9ee077f6601f908681adf885568d7545db669 | [
"MIT"
] | 1 | 2022-03-28T22:05:58.000Z | 2022-03-28T22:05:58.000Z | main.py | BluBean/pimoroni-Inky-Impression-57-image-frame | abb9ee077f6601f908681adf885568d7545db669 | [
"MIT"
] | null | null | null | main.py | BluBean/pimoroni-Inky-Impression-57-image-frame | abb9ee077f6601f908681adf885568d7545db669 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import glob
from random import randrange
import signal
import RPi.GPIO as GPIO
import textwrap
from inky.auto import auto
try:
from PIL import Image, ImageDraw, ImageFont
except ImportError:
print("""This script requires PIL/Pillow, try:
sudo apt install python3-pil
""")
pri... | 33.605469 | 113 | 0.641404 |
00786234b771e450b77c26fbf042c55f4eb590c5 | 110 | py | Python | Chapter 01/Example_1_4.py | bpbpublications/Advance-Core-Python-Programming | 8902ceb270f55c04c12e818032f90d641c14d7b1 | [
"MIT"
] | null | null | null | Chapter 01/Example_1_4.py | bpbpublications/Advance-Core-Python-Programming | 8902ceb270f55c04c12e818032f90d641c14d7b1 | [
"MIT"
] | null | null | null | Chapter 01/Example_1_4.py | bpbpublications/Advance-Core-Python-Programming | 8902ceb270f55c04c12e818032f90d641c14d7b1 | [
"MIT"
] | null | null | null | number = [1,2,3,4,5,6,13,7,8,9,0]
odd_number = list(filter(lambda x : (x%2!=0), number))
print(odd_number)
| 27.5 | 55 | 0.627273 |
562d958d3750f2a4d322a2e7d00068d65db50f32 | 11,214 | py | Python | docs/conf.py | johnnycakes79/pyops | 9eeda939e3f0d65a5dd220b3e439c8d2ba880d98 | [
"BSD-3-Clause"
] | 2 | 2016-03-23T14:35:16.000Z | 2016-05-17T04:56:28.000Z | docs/conf.py | johnnycakes79/pyops | 9eeda939e3f0d65a5dd220b3e439c8d2ba880d98 | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | johnnycakes79/pyops | 9eeda939e3f0d65a5dd220b3e439c8d2ba880d98 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# pyops documentation build configuration file, created by
# sphinx-quickstart on Thu Oct 1 15:55:02 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All... | 31.236769 | 80 | 0.717585 |
5265027b3eacd3a83586db212fbc8ff5f9a5ad4b | 1,456 | py | Python | pandas2neo4j/errors.py | wiatrak2/pandas2neo4j | 5436f60403511fcceb2bc5619209897b81195c5c | [
"Apache-2.0"
] | 1 | 2021-09-07T08:10:59.000Z | 2021-09-07T08:10:59.000Z | pandas2neo4j/errors.py | wiatrak2/pandas2neo4j | 5436f60403511fcceb2bc5619209897b81195c5c | [
"Apache-2.0"
] | null | null | null | pandas2neo4j/errors.py | wiatrak2/pandas2neo4j | 5436f60403511fcceb2bc5619209897b81195c5c | [
"Apache-2.0"
] | null | null | null | class Pandas2Neo4jError(Exception):
pass
class NotSupportedModelClassError(Pandas2Neo4jError):
pass
class NodeWithIdDoesNotExistError(Pandas2Neo4jError):
def __init__(self, node_class=None, node_id=None):
self.node_class = node_class
self.node_id = node_id
def __str__(self):
... | 30.978723 | 118 | 0.721841 |
6012c2c973cc79235fe85e5e69ee64ee00349713 | 977 | tac | Python | demos/twistd/helloworld.tac | rolando-contribute/cyclone | a9a6511943c138895a3ae833a5c98431d4ea1962 | [
"Apache-2.0"
] | 1 | 2020-12-27T18:43:14.000Z | 2020-12-27T18:43:14.000Z | demos/twistd/helloworld.tac | rolando-contribute/cyclone | a9a6511943c138895a3ae833a5c98431d4ea1962 | [
"Apache-2.0"
] | null | null | null | demos/twistd/helloworld.tac | rolando-contribute/cyclone | a9a6511943c138895a3ae833a5c98431d4ea1962 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env twistd -ny
#
# Copyright 2009 Facebook
#
# 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 ... | 31.516129 | 75 | 0.756397 |
6a319a64f21845f62830784a60fc891061af2bc0 | 4,178 | py | Python | src/interpolate_video.py | adamjm/sepconv | e4296d28673cfc05d233f628c82baf43a16b9af4 | [
"MIT"
] | 134 | 2018-09-18T20:12:16.000Z | 2021-08-05T16:39:06.000Z | src/interpolate_video.py | adamjm/sepconv | e4296d28673cfc05d233f628c82baf43a16b9af4 | [
"MIT"
] | 8 | 2019-03-03T20:02:38.000Z | 2021-11-24T09:32:29.000Z | src/interpolate_video.py | adamjm/sepconv | e4296d28673cfc05d233f628c82baf43a16b9af4 | [
"MIT"
] | 28 | 2018-10-31T17:30:04.000Z | 2022-03-23T13:42:15.000Z | #
# KTH Royal Institute of Technology
#
import argparse
import torch
import math
from torchvision.transforms import CenterCrop
from os.path import join, isdir
from timeit import default_timer as timer
from src.utilities import write_video
from src.interpolate import interpolate_batch
from src.data_manager import load_... | 40.173077 | 202 | 0.671374 |
7c7069a6a18f5c5b42fde5d91659c44b4caa05b2 | 621 | py | Python | contrib/test_spin2dstar.py | miquelramirez/tulip-control | ce54897c242689f45ad33650f157bf1805b35ed6 | [
"BSD-3-Clause"
] | 1 | 2020-02-13T14:13:50.000Z | 2020-02-13T14:13:50.000Z | contrib/test_spin2dstar.py | miquelramirez/tulip-control | ce54897c242689f45ad33650f157bf1805b35ed6 | [
"BSD-3-Clause"
] | null | null | null | contrib/test_spin2dstar.py | miquelramirez/tulip-control | ce54897c242689f45ad33650f157bf1805b35ed6 | [
"BSD-3-Clause"
] | 1 | 2019-07-09T16:32:39.000Z | 2019-07-09T16:32:39.000Z | #!/usr/bin/env python
"""
Regression tests for spin2dstar.py
SCL; 1 Sep 2013
"""
import sys
import nose
from spin2dstar import spin_to_dstar
S2D_BATTERY = {
"[]<> a": "G F a",
"foo": "foo",
"p0 && p1": "& p0 p1",
"([] <> a) -> ([] <> b)": "i G F a G F b",
"(p U q) || (r U z)": "| U p q U r z"
}... | 18.264706 | 58 | 0.595813 |
6513d4568ca71136c1e82717c869994a5b7b320f | 3,863 | py | Python | src/primaires/information/commandes/roadmap/__init__.py | stormi/tsunami | bdc853229834b52b2ee8ed54a3161a1a3133d926 | [
"BSD-3-Clause"
] | null | null | null | src/primaires/information/commandes/roadmap/__init__.py | stormi/tsunami | bdc853229834b52b2ee8ed54a3161a1a3133d926 | [
"BSD-3-Clause"
] | null | null | null | src/primaires/information/commandes/roadmap/__init__.py | stormi/tsunami | bdc853229834b52b2ee8ed54a3161a1a3133d926 | [
"BSD-3-Clause"
] | null | null | null | # -*-coding:Utf-8 -*
# Copyright (c) 2015 LE GOFF Vincent
# 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 copyright notice, this
# lis... | 43.897727 | 79 | 0.664768 |
d4af9d9a7be1a9cebde2f973c523ffae3dd417eb | 23,008 | py | Python | AutotestPlatform/website/models.py | yzypals/AutoTestingPlatform | cfb2c53337406347fad37bd65568b22cdc76fdca | [
"Apache-2.0"
] | null | null | null | AutotestPlatform/website/models.py | yzypals/AutoTestingPlatform | cfb2c53337406347fad37bd65568b22cdc76fdca | [
"Apache-2.0"
] | 2 | 2020-06-06T00:51:32.000Z | 2021-06-10T22:40:50.000Z | AutotestPlatform/website/models.py | yzypals/AutoTestingPlatform | cfb2c53337406347fad37bd65568b22cdc76fdca | [
"Apache-2.0"
] | 1 | 2020-05-31T03:49:24.000Z | 2020-05-31T03:49:24.000Z | from django.db import models
# Create your models here.
# 导航栏
class Navigation(models.Model):
id = models.IntegerField(primary_key=True) # ID
menu_name = models.CharField(max_length=20) # 菜单名称
parent_id = models.IntegerField() # 父级菜单ID
url = models.CharField(max_length=500) # 菜单URL
icon = models.... | 52.172336 | 110 | 0.649426 |
1dd85fbaf49980f483cf4df777c212bc1103cc94 | 10,604 | py | Python | posix-compliance/posix_rst.py | richidubey/rtems-docs | 4476290486ae0258589adbe812de69a024403cbf | [
"BSD-2-Clause"
] | 1 | 2019-08-05T18:06:10.000Z | 2019-08-05T18:06:10.000Z | posix-compliance/posix_rst.py | richidubey/rtems-docs | 4476290486ae0258589adbe812de69a024403cbf | [
"BSD-2-Clause"
] | null | null | null | posix-compliance/posix_rst.py | richidubey/rtems-docs | 4476290486ae0258589adbe812de69a024403cbf | [
"BSD-2-Clause"
] | null | null | null | #! /usr/bin/env python
#
# Convert the CSV compliance data to ReST Format.
#
from __future__ import print_function
import copy
import csv
import os
import sys
standards = [
'RTEMS',
'POSIX-2008',
'POSIX-2003',
'PSE51',
'PSE52',
'PSE53',
'PSE54',
'C99',
'C11',
'FACE 2.1 Securit... | 35.703704 | 85 | 0.467654 |
1df1dc4c37d6f637d67ea5f031a6cb478c11b08e | 406 | py | Python | scraper/migrations/0010_auto_20210103_1851.py | gorkemyontem/SWE-573-2020 | 6a9ca57d294066fcc0db640f45d38d7341754a68 | [
"MIT"
] | null | null | null | scraper/migrations/0010_auto_20210103_1851.py | gorkemyontem/SWE-573-2020 | 6a9ca57d294066fcc0db640f45d38d7341754a68 | [
"MIT"
] | 35 | 2020-11-02T17:06:35.000Z | 2021-03-10T07:56:03.000Z | scraper/migrations/0010_auto_20210103_1851.py | gorkemyontem/SWE-573-2020 | 6a9ca57d294066fcc0db640f45d38d7341754a68 | [
"MIT"
] | 1 | 2021-02-02T14:38:27.000Z | 2021-02-02T14:38:27.000Z | # Generated by Django 3.1.4 on 2021-01-03 15:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('scraper', '0009_auto_20210103_1850'),
]
operations = [
migrations.AlterField(
model_name='comments',
name='comment_t... | 21.368421 | 62 | 0.610837 |
f9d906007911c3b8eb623c743c9691a6327a497f | 4,298 | py | Python | tensorflow/virtual_root.__init__.py | Faagerholm/tensorflow | 98e30b8748eb018f33836ac9269db67ab60483ab | [
"Apache-2.0"
] | 1 | 2019-07-25T22:57:03.000Z | 2019-07-25T22:57:03.000Z | tensorflow/virtual_root.__init__.py | Faagerholm/tensorflow | 98e30b8748eb018f33836ac9269db67ab60483ab | [
"Apache-2.0"
] | null | null | null | tensorflow/virtual_root.__init__.py | Faagerholm/tensorflow | 98e30b8748eb018f33836ac9269db67ab60483ab | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 36.423729 | 100 | 0.750349 |
9eef30c549e035d512514348e2737dec8792bb4a | 38 | py | Python | error.py | Odogwudozilla/Scripts | bd6752777a3e7ea6e00ca99788a6edf4c8efde20 | [
"MIT"
] | null | null | null | error.py | Odogwudozilla/Scripts | bd6752777a3e7ea6e00ca99788a6edf4c8efde20 | [
"MIT"
] | 5 | 2020-02-25T14:51:09.000Z | 2022-02-26T04:29:51.000Z | error.py | Odogwudozilla/Scripts | bd6752777a3e7ea6e00ca99788a6edf4c8efde20 | [
"MIT"
] | null | null | null | print(1)
int(9)
int 9
print(2)
print 3 | 7.6 | 8 | 0.684211 |
19cd3711e12ba0e153770fc5e1996bcc862a8073 | 2,317 | py | Python | tests/ti_deps/deps/test_pool_slots_available_dep.py | ChaseKnowlden/airflow | 6b71eac1997a7c0db3b8e3aed6b4e65d01871440 | [
"Apache-2.0"
] | 15,947 | 2019-01-05T13:51:02.000Z | 2022-03-31T23:33:16.000Z | tests/ti_deps/deps/test_pool_slots_available_dep.py | ChaseKnowlden/airflow | 6b71eac1997a7c0db3b8e3aed6b4e65d01871440 | [
"Apache-2.0"
] | 14,603 | 2019-01-05T09:43:19.000Z | 2022-03-31T23:11:59.000Z | tests/ti_deps/deps/test_pool_slots_available_dep.py | ChaseKnowlden/airflow | 6b71eac1997a7c0db3b8e3aed6b4e65d01871440 | [
"Apache-2.0"
] | 8,429 | 2019-01-05T19:45:47.000Z | 2022-03-31T22:13:01.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 38.616667 | 79 | 0.739318 |
149bde451ad4aa9fe367b20881058714849ebc68 | 20,468 | py | Python | tensorflow/python/ops/nn_grad.py | atfkaka/tensorflow | 5657d0dee8d87f4594b3e5902ed3e3ca8d6dfc0a | [
"Apache-2.0"
] | 101 | 2016-12-03T11:40:52.000Z | 2017-12-23T02:02:03.000Z | tensorflow/python/ops/nn_grad.py | atfkaka/tensorflow | 5657d0dee8d87f4594b3e5902ed3e3ca8d6dfc0a | [
"Apache-2.0"
] | 9 | 2016-12-14T03:27:46.000Z | 2017-09-13T02:29:07.000Z | tensorflow/python/ops/nn_grad.py | atfkaka/tensorflow | 5657d0dee8d87f4594b3e5902ed3e3ca8d6dfc0a | [
"Apache-2.0"
] | 47 | 2016-12-04T12:37:24.000Z | 2018-01-14T18:13:07.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 36.484848 | 87 | 0.631474 |
6b4e7b1affa4a0e3e3441b4e47e62206e858d633 | 1,845 | py | Python | model/encoder.py | DeepLearnXMU/H-RNNSearch | a28cb555984e920e317fc9376cec12924f422f69 | [
"MIT"
] | 9 | 2018-11-16T12:46:10.000Z | 2022-02-04T16:22:39.000Z | model/encoder.py | DeepLearnXMU/H-RNNSearch | a28cb555984e920e317fc9376cec12924f422f69 | [
"MIT"
] | null | null | null | model/encoder.py | DeepLearnXMU/H-RNNSearch | a28cb555984e920e317fc9376cec12924f422f69 | [
"MIT"
] | null | null | null | import theano
import theano.tensor as T
import nn
import ops
def gru_encoder(cell, inputs, mask, initid, initial_state=None, dtype=None):
if not isinstance(cell, nn.rnn_cell.rnn_cell):
raise ValueError("cell is not an instance of rnn_cell")
if isinstance(inputs, (list, tuple)):
raise ValueEr... | 33.545455 | 93 | 0.619512 |
6c1007147cc91568ddc7fedefb205330ad11b65c | 2,500 | py | Python | python/rbin/generate_etfbeta.py | CodeApprenticeRai/newt | 0e07a87aa6b8d4b238c1a9fd3fef363133866c57 | [
"Apache-2.0"
] | 1 | 2021-06-21T12:23:55.000Z | 2021-06-21T12:23:55.000Z | python/rbin/generate_etfbeta.py | CodeApprenticeRai/newt | 0e07a87aa6b8d4b238c1a9fd3fef363133866c57 | [
"Apache-2.0"
] | null | null | null | python/rbin/generate_etfbeta.py | CodeApprenticeRai/newt | 0e07a87aa6b8d4b238c1a9fd3fef363133866c57 | [
"Apache-2.0"
] | 6 | 2019-10-17T21:16:21.000Z | 2020-10-19T08:27:01.000Z | #!/usr/bin/env python
import os
import sys
import util
from gzip import GzipFile
from data_sources import file_source
import datafiles
def main():
util.check_include()
util.set_log_file()
#get last calcres of previous day
prevDay = util.exchangeTradingOffset(os.environ['PRIMARY_EXCHANGE'],os.envir... | 37.313433 | 149 | 0.6108 |
9b5eba7c483fbee78330cf2dc466e675e141f93c | 2,685 | py | Python | example_problems/problems_to_be_done/map/makeInputs-suite.py | romeorizzi/TALight | 2b694cb487f41dd0d36d7aa39f5c9c5a21bfc18e | [
"MIT"
] | 4 | 2021-06-27T13:27:24.000Z | 2022-03-24T10:46:28.000Z | example_problems/problems_to_be_done/map/makeInputs-suite.py | romeorizzi/TALight | 2b694cb487f41dd0d36d7aa39f5c9c5a21bfc18e | [
"MIT"
] | 1 | 2021-01-23T06:50:31.000Z | 2021-03-17T15:35:18.000Z | example_problems/problems_to_be_done/map/makeInputs-suite.py | romeorizzi/TALight | 2b694cb487f41dd0d36d7aa39f5c9c5a21bfc18e | [
"MIT"
] | 5 | 2021-04-01T15:21:57.000Z | 2022-01-29T15:07:38.000Z | #!/usr/bin/env python3
from sys import argv, exit, stderr
import os
INPUT_FOLDER = argv[1]
INPUT_FORMAT = argv[2]
if INPUT_FORMAT == "dat":
GENERATOR="./instance-generators/dat-generator.sh"
if INPUT_FORMAT == "txt":
GENERATOR="./instance-generators/txt-generator.sh"
os.system(f"rm -rf {INPUT_FOLDER}")
os.sys... | 42.619048 | 181 | 0.721415 |
c4be2cf01d3521e30089a4eebf95985d5ddd9f69 | 456 | py | Python | GUI/demo02.py | yueludanfeng/Test | 8ea2bd2a8602ed51379c7a89ea1fdf370b8f1ca7 | [
"Apache-2.0"
] | 10 | 2019-01-20T06:52:30.000Z | 2022-03-22T03:35:47.000Z | GUI/demo02.py | yueludanfeng/Test | 8ea2bd2a8602ed51379c7a89ea1fdf370b8f1ca7 | [
"Apache-2.0"
] | null | null | null | GUI/demo02.py | yueludanfeng/Test | 8ea2bd2a8602ed51379c7a89ea1fdf370b8f1ca7 | [
"Apache-2.0"
] | 11 | 2017-10-17T07:50:21.000Z | 2021-12-13T12:04:58.000Z | # coding=utf-8
import numpy as np
import matplotlib.pyplot as plt
plt.figure(1) # 创建图表1
plt.figure(2) # 创建图表2
ax1 = plt.subplot(211) # 在图表2中创建子图1
ax2 = plt.subplot(212) # 在图表2中创建子图2
x = np.linspace(0, 3, 100)
for i in xrange(5):
plt.figure(1) # ❶ # 选择图表1
plt.plot(x, np.exp(i * x / 3))
pl... | 24 | 37 | 0.589912 |
fc84663a91f8ee7a23eb7ba84e222d14cf94b0ad | 9,570 | py | Python | dymos/examples/vanderpol/vanderpol_ode.py | pgkirsch/dymos | d4e68bd3db13972dcbf9462c37c55814f521d762 | [
"Apache-2.0"
] | null | null | null | dymos/examples/vanderpol/vanderpol_ode.py | pgkirsch/dymos | d4e68bd3db13972dcbf9462c37c55814f521d762 | [
"Apache-2.0"
] | 2 | 2020-02-18T17:16:48.000Z | 2020-02-18T18:26:05.000Z | dymos/examples/vanderpol/vanderpol_ode.py | wright/dymos | 9d253a16ffcc162a84ef1b4a7dddcebeda5522ac | [
"Apache-2.0"
] | null | null | null | import numpy as np
import openmdao.api as om
import time
from openmdao.utils.array_utils import evenly_distrib_idxs
class vanderpol_ode(om.ExplicitComponent):
"""ODE for optimal control of a Van der Pol oscillator
objective J:
minimize integral of (x0**2 + x1**2 + u**2) for 0.0 <= t <= 15
subjec... | 41.790393 | 117 | 0.611285 |
511c4f585c4e45c444cfdd07c4ed6d740e736c6f | 16,998 | py | Python | charles-university/deep-learning/labs/09/lemmatizer_attn.py | Hyperparticle/lct-master | 8acb0ca8fe14bb86305f235e3fec0a595acae2de | [
"MIT"
] | 3 | 2018-11-08T14:23:45.000Z | 2021-02-08T17:54:59.000Z | charles-university/deep-learning/labs/09/lemmatizer_attn.py | Hyperparticle/lct-master | 8acb0ca8fe14bb86305f235e3fec0a595acae2de | [
"MIT"
] | null | null | null | charles-university/deep-learning/labs/09/lemmatizer_attn.py | Hyperparticle/lct-master | 8acb0ca8fe14bb86305f235e3fec0a595acae2de | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import numpy as np
import tensorflow as tf
import morpho_dataset
class Network:
def __init__(self, threads, seed=42):
# Create an empty graph and a session
graph = tf.Graph()
graph.seed = seed
self.session = tf.Session(graph = graph, config=tf.ConfigProto(int... | 60.924731 | 181 | 0.633898 |
e3b913f47429c19494890afa5d790183ce6e4e60 | 4,610 | py | Python | gridalert/template/logwatchfine_template.py | tkishimoto/gridalert | 2b69999e7dbb6f3dc4919280a1f5bbceaf9e0c43 | [
"Apache-2.0"
] | 1 | 2019-07-19T10:16:15.000Z | 2019-07-19T10:16:15.000Z | gridalert/template/logwatchfine_template.py | tkishimoto/gridalert | 2b69999e7dbb6f3dc4919280a1f5bbceaf9e0c43 | [
"Apache-2.0"
] | null | null | null | gridalert/template/logwatchfine_template.py | tkishimoto/gridalert | 2b69999e7dbb6f3dc4919280a1f5bbceaf9e0c43 | [
"Apache-2.0"
] | null | null | null | from logging import getLogger
logger = getLogger(__name__)
from .logwatch_template import *
class LogwatchfineTemplate(LogwatchTemplate):
def __init__(self, conf):
super().__init__(conf)
def initialize(self):
for service in self.conf['cl']['services'].split(','):
... | 27.939394 | 80 | 0.444685 |
d5d0baa1b454e84698afe7eac7bdd101c9ba0463 | 7,709 | py | Python | src/train_kth.py | mubashirhanif/iclr2017mcnet | 8827cbe9cc83978e7f3fed28a754119d5ee9574f | [
"MIT"
] | null | null | null | src/train_kth.py | mubashirhanif/iclr2017mcnet | 8827cbe9cc83978e7f3fed28a754119d5ee9574f | [
"MIT"
] | null | null | null | src/train_kth.py | mubashirhanif/iclr2017mcnet | 8827cbe9cc83978e7f3fed28a754119d5ee9574f | [
"MIT"
] | null | null | null | import cv2
import sys
import time
import imageio
import tensorflow as tf
import scipy.misc as sm
import numpy as np
import scipy.io as sio
from mcnet import MCNET
from utils import *
from os import listdir, makedirs, system
from os.path import exists
from argparse import ArgumentParser
from joblib import Parallel, de... | 41.896739 | 85 | 0.515501 |
4a67c2950d859abe3d2e7d045856544d50a5e9d7 | 5,649 | py | Python | apps/modules/comments/process/adm_comment.py | doublealread/osroom | c0aee322704f1eeca682a3e7669298882ed3dba5 | [
"BSD-2-Clause"
] | 1 | 2019-05-04T03:17:14.000Z | 2019-05-04T03:17:14.000Z | apps/modules/comments/process/adm_comment.py | doublealread/osroom | c0aee322704f1eeca682a3e7669298882ed3dba5 | [
"BSD-2-Clause"
] | null | null | null | apps/modules/comments/process/adm_comment.py | doublealread/osroom | c0aee322704f1eeca682a3e7669298882ed3dba5 | [
"BSD-2-Clause"
] | null | null | null | # -*-coding:utf-8-*-
from bson import ObjectId
from flask import request
from flask_babel import gettext
from flask_login import current_user
from apps.modules.comments.process.comment import find_comments
from apps.modules.message.process.user_message import insert_user_msg
from apps.utils.format.obj_format import jso... | 36.921569 | 99 | 0.501151 |
eed2fe19df6a3f78a4a1f0ee40d26ccbf50f3349 | 34,433 | py | Python | sdk/cwl/arvados_cwl/executor.py | basharbme/arvados | 1c3c8f7fd2e1268b139e046fbd6a7093dd82222f | [
"Apache-2.0"
] | 1 | 2019-09-08T01:49:09.000Z | 2019-09-08T01:49:09.000Z | sdk/cwl/arvados_cwl/executor.py | basharbme/arvados | 1c3c8f7fd2e1268b139e046fbd6a7093dd82222f | [
"Apache-2.0"
] | null | null | null | sdk/cwl/arvados_cwl/executor.py | basharbme/arvados | 1c3c8f7fd2e1268b139e046fbd6a7093dd82222f | [
"Apache-2.0"
] | null | null | null | # Copyright (C) The Arvados Authors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
from __future__ import division
from builtins import next
from builtins import object
from builtins import str
from future.utils import viewvalues, viewitems
import argparse
import logging
import os
import sys
import thr... | 44.951697 | 161 | 0.577644 |
4796f2eecc16a538a24c657c6103d3fc7c470907 | 118,741 | py | Python | flaskJSONRPCServer/__init__.py | byaka/flaskJSONRPCServer | 328e88c7358e8ce87cd8c56a2db22b0c43e9661d | [
"Apache-2.0"
] | 2 | 2017-04-12T05:54:38.000Z | 2019-10-09T15:56:18.000Z | flaskJSONRPCServer/__init__.py | byaka/flaskJSONRPCServer | 328e88c7358e8ce87cd8c56a2db22b0c43e9661d | [
"Apache-2.0"
] | 160 | 2015-04-24T09:39:08.000Z | 2019-10-13T15:27:29.000Z | flaskJSONRPCServer/__init__.py | byaka/flaskJSONRPCServer | 328e88c7358e8ce87cd8c56a2db22b0c43e9661d | [
"Apache-2.0"
] | 2 | 2016-02-26T13:20:02.000Z | 2021-10-05T04:05:04.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*
__ver_major__ = 0
__ver_minor__ = 9
__ver_patch__ = 2
__ver_sub__ = "dev"
__version__ = "%d.%d.%d" % (__ver_major__, __ver_minor__, __ver_patch__)
"""
This library is an extended implementation of server for JSON-RPC protocol. It supports only json-rpc 2.0 specification for... | 47.307171 | 640 | 0.630111 |
a7d08810a4a8509de953ac470523cc2958616a35 | 3,375 | py | Python | ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/pagination_context.py | alexa-labs/alexa-apis-for-python | 52838be4f57ee1a2479402ea78b1247b56017942 | [
"Apache-2.0"
] | 90 | 2018-09-19T21:56:42.000Z | 2022-03-30T11:25:21.000Z | ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/pagination_context.py | ishitaojha/alexa-apis-for-python | a68f94b7a0e41f819595d6fe56e800403e8a4194 | [
"Apache-2.0"
] | 11 | 2018-09-23T12:16:48.000Z | 2021-06-10T19:49:45.000Z | ask-smapi-model/ask_smapi_model/v1/skill/nlu/evaluations/pagination_context.py | ishitaojha/alexa-apis-for-python | a68f94b7a0e41f819595d6fe56e800403e8a4194 | [
"Apache-2.0"
] | 28 | 2018-09-19T22:30:38.000Z | 2022-02-22T22:57:07.000Z | # coding: utf-8
#
# 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 "lice... | 31.542056 | 141 | 0.586667 |
126d87a0ec738ce81406d6525efa08bf3e495896 | 261 | py | Python | Cycle_1/Week_2/Session_8/conditionals_exercise.py | htrismicristo/MisionTIC_2022 | 62837503ac33b3fb4e4d2d23bd7b8388bbecc02d | [
"MIT"
] | null | null | null | Cycle_1/Week_2/Session_8/conditionals_exercise.py | htrismicristo/MisionTIC_2022 | 62837503ac33b3fb4e4d2d23bd7b8388bbecc02d | [
"MIT"
] | null | null | null | Cycle_1/Week_2/Session_8/conditionals_exercise.py | htrismicristo/MisionTIC_2022 | 62837503ac33b3fb4e4d2d23bd7b8388bbecc02d | [
"MIT"
] | null | null | null |
# Definiendo variables
A = int(input())
B = int(input())
C = int(input())
D = int(input())
# Comparando variables
if B > C and D > A and (C+D) > (A+B) and D > 0 and C > 0 and (not A%2):
print('Valores aceptados')
else:
print('Valores no aceptados') | 21.75 | 71 | 0.597701 |
2b6ef8881db4fa004b46cba32ab9d6523281ce65 | 4,963 | py | Python | compiler/base/utils.py | ycyang0508/OpenRAM | 54c6043cb81c51f5f4a2f77e91145545ce0ed6d6 | [
"BSD-3-Clause"
] | 1 | 2022-02-17T22:12:46.000Z | 2022-02-17T22:12:46.000Z | compiler/base/utils.py | ycyang0508/OpenRAM | 54c6043cb81c51f5f4a2f77e91145545ce0ed6d6 | [
"BSD-3-Clause"
] | null | null | null | compiler/base/utils.py | ycyang0508/OpenRAM | 54c6043cb81c51f5f4a2f77e91145545ce0ed6d6 | [
"BSD-3-Clause"
] | null | null | null | # See LICENSE for licensing information.
#
# Copyright (c) 2016-2021 Regents of the University of California and The Board
# of Regents for the Oklahoma Agricultural and Mechanical College
# (acting for and on behalf of Oklahoma State University)
# All rights reserved.
import os
import math
import gdsMill
import tech... | 29.194118 | 93 | 0.656659 |
98d24c51a88e1470b4dde363bc1502e40c76b016 | 10,625 | py | Python | 3 calcGUI/CalcGUIModified.py | Blade24-byte/pythonteachingcode | 3fa7f7e5b459873ad6c0b921c0760d11e97db054 | [
"MIT"
] | null | null | null | 3 calcGUI/CalcGUIModified.py | Blade24-byte/pythonteachingcode | 3fa7f7e5b459873ad6c0b921c0760d11e97db054 | [
"MIT"
] | null | null | null | 3 calcGUI/CalcGUIModified.py | Blade24-byte/pythonteachingcode | 3fa7f7e5b459873ad6c0b921c0760d11e97db054 | [
"MIT"
] | 19 | 2019-05-31T19:29:18.000Z | 2020-07-20T05:23:56.000Z | '''
Modified calcGUI
This example helps show how the tkinter library works in Python.
Run it and press the 1 key on your keyboard. Why does "dominic" appear in the entry bar?
Why does one key have "DT" on it? When you click it, why does it make "Thomas" show in the entry bar?
Why is the font in the entry bar now f... | 46.39738 | 132 | 0.590306 |
4c69f920f6f9e3a07b6ee6417b6c86ee16615000 | 3,245 | py | Python | sexpr.py | lispparser/sexp-python | 588ba16c0e846486295e5e699f7c714d1391560a | [
"Zlib"
] | null | null | null | sexpr.py | lispparser/sexp-python | 588ba16c0e846486295e5e699f7c714d1391560a | [
"Zlib"
] | null | null | null | sexpr.py | lispparser/sexp-python | 588ba16c0e846486295e5e699f7c714d1391560a | [
"Zlib"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2014 Ingo Ruhnke <grumbel@gmail.com>
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for any damages
# arising from the use of this software.
#
# Permission is granted to anyone to use this software for ... | 28.716814 | 95 | 0.48074 |
0fed2853f893c8c80ee2fdf83d522c6a9cc8fe30 | 298 | py | Python | Player.py | THEToilet/kamisama | 5a74819d2c768cf7cf44f184c26428d72bbcfe80 | [
"MIT"
] | null | null | null | Player.py | THEToilet/kamisama | 5a74819d2c768cf7cf44f184c26428d72bbcfe80 | [
"MIT"
] | null | null | null | Player.py | THEToilet/kamisama | 5a74819d2c768cf7cf44f184c26428d72bbcfe80 | [
"MIT"
] | null | null | null | import Vector2 as vec2
class pc:
def __init__(self):
self.pos = vec2.Vec2(10, 95)
self.vec = 0
self.direction = 0
self.is_floating = False
self.vy = 0
def update(self, x, y, dx):
self.pos.x += x
self.pos.y += y
self.vec = dx | 21.285714 | 36 | 0.513423 |
e1b59f55eebe53b762d0b76374429e354e926afa | 3,445 | py | Python | backend/tests/test_entry.py | acifani/reviso-timetracking | f7ee89fb8ea6e39960af8c072633c7cf73c849e6 | [
"MIT"
] | null | null | null | backend/tests/test_entry.py | acifani/reviso-timetracking | f7ee89fb8ea6e39960af8c072633c7cf73c849e6 | [
"MIT"
] | null | null | null | backend/tests/test_entry.py | acifani/reviso-timetracking | f7ee89fb8ea6e39960af8c072633c7cf73c849e6 | [
"MIT"
] | null | null | null | import unittest
import json
from api import create_app, db
BASE_URL = '/api/v0.1/entries'
GOOD_ENTRY = {
'id': 1,
'customer': 'good_customer',
'hourly_rate': 50,
'length': 60
}
BAD_ENTRY = {
'id': 1,
'customer': 'bad_customer',
'hourly_rate': 'twenty',
'length': 60
}
class EntryTestCa... | 33.125 | 76 | 0.640929 |
b297bf104c1010ccfd8dfd09abd42f129775093f | 23,409 | py | Python | 3.py | znuxor/adventofcode2016 | 43c1da30cf3b0bca0d9daeddd5692ce2787b544a | [
"BSD-3-Clause"
] | null | null | null | 3.py | znuxor/adventofcode2016 | 43c1da30cf3b0bca0d9daeddd5692ce2787b544a | [
"BSD-3-Clause"
] | null | null | null | 3.py | znuxor/adventofcode2016 | 43c1da30cf3b0bca0d9daeddd5692ce2787b544a | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
theInput = """785 516 744
272 511 358
801 791 693
572 150 74
644 534 138
191 396 196
860 92 399
233 321 823
720 333 570
308 427 572
246 206 66
156 261 595
336 810 505
810 210 938
615 987 820
117 22 519
412 990 256
405 996 423
55 366 418
290 402 810
31... | 14.127339 | 47 | 0.622795 |
922f343c6340915633952061b4a90f41e3b900cc | 2,986 | py | Python | utils/TrainGAN.py | ynakaDream/Deep-Learning-GANs | 2e00405079c131245f4dd23eb494a27a2b12598d | [
"MIT"
] | 4 | 2019-01-14T04:38:51.000Z | 2020-02-13T20:38:10.000Z | utils/TrainGAN.py | ynakaDream/Deep-Learning-GANs | 2e00405079c131245f4dd23eb494a27a2b12598d | [
"MIT"
] | null | null | null | utils/TrainGAN.py | ynakaDream/Deep-Learning-GANs | 2e00405079c131245f4dd23eb494a27a2b12598d | [
"MIT"
] | null | null | null | import torch
class TrainGAN:
def __init__(self, batch_size):
self.device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
print('DEVICE:', self.device)
self.batch_size = batch_size
self.noise = None
self.real_target = None
self.fake_target = None
... | 27.648148 | 86 | 0.593101 |
f242fb6989fed1087788efa2c6a97dfc7b99679a | 349 | py | Python | tests/conftest.py | City-of-Helsinki/helsinki-profile-gdpr-api | c2c2aca8847b32754bda49c1c8c03052ec40703d | [
"MIT"
] | 2 | 2021-03-23T08:19:58.000Z | 2021-04-07T13:31:55.000Z | tests/conftest.py | City-of-Helsinki/helsinki-profile-gdpr-api | c2c2aca8847b32754bda49c1c8c03052ec40703d | [
"MIT"
] | 2 | 2021-03-10T22:03:40.000Z | 2021-03-15T14:07:27.000Z | tests/conftest.py | City-of-Helsinki/helsinki-profile-gdpr-api | c2c2aca8847b32754bda49c1c8c03052ec40703d | [
"MIT"
] | null | null | null | import pytest
from rest_framework.test import APIClient
from tests.factories import ProfileFactory, UserFactory
@pytest.fixture(autouse=True)
def autouse_db(db):
pass
@pytest.fixture
def api_client():
return APIClient()
@pytest.fixture
def user():
return UserFactory()
@pytest.fixture
def profile():... | 13.96 | 55 | 0.750716 |
614d6531c2bf98e31b3bee63514302b28448362f | 8,645 | py | Python | large_cohort/flag_utils_test.py | amitport/google_research_federated | b0dea245eb484f731f28d80e460795816d938b16 | [
"BSD-3-Clause"
] | null | null | null | large_cohort/flag_utils_test.py | amitport/google_research_federated | b0dea245eb484f731f28d80e460795816d938b16 | [
"BSD-3-Clause"
] | null | null | null | large_cohort/flag_utils_test.py | amitport/google_research_federated | b0dea245eb484f731f28d80e460795816d938b16 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2018, 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 to in writing... | 43.442211 | 80 | 0.700868 |
804adf1c235213b9eec8c6b22d376b19b467f7d3 | 663 | py | Python | RegAndLogin/migrations/0001_initial.py | Trevelyn/steganography | 41fb3cedd56464d664f91a6c95f531da937e4e15 | [
"MIT"
] | null | null | null | RegAndLogin/migrations/0001_initial.py | Trevelyn/steganography | 41fb3cedd56464d664f91a6c95f531da937e4e15 | [
"MIT"
] | null | null | null | RegAndLogin/migrations/0001_initial.py | Trevelyn/steganography | 41fb3cedd56464d664f91a6c95f531da937e4e15 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-10-31 16:20
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='HelpIn... | 26.52 | 114 | 0.604827 |
d863d893cae128d95ee57fdb02f253b1afcbcee5 | 36,352 | py | Python | Ideas/SearchSpaceOptions/Segmentors_MinParams.py | genster6/Simple-Evolutionary-Exploration | 063a64b3903d560b2622d63e049939537dc0c7b1 | [
"MIT"
] | 2 | 2020-04-25T16:32:51.000Z | 2022-03-07T20:38:08.000Z | Ideas/SearchSpaceOptions/Segmentors_MinParams.py | genster6/Simple-Evolutionary-Exploration | 063a64b3903d560b2622d63e049939537dc0c7b1 | [
"MIT"
] | null | null | null | Ideas/SearchSpaceOptions/Segmentors_MinParams.py | genster6/Simple-Evolutionary-Exploration | 063a64b3903d560b2622d63e049939537dc0c7b1 | [
"MIT"
] | 1 | 2020-03-20T19:36:36.000Z | 2020-03-20T19:36:36.000Z | """ Segmentor library designed to learn how to segment images using GAs.
This libary actually does not incode the GA itself, instead it just defines
the search parameters the evaluation funtions and the fitness function (comming soon)
"""
# TODO: Research project-clean up the parameters class to reduce the search spac... | 38.144806 | 133 | 0.633913 |
33b50e962b3aac2b681d03eee012946ef27465d5 | 383 | py | Python | backend/tasks/admin.py | Newinacode/Daily_Tracker | c5ce28832039dfbca977826be6409586311d107d | [
"MIT"
] | 2 | 2020-10-11T12:36:49.000Z | 2020-10-12T03:10:00.000Z | backend/tasks/admin.py | Newinacode/Daily_Tracker | c5ce28832039dfbca977826be6409586311d107d | [
"MIT"
] | null | null | null | backend/tasks/admin.py | Newinacode/Daily_Tracker | c5ce28832039dfbca977826be6409586311d107d | [
"MIT"
] | 2 | 2020-10-11T12:21:31.000Z | 2020-10-12T11:27:13.000Z | from django.contrib import admin
from .models import Task
# Register your models here.
class TaskAdmin(admin.ModelAdmin):
list_display = ('id', 'title', 'start_date', 'end_date', 'status', 'user')
list_display_links = ('id', 'title')
list_editable = ('status',)
search_fields = ('title', 'start_date')... | 23.9375 | 78 | 0.686684 |
30db225ddee8472b0d8ffa4465898e2e0d6cfd49 | 2,297 | py | Python | metflix_remake/movies/migrations/0001_initial.py | luismoa/yummy_metflix_remake | bf6e108f9229c12b44e2dc1ea95e6c3d043cb465 | [
"MIT"
] | 1 | 2021-04-11T15:56:34.000Z | 2021-04-11T15:56:34.000Z | metflix_remake/movies/migrations/0001_initial.py | luismoa/yummy_metflix_remake | bf6e108f9229c12b44e2dc1ea95e6c3d043cb465 | [
"MIT"
] | 16 | 2021-04-10T22:46:43.000Z | 2021-06-08T22:21:00.000Z | metflix_remake/movies/migrations/0001_initial.py | luismoa/yummy_metflix_remake | bf6e108f9229c12b44e2dc1ea95e6c3d043cb465 | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-04-18 12:13
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Actor',
fields=[
... | 39.603448 | 118 | 0.559861 |
7450d9d05b981f5094edda40dee5dc314d6216ce | 56,036 | py | Python | src/sage/schemes/elliptic_curves/gal_reps_number_field.py | ChamanAgrawal/sage | 5f6d56ba247b352d7d46442e88fa3a027e9f222d | [
"BSL-1.0"
] | 2 | 2019-06-02T03:16:59.000Z | 2019-06-15T10:17:18.000Z | src/sage/schemes/elliptic_curves/gal_reps_number_field.py | ChamanAgrawal/sage | 5f6d56ba247b352d7d46442e88fa3a027e9f222d | [
"BSL-1.0"
] | null | null | null | src/sage/schemes/elliptic_curves/gal_reps_number_field.py | ChamanAgrawal/sage | 5f6d56ba247b352d7d46442e88fa3a027e9f222d | [
"BSL-1.0"
] | 1 | 2019-06-02T03:16:55.000Z | 2019-06-02T03:16:55.000Z | # -*- coding: utf-8 -*-
r"""
Galois representations for elliptic curves over number fields
This file contains the code to compute for which primes the Galois
representation attached to an elliptic curve (over an arbitrary number field)
is surjective. The functions in this file are called by the ``is_surjective``
and `... | 34.804969 | 198 | 0.589996 |
e22fcccb7a3ee9ba1f9fcbc2a3fe6fb9cd44d86e | 1,521 | py | Python | examples/multidimensionalexample.py | dish59742/amplpy | 9309a947b74dcc524a07809a68bf32d93e9f0a48 | [
"BSD-3-Clause"
] | 47 | 2017-08-11T16:38:26.000Z | 2022-03-24T08:37:40.000Z | examples/multidimensionalexample.py | Seanpm2001-Python/amplpy | 26c04134b6c4135a541d54c7873d9b2933df039a | [
"BSD-3-Clause"
] | 41 | 2017-08-05T00:54:27.000Z | 2022-03-08T21:56:19.000Z | examples/multidimensionalexample.py | Seanpm2001-Python/amplpy | 26c04134b6c4135a541d54c7873d9b2933df039a | [
"BSD-3-Clause"
] | 22 | 2017-08-05T00:38:43.000Z | 2022-02-02T20:22:10.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, absolute_import, division
from builtins import map, range, object, zip, sorted
import sys
import os
def main(argc, argv):
from amplpy import AMPL, DataFrame
os.chdir(os.path.dirname(__file__) or os.curdir)
try:
# ... | 32.361702 | 79 | 0.577909 |
41b73a620ca0ece5113da2c3674e0a857f556547 | 833 | py | Python | meiduo_mall/celery_tasks/email/tasks.py | Wang-TaoTao/meiduo_project | f95f097c2a85f500d0fd264a58e2f0d92771fff6 | [
"MIT"
] | null | null | null | meiduo_mall/celery_tasks/email/tasks.py | Wang-TaoTao/meiduo_project | f95f097c2a85f500d0fd264a58e2f0d92771fff6 | [
"MIT"
] | null | null | null | meiduo_mall/celery_tasks/email/tasks.py | Wang-TaoTao/meiduo_project | f95f097c2a85f500d0fd264a58e2f0d92771fff6 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.core.mail import send_mail
from celery_tasks.main import app
from meiduo_mall.settings.dev import logger
@app.task(bind=True, name='send_verify_email', retry_backoff=3)
def send_verify_email(self, to_email, verify_url):
"""
发送验证邮箱邮件
:param to_email: 收件人邮箱
... | 28.724138 | 90 | 0.621849 |
96eadf00b79bbb62281b9145d4250247afd772af | 1,622 | py | Python | linter.py | corvisa/SummitLinter | d8dd68e212cff9d4f8184c9f3c20a377af72ed56 | [
"MIT"
] | 22 | 2015-03-11T16:37:14.000Z | 2021-08-03T09:09:12.000Z | linter.py | corvisa/SummitLinter | d8dd68e212cff9d4f8184c9f3c20a377af72ed56 | [
"MIT"
] | null | null | null | linter.py | corvisa/SummitLinter | d8dd68e212cff9d4f8184c9f3c20a377af72ed56 | [
"MIT"
] | 1 | 2018-03-03T16:10:01.000Z | 2018-03-03T16:10:01.000Z | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
#
# Copyright (c) 2014 CorvisaCloud, LLC
#
# License: MIT
#
"""This module exports the LuaSummit plugin class."""
from SublimeLinter.lint import Linter, util
class SummitLinter(Linter):
"""Provides an interface to luacheck... | 28.964286 | 112 | 0.532676 |
b1d476b2145a7c20c5093bbb3594fb263f1a7766 | 58,848 | py | Python | simtbx/diffBragg/hopper_utils.py | ReliaSolve/cctbx_project | 4a0eebc1f19af94edde170553e1c4be3cffac1b8 | [
"BSD-3-Clause-LBNL"
] | null | null | null | simtbx/diffBragg/hopper_utils.py | ReliaSolve/cctbx_project | 4a0eebc1f19af94edde170553e1c4be3cffac1b8 | [
"BSD-3-Clause-LBNL"
] | 170 | 2020-09-26T19:17:07.000Z | 2022-03-31T21:32:41.000Z | simtbx/diffBragg/hopper_utils.py | ReliaSolve/cctbx_project | 4a0eebc1f19af94edde170553e1c4be3cffac1b8 | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import absolute_import, division, print_function
import os
from dials.algorithms.shoebox import MaskCode
from copy import deepcopy
from dials.model.data import Shoebox
import numpy as np
from scipy.optimize import dual_annealing, basinhopping
from collections import Counter
from scitbx.matrix import sqr... | 43.430258 | 152 | 0.601397 |
d1973af0ea65b420847e46be97eb6882e0181ecf | 466 | py | Python | data/scripts/templates/object/tangible/item/quest/force_sensitive/shared_fs_sculpture_4.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/tangible/item/quest/force_sensitive/shared_fs_sculpture_4.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/tangible/item/quest/force_sensitive/shared_fs_sculpture_4.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/item/quest/force_sensitive/shared_fs_sculpture_4.iff"
result.attrib... | 27.411765 | 89 | 0.733906 |
b3e65c42bd4b62e9f9140df2ca630dfa08772cce | 3,251 | py | Python | test_project_postgres/sample/tests.py | Piero-Palevsky-OH/aldjemy | dc79f3b7aabe47c4a13e44f61038bc19a921980d | [
"BSD-3-Clause"
] | null | null | null | test_project_postgres/sample/tests.py | Piero-Palevsky-OH/aldjemy | dc79f3b7aabe47c4a13e44f61038bc19a921980d | [
"BSD-3-Clause"
] | null | null | null | test_project_postgres/sample/tests.py | Piero-Palevsky-OH/aldjemy | dc79f3b7aabe47c4a13e44f61038bc19a921980d | [
"BSD-3-Clause"
] | null | null | null | from django.test import TestCase
from sqlalchemy import select
from sqlalchemy.dialects.postgresql import array
from sample.models import TicTacToeBoard, JsonModel
from aldjemy.core import get_engine
class TestArrayField(TestCase):
"""
Tests that queries involving array fields can be performed.
"""
... | 34.221053 | 83 | 0.485082 |
934c2a4a93b17b67a00991e639a73f782b01b62b | 7,384 | py | Python | bot/exts/utils/eval.py | ShakyaMajumdar/gurkbot | 7532e3ee152804f0211760cc4ace27509eaccc8c | [
"MIT"
] | 24 | 2020-12-18T07:26:14.000Z | 2022-03-30T22:56:49.000Z | bot/exts/utils/eval.py | ShakyaMajumdar/gurkbot | 7532e3ee152804f0211760cc4ace27509eaccc8c | [
"MIT"
] | 143 | 2020-12-18T09:13:51.000Z | 2022-03-02T19:27:44.000Z | bot/exts/utils/eval.py | ShakyaMajumdar/gurkbot | 7532e3ee152804f0211760cc4ace27509eaccc8c | [
"MIT"
] | 44 | 2020-12-18T09:05:29.000Z | 2022-03-02T20:06:23.000Z | import datetime
import json
from pathlib import Path
from typing import Optional
import aiohttp
from bot.bot import Bot
from discord import Embed, Message
from discord.ext import commands, tasks
from discord.ext.commands import Cog, Context, command
from discord.utils import escape_mentions
from loguru import logger
f... | 38.659686 | 91 | 0.543743 |
2b2d228cdbe510ab5762c904f305b18a49d1659d | 2,423 | py | Python | linux/lib/python2.7/dist-packages/blueman/plugins/applet/AuthAgent.py | nmercier/linux-cross-gcc | a5b0028fd2b72ec036a4725e93ba29d73cb753a6 | [
"BSD-3-Clause"
] | 3 | 2015-10-31T10:39:25.000Z | 2019-04-27T20:19:33.000Z | linux/lib/python2.7/dist-packages/blueman/plugins/applet/AuthAgent.py | nmercier/linux-cross-gcc | a5b0028fd2b72ec036a4725e93ba29d73cb753a6 | [
"BSD-3-Clause"
] | null | null | null | linux/lib/python2.7/dist-packages/blueman/plugins/applet/AuthAgent.py | nmercier/linux-cross-gcc | a5b0028fd2b72ec036a4725e93ba29d73cb753a6 | [
"BSD-3-Clause"
] | null | null | null | from blueman.Functions import *
from blueman.plugins.AppletPlugin import AppletPlugin
import blueman.main.applet.BluezAgent as BluezAgent
import blueman.bluez as Bluez
from gi.repository import GObject
from gi.repository import Gtk
class AuthAgent(AppletPlugin):
__description__ = _("Provides passkey, authenticat... | 32.306667 | 109 | 0.641766 |
0a30795db1ff0f82f16f32ac4ecabed4b6410033 | 1,738 | py | Python | admin_cli/utils.py | fireicewater/antdAdmin | a418a314df74dd5a0f91ffb26b16760a4aad9ebf | [
"Apache-2.0"
] | 1 | 2022-01-21T06:38:43.000Z | 2022-01-21T06:38:43.000Z | admin_cli/utils.py | fireicewater/antdAdmin | a418a314df74dd5a0f91ffb26b16760a4aad9ebf | [
"Apache-2.0"
] | null | null | null | admin_cli/utils.py | fireicewater/antdAdmin | a418a314df74dd5a0f91ffb26b16760a4aad9ebf | [
"Apache-2.0"
] | null | null | null | import os
import re
import sys
import django
from django.utils import translation
def init_django_env(project_name_settings):
pwd = os.path.dirname(os.path.realpath(__file__))
# 将项目目录加入setting
sys.path.append(pwd)
# manage.py中
os.environ.setdefault("DJANGO_SETTINGS_MODULE", f"{project_name_settin... | 21.725 | 79 | 0.620829 |
0f985ee16e6a8b660f128d79fe93bb60ea612032 | 4,666 | py | Python | nova/tests/unit/image/test_fake.py | zaina/nova | 181358c172d606b23c9cc14b58d677d911013c02 | [
"Apache-2.0"
] | 7 | 2015-09-22T11:27:16.000Z | 2015-11-02T12:33:46.000Z | nova/tests/unit/image/test_fake.py | zaina/nova | 181358c172d606b23c9cc14b58d677d911013c02 | [
"Apache-2.0"
] | 2 | 2015-09-07T22:14:46.000Z | 2020-08-12T08:51:56.000Z | nova/tests/unit/image/test_fake.py | zaina/nova | 181358c172d606b23c9cc14b58d677d911013c02 | [
"Apache-2.0"
] | 4 | 2015-09-09T16:48:56.000Z | 2022-03-15T20:52:57.000Z | # Copyright 2011 OpenStack Foundation
#
# 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 l... | 39.542373 | 78 | 0.575225 |
41de66130d854d632038ee90892a27e4fb1494cb | 5,280 | py | Python | Scripts/BunnyAnimation/rotation_animation1.py | WeakKnight/Falcor | 9c0306a3d0525902b042efd2581369141bb95339 | [
"BSD-3-Clause"
] | null | null | null | Scripts/BunnyAnimation/rotation_animation1.py | WeakKnight/Falcor | 9c0306a3d0525902b042efd2581369141bb95339 | [
"BSD-3-Clause"
] | null | null | null | Scripts/BunnyAnimation/rotation_animation1.py | WeakKnight/Falcor | 9c0306a3d0525902b042efd2581369141bb95339 | [
"BSD-3-Clause"
] | null | null | null | baseName = "frame1"
scenePath = "VPLMedia/bunny/Tutorial1.pyscene"
from falcor import *
photonPathCount = 25000000
perFramePathCount = 10000
def render_graph_vbnl(pPhotonPathCount, pPerFramePathCount):
g = RenderGraph('g')
loadRenderPassLibrary('SceneDebugger.dll')
loadRenderPassLibrary('BSDFViewer.dll')
... | 61.395349 | 342 | 0.771023 |
1735e22751d3831002d8cf2d03043d12fbaaf95b | 283 | py | Python | FusionIIIT/applications/central_mess/migrations/0013_merge_20200606_1159.py | sabhishekpratap5/sonarcubeTest2 | 9bd8105e457f6feb8c38fa94b335e54783fca99e | [
"bzip2-1.0.6"
] | 2 | 2020-06-17T11:59:08.000Z | 2020-07-10T12:17:35.000Z | FusionIIIT/applications/central_mess/migrations/0013_merge_20200606_1159.py | sabhishekpratap5/sonarcubeTest2 | 9bd8105e457f6feb8c38fa94b335e54783fca99e | [
"bzip2-1.0.6"
] | 19 | 2019-09-08T06:01:14.000Z | 2020-05-21T09:08:20.000Z | FusionIIIT/applications/central_mess/migrations/0013_merge_20200606_1159.py | sabhishekpratap5/sonarcubeTest2 | 9bd8105e457f6feb8c38fa94b335e54783fca99e | [
"bzip2-1.0.6"
] | 14 | 2019-08-31T12:25:42.000Z | 2022-01-12T08:05:33.000Z | # Generated by Django 3.0.6 on 2020-06-06 11:59
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('central_mess', '0012_auto_20200605_1951'),
('central_mess', '0004_auto_20200603_2137'),
]
operations = [
]
| 18.866667 | 52 | 0.660777 |
6672fde8e7495a4ec4e7096b26ff436efa777ab6 | 2,865 | py | Python | nova/tests/virt/vmwareapi/test_vim_util.py | bopopescu/nova-master | 58809056f3a219c6ea3667003f906eeaf581fa95 | [
"Apache-2.0"
] | 3 | 2015-06-01T18:32:50.000Z | 2015-11-05T01:07:01.000Z | nova/tests/virt/vmwareapi/test_vim_util.py | bopopescu/nova-master | 58809056f3a219c6ea3667003f906eeaf581fa95 | [
"Apache-2.0"
] | null | null | null | nova/tests/virt/vmwareapi/test_vim_util.py | bopopescu/nova-master | 58809056f3a219c6ea3667003f906eeaf581fa95 | [
"Apache-2.0"
] | 1 | 2020-07-24T06:01:37.000Z | 2020-07-24T06:01:37.000Z | # Copyright (c) 2013 VMware, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 39.791667 | 78 | 0.675393 |
5309b20972a809496471958acc2193a09b0ca035 | 2,456 | py | Python | doc/source/conf.py | SpamapS/gearhorn | c69dae8a751d1e461fda88fd53ddda453cfab91f | [
"Apache-2.0"
] | null | null | null | doc/source/conf.py | SpamapS/gearhorn | c69dae8a751d1e461fda88fd53ddda453cfab91f | [
"Apache-2.0"
] | null | null | null | doc/source/conf.py | SpamapS/gearhorn | c69dae8a751d1e461fda88fd53ddda453cfab91f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software... | 32.315789 | 79 | 0.696661 |
54d3b6ef98f5970133178dfc78438e944be7f4b9 | 7,208 | py | Python | multiagent/scenarios/multi_circular.py | AdityaKapoor74/multiagent-particle-envs | 01484668465609c14c2cc95432cb17305d9b2ef6 | [
"MIT"
] | null | null | null | multiagent/scenarios/multi_circular.py | AdityaKapoor74/multiagent-particle-envs | 01484668465609c14c2cc95432cb17305d9b2ef6 | [
"MIT"
] | null | null | null | multiagent/scenarios/multi_circular.py | AdityaKapoor74/multiagent-particle-envs | 01484668465609c14c2cc95432cb17305d9b2ef6 | [
"MIT"
] | null | null | null | import numpy as np
from multiagent.core import World, Agent, Landmark
from multiagent.scenario import BaseScenario
import webcolors
import math
class Scenario(BaseScenario):
def make_world(self):
world = World()
# set any world properties first
# world.dim_c = 2
self.num_agents = 8
self.num_landmarks = 8
... | 33.06422 | 233 | 0.685766 |
00f29ba181a8599a217eadb356e0b3361f02e4df | 3,550 | py | Python | plot_wheel_diagram.py | riquri/wheel-diagram | 30b4cd73edffb4f57cd5d9065fc8541badde5f12 | [
"MIT"
] | null | null | null | plot_wheel_diagram.py | riquri/wheel-diagram | 30b4cd73edffb4f57cd5d9065fc8541badde5f12 | [
"MIT"
] | null | null | null | plot_wheel_diagram.py | riquri/wheel-diagram | 30b4cd73edffb4f57cd5d9065fc8541badde5f12 | [
"MIT"
] | null | null | null | import sys
import math
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import matplotlib
import matplotlib.patheffects as PathEffects
import subprocess
matplotlib.font_manager._rebuild()
plt.rcParams["font.family"] = "Helvetica"
plt.rcParams["font.weight"] = "bold"
def wheel_diagram(seq):
... | 39.88764 | 206 | 0.614648 |
a25397ad0891c541c2e7970d5d8e8e4dc7f17c0e | 154 | py | Python | TITADOweb/web/urls.py | KomeilParseh/TITA-DO | 714685fa18bfd2ef07f5c0d656927039b05d7997 | [
"MIT"
] | 9 | 2020-08-27T10:10:11.000Z | 2021-04-21T04:46:15.000Z | TITADOweb/web/urls.py | mdk1384/TITA-DO-1 | 714685fa18bfd2ef07f5c0d656927039b05d7997 | [
"MIT"
] | 2 | 2020-08-27T12:09:57.000Z | 2021-01-05T09:29:19.000Z | TITADOweb/web/urls.py | mdk1384/TITA-DO-1 | 714685fa18bfd2ef07f5c0d656927039b05d7997 | [
"MIT"
] | 2 | 2020-08-27T10:10:18.000Z | 2021-01-01T06:20:20.000Z | from django.conf.urls import url
from django.urls import path
from .views import Todo
urlpatterns = [
url(r'^submitTodo/$', Todo, name='Todo'),
]
| 15.4 | 45 | 0.694805 |
94c780253723fd5131310dc163b93d35efaefee8 | 3,447 | py | Python | blockapi/api/terra_money.py | andrejkljucko/blockapi | 6ff08ebc237f305faede1817be360e50b5b72705 | [
"MIT"
] | null | null | null | blockapi/api/terra_money.py | andrejkljucko/blockapi | 6ff08ebc237f305faede1817be360e50b5b72705 | [
"MIT"
] | null | null | null | blockapi/api/terra_money.py | andrejkljucko/blockapi | 6ff08ebc237f305faede1817be360e50b5b72705 | [
"MIT"
] | null | null | null | from decimal import Decimal
from blockapi.services import BlockchainAPI
class TerraMoneyApi(BlockchainAPI):
"""
Terra Money
API docs: UNKNOWN
Explorer: https://fcd.terra.dev/
"""
symbol = 'LUNA'
base_url = 'https://fcd.terra.dev/v1'
rate_limit = 0.5
coef = Decimal(1e-6)
max_i... | 29.211864 | 79 | 0.531477 |
bb6a1969abe9463280cb26168933cf2a859d648a | 3,457 | py | Python | ideaseed/queyd.py | ewen-lbh/ideasprout | d4ea7df7d0a1d6ecd20d3bd0f8d0af2f9ab78c7a | [
"MIT"
] | null | null | null | ideaseed/queyd.py | ewen-lbh/ideasprout | d4ea7df7d0a1d6ecd20d3bd0f8d0af2f9ab78c7a | [
"MIT"
] | null | null | null | ideaseed/queyd.py | ewen-lbh/ideasprout | d4ea7df7d0a1d6ecd20d3bd0f8d0af2f9ab78c7a | [
"MIT"
] | null | null | null | import json
from pathlib import Path
from subprocess import call
from typing import Any, Callable, NamedTuple, Tuple
import requests
from requests.models import Response
from rich.prompt import InvalidResponse
from ideaseed import ui
from ideaseed.authentication import Cache, T
from ideaseed.ondisk import Idea
from i... | 31.427273 | 293 | 0.587504 |
4eeab16c7058aeb424bf8064be51da01786a0f51 | 2,116 | py | Python | scripts/site-sitemap.py | mpercy/mod_mbox | ce9f5707aca5b74cfc4216418df969498fcea27d | [
"Apache-2.0"
] | 1 | 2017-11-09T23:27:56.000Z | 2017-11-09T23:27:56.000Z | scripts/site-sitemap.py | mpercy/mod_mbox | ce9f5707aca5b74cfc4216418df969498fcea27d | [
"Apache-2.0"
] | null | null | null | scripts/site-sitemap.py | mpercy/mod_mbox | ce9f5707aca5b74cfc4216418df969498fcea27d | [
"Apache-2.0"
] | null | null | null | #!/usr/local/bin/python
import os
from os.path import join as pjoin
import sys
import subprocess
def get_output(cmd):
s = subprocess.Popen(cmd, stdout=subprocess.PIPE)
out = s.communicate()[0]
s.wait()
return out.strip()
# you could use os.path.walk to calculate this... or you could use du(1).
def du... | 27.480519 | 132 | 0.581285 |
84b728fe61b4397d5b83b13685fdca6b7e0fd67b | 4,432 | py | Python | deliravision/torch/models/gans/info/models.py | delira-dev/vision_torch | d944aa67d319bd63a2add5cb89e8308413943de6 | [
"BSD-2-Clause"
] | 4 | 2019-08-03T09:56:50.000Z | 2019-09-05T09:32:06.000Z | deliravision/torch/models/gans/info/models.py | delira-dev/vision_torch | d944aa67d319bd63a2add5cb89e8308413943de6 | [
"BSD-2-Clause"
] | 23 | 2019-08-03T14:16:47.000Z | 2019-10-22T10:15:10.000Z | deliravision/torch/models/gans/info/models.py | delira-dev/vision_torch | d944aa67d319bd63a2add5cb89e8308413943de6 | [
"BSD-2-Clause"
] | null | null | null | import torch
class Generator(torch.nn.Module):
"""
Simple Generator Network
"""
def __init__(self, latent_dim, n_classes, code_dim, img_size, num_channels):
"""
Parameters
----------
latent_dim : int
size of the latent dimension
n_classes : int
... | 31.211268 | 80 | 0.549639 |
2841b1741c7a11516f5ac73d4bc1eeeec407da4d | 9,465 | py | Python | algorithms/symmetry/absences/screw_axes.py | Anthchirp/dials | 211cf7646d6711769b86643b010cb2fe5aaf71b9 | [
"BSD-3-Clause"
] | null | null | null | algorithms/symmetry/absences/screw_axes.py | Anthchirp/dials | 211cf7646d6711769b86643b010cb2fe5aaf71b9 | [
"BSD-3-Clause"
] | 2 | 2020-07-31T22:37:30.000Z | 2020-07-31T23:08:55.000Z | algorithms/symmetry/absences/screw_axes.py | Anthchirp/dials | 211cf7646d6711769b86643b010cb2fe5aaf71b9 | [
"BSD-3-Clause"
] | null | null | null | """Definitions of screw axes with methods for scoring against data."""
from __future__ import absolute_import, division, print_function
import math
import logging
from scitbx.array_family import flex
from dials.algorithms.symmetry.absences.plots import plot_screw_axes
from dials.util.observer import Observer, Subject, ... | 34.046763 | 97 | 0.619123 |
4aeddd8486f249705fa1b32dac576a9ab3746140 | 407 | py | Python | backend/flat_wind_29352/wsgi.py | crowdbotics-apps/flat-wind-29352 | 313d3feaee0702f05e6ccb519acef99f1710ce3b | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/flat_wind_29352/wsgi.py | crowdbotics-apps/flat-wind-29352 | 313d3feaee0702f05e6ccb519acef99f1710ce3b | [
"FTL",
"AML",
"RSA-MD"
] | 46 | 2021-08-02T22:56:11.000Z | 2022-01-23T13:44:27.000Z | backend/flat_wind_29352/wsgi.py | crowdbotics-apps/flat-wind-29352 | 313d3feaee0702f05e6ccb519acef99f1710ce3b | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
WSGI config for flat_wind_29352 project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJAN... | 23.941176 | 78 | 0.793612 |
117db7f2112f525361be073f0fe7681634cb73d2 | 19,121 | py | Python | lib/GUI/Shortcuts.py | Connor22/hydrus | d0ae4a8898742a0d13601e1167d5ba697b31c395 | [
"WTFPL"
] | null | null | null | lib/GUI/Shortcuts.py | Connor22/hydrus | d0ae4a8898742a0d13601e1167d5ba697b31c395 | [
"WTFPL"
] | null | null | null | lib/GUI/Shortcuts.py | Connor22/hydrus | d0ae4a8898742a0d13601e1167d5ba697b31c395 | [
"WTFPL"
] | null | null | null | from . import ClientConstants as CC
from . import ClientData
from . import ClientGUICommon
from . import HydrusConstants as HC
from . import HydrusData
from . import HydrusGlobals as HG
from . import HydrusSerialisable
import wx
FLASHWIN_OK = False
if HC.PLATFORM_WINDOWS:
try:
import wx.lib.... | 28.243722 | 172 | 0.516919 |
52a60f2702208284fcac12ebcdc194a5b8fc7639 | 985 | py | Python | services/flaskr/geocoding/google_geocoder/google_geocoder.py | Tigenzero/clutch-code-project | 3921ee810f286884f9b3bf02e98c00b0e1159c4a | [
"MIT"
] | null | null | null | services/flaskr/geocoding/google_geocoder/google_geocoder.py | Tigenzero/clutch-code-project | 3921ee810f286884f9b3bf02e98c00b0e1159c4a | [
"MIT"
] | 1 | 2021-06-02T00:54:33.000Z | 2021-06-02T00:54:33.000Z | services/flaskr/geocoding/google_geocoder/google_geocoder.py | Tigenzero/clutch-code-project | 3921ee810f286884f9b3bf02e98c00b0e1159c4a | [
"MIT"
] | null | null | null | import googlemaps
from collections import deque
class GoogleGeocoder(object):
def __init__(self, api_key):
self.gmap = googlemaps.Client(key=api_key)
self.queue = deque()
def _get_geocoded_lat_long(self, address):
geocode_object = self.gmap.geocode(address)
return self._parse_... | 41.041667 | 119 | 0.705584 |
3cd45ef737cb1b1f2de3e43169be42bfea8e10d5 | 1,052 | py | Python | scripts/generate_lava.py | konsulko/meta-meson | 443aa3ce80bef09eb2f45dc070ee6b8e3cf38e89 | [
"MIT"
] | null | null | null | scripts/generate_lava.py | konsulko/meta-meson | 443aa3ce80bef09eb2f45dc070ee6b8e3cf38e89 | [
"MIT"
] | null | null | null | scripts/generate_lava.py | konsulko/meta-meson | 443aa3ce80bef09eb2f45dc070ee6b8e3cf38e89 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from jinja2 import Environment, FileSystemLoader
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--template")
parser.add_argument("--base-artifacts-url")
parser.add_argument("--device-type")
parser.add_argument("--kernel-image-name")
parser.add_argument("--dtb-name")
par... | 31.878788 | 87 | 0.770913 |
c86980de94b7931fa6af5747f97a095c8ac3412f | 1,080 | py | Python | xlsxwriter/test/comparison/test_rich_string08.py | Rippling/XlsxWriter-1 | be8d1cb8f8b156cf87bbe5d591f1f5475804be44 | [
"BSD-2-Clause"
] | null | null | null | xlsxwriter/test/comparison/test_rich_string08.py | Rippling/XlsxWriter-1 | be8d1cb8f8b156cf87bbe5d591f1f5475804be44 | [
"BSD-2-Clause"
] | null | null | null | xlsxwriter/test/comparison/test_rich_string08.py | Rippling/XlsxWriter-1 | be8d1cb8f8b156cf87bbe5d591f1f5475804be44 | [
"BSD-2-Clause"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c), 2013-2021, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparison_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompar... | 26.341463 | 79 | 0.606481 |
1a2589abea4d93dd888f98c498469d333d1be6f5 | 30,273 | py | Python | qiskit/visualization/circuit_visualization.py | meamy/qiskit-terra | 353918ba2c92b9d1fdda71d9a1d0262be6389c1f | [
"Apache-2.0"
] | 1 | 2021-07-11T18:17:38.000Z | 2021-07-11T18:17:38.000Z | qiskit/visualization/circuit_visualization.py | meamy/qiskit-terra | 353918ba2c92b9d1fdda71d9a1d0262be6389c1f | [
"Apache-2.0"
] | 35 | 2019-03-07T02:09:22.000Z | 2022-03-22T19:55:15.000Z | qiskit/visualization/circuit_visualization.py | meamy/qiskit-terra | 353918ba2c92b9d1fdda71d9a1d0262be6389c1f | [
"Apache-2.0"
] | 1 | 2020-10-31T09:26:39.000Z | 2020-10-31T09:26:39.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 44.782544 | 99 | 0.532256 |
234831a467040bf1125b69c84e216d95c118117e | 481 | py | Python | estrutura-repeticao-while/ex066.py | TacilioRodriguez/Python | 0b98dc8336e014046c579b387013b2871024e3d0 | [
"Unlicense"
] | null | null | null | estrutura-repeticao-while/ex066.py | TacilioRodriguez/Python | 0b98dc8336e014046c579b387013b2871024e3d0 | [
"Unlicense"
] | null | null | null | estrutura-repeticao-while/ex066.py | TacilioRodriguez/Python | 0b98dc8336e014046c579b387013b2871024e3d0 | [
"Unlicense"
] | null | null | null | """
Crie um programa que leia varios numeros inteiros pelo teclado. O programa só vai para quando o usuário digitar
o valor 999, que é a condição de parada. No final, mostre quantos numeros foram digitados e qual foi a soma entre eles,
desconsiderando a flag.
"""
cont = 0
soma = 0
dig = 0
while dig != 999:
dig = ... | 26.722222 | 119 | 0.677755 |
d5987e61fad8106876673d1b906e3c92aaf75147 | 449 | py | Python | solutions/713_subarray_product_less_than_k.py | YiqunPeng/leetcode_pro | 7e6376984f9baec49a5e827d98330fe3d1b656f0 | [
"MIT"
] | null | null | null | solutions/713_subarray_product_less_than_k.py | YiqunPeng/leetcode_pro | 7e6376984f9baec49a5e827d98330fe3d1b656f0 | [
"MIT"
] | null | null | null | solutions/713_subarray_product_less_than_k.py | YiqunPeng/leetcode_pro | 7e6376984f9baec49a5e827d98330fe3d1b656f0 | [
"MIT"
] | null | null | null | class Solution:
def numSubarrayProductLessThanK(self, nums: List[int], k: int) -> int:
"""Two pointers.
Running time: O(n) where n == len(nums).
"""
if k <= 1:
return 0
p = 1
i = 0
res = 0
for j in range(len(nums)):
p *= nums[j... | 23.631579 | 74 | 0.389755 |
e6e71eefeffd866db33c1fa179576bd5fd6a306c | 3,479 | py | Python | scripts/bigwig_helper.py | kundajelab/retina-models | bd458c65f5917f5dccb87f123e9be672472bd4b6 | [
"MIT"
] | null | null | null | scripts/bigwig_helper.py | kundajelab/retina-models | bd458c65f5917f5dccb87f123e9be672472bd4b6 | [
"MIT"
] | null | null | null | scripts/bigwig_helper.py | kundajelab/retina-models | bd458c65f5917f5dccb87f123e9be672472bd4b6 | [
"MIT"
] | null | null | null | import pyBigWig
import numpy as np
def read_chrom_sizes(fname):
with open(fname) as f:
gs = [x.strip().split('\t') for x in f]
gs = [(x[0], int(x[1])) for x in gs if len(x)==2]
return gs
def get_regions(regions_file, seqlen):
# regions file is assumed to be centered at summit (2nd + 10th col... | 33.776699 | 122 | 0.585513 |
9308fc317f6144814880379b3898d58bf8a2f9a4 | 3,747 | py | Python | brainscore/benchmarks/__init__.py | pmcgrath249/brain-score | 6e7d7288c2df44c1563499a7e4d81a2d509255e4 | [
"MIT"
] | 1 | 2020-12-17T14:51:01.000Z | 2020-12-17T14:51:01.000Z | brainscore/benchmarks/__init__.py | pmcgrath249/brain-score | 6e7d7288c2df44c1563499a7e4d81a2d509255e4 | [
"MIT"
] | 2 | 2021-07-30T11:30:17.000Z | 2021-11-15T09:29:10.000Z | brainscore/benchmarks/__init__.py | pmcgrath249/brain-score | 6e7d7288c2df44c1563499a7e4d81a2d509255e4 | [
"MIT"
] | 2 | 2020-02-11T12:50:48.000Z | 2021-06-22T09:51:08.000Z | from abc import ABC
from result_caching import cache, store
from brainscore.metrics import Score
from brainscore.utils import LazyLoad
class Benchmark(ABC):
def __call__(self, candidate):
raise NotImplementedError()
@property
def identifier(self):
raise NotImplementedError()
@prope... | 36.378641 | 104 | 0.711236 |
e8c59b856e183a55f71a54038e6f1b6909c1ce32 | 989 | py | Python | app/app/urls.py | hamidrezaorouji/recipe-app-api | 0500f4f59389fad63a13bc65800646cc980f58e6 | [
"MIT"
] | null | null | null | app/app/urls.py | hamidrezaorouji/recipe-app-api | 0500f4f59389fad63a13bc65800646cc980f58e6 | [
"MIT"
] | 10 | 2020-02-12T02:27:38.000Z | 2022-03-12T00:08:16.000Z | app/app/urls.py | hamidrezaorouji/recipe-app-api | 0500f4f59389fad63a13bc65800646cc980f58e6 | [
"MIT"
] | null | null | null | """app URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vie... | 36.62963 | 77 | 0.715875 |
51a2b38f89f1299e33d1eda09607f82c8ca231a9 | 7,612 | py | Python | autoPyTorch/pipeline/traditional_tabular_regression.py | franchuterivera/Auto-PyTorch | ff5c5c99e424a47b5cdb0e40ec68fbf33943e764 | [
"Apache-2.0"
] | 1 | 2021-05-12T10:11:58.000Z | 2021-05-12T10:11:58.000Z | autoPyTorch/pipeline/traditional_tabular_regression.py | franchuterivera/Auto-PyTorch | ff5c5c99e424a47b5cdb0e40ec68fbf33943e764 | [
"Apache-2.0"
] | 1 | 2021-06-23T21:48:03.000Z | 2021-06-23T21:48:03.000Z | autoPyTorch/pipeline/traditional_tabular_regression.py | franchuterivera/Auto-PyTorch | ff5c5c99e424a47b5cdb0e40ec68fbf33943e764 | [
"Apache-2.0"
] | null | null | null | import warnings
from typing import Any, Dict, List, Optional, Tuple, cast
from ConfigSpace.configuration_space import Configuration, ConfigurationSpace
import numpy as np
from sklearn.base import RegressorMixin
from autoPyTorch.pipeline.base_pipeline import BaseDatasetPropertiesType, BasePipeline, PipelineStepType
... | 40.489362 | 112 | 0.605623 |
7ccfa56cdf90168eda6c6a607e3dfe7fb9cc8fe2 | 5,899 | py | Python | tests/common/test_op/smooth_l1_loss_grad.py | KnowingNothing/akg-test | 114d8626b824b9a31af50a482afc07ab7121862b | [
"Apache-2.0"
] | 1 | 2020-08-31T02:43:43.000Z | 2020-08-31T02:43:43.000Z | tests/common/test_op/smooth_l1_loss_grad.py | KnowingNothing/akg-test | 114d8626b824b9a31af50a482afc07ab7121862b | [
"Apache-2.0"
] | null | null | null | tests/common/test_op/smooth_l1_loss_grad.py | KnowingNothing/akg-test | 114d8626b824b9a31af50a482afc07ab7121862b | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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... | 38.809211 | 138 | 0.659095 |
5945ec63798395d8fbbdf999eda58163d852d003 | 2,360 | py | Python | src/api/migrations/0002_application_sponsorship.py | kwanj-k/geoprotest_server | 4bc07c5c175f2de761895e299276422e61011146 | [
"MIT"
] | null | null | null | src/api/migrations/0002_application_sponsorship.py | kwanj-k/geoprotest_server | 4bc07c5c175f2de761895e299276422e61011146 | [
"MIT"
] | 5 | 2021-04-08T21:12:12.000Z | 2022-02-10T10:07:34.000Z | src/api/migrations/0002_application_sponsorship.py | kwanj-k/geoprotest_server | 4bc07c5c175f2de761895e299276422e61011146 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.9 on 2020-01-20 17:50
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.manager
class Migration(migrations.Migration):
dependencies = [
('api', '0001_initial'),
]
operations = [
mi... | 42.909091 | 150 | 0.577542 |
049dccf07038a619ab0b9ee395ea801e31d7f49b | 3,602 | py | Python | examples/main.py | mineshmathew/WordDetector | 37469d96e5003c3579ecbee1e90f5002b6b8c7f6 | [
"MIT"
] | null | null | null | examples/main.py | mineshmathew/WordDetector | 37469d96e5003c3579ecbee1e90f5002b6b8c7f6 | [
"MIT"
] | null | null | null | examples/main.py | mineshmathew/WordDetector | 37469d96e5003c3579ecbee1e90f5002b6b8c7f6 | [
"MIT"
] | null | null | null | import argparse
from typing import List
import cv2
import matplotlib.pyplot as plt
from path import Path
from word_detector import detect, prepare_img, sort_multiline
def get_img_files(data_dir: Path) -> List[Path]:
"""Return all image files contained in a folder."""
res = []
for ext in ['*.png', '*.jpg... | 33.351852 | 107 | 0.549417 |
875cfc71b7b73fe02289dcb5ec76d1930a17f3be | 1,640 | py | Python | flunt/notifications/notifiable.py | alexiusstrauss/PyFlunt | 8ef79181c0ad053bfee7690da2ed91c1b2d6c390 | [
"MIT"
] | null | null | null | flunt/notifications/notifiable.py | alexiusstrauss/PyFlunt | 8ef79181c0ad053bfee7690da2ed91c1b2d6c390 | [
"MIT"
] | 1 | 2021-12-08T13:59:32.000Z | 2021-12-08T13:59:32.000Z | flunt/notifications/notifiable.py | alexiusstrauss/PyFlunt | 8ef79181c0ad053bfee7690da2ed91c1b2d6c390 | [
"MIT"
] | null | null | null | """Module Notifiable."""
from flunt.notifications.notification import Notification
class Notifiable(Notification):
"""Class Notifiable."""
def __init__(self) -> None:
"""Found 'Constructor'."""
self._notifications: list = []
def add_notification(self, notification: Notification):
... | 27.79661 | 78 | 0.629878 |
48f0eda75c0481e5d6735b64c984c6ce26e6c7a8 | 18,223 | py | Python | zappa/utilities.py | dharmeshspatel4u/Zappa | f3e0e823f6aa5bd21e590e39b96ac592c1f064d1 | [
"MIT"
] | null | null | null | zappa/utilities.py | dharmeshspatel4u/Zappa | f3e0e823f6aa5bd21e590e39b96ac592c1f064d1 | [
"MIT"
] | 2 | 2019-03-27T05:51:03.000Z | 2019-06-05T08:27:04.000Z | zappa/utilities.py | dharmeshspatel4u/Zappa | f3e0e823f6aa5bd21e590e39b96ac592c1f064d1 | [
"MIT"
] | 1 | 2019-11-20T05:52:47.000Z | 2019-11-20T05:52:47.000Z | import botocore
import calendar
import datetime
import durationpy
import fnmatch
import io
import json
import logging
import os
import re
import shutil
import stat
import sys
from past.builtins import basestring
if sys.version_info[0] < 3:
from urlparse import urlparse
else:
from urllib.parse import urlparse
... | 32.253097 | 143 | 0.598913 |
569d686ac9714004429c2077788f864bcdb8d7ed | 2,982 | py | Python | challs/ctf_sync.py | iver-ics/iver-ctf-2021 | 5db451ff5d587b1df1ec213a297b273e36237fc9 | [
"MIT"
] | null | null | null | challs/ctf_sync.py | iver-ics/iver-ctf-2021 | 5db451ff5d587b1df1ec213a297b273e36237fc9 | [
"MIT"
] | null | null | null | challs/ctf_sync.py | iver-ics/iver-ctf-2021 | 5db451ff5d587b1df1ec213a297b273e36237fc9 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""CTF challenges synchronizer
This script publishes or updates the challenges to CTFd, based on the
configurations from `challenge.yml` in each challenge's directory, together
with any pre-built files that should be download'able.
This script is written and maintained by Iver.
"""
import argpars... | 26.864865 | 98 | 0.636486 |
1462f4215d74a529b68a4acef0c6c5ddadbc5286 | 19,927 | py | Python | python/services/bigquery/routine.py | trodge/declarative-resource-client-library | 2cb7718a5074776b3113cc18a7483b54022238f3 | [
"Apache-2.0"
] | null | null | null | python/services/bigquery/routine.py | trodge/declarative-resource-client-library | 2cb7718a5074776b3113cc18a7483b54022238f3 | [
"Apache-2.0"
] | null | null | null | python/services/bigquery/routine.py | trodge/declarative-resource-client-library | 2cb7718a5074776b3113cc18a7483b54022238f3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 35.969314 | 88 | 0.673107 |
e2f86c09794f9a75036150e2e33cbb6bc6bc911d | 23,538 | py | Python | src/azure-cli/azure/cli/command_modules/appconfig/_help.py | dlijah/azure-cli | 06c71648030d11fe2a46121519bced5712be99be | [
"MIT"
] | 1 | 2020-10-06T18:34:24.000Z | 2020-10-06T18:34:24.000Z | src/azure-cli/azure/cli/command_modules/appconfig/_help.py | dlijah/azure-cli | 06c71648030d11fe2a46121519bced5712be99be | [
"MIT"
] | 1 | 2020-08-04T14:17:13.000Z | 2020-08-04T14:17:13.000Z | src/azure-cli/azure/cli/command_modules/appconfig/_help.py | hackathon-cli-recommendation/azure-cli | b9df3c9cfd400627912e5751bb6dcd429670b2c7 | [
"MIT"
] | null | null | null | # 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.
# -----------------------------------------------------... | 52.540179 | 258 | 0.720919 |
da02df618e1047600a1e6d3cc10b54e19ca250ab | 3,717 | py | Python | pytrol/control/agent/HPLEstimator.py | mothguib/pytrol | 1b9634fb97e77407b4c609399c27663396a8d7e3 | [
"MIT"
] | null | null | null | pytrol/control/agent/HPLEstimator.py | mothguib/pytrol | 1b9634fb97e77407b4c609399c27663396a8d7e3 | [
"MIT"
] | null | null | null | pytrol/control/agent/HPLEstimator.py | mothguib/pytrol | 1b9634fb97e77407b4c609399c27663396a8d7e3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
import torch
import pytrol.util.argsparser as parser
from pytrol.control.agent.HPAgent import HPAgent
from pytrol.control.agent.MAPTrainerModelAgent import MAPTrainerModelAgent
from pytrol.model.knowledge.EnvironmentKnowledge import EnvironmentKnowledge
from pytrol.util.net.... | 35.4 | 78 | 0.503094 |
e3e88d30a3c832b9f01d22de0fbaf5d2fc4acc6e | 1,331 | py | Python | cybox/test/objects/obj_metadata_test.py | Mattlk13/python-cybox | ee82c7da40ca4638e3ca8d70766150c0dace1b55 | [
"BSD-3-Clause"
] | 40 | 2015-03-05T18:22:51.000Z | 2022-03-06T07:29:25.000Z | cybox/test/objects/obj_metadata_test.py | Mattlk13/python-cybox | ee82c7da40ca4638e3ca8d70766150c0dace1b55 | [
"BSD-3-Clause"
] | 106 | 2015-01-12T18:52:20.000Z | 2021-04-25T22:57:52.000Z | cybox/test/objects/obj_metadata_test.py | Mattlk13/python-cybox | ee82c7da40ca4638e3ca8d70766150c0dace1b55 | [
"BSD-3-Clause"
] | 30 | 2015-03-25T07:24:40.000Z | 2021-07-23T17:10:11.000Z | # Copyright (c) 2017, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
import unittest
from cybox.objects import _ObjectMetadata, UnknownObjectType
class ObjectTypeTest(unittest.TestCase):
def setUp(self):
obj_list = [
("!!MissingAPIClass", None, None, None,... | 31.690476 | 77 | 0.595793 |
f270009828b45836f4bb33e0583ec3a144774933 | 1,168 | py | Python | __init__.py | rborstgithub/l10n_gt_extra | 12cec30cddd4e7e5fdc8caaffc001ba21e73f2ec | [
"MIT"
] | null | null | null | __init__.py | rborstgithub/l10n_gt_extra | 12cec30cddd4e7e5fdc8caaffc001ba21e73f2ec | [
"MIT"
] | 2 | 2020-11-04T14:48:18.000Z | 2021-04-13T15:59:54.000Z | __init__.py | rborstgithub/l10n_gt_extra | 12cec30cddd4e7e5fdc8caaffc001ba21e73f2ec | [
"MIT"
] | 17 | 2017-12-11T17:36:01.000Z | 2022-03-30T03:56:06.000Z | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2009-2012 Soluciones Tecnologócias Prisma S.A. All Rights Reserved.
# José Rodrigo Fernández Menegazzo, Soluciones Tecnologócias Prisma S.A.
# (http://www.solucionesprisma.com)
#
# This prog... | 41.714286 | 84 | 0.645548 |
a34a23ec56a28899614d9528243f3e0db1c9b0c8 | 7,675 | py | Python | bitbots_live_tool_rqt/scripts/test_node.py | bit-bots/bitbots_misc | b6dd979bd4f0dc0019d9ff1b52510d9cb32bc284 | [
"MIT"
] | null | null | null | bitbots_live_tool_rqt/scripts/test_node.py | bit-bots/bitbots_misc | b6dd979bd4f0dc0019d9ff1b52510d9cb32bc284 | [
"MIT"
] | 57 | 2019-03-02T10:59:05.000Z | 2021-12-09T18:57:34.000Z | bitbots_live_tool_rqt/scripts/test_node.py | bit-bots/bitbots_misc | b6dd979bd4f0dc0019d9ff1b52510d9cb32bc284 | [
"MIT"
] | 1 | 2019-07-28T11:26:47.000Z | 2019-07-28T11:26:47.000Z | #!/usr/bin/env python3
import rospy
from std_msgs.msg import Header
from humanoid_league_msgs.msg import BallRelative, ObstacleRelativeArray, ObstacleRelative, Strategy, GameState, RobotControlState
from geometry_msgs.msg import Point, PoseWithCovarianceStamped, Pose2D
import math
import yaml
import rospkg
import os... | 29.633205 | 131 | 0.643127 |
a1e6756783f193ffd7adc8bf89112786f02239e0 | 27,177 | py | Python | src/engine/SCons/UtilTests.py | azverkan/scons | 704ddb9270e14c7771d0c58c04c7afa7bc009603 | [
"MIT"
] | 1 | 2015-11-04T22:22:10.000Z | 2015-11-04T22:22:10.000Z | src/engine/SCons/UtilTests.py | azverkan/scons | 704ddb9270e14c7771d0c58c04c7afa7bc009603 | [
"MIT"
] | null | null | null | src/engine/SCons/UtilTests.py | azverkan/scons | 704ddb9270e14c7771d0c58c04c7afa7bc009603 | [
"MIT"
] | null | null | null | #
# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicen... | 33.97125 | 129 | 0.534202 |
d2b22c7a4c2e3909dbc2895f29ce01add87606ce | 134,197 | py | Python | pandas/tests/plotting/test_frame.py | Ethanator/pandas | 229722e6a24b9658a27fc06b617701ad02aaa435 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2020-10-08T00:29:41.000Z | 2020-10-08T00:29:41.000Z | pandas/tests/plotting/test_frame.py | Ethanator/pandas | 229722e6a24b9658a27fc06b617701ad02aaa435 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/tests/plotting/test_frame.py | Ethanator/pandas | 229722e6a24b9658a27fc06b617701ad02aaa435 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | """ Test cases for DataFrame.plot """
from datetime import date, datetime
import itertools
import string
import warnings
import numpy as np
from numpy.random import rand, randn
import pytest
import pandas.util._test_decorators as td
from pandas.core.dtypes.api import is_list_like
import pandas as pd
from pandas im... | 38.83015 | 88 | 0.566749 |
46428abf5eaf0aee9b7ec2c3cb2fef41a8d23b43 | 7,697 | py | Python | beartype/_util/hint/pep/proposal/pep484585/utilpepfunc.py | vcokltfre/beartype | 9a1f81bea37a0eb4f51443dded8cec2e751e42a8 | [
"MIT"
] | null | null | null | beartype/_util/hint/pep/proposal/pep484585/utilpepfunc.py | vcokltfre/beartype | 9a1f81bea37a0eb4f51443dded8cec2e751e42a8 | [
"MIT"
] | null | null | null | beartype/_util/hint/pep/proposal/pep484585/utilpepfunc.py | vcokltfre/beartype | 9a1f81bea37a0eb4f51443dded8cec2e751e42a8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright (c) 2014-2021 Beartype authors.
# See "LICENSE" for further details.
'''
Project-wide :pep:`484`- and :pep:`585`-compliant **decorated callable type
hint utilities** (i.e., callables generically applicabl... | 41.38172 | 79 | 0.647655 |
5d7a58a62ebb1847820a05f978db56aae334076d | 432 | py | Python | zconnect/util/exceptions/api.py | zconnect-iot/zconnect-django | 5c569f54f100e23d72e2ac4de795739ea461a431 | [
"MIT"
] | 2 | 2018-08-19T16:16:39.000Z | 2019-06-11T02:23:50.000Z | zconnect/util/exceptions/api.py | zconnect-iot/zconnect-django | 5c569f54f100e23d72e2ac4de795739ea461a431 | [
"MIT"
] | 2 | 2018-07-05T09:51:54.000Z | 2018-07-06T13:12:04.000Z | zconnect/util/exceptions/api.py | zconnect-iot/zconnect-django | 5c569f54f100e23d72e2ac4de795739ea461a431 | [
"MIT"
] | null | null | null | from django.utils.translation import ugettext_lazy as _
from rest_framework import exceptions, status
class BadRequestError(exceptions.APIException):
"""This is the same as the rest_framework.ValidationError, but for some
reason that returns a list rather than a dict, which we want to use
normally"""
... | 36 | 75 | 0.766204 |
e713383c90e7630975cb05368f5e60a2e460e0e0 | 11,342 | py | Python | api/serializers.py | hotosm/hot-exports-two | d60530445e89b2a46bd55ea3b7c2e72409b0f493 | [
"BSD-3-Clause"
] | 95 | 2017-09-29T13:20:38.000Z | 2022-03-14T06:43:47.000Z | api/serializers.py | hotosm/hot-exports-two | d60530445e89b2a46bd55ea3b7c2e72409b0f493 | [
"BSD-3-Clause"
] | 229 | 2015-07-29T08:50:27.000Z | 2017-09-21T18:05:56.000Z | api/serializers.py | hotosm/hot-exports-two | d60530445e89b2a46bd55ea3b7c2e72409b0f493 | [
"BSD-3-Clause"
] | 30 | 2017-10-06T23:53:48.000Z | 2022-03-10T06:17:07.000Z | """
Provides serialization for API responses.
See `DRF serializer documentation <http://www.django-rest-framework.org/api-guide/serializers/>`_
Used by the View classes api/views.py to serialize API responses as JSON or HTML.
See DEFAULT_RENDERER_CLASSES setting in core.settings.contrib for the enabled renderers.
"""... | 37.93311 | 120 | 0.62608 |
73e79e34b76061568863171e1d94a7587a931977 | 2,996 | py | Python | src/getargs.py | bmoxon/azfinsim | 3e203855410abd6c9636377b93ed5d33ac896c41 | [
"MIT"
] | 5 | 2021-02-24T19:10:34.000Z | 2022-02-24T21:11:24.000Z | src/getargs.py | bmoxon/azfinsim | 3e203855410abd6c9636377b93ed5d33ac896c41 | [
"MIT"
] | null | null | null | src/getargs.py | bmoxon/azfinsim | 3e203855410abd6c9636377b93ed5d33ac896c41 | [
"MIT"
] | 2 | 2021-05-03T11:57:31.000Z | 2021-12-09T10:24:29.000Z | #! /usr/bin/env python3
# Common arg parser
import argparse
def getargs(progname):
parser = argparse.ArgumentParser(progname)
#-- Batch parameters
parser.add_argument("-p","--pool-id", help="<name of the azure batch pool to submit the job to>")
parser.add_argument("-j","--job-id", default="AzFinSim... | 61.142857 | 143 | 0.678238 |
63e0a025ca9432dd8c70bd28ba63750a56c5a98a | 400 | py | Python | fdk_client/platform/models/SubscriptionConfigResponse.py | kavish-d/fdk-client-python | a1023eb530473322cb52e095fc4ceb226c1e6037 | [
"MIT"
] | null | null | null | fdk_client/platform/models/SubscriptionConfigResponse.py | kavish-d/fdk-client-python | a1023eb530473322cb52e095fc4ceb226c1e6037 | [
"MIT"
] | null | null | null | fdk_client/platform/models/SubscriptionConfigResponse.py | kavish-d/fdk-client-python | a1023eb530473322cb52e095fc4ceb226c1e6037 | [
"MIT"
] | null | null | null | """Platform Models."""
from marshmallow import fields, Schema
from marshmallow.validate import OneOf
from ..enums import *
from ..models.BaseSchema import BaseSchema
class SubscriptionConfigResponse(BaseSchema):
# Payment swagger.json
config = fields.Dict(required=False)
success = fields... | 15.384615 | 45 | 0.7125 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.