hexsha string | size int64 | ext string | lang string | max_stars_repo_path string | max_stars_repo_name string | max_stars_repo_head_hexsha string | max_stars_repo_licenses list | max_stars_count int64 | max_stars_repo_stars_event_min_datetime string | max_stars_repo_stars_event_max_datetime string | max_issues_repo_path string | max_issues_repo_name string | max_issues_repo_head_hexsha string | max_issues_repo_licenses list | max_issues_count int64 | max_issues_repo_issues_event_min_datetime string | max_issues_repo_issues_event_max_datetime string | max_forks_repo_path string | max_forks_repo_name string | max_forks_repo_head_hexsha string | max_forks_repo_licenses list | max_forks_count int64 | max_forks_repo_forks_event_min_datetime string | max_forks_repo_forks_event_max_datetime string | content string | avg_line_length float64 | max_line_length int64 | alphanum_fraction float64 | qsc_code_num_words_quality_signal int64 | qsc_code_num_chars_quality_signal float64 | qsc_code_mean_word_length_quality_signal float64 | qsc_code_frac_words_unique_quality_signal float64 | qsc_code_frac_chars_top_2grams_quality_signal float64 | qsc_code_frac_chars_top_3grams_quality_signal float64 | qsc_code_frac_chars_top_4grams_quality_signal float64 | qsc_code_frac_chars_dupe_5grams_quality_signal float64 | qsc_code_frac_chars_dupe_6grams_quality_signal float64 | qsc_code_frac_chars_dupe_7grams_quality_signal float64 | qsc_code_frac_chars_dupe_8grams_quality_signal float64 | qsc_code_frac_chars_dupe_9grams_quality_signal float64 | qsc_code_frac_chars_dupe_10grams_quality_signal float64 | qsc_code_frac_chars_replacement_symbols_quality_signal float64 | qsc_code_frac_chars_digital_quality_signal float64 | qsc_code_frac_chars_whitespace_quality_signal float64 | qsc_code_size_file_byte_quality_signal float64 | qsc_code_num_lines_quality_signal float64 | qsc_code_num_chars_line_max_quality_signal float64 | qsc_code_num_chars_line_mean_quality_signal float64 | qsc_code_frac_chars_alphabet_quality_signal float64 | qsc_code_frac_chars_comments_quality_signal float64 | qsc_code_cate_xml_start_quality_signal float64 | qsc_code_frac_lines_dupe_lines_quality_signal float64 | qsc_code_cate_autogen_quality_signal float64 | qsc_code_frac_lines_long_string_quality_signal float64 | qsc_code_frac_chars_string_length_quality_signal float64 | qsc_code_frac_chars_long_word_length_quality_signal float64 | qsc_code_frac_lines_string_concat_quality_signal float64 | qsc_code_cate_encoded_data_quality_signal float64 | qsc_code_frac_chars_hex_words_quality_signal float64 | qsc_code_frac_lines_prompt_comments_quality_signal float64 | qsc_code_frac_lines_assert_quality_signal float64 | qsc_codepython_cate_ast_quality_signal float64 | qsc_codepython_frac_lines_func_ratio_quality_signal float64 | qsc_codepython_cate_var_zero_quality_signal bool | qsc_codepython_frac_lines_pass_quality_signal float64 | qsc_codepython_frac_lines_import_quality_signal float64 | qsc_codepython_frac_lines_simplefunc_quality_signal float64 | qsc_codepython_score_lines_no_logic_quality_signal float64 | qsc_codepython_frac_lines_print_quality_signal float64 | qsc_code_num_words int64 | qsc_code_num_chars int64 | qsc_code_mean_word_length int64 | qsc_code_frac_words_unique null | qsc_code_frac_chars_top_2grams int64 | qsc_code_frac_chars_top_3grams int64 | qsc_code_frac_chars_top_4grams int64 | qsc_code_frac_chars_dupe_5grams int64 | qsc_code_frac_chars_dupe_6grams int64 | qsc_code_frac_chars_dupe_7grams int64 | qsc_code_frac_chars_dupe_8grams int64 | qsc_code_frac_chars_dupe_9grams int64 | qsc_code_frac_chars_dupe_10grams int64 | qsc_code_frac_chars_replacement_symbols int64 | qsc_code_frac_chars_digital int64 | qsc_code_frac_chars_whitespace int64 | qsc_code_size_file_byte int64 | qsc_code_num_lines int64 | qsc_code_num_chars_line_max int64 | qsc_code_num_chars_line_mean int64 | qsc_code_frac_chars_alphabet int64 | qsc_code_frac_chars_comments int64 | qsc_code_cate_xml_start int64 | qsc_code_frac_lines_dupe_lines int64 | qsc_code_cate_autogen int64 | qsc_code_frac_lines_long_string int64 | qsc_code_frac_chars_string_length int64 | qsc_code_frac_chars_long_word_length int64 | qsc_code_frac_lines_string_concat null | qsc_code_cate_encoded_data int64 | qsc_code_frac_chars_hex_words int64 | qsc_code_frac_lines_prompt_comments int64 | qsc_code_frac_lines_assert int64 | qsc_codepython_cate_ast int64 | qsc_codepython_frac_lines_func_ratio int64 | qsc_codepython_cate_var_zero int64 | qsc_codepython_frac_lines_pass int64 | qsc_codepython_frac_lines_import int64 | qsc_codepython_frac_lines_simplefunc int64 | qsc_codepython_score_lines_no_logic int64 | qsc_codepython_frac_lines_print int64 | effective string | hits int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d47604d4e7930e1d2892cd39aa8cb069f27e3a0a | 174 | py | Python | src/pybel/io/hetionet/__init__.py | cthoyt/pybel | ed66f013a77f9cbc513892b0dad1025b8f68bb46 | [
"Apache-2.0"
] | null | null | null | src/pybel/io/hetionet/__init__.py | cthoyt/pybel | ed66f013a77f9cbc513892b0dad1025b8f68bb46 | [
"Apache-2.0"
] | 11 | 2017-12-28T08:03:14.000Z | 2019-01-15T02:13:58.000Z | src/pybel/io/hetionet/__init__.py | cthoyt/pybel | ed66f013a77f9cbc513892b0dad1025b8f68bb46 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Importer for Hetionet JSON."""
from .hetionet import (
from_hetionet_file,
from_hetionet_gz,
from_hetionet_json,
get_hetionet,
)
| 15.818182 | 33 | 0.66092 | 21 | 174 | 5.142857 | 0.571429 | 0.444444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007246 | 0.206897 | 174 | 10 | 34 | 17.4 | 0.775362 | 0.287356 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.166667 | 0 | 0.166667 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2e0182eee4a733e7fc6415cc681880f7a31053c9 | 1,683 | py | Python | dqn/snake.py | kkatrio/ai-snake | 073350f02bf82c168ed2cbe59a3cc15e935db97b | [
"MIT"
] | null | null | null | dqn/snake.py | kkatrio/ai-snake | 073350f02bf82c168ed2cbe59a3cc15e935db97b | [
"MIT"
] | null | null | null | dqn/snake.py | kkatrio/ai-snake | 073350f02bf82c168ed2cbe59a3cc15e935db97b | [
"MIT"
] | null | null | null | from collections import deque
class Directions():
NORTH = 0
WEST = 1
SOUTH = 2
EAST = 3
class Snake():
def __init__(self, head_starting_position):
self.head_i, self.head_j = head_starting_position
self.stack = deque()
# initialize head
self.stack.append(head_starting_position)
def _update_head_position(self, direction):
# j is the second index in the array state -> move horizontally
# i is the first -> move vertically
if direction == Directions.NORTH:
self.head_i -= 1
if direction == Directions.WEST:
self.head_j -= 1
if direction == Directions.SOUTH:
self.head_i += 1
if direction == Directions.EAST:
self.head_j += 1
def move_head(self, direction):
# calculates the new head position, appends it, returns the new
self._update_head_position(direction)
#print("new head_i, head_j: ", self.head_i, self.head_j)
self.stack.append((self.head_i, self.head_j))
return (self.head_i, self.head_j)
def append_body(self, body_position):
self.stack.appendleft(body_position)
def erase_tail(self):
self.stack.popleft()
def lies_on_position(self, position):
return True if position in self.stack else False
@property
def head(self):
# returns the position(index) of the top of the stack
# it must always be > 0
return self.stack[-1]
@property
def tail(self):
#print('property returns tail', self.stack[0])
return self.stack[0]
@property
def size(self):
return len(self.stack)
| 29.017241 | 71 | 0.622103 | 224 | 1,683 | 4.508929 | 0.290179 | 0.10297 | 0.053465 | 0.051485 | 0.132673 | 0.132673 | 0.061386 | 0 | 0 | 0 | 0 | 0.009975 | 0.285205 | 1,683 | 57 | 72 | 29.526316 | 0.829593 | 0.206179 | 0 | 0.076923 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.230769 | false | 0 | 0.025641 | 0.102564 | 0.538462 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
2e347676eebf2229f6b093dde13b8eb2f8de4004 | 2,037 | py | Python | packages/pytiger2c/ast/binaryoperatornode.py | yasserglez/pytiger2c | 35c44d14775bf69ed6689b708b98d6d1ca533ba0 | [
"MIT"
] | 2 | 2015-11-16T11:50:24.000Z | 2017-09-27T23:18:16.000Z | packages/pytiger2c/ast/binaryoperatornode.py | yasserglez/pytiger2c | 35c44d14775bf69ed6689b708b98d6d1ca533ba0 | [
"MIT"
] | null | null | null | packages/pytiger2c/ast/binaryoperatornode.py | yasserglez/pytiger2c | 35c44d14775bf69ed6689b708b98d6d1ca533ba0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Clase C{BinaryOperatorNode} del árbol de sintáxis abstracta.
"""
from pytiger2c.ast.operatornode import OperatorNode
class BinaryOperatorNode(OperatorNode):
"""
Clase C{BinaryOperatorNode} del árbol de sintáxis abstracta.
Representa la clase base para los operadores que se realizan
entre dos expresiones. De esta clase heredan los operadores
aritméticos y lógicos.
"""
def _get_left(self):
"""
Método para obtener el valor de la propiedad C{left}.
"""
return self._left
left = property(_get_left)
def _get_right(self):
"""
Método para obtener el valor de la propiedad C{right}.
"""
return self._right
right = property(_get_right)
def __init__(self, left, right):
"""
Inicializa la clase C{BinaryOperatorNode}.
@type left: C{LanguageNode}
@param left: Nodo del árbol de sintáxis abstracta correspondiente
a la expresión a la izquierda del operador.
@type right: C{LanguageNode}
@param right: Nodo del árbol de sintáxis abstracta correspondiente
a la expresión a la derecha del operador.
"""
super(BinaryOperatorNode, self).__init__()
self._left = left
self._right = right
def generate_dot(self, generator):
"""
Genera un grafo en formato Graphviz DOT correspondiente al árbol de
sintáxis abstracta del programa Tiger del cual este nodo es raíz.
Para obtener información acerca de los parámetros recibidos por
este método consulte la documentación del método C{generate_dot}
de la clase C{LanguageNode}.
"""
me = generator.add_node(str(self.__class__.__name__))
left = self.left.generate_dot(generator)
right = self.right.generate_dot(generator)
generator.add_edge(me, left)
generator.add_edge(me, right)
return me
| 30.863636 | 76 | 0.632302 | 237 | 2,037 | 5.28692 | 0.371308 | 0.027933 | 0.059856 | 0.09577 | 0.24581 | 0.24581 | 0.24581 | 0.24581 | 0.164405 | 0.164405 | 0 | 0.001395 | 0.296024 | 2,037 | 65 | 77 | 31.338462 | 0.872385 | 0.505155 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.046154 | 0 | 1 | 0.210526 | false | 0 | 0.052632 | 0 | 0.578947 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
2e4d4b680edae8c11b3899e46dc871e5d4dbed96 | 1,688 | py | Python | djotes/rest/views.py | lily-seabreeze/djotes | 5706413a3dbbc3cfbf4e15eb7dc514712c0cb4de | [
"MIT"
] | null | null | null | djotes/rest/views.py | lily-seabreeze/djotes | 5706413a3dbbc3cfbf4e15eb7dc514712c0cb4de | [
"MIT"
] | 2 | 2016-08-23T05:30:29.000Z | 2016-08-24T20:10:23.000Z | djotes/rest/views.py | lily-seabreeze/djotes | 5706413a3dbbc3cfbf4e15eb7dc514712c0cb4de | [
"MIT"
] | null | null | null | from django.contrib.auth.models import User
from rest_framework import permissions
from rest_framework import renderers
from rest_framework import viewsets
from rest_framework.decorators import detail_route
from rest_framework.response import Response
from djotes.rest.models import Note
from djotes.rest.permissions import IsOwner
from djotes.rest.serializers import NoteSerializer, UserSerializer
class NoteViewSet(viewsets.ModelViewSet):
"""This endpoint presents notes.
The owner of the note may update or delete existing notes,
or create a new one.
"""
#queryset = Note.objects.all()
serializer_class = NoteSerializer
permission_classes = (permissions.IsAuthenticated, IsOwner,)
def perform_create(self, serializer):
serializer.save(owner=self.request.user)
def get_queryset(self):
user = self.request.user
return Note.objects.filter(owner=user)
# should just be for only a user in the system,
# create new user, get user info, update user info
#
# use modelview not modelviewset...?
class UserViewSet(viewsets.ModelViewSet):
"""This endpoint presents the users in the system.
This is mainly for creating new users (anonymously)
and performing
Notes belonging to a user are serialized using
hyperlinked representation.
"""
queryset = User.objects.all()
serializer_class = UserSerializer
# TODO: permissions IsMatchUsername
def get_queryset(self):
user = self.request.user
# if admin get all else get only the user
if isadmin...
return User.objects.all()
else:
return User.objects.filter(username=user.username)
| 28.610169 | 66 | 0.729858 | 211 | 1,688 | 5.781991 | 0.421801 | 0.032787 | 0.069672 | 0.056557 | 0.12623 | 0.060656 | 0.060656 | 0.060656 | 0 | 0 | 0 | 0 | 0.203199 | 1,688 | 58 | 67 | 29.103448 | 0.907063 | 0.138033 | 0 | 0.153846 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.017241 | 0 | 0 | null | null | 0 | 0.346154 | null | null | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
2e7053c9aff2b4673e9808787997572628d56c82 | 286 | py | Python | cloudbio/deploy/tools.py | afgane/cloudbiolinux | 34505624fa271e9b8ff8a6ab7a08f840e41747ce | [
"MIT"
] | 1 | 2015-06-19T14:34:43.000Z | 2015-06-19T14:34:43.000Z | cloudbio/deploy/tools.py | afgane/cloudbiolinux | 34505624fa271e9b8ff8a6ab7a08f840e41747ce | [
"MIT"
] | null | null | null | cloudbio/deploy/tools.py | afgane/cloudbiolinux | 34505624fa271e9b8ff8a6ab7a08f840e41747ce | [
"MIT"
] | null | null | null | """
"""
from fabric.api import env
from cloudbio.galaxy.tools import _install_tools
def purge_tools():
env.safe_sudo("rm -rf %s" % env.install_dir)
def install_tools(tools_conf):
"""Deploy a Galaxy server along with some tools.
"""
_install_tools(env, tools_conf)
| 16.823529 | 52 | 0.699301 | 42 | 286 | 4.52381 | 0.571429 | 0.189474 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.181818 | 286 | 16 | 53 | 17.875 | 0.811966 | 0.157343 | 0 | 0 | 0 | 0 | 0.040359 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
2e80141a0f63ad2ec3b66257c678aaccfc0cb07b | 129 | py | Python | src/pipgrip/libs/mixology/_compat.py | pombredanne/pipgrip | a1e0165d9fc9085052c8a010bedf36daff4133be | [
"BSD-3-Clause"
] | 100 | 2020-01-07T13:32:02.000Z | 2022-03-30T14:35:21.000Z | src/pipgrip/libs/mixology/_compat.py | pombredanne/pipgrip | a1e0165d9fc9085052c8a010bedf36daff4133be | [
"BSD-3-Clause"
] | 50 | 2020-01-07T13:17:31.000Z | 2022-03-01T17:55:57.000Z | src/pipgrip/libs/mixology/_compat.py | pombredanne/pipgrip | a1e0165d9fc9085052c8a010bedf36daff4133be | [
"BSD-3-Clause"
] | 7 | 2020-01-09T23:06:10.000Z | 2021-04-11T23:57:26.000Z | import sys
PY36 = sys.version_info >= (3, 6)
if not PY36:
from collections import OrderedDict
else:
OrderedDict = dict
| 14.333333 | 39 | 0.697674 | 18 | 129 | 4.944444 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.06 | 0.224806 | 129 | 8 | 40 | 16.125 | 0.83 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
5ceb920d71fc37887df4c38f95bcba9b31e8f1b8 | 1,058 | py | Python | pyramid_oereb/lib/sources/address.py | geo-bl-ch/pyramid_oereb | 767375a4adda4589e12c4257377fc30258cdfcb3 | [
"BSD-2-Clause"
] | 4 | 2019-03-28T09:58:34.000Z | 2020-04-29T15:08:44.000Z | pyramid_oereb/lib/sources/address.py | geo-bl-ch/pyramid_oereb | 767375a4adda4589e12c4257377fc30258cdfcb3 | [
"BSD-2-Clause"
] | 452 | 2019-02-05T10:10:43.000Z | 2022-03-31T08:27:38.000Z | pyramid_oereb/lib/sources/address.py | geo-bl-ch/pyramid_oereb | 767375a4adda4589e12c4257377fc30258cdfcb3 | [
"BSD-2-Clause"
] | 20 | 2019-02-01T09:04:48.000Z | 2021-12-23T09:23:07.000Z | # -*- coding: utf-8 -*-
from pyramid_oereb.lib.sources import Base
from pyramid_oereb.lib.records.address import AddressRecord
class AddressBaseSource(Base):
"""
Base class for address sources.
Attributes:
records (list of pyramid_oereb.lib.records.address.AddressRecord): List of address records.
"""
_record_class_ = AddressRecord
def read(self, params, street_name, zip_code, street_number):
"""
Every address source has to implement a read method. This method must accept the three parameters. If
you want adapt to your own source for addresses, this is the point where to hook in.
Args:
params (pyramid_oereb.views.webservice.Parameter): The parameters of the extract request.
street_name (unicode): The name of the street for the desired address.
zip_code (int): The postal zipcode for the desired address.
street_number (str): The house or so called street number of the desired address.
"""
pass # pragma: no cover
| 37.785714 | 109 | 0.687146 | 140 | 1,058 | 5.1 | 0.528571 | 0.067227 | 0.063025 | 0.053221 | 0.081232 | 0 | 0 | 0 | 0 | 0 | 0 | 0.00125 | 0.243856 | 1,058 | 27 | 110 | 39.185185 | 0.89125 | 0.655009 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0.166667 | 0.333333 | 0 | 0.833333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 3 |
5ced7fa3f4f8fc0aa498ecc3591c2db03ede76ca | 53 | py | Python | tools/annotations.py | urain39/astr-archives | a20d0b24b4b488167ca5fb8a740c1bd59f525f83 | [
"Apache-2.0"
] | null | null | null | tools/annotations.py | urain39/astr-archives | a20d0b24b4b488167ca5fb8a740c1bd59f525f83 | [
"Apache-2.0"
] | 1 | 2021-01-20T06:27:12.000Z | 2021-01-20T09:54:15.000Z | tools/annotations.py | urain39/astr-archives | a20d0b24b4b488167ca5fb8a740c1bd59f525f83 | [
"Apache-2.0"
] | null | null | null | from typing import Dict
Dictionary = Dict[str, str]
| 13.25 | 27 | 0.754717 | 8 | 53 | 5 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.169811 | 53 | 3 | 28 | 17.666667 | 0.909091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
5cf677dc2dff28a4d495eac07395480c4072380c | 611 | py | Python | neighbour/migrations/0020_auto_20211229_0141.py | mary-wan/Neighbourhood | 4150ea60d8ab471fce7173c50c040f36320f3f40 | [
"Unlicense"
] | 2 | 2022-01-17T03:52:59.000Z | 2022-02-18T15:09:34.000Z | neighbour/migrations/0020_auto_20211229_0141.py | mary-wan/Neighbourhood | 4150ea60d8ab471fce7173c50c040f36320f3f40 | [
"Unlicense"
] | null | null | null | neighbour/migrations/0020_auto_20211229_0141.py | mary-wan/Neighbourhood | 4150ea60d8ab471fce7173c50c040f36320f3f40 | [
"Unlicense"
] | null | null | null | # Generated by Django 2.2.24 on 2021-12-28 22:41
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('neighbour', '0019_auto_20211229_0009'),
]
operations = [
migrations.AlterModelOptions(
name='business',
options={'ordering': ['-pk']},
),
migrations.AlterModelOptions(
name='post',
options={'ordering': ['-pk']},
),
migrations.RenameField(
model_name='business',
old_name='name',
new_name='business_name',
),
]
| 22.62963 | 49 | 0.540098 | 54 | 611 | 5.981481 | 0.648148 | 0.111455 | 0.19195 | 0.167183 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.077859 | 0.327332 | 611 | 26 | 50 | 23.5 | 0.708029 | 0.075286 | 0 | 0.35 | 1 | 0 | 0.161634 | 0.040853 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.05 | 0 | 0.2 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
5cf98122008c7d1867b4450f99a6a40d57ad7330 | 43 | py | Python | common/pycsp/common/__init__.py | a4/a4 | e1de89260cb3894908f1d01dfacea125abc79da9 | [
"BSL-1.0"
] | 4 | 2015-04-07T20:25:16.000Z | 2019-04-27T15:04:02.000Z | common/pycsp/common/__init__.py | a4/a4 | e1de89260cb3894908f1d01dfacea125abc79da9 | [
"BSL-1.0"
] | null | null | null | common/pycsp/common/__init__.py | a4/a4 | e1de89260cb3894908f1d01dfacea125abc79da9 | [
"BSL-1.0"
] | 1 | 2021-06-02T17:22:35.000Z | 2021-06-02T17:22:35.000Z | __all__ = ['toolkit', 'plugNplay','trace']
| 21.5 | 42 | 0.651163 | 4 | 43 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.093023 | 43 | 1 | 43 | 43 | 0.615385 | 0 | 0 | 0 | 0 | 0 | 0.488372 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
cf264c574b87a4b32a08bda250abacfc76fe7adf | 85 | py | Python | records/04-08/__init__.py | AaronYang2333/CSCI_570 | 03e34ce5ff192fc94612bc3afb51dcab3e854462 | [
"Apache-2.0"
] | 36 | 2020-07-25T00:13:25.000Z | 2022-02-28T17:48:15.000Z | records/04-08/__init__.py | AaronYang2333/LeetCode | 03e34ce5ff192fc94612bc3afb51dcab3e854462 | [
"Apache-2.0"
] | 6 | 2020-06-06T04:39:37.000Z | 2021-04-03T01:45:39.000Z | records/04-08/__init__.py | AaronYang2333/LeetCode | 03e34ce5ff192fc94612bc3afb51dcab3e854462 | [
"Apache-2.0"
] | 16 | 2020-12-16T02:38:16.000Z | 2022-02-28T17:48:16.000Z | __author__ = 'Aaron Yang'
__email__ = 'byang971@usc.edu'
__date__ = '2021/4/8 20:12'
| 21.25 | 30 | 0.705882 | 13 | 85 | 3.692308 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.175676 | 0.129412 | 85 | 3 | 31 | 28.333333 | 0.472973 | 0 | 0 | 0 | 0 | 0 | 0.470588 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
cf2961091028b0f55f1a6e942331427db4d39d99 | 5,679 | py | Python | src/pieltk/alphabet/xcr.py | caiogeraldes/pieltk | 205c2c030fce5f82551fe36fb48eef1040c7e496 | [
"MIT"
] | null | null | null | src/pieltk/alphabet/xcr.py | caiogeraldes/pieltk | 205c2c030fce5f82551fe36fb48eef1040c7e496 | [
"MIT"
] | null | null | null | src/pieltk/alphabet/xcr.py | caiogeraldes/pieltk | 205c2c030fce5f82551fe36fb48eef1040c7e496 | [
"MIT"
] | null | null | null | """The Carian alphabet. Sources:
- `<https://www.unicode.org/charts/PDF/U102A0.pdf>`
- Adiego, Ignacio, J. (2007) The Carian Language
"""
__author__ = [
"Caio Geraldes <caio.geraldes@usp.br>"]
VOWELS = [
"\U000102A0", # 𐊠 CARIAN LETTER A
"\U000102A7", # 𐊧 CARIAN LETTER A2
"\U000102AB", # 𐊫 CARIAN LETTER O
"\U000102B2", # 𐊲 CARIAN LETTER U
"\U000102B9", # 𐊹 CARIAN LETTER I
"\U000102BA", # 𐊺 CARIAN LETTER E
"\U000102BF", # 𐊿 CARIAN LETTER UU
"\U000102C5", # 𐋅 CARIAN LETTER II
"\U000102C8", # 𐋈 CARIAN LETTER UUU2
"\U000102CF", # 𐋏 CARIAN LETTER E2
"\U000102D0", # 𐋐 CARIAN LETTER UUU3
]
CONSONANTS = [
"\U000102A1", # 𐊡 CARIAN LETTER P2
"\U000102A2", # 𐊢 CARIAN LETTER D
"\U000102A3", # 𐊣 CARIAN LETTER L
"\U000102A4", # 𐊤 CARIAN LETTER UUU
"\U000102A5", # 𐊥 CARIAN LETTER R
"\U000102A6", # 𐊦 CARIAN LETTER LD
"\U000102A8", # 𐊨 CARIAN LETTER Q
"\U000102A9", # 𐊩 CARIAN LETTER B
"\U000102AA", # 𐊪 CARIAN LETTER M
"\U000102AC", # 𐊬 CARIAN LETTER D2
"\U000102AD", # 𐊭 CARIAN LETTER T
"\U000102AE", # 𐊮 CARIAN LETTER SH
"\U000102AF", # 𐊯 CARIAN LETTER SH2
"\U000102B0", # 𐊰 CARIAN LETTER S
"\U000102B1", # 𐊱 CARIAN LETTER C-18
"\U000102B3", # 𐊳 CARIAN LETTER NN
"\U000102B4", # 𐊴 CARIAN LETTER X
"\U000102B5", # 𐊵 CARIAN LETTER N
"\U000102B6", # 𐊶 CARIAN LETTER TT2
"\U000102B7", # 𐊷 CARIAN LETTER P
"\U000102B8", # 𐊸 CARIAN LETTER SS
"\U000102BB", # 𐊻 CARIAN LETTER UUUU
"\U000102BC", # 𐊼 CARIAN LETTER K
"\U000102BD", # 𐊽 CARIAN LETTER K2
"\U000102BE", # 𐊾 CARIAN LETTER ND
"\U000102C0", # 𐋀 CARIAN LETTER G
"\U000102C1", # 𐋁 CARIAN LETTER G2
"\U000102C2", # 𐋂 CARIAN LETTER ST
"\U000102C3", # 𐋃 CARIAN LETTER ST2
"\U000102C4", # 𐋄 CARIAN LETTER NG
"\U000102C6", # 𐋆 CARIAN LETTER C-39
"\U000102C7", # 𐋇 CARIAN LETTER TT
"\U000102C9", # 𐋉 CARIAN LETTER RR
"\U000102CA", # 𐋊 CARIAN LETTER MB
"\U000102CB", # 𐋋 CARIAN LETTER MB2
"\U000102CC", # 𐋌 CARIAN LETTER MB3
"\U000102CD", # 𐋍 CARIAN LETTER MB4
"\U000102CE", # 𐋎 CARIAN LETTER LD2
]
# The i and r used at Hyllarima are not represented as a glyph
# of their own yet.
HYLLARIMA = [
"\U000102A0", # 𐊠 a
"\U000102A2", # 𐊢 d
"\U000102A3", # 𐊣 l
"\U000102A4", # 𐊤 y
"\U000102A5", # 𐊥 r
"\U000102CE", # 𐋎 λ
"\U000102A8", # 𐊨 q
"\U000102A9", # 𐊩 b
"\U000102AA", # 𐊪 m
"\U000102AB", # 𐊫 o
"\U000102AD", # 𐊭 t
"\U000102AE", # 𐊮 sh
"\U000102B0", # 𐊰 s
"\U000102B2", # 𐊲 u
"\U000102B3", # 𐊳 ñ
"\U000102B5", # 𐊵 n
"\U000102B7", # 𐊷 p
"\U000102B8", # 𐊸 ś
"\U000102B9", # 𐊹 i
"\U000102CF", # 𐋏 e
"\U000102BD", # 𐊽 k
"\U000102BE", # 𐊾 δ
"\U000102C3", # 𐋃 z
"\U000102C7", # 𐋇 τ
]
# The q and r used at Euromos are not represented as a glyph of their own yet.
EUROMOS = [
"\U000102A0", # 𐊠 a
"\U000102A2", # 𐊢 d
"\U000102A3", # 𐊣 l
"\U000102A4", # 𐊤 y
"\U000102A5", # 𐊥 r
"\U000102CE", # 𐋎 λ
"\U000102A8", # 𐊨 q
"\U000102A9", # 𐊩 b
"\U000102AA", # 𐊪 m
"\U000102AB", # 𐊫 o
"\U000102AD", # 𐊭 t
"\U000102B0", # 𐊰 s
"\U000102B2", # 𐊲 u
"\U000102B4", # 𐊴 ḱ
"\U000102B5", # 𐊵 n
"\U000102B8", # 𐊸 ś
"\U000102B9", # 𐊹 i
"\U000102CF", # 𐋏 e
"\U000102BD", # 𐊽 k
"\U000102BC", # 𐊼 k2
"\U000102BE", # 𐊾 δ
"\U000102C3", # 𐋃 z
]
# The β, i, q and z used at Mylasa are not represented as a glyph
# of their own yet.
MYLASA = [
"\U000102A0", # 𐊠 a
"\U000102A2", # 𐊢 d
"\U000102A3", # 𐊣 l
"\U000102D0", # 𐋐 y
"\U000102A5", # 𐊥 r
"\U000102A8", # 𐊨 q
"\U000102A9", # 𐊩 b
"\U000102AA", # 𐊪 m
"\U000102AB", # 𐊫 o
"\U000102AD", # 𐊭 t
"\U000102AE", # 𐊮 sh
"\U000102B0", # 𐊰 s
"\U000102B2", # 𐊲 u
"\U000102B4", # 𐊴 ḱ
"\U000102B5", # 𐊵 n
"\U000102B7", # 𐊷 p
"\U000102B8", # 𐊸 ś
"\U000102B9", # 𐊹 i
"\U000102CF", # 𐋏 e
"\U000102BD", # 𐊽 k
"\U000102BE", # 𐊾 δ
"\U000102C3", # 𐋃 z
]
# The ḱ and β used at Stratonikeia are not represented as a glyph
# of their own yet.
STRATONIKEIA = [
"\U000102A0", # 𐊠 a
"\U000102A2", # 𐊢 d
"\U000102A3", # 𐊣 l
"\U000102A4", # 𐊤 y
"\U000102A5", # 𐊥 r
"\U000102A6", # 𐊦 λ
"\U000102A8", # 𐊨 q
"\U000102AA", # 𐊪 m
"\U000102AB", # 𐊫 o
"\U000102AD", # 𐊭 t
"\U000102AE", # 𐊮 sh
"\U000102B0", # 𐊰 s
"\U000102B1", # 𐊱 ?
"\U000102B2", # 𐊲 u
"\U000102B3", # 𐊳 ñ
"\U000102B4", # 𐊴 ḱ
"\U000102B5", # 𐊵 n
"\U000102B7", # 𐊷 p
"\U000102B8", # 𐊸 ś
"\U000102B9", # 𐊹 i
"\U000102BA", # 𐊺 e
"\U000102BD", # 𐊽 k
"\U000102BE", # 𐊾 δ
"\U000102C3", # 𐋃 z
]
# The a used at Sinuri-Kildara is not represented as a glyph of its own yet.
SINURI_KILDARA = [
"\U000102A0", # 𐊠 a
"\U000102A2", # 𐊢 d
"\U000102A3", # 𐊣 l
"\U000102D0", # 𐋐 y
"\U000102A5", # 𐊥 r
"\U000102A6", # 𐊦 λ
"\U000102A8", # 𐊨 q
"\U000102A9", # 𐊩 b
"\U000102AA", # 𐊪 m
"\U000102AB", # 𐊫 o
"\U000102AD", # 𐊭 t
"\U000102AE", # 𐊮 sh
"\U000102B0", # 𐊰 s
"\U000102B1", # 𐊱 ?
"\U000102B2", # 𐊲 u
"\U000102B3", # 𐊳 ñ
"\U000102B4", # 𐊴 ḱ
"\U000102B5", # 𐊵 n
"\U000102B7", # 𐊷 p
"\U000102B8", # 𐊸 ś
"\U000102B9", # 𐊹 i
"\U000102BA", # 𐊺 e
"\U000102BC", # 𐊼 k
"\U000102BE", # 𐊾 δ
"\U000102C3", # 𐋃 z
"\U000102C4", # 𐋄 ŋ?
]
# Kaunos, C.series, Memphis
| 26.914692 | 78 | 0.527382 | 723 | 5,679 | 4.135546 | 0.283541 | 0.196656 | 0.022074 | 0.028428 | 0.482274 | 0.482274 | 0.470569 | 0.454515 | 0.454515 | 0.454515 | 0 | 0.291773 | 0.310794 | 5,679 | 210 | 79 | 27.042857 | 0.472151 | 0.345483 | 0 | 0.814208 | 0 | 0 | 0.482739 | 0.006225 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
cf2b8da346802825a39ae888ffe2dee98f42c532 | 358 | py | Python | polls/migrations/0007_auto_20190729_0122.py | nguyenviettun/mysite | cf10e8a4b4ea7a4a213a54dc1b1c9ee930de345f | [
"Unlicense"
] | null | null | null | polls/migrations/0007_auto_20190729_0122.py | nguyenviettun/mysite | cf10e8a4b4ea7a4a213a54dc1b1c9ee930de345f | [
"Unlicense"
] | null | null | null | polls/migrations/0007_auto_20190729_0122.py | nguyenviettun/mysite | cf10e8a4b4ea7a4a213a54dc1b1c9ee930de345f | [
"Unlicense"
] | null | null | null | # Generated by Django 2.2.3 on 2019-07-29 01:22
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('polls', '0006_auto_20190729_0057'),
]
operations = [
migrations.DeleteModel(
name='Bar',
),
migrations.DeleteModel(
name='Fooo',
),
]
| 17.9 | 47 | 0.564246 | 36 | 358 | 5.527778 | 0.777778 | 0.211055 | 0.251256 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.127572 | 0.321229 | 358 | 19 | 48 | 18.842105 | 0.691358 | 0.125698 | 0 | 0.307692 | 1 | 0 | 0.11254 | 0.073955 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.076923 | 0 | 0.307692 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
cf4a5f93619b33f3dd3f627a9800f3d97ca341a8 | 80 | py | Python | Test.py | sad786/Python | 738198bbab5abfa1d521e83291eed7026a4f6f12 | [
"Apache-2.0"
] | null | null | null | Test.py | sad786/Python | 738198bbab5abfa1d521e83291eed7026a4f6f12 | [
"Apache-2.0"
] | null | null | null | Test.py | sad786/Python | 738198bbab5abfa1d521e83291eed7026a4f6f12 | [
"Apache-2.0"
] | null | null | null | a = input("Enter some list of numbers =")
for i in a:
print(i)
print(type(a))
| 13.333333 | 41 | 0.6375 | 16 | 80 | 3.1875 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.2 | 80 | 5 | 42 | 16 | 0.796875 | 0 | 0 | 0 | 0 | 0 | 0.35 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
cf53f16d34a25f8c3d0d23e3b11032c4572f978d | 50 | py | Python | evennia/contrib/tutorials/batchprocessor/__init__.py | davidrideout/evennia | 879eea55acdf4fe5cdc96ba8fd0ab5ccca4ae84b | [
"BSD-3-Clause"
] | null | null | null | evennia/contrib/tutorials/batchprocessor/__init__.py | davidrideout/evennia | 879eea55acdf4fe5cdc96ba8fd0ab5ccca4ae84b | [
"BSD-3-Clause"
] | null | null | null | evennia/contrib/tutorials/batchprocessor/__init__.py | davidrideout/evennia | 879eea55acdf4fe5cdc96ba8fd0ab5ccca4ae84b | [
"BSD-3-Clause"
] | null | null | null | """
Batch processing examples - Griatch 2012
"""
| 10 | 40 | 0.68 | 5 | 50 | 6.8 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.097561 | 0.18 | 50 | 4 | 41 | 12.5 | 0.731707 | 0.8 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
cf5ab88dbf198f54ade9e9b7307e2ec1b086bbd6 | 343 | py | Python | fairshake_assessments/core/__init__.py | MaayanLab/fairshake-assessments | 86528e34edc0282528bb9229b637f43c7656fb80 | [
"Apache-2.0"
] | null | null | null | fairshake_assessments/core/__init__.py | MaayanLab/fairshake-assessments | 86528e34edc0282528bb9229b637f43c7656fb80 | [
"Apache-2.0"
] | null | null | null | fairshake_assessments/core/__init__.py | MaayanLab/fairshake-assessments | 86528e34edc0282528bb9229b637f43c7656fb80 | [
"Apache-2.0"
] | null | null | null | from .assess import *
from .fairshake import *
def metric(schema):
assert '@id' in schema
def wrapper(func):
return dict({'@type': 'Metric'}, **schema, function=func)
return wrapper
def resolver(schema):
assert '@id' in schema
def wrapper(func):
return dict({'@type': 'Resolver'}, **schema, function=func)
return wrapper
| 22.866667 | 63 | 0.673469 | 44 | 343 | 5.25 | 0.386364 | 0.17316 | 0.121212 | 0.138528 | 0.701299 | 0.4329 | 0.4329 | 0.4329 | 0.4329 | 0.4329 | 0 | 0 | 0.174927 | 343 | 14 | 64 | 24.5 | 0.816254 | 0 | 0 | 0.5 | 0 | 0 | 0.087464 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 1 | 0.333333 | false | 0 | 0.166667 | 0.166667 | 0.833333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
cf6d92ad9d4a0ee326447b062ffe262a3694046d | 155 | py | Python | setup.py | AFCYBER-DREAM/piperci-noop-faas | de00ce7b4c73bc2170d637b83737646daaa0ffef | [
"MIT"
] | null | null | null | setup.py | AFCYBER-DREAM/piperci-noop-faas | de00ce7b4c73bc2170d637b83737646daaa0ffef | [
"MIT"
] | 2 | 2019-06-04T20:41:30.000Z | 2019-06-10T17:44:58.000Z | setup.py | AFCYBER-DREAM/piperci-noop-faas | de00ce7b4c73bc2170d637b83737646daaa0ffef | [
"MIT"
] | 2 | 2019-06-04T20:37:00.000Z | 2019-06-10T17:53:41.000Z | #! /usr/bin/env python
import setuptools
__name__ == "__main__" and setuptools.setup(
use_scm_version=True, setup_requires=["setuptools-scm"]
)
| 22.142857 | 60 | 0.716129 | 19 | 155 | 5.263158 | 0.789474 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.154839 | 155 | 6 | 61 | 25.833333 | 0.763359 | 0.135484 | 0 | 0 | 0 | 0 | 0.173228 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.25 | 0 | 0.25 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
cf7cd47b41457b7d5dc40fcefcaa361d44853ade | 242 | py | Python | settings.py | Vetal1977/tf_aws_lambda | 1232355c591e1319a01902090f05572f2fdf9284 | [
"MIT"
] | 31 | 2017-11-27T16:31:47.000Z | 2021-09-30T04:20:14.000Z | settings.py | vbezgachev/tf_aws_lambda | 1232355c591e1319a01902090f05572f2fdf9284 | [
"MIT"
] | 1 | 2018-10-18T19:13:41.000Z | 2018-10-18T19:13:41.000Z | settings.py | vbezgachev/tf_aws_lambda | 1232355c591e1319a01902090f05572f2fdf9284 | [
"MIT"
] | 5 | 2017-11-28T13:10:10.000Z | 2020-04-26T15:44:12.000Z | '''
Common settings for using in a project scope
'''
MODEL_ZIP_FILE_NAME_ENV_VAR = 'TF_AWS_MODEL_ZIP_FILE_NAME'
MODEL_PROTOBUF_FILE_NAME_ENV_VAR = 'TF_AWS_MODEL_PROTOBUF_FILE_NAME'
S3_MODEL_BUCKET_NAME_ENV_VAR = 'TF_AWS_S3_MODEL_BUCKET_NAME'
| 34.571429 | 68 | 0.859504 | 44 | 242 | 4.045455 | 0.431818 | 0.179775 | 0.168539 | 0.202247 | 0.353933 | 0.269663 | 0.269663 | 0 | 0 | 0 | 0 | 0.008969 | 0.078512 | 242 | 6 | 69 | 40.333333 | 0.789238 | 0.181818 | 0 | 0 | 0 | 0 | 0.442105 | 0.442105 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
d83d88c867c30add47a830733283a748e697bbf2 | 461 | py | Python | robert/exceptions.py | manucabral/assistant-robert | 695adafb7efb596a48608f90ac6d5cd464b19c32 | [
"MIT"
] | 1 | 2021-12-16T19:51:15.000Z | 2021-12-16T19:51:15.000Z | robert/exceptions.py | manucabral/assistant-robert | 695adafb7efb596a48608f90ac6d5cd464b19c32 | [
"MIT"
] | null | null | null | robert/exceptions.py | manucabral/assistant-robert | 695adafb7efb596a48608f90ac6d5cd464b19c32 | [
"MIT"
] | null | null | null | class RobertException(Exception):
def __init__(self, message: str = None):
message = 'An fatal error has occurred' if message is None else message
super().__init__(message)
class LanguageNotSupported(RobertException):
def __init__(self):
super().__init__('That language is not supported')
class UnknownSafeSearchType(RobertException):
def __init__(self, type):
super().__init__(f'Safe search {type} does not exist') | 38.416667 | 79 | 0.711497 | 53 | 461 | 5.735849 | 0.566038 | 0.069079 | 0.108553 | 0.171053 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.18872 | 461 | 12 | 80 | 38.416667 | 0.812834 | 0 | 0 | 0 | 0 | 0 | 0.194805 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.3 | false | 0 | 0 | 0 | 0.6 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
d85886a68a9475f5416148789eb5ad16c73f847d | 30 | py | Python | python/ccxt/static_dependencies/__init__.py | DavidFelsen/ccxt | 6497b7da13d2ea3a9e56207b46b8691938b07839 | [
"MIT"
] | 24,910 | 2017-10-27T21:41:59.000Z | 2022-03-31T23:08:57.000Z | python/ccxt/static_dependencies/__init__.py | DavidFelsen/ccxt | 6497b7da13d2ea3a9e56207b46b8691938b07839 | [
"MIT"
] | 8,201 | 2017-10-28T10:19:28.000Z | 2022-03-31T23:49:37.000Z | python/ccxt/static_dependencies/__init__.py | DavidFelsen/ccxt | 6497b7da13d2ea3a9e56207b46b8691938b07839 | [
"MIT"
] | 6,632 | 2017-10-28T02:53:24.000Z | 2022-03-31T23:20:14.000Z | __all__ = ['ecdsa', 'keccak']
| 15 | 29 | 0.6 | 3 | 30 | 4.666667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.133333 | 30 | 1 | 30 | 30 | 0.538462 | 0 | 0 | 0 | 0 | 0 | 0.366667 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
d8655aa4c3390522fd301cb5ca5ddc54c637e45f | 185 | py | Python | rocketlog/__init__.py | graylzhang/rocketlog | d1e165cf9db98f0d6ae1987d61ffd0d78e02745b | [
"MIT"
] | null | null | null | rocketlog/__init__.py | graylzhang/rocketlog | d1e165cf9db98f0d6ae1987d61ffd0d78e02745b | [
"MIT"
] | null | null | null | rocketlog/__init__.py | graylzhang/rocketlog | d1e165cf9db98f0d6ae1987d61ffd0d78e02745b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__version__ = '0.1.0'
from .api.log_handler import LogHandler
from .api.client import Client
from .agent.agent import Agent
# 向下兼容
FlyLogHandler = LogHandler
| 16.818182 | 39 | 0.72973 | 26 | 185 | 5 | 0.615385 | 0.107692 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.025478 | 0.151351 | 185 | 10 | 40 | 18.5 | 0.802548 | 0.140541 | 0 | 0 | 0 | 0 | 0.032051 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.6 | 0 | 0.6 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
d8738939831867929b6bb3c7c8e4327dc5de113a | 87 | py | Python | query/plans/tpch15cfg.py | cakebytheoceanLuo/dogqc | 163618becdb57bd952a1ac5ba346d3c7ec163e04 | [
"MIT"
] | 12 | 2020-02-08T10:41:50.000Z | 2022-02-25T13:21:52.000Z | query/plans/tpch15cfg.py | cakebytheoceanLuo/dogqc | 163618becdb57bd952a1ac5ba346d3c7ec163e04 | [
"MIT"
] | 62 | 2021-12-02T03:08:20.000Z | 2022-03-31T14:05:58.000Z | query/plans/tpch15cfg.py | cakebytheoceanLuo/dogqc | 163618becdb57bd952a1ac5ba346d3c7ec163e04 | [
"MIT"
] | 4 | 2020-03-15T03:34:10.000Z | 2022-03-18T07:51:37.000Z | {
4 : {
"operator" : "aggregation",
"numgroups" : 1000000
}
}
| 12.428571 | 36 | 0.413793 | 5 | 87 | 7.2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.16 | 0.425287 | 87 | 6 | 37 | 14.5 | 0.56 | 0 | 0 | 0 | 0 | 0 | 0.321839 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
d875ffc3ab8d57a24ec51caf51a08e22942a1c20 | 4,115 | py | Python | main_old.py | GitRenhl/PyxelControllerTest | 6ca47e799bb97dcf1eff0aab3887e812620e3d1b | [
"MIT"
] | null | null | null | main_old.py | GitRenhl/PyxelControllerTest | 6ca47e799bb97dcf1eff0aab3887e812620e3d1b | [
"MIT"
] | null | null | null | main_old.py | GitRenhl/PyxelControllerTest | 6ca47e799bb97dcf1eff0aab3887e812620e3d1b | [
"MIT"
] | null | null | null | import pyxel
class STATE:
CURRENT = 0
EVER = 1
class Window:
WIDTH = 200
HEIGHT = 200
def __init__(self):
pyxel.init(self.WIDTH, self.HEIGHT, caption="Noise")
pyxel.mouse(True)
self.keys_name = {
pyxel.GAMEPAD_1_A: "A",
pyxel.GAMEPAD_1_B: "B",
pyxel.GAMEPAD_1_DOWN: "DOWN",
pyxel.GAMEPAD_1_LEFT: "LEFT",
pyxel.GAMEPAD_1_LEFT_SHOULDER: "LEFT_SHOULDER",
pyxel.GAMEPAD_1_RIGHT: "RIGHT",
pyxel.GAMEPAD_1_RIGHT_SHOULDER: "RIGHT_SHOULDER",
pyxel.GAMEPAD_1_SELECT: "SELECT",
pyxel.GAMEPAD_1_START: "START",
pyxel.GAMEPAD_1_UP: "UP",
pyxel.GAMEPAD_1_X: "X",
pyxel.GAMEPAD_1_Y: "Y",
pyxel.GAMEPAD_2_A: "A",
pyxel.GAMEPAD_2_B: "B",
pyxel.GAMEPAD_2_DOWN: "DOWN",
pyxel.GAMEPAD_2_LEFT: "LEFT",
pyxel.GAMEPAD_2_LEFT_SHOULDER: "LEFT_SHOULDER",
pyxel.GAMEPAD_2_RIGHT: "RIGHT",
pyxel.GAMEPAD_2_RIGHT_SHOULDER: "RIGHT_SHOULDER",
pyxel.GAMEPAD_2_SELECT: "SELECT",
pyxel.GAMEPAD_2_START: "START",
pyxel.GAMEPAD_2_UP: "UP",
pyxel.GAMEPAD_2_X: "X",
pyxel.GAMEPAD_2_Y: "Y",
}
self.pressed_keys = {
pyxel.GAMEPAD_1_A: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_1_B: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_1_DOWN: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_1_LEFT: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_1_LEFT_SHOULDER: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_1_RIGHT: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_1_RIGHT_SHOULDER: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_1_SELECT: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_1_START: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_1_UP: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_1_X: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_1_Y: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_2_A: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_2_B: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_2_DOWN: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_2_LEFT: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_2_LEFT_SHOULDER: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_2_RIGHT: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_2_RIGHT_SHOULDER: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_2_SELECT: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_2_START: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_2_UP: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_2_X: {STATE.CURRENT: False, STATE.EVER: False},
pyxel.GAMEPAD_2_Y: {STATE.CURRENT: False, STATE.EVER: False},
}
pyxel.run(self.update, self.draw)
def update(self):
for key in self.pressed_keys:
if pyxel.btnp(key):
self.pressed_keys[key][STATE.CURRENT] = True
self.pressed_keys[key][STATE.EVER] = True
elif pyxel.btnr(key):
self.pressed_keys[key][STATE.CURRENT] = False
def draw(self):
pyxel.cls(1)
y = 0
for key, v in self.pressed_keys.items():
pyxel.text(60, y, self.keys_name.get(key), 7)
if v.get(STATE.CURRENT):
col = 11
else:
col = 8
pyxel.text(10, y, str(v.get(STATE.CURRENT)), col)
if v.get(STATE.EVER):
col = 11
else:
col = 8
pyxel.text(35, y, str(v.get(STATE.EVER)), col)
y += 7
if __name__ == "__main__":
Window()
| 38.101852 | 86 | 0.58226 | 522 | 4,115 | 4.344828 | 0.116858 | 0.253968 | 0.18739 | 0.232804 | 0.689153 | 0.624339 | 0.559083 | 0.510582 | 0.493827 | 0.223986 | 0 | 0.024845 | 0.295747 | 4,115 | 107 | 87 | 38.457944 | 0.757764 | 0 | 0 | 0.068182 | 0 | 0 | 0.030863 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.034091 | false | 0 | 0.011364 | 0 | 0.113636 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
d89812bdd52c41eca7e382d1cb67eba0969335c6 | 1,569 | py | Python | tests/test_lottery.py | marekyggdrasil/provably-fair-lotteries | bf195b4094eeb696e9b385e64d92caded66d4a1e | [
"MIT"
] | 1 | 2021-12-19T13:15:27.000Z | 2021-12-19T13:15:27.000Z | tests/test_lottery.py | marekyggdrasil/provably-fair-lotteries | bf195b4094eeb696e9b385e64d92caded66d4a1e | [
"MIT"
] | null | null | null | tests/test_lottery.py | marekyggdrasil/provably-fair-lotteries | bf195b4094eeb696e9b385e64d92caded66d4a1e | [
"MIT"
] | null | null | null | from src.lottery import lottery
# grin lottery #1
# block height 1550360
# https://grinexplorer.net/block/00003fdaff2ab03fcbdeed39307a4ad90c0bbf4394d23026b7b4b794d8f6b932
def test_grinventions_1():
rn = 25
input_hash = '00003fdaff2ab03fcbdeed39307a4ad90c0bbf4394d23026b7b4b794d8f6b932'
seed, tickets, shuffled = lottery(input_hash, rn)
assert seed == 440714160416639244135458261333621959951537644246447821549491272723904818
assert tickets == list(range(1, rn+1))
assert shuffled == [10, 16, 24, 12, 5, 18, 25, 20, 19, 22, 6, 9, 14, 23, 21, 15, 13, 8, 3, 7, 4, 1, 17, 2, 11]
# anteaters lottery #1
# block height 1545578
# https://grinexplorer.net/block/00006f2e7a304290afb47c35064fb0f7462f127a26d51f47ff1a22b1076ba5fd
def test_anteaters_1():
rn = 22
input_hash = '00006f2e7a304290afb47c35064fb0f7462f127a26d51f47ff1a22b1076ba5fd'
seed, tickets, shuffled = lottery(input_hash, rn)
assert seed == 767346869993045883512611938304905359464618715524261301224426443209680381
assert tickets == list(range(1, rn+1))
assert shuffled == [10, 14, 4, 2, 6, 12, 7, 11, 1, 9, 8, 19, 16, 17, 18, 5, 15, 21, 22, 20, 3, 13]
# just a test
def test_grin_block_hash():
rn = 12
input_hash = '00003f009fa5b002fb32efde6f7924409a3a745f79fcfcfa2e5221489710b893'
seed, tickets, shuffled = lottery(input_hash, rn)
assert seed == 434826832662083618074763177596269117349512691366460603804297690115782803
assert tickets == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
assert shuffled == [12, 5, 8, 9, 6, 11, 1, 4, 3, 7, 2, 10]
| 43.583333 | 114 | 0.732951 | 181 | 1,569 | 6.281768 | 0.320442 | 0.047493 | 0.050132 | 0.068602 | 0.197889 | 0.197889 | 0.197889 | 0.197889 | 0.197889 | 0.073879 | 0 | 0.416413 | 0.161249 | 1,569 | 35 | 115 | 44.828571 | 0.447568 | 0.178458 | 0 | 0.227273 | 0 | 0 | 0.150117 | 0.150117 | 0 | 0 | 0 | 0 | 0.409091 | 1 | 0.136364 | false | 0 | 0.045455 | 0 | 0.181818 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
d89f53bd247e061b35812077fa26f8bf5aba73f6 | 80 | py | Python | keep_alive.py | gwu-libraries/social-feed-messaging | 3e5aebce9e7c28f2bb4990b4be7a772a573aa390 | [
"MIT"
] | 1 | 2018-12-16T03:08:11.000Z | 2018-12-16T03:08:11.000Z | keep_alive.py | gwu-libraries/social-feed-messaging | 3e5aebce9e7c28f2bb4990b4be7a772a573aa390 | [
"MIT"
] | null | null | null | keep_alive.py | gwu-libraries/social-feed-messaging | 3e5aebce9e7c28f2bb4990b4be7a772a573aa390 | [
"MIT"
] | null | null | null | import time
print "Keeping the container alive."
while True:
time.sleep(60) | 16 | 36 | 0.7375 | 12 | 80 | 4.916667 | 0.916667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.030303 | 0.175 | 80 | 5 | 37 | 16 | 0.863636 | 0 | 0 | 0 | 0 | 0 | 0.345679 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.25 | null | null | 0.25 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
d8a8ff71f4cd73891919041ce13f820f4edd5cda | 353 | bzl | Python | platform/python/deps_early.bzl | AngelAlvie/homeworld | 84406acd0ea03ddd4c807868b204a04898e639e3 | [
"MIT"
] | 18 | 2017-06-24T08:27:52.000Z | 2022-01-04T08:41:11.000Z | platform/python/deps_early.bzl | AngelAlvie/homeworld | 84406acd0ea03ddd4c807868b204a04898e639e3 | [
"MIT"
] | 453 | 2017-07-01T14:24:39.000Z | 2020-07-02T05:32:25.000Z | platform/python/deps_early.bzl | AngelAlvie/homeworld | 84406acd0ea03ddd4c807868b204a04898e639e3 | [
"MIT"
] | 19 | 2017-07-02T19:59:03.000Z | 2020-02-23T00:24:54.000Z | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
def python_dependencies_early():
http_archive(
name = "rules_python",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.0.1/rules_python-0.0.1.tar.gz",
sha256 = "aa96a691d3a8177f3215b14b0edc9641787abaaa30363a080165d06ab65e1161",
)
| 39.222222 | 109 | 0.728045 | 41 | 353 | 6.04878 | 0.682927 | 0.133065 | 0.024194 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.170492 | 0.135977 | 353 | 8 | 110 | 44.125 | 0.642623 | 0 | 0 | 0 | 0 | 0.142857 | 0.634561 | 0.305949 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | true | 0 | 0 | 0 | 0.142857 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
d8adcc2dcbcb91521d57a872a48300bc3b631de7 | 611 | py | Python | python/testData/paramInfo/InitializingAttrsKwOnlyOnBaseClass.py | Sajaki/intellij-community | 6748af2c40567839d11fd652ec77ba263c074aad | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/paramInfo/InitializingAttrsKwOnlyOnBaseClass.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2022-02-19T09:45:05.000Z | 2022-02-27T20:32:55.000Z | python/testData/paramInfo/InitializingAttrsKwOnlyOnBaseClass.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | import attr
@attr.s(kw_only=True)
class Base1:
a = attr.ib(type=int)
@attr.s
class Derived1(Base1):
b = attr.ib(type=int)
Derived1(<arg1>)
@attr.s(kw_only=True)
class Base2:
a = attr.ib(type=int)
@attr.s
class Derived2(Base2):
b = attr.ib(type=int, default=1)
Derived2(<arg2>)
@attr.s(kw_only=True)
class Base3:
a = attr.ib(type=int, default=1)
@attr.s
class Derived3(Base3):
b = attr.ib(type=int)
Derived3(<arg3>)
@attr.s(kw_only=True)
class Base4:
a = attr.ib(type=int, default=1)
@attr.s
class Derived4(Base4):
b = attr.ib(type=int, default=1)
Derived4(<arg4>) | 13.577778 | 36 | 0.651391 | 106 | 611 | 3.716981 | 0.245283 | 0.101523 | 0.203046 | 0.263959 | 0.670051 | 0.598985 | 0.395939 | 0.284264 | 0.162437 | 0.162437 | 0 | 0.047431 | 0.171849 | 611 | 45 | 37 | 13.577778 | 0.731225 | 0 | 0 | 0.551724 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.034483 | null | null | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
d8bc4a1ca4b42a8ad0f5f2de39642992437250d8 | 1,634 | py | Python | trade_remedies_caseworker/core/models.py | uktrade/trade-remedies-caseworker | fece9fde3cb241d96cbc1aaf7188d976f8621600 | [
"MIT"
] | 1 | 2020-08-27T09:53:00.000Z | 2020-08-27T09:53:00.000Z | trade_remedies_caseworker/core/models.py | uktrade/trade-remedies-caseworker | fece9fde3cb241d96cbc1aaf7188d976f8621600 | [
"MIT"
] | 7 | 2020-10-14T16:23:42.000Z | 2021-09-24T14:18:47.000Z | trade_remedies_caseworker/core/models.py | uktrade/trade-remedies-caseworker | fece9fde3cb241d96cbc1aaf7188d976f8621600 | [
"MIT"
] | null | null | null | from .constants import SECURITY_GROUPS_TRA_ADMINS, SECURITY_GROUPS_TRA_TOP_ADMINS
class TransientUser:
"""
A TransientUser object mimics a Django auth User but does not
persist anywhere. Insetad it is created on the fly by the
APIUserMiddleware middleware using session data.
"""
def __init__(self, **kwargs):
self.is_authenticated = True
self.transient_user = True
self.permissions = {}
for key, value in kwargs.items():
setattr(self, key, value)
def has_group(self, groups):
if not isinstance(groups, list):
groups = [groups]
return any([grp in self.groups for grp in groups])
def has_perms(self, permissions):
return any([prm in self.permissions for prm in permissions])
def has_perm(self, permission):
return permission in self.permissions
@property
def is_admin(self):
return any([grp in self.groups for grp in SECURITY_GROUPS_TRA_ADMINS])
@property
def is_top_admin(self):
"""
To resolve TR-2639, adding this check for higher admin access.
This is because lead inv. is considered admin currently. This can be changed
but the implications are not clear.
"""
return any([grp in self.groups for grp in SECURITY_GROUPS_TRA_TOP_ADMINS])
def reload(self, request):
"""
Reload the user from the API
"""
user = get_user(request.user.token, self.id) # noqa: F821
request.session["user"] = user
request.session.modified = True
self.init_fields(**user)
return user
| 32.039216 | 84 | 0.649327 | 214 | 1,634 | 4.827103 | 0.429907 | 0.029042 | 0.065828 | 0.040658 | 0.159729 | 0.125847 | 0.125847 | 0.125847 | 0.125847 | 0.094869 | 0 | 0.005892 | 0.27295 | 1,634 | 50 | 85 | 32.68 | 0.863636 | 0.235618 | 0 | 0.071429 | 0 | 0 | 0.003439 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.035714 | 0.107143 | 0.535714 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
d8fafd8b2676bc9e5390adae9ec66b44e5850c61 | 7,993 | py | Python | quacker/quacker.py | FlyOrBoom/QuintessentialQuackbotsWithQuestionableQueryingQualifications | 7b44ac96d73c9d36e4bd00a1f2540219e4022d9e | [
"CC0-1.0"
] | null | null | null | quacker/quacker.py | FlyOrBoom/QuintessentialQuackbotsWithQuestionableQueryingQualifications | 7b44ac96d73c9d36e4bd00a1f2540219e4022d9e | [
"CC0-1.0"
] | null | null | null | quacker/quacker.py | FlyOrBoom/QuintessentialQuackbotsWithQuestionableQueryingQualifications | 7b44ac96d73c9d36e4bd00a1f2540219e4022d9e | [
"CC0-1.0"
] | null | null | null | import os,asyncio,json,discord
from random import randint, random
from dotenv import load_dotenv
load_dotenv()
client = discord.Client()
latest_id = {}
dict = ["abstraction","accessibility","accessibilitytree","aom","adobeflash","ajax","algorithm","alignmentcontainer","alignmentsubject","alpha","alphachannel","alpn","api","applesafari","applicationcontext","argument","aria","arpa","arpanet","array","ascii","asynchronous","atag","attribute","bandwidth","base64","baseline","beacon","béziercurve","bidi","bigint","blink","block","css","block","scripting","blockciphermodeofoperation","boolean","boot2gecko","bootstrap","boundingbox","breadcrumb","brotli","browser","browsingcontext","buffer","cache","cacheable","caldav","callstack","callbackfunction","canonicalorder","canvas","cardsorting","carddav","caret","cdn","certificateauthority","certified","challengeresponseauthentication","character","characterencoding","characterset","chrome","cia","cipher","ciphersuite","ciphertext","class","clienthints","closure","cms","codesplitting","codec","compile","compiletime","computerprogramming","conditional","constant","constructor","continuousmedia","controlflow","cookie","copyleft","cors","corssafelistedrequestheader","corssafelistedresponseheader","crawler","crlf","crossaxis","crosssitescripting","crud","cryptanalysis","cryptographichashfunction","cryptography","csp","csrf","css","cssobjectmodel","cssom","csspixel","csspreprocessor","datastructure","decryption","denialofservice","descriptor","css","deserialization","developertools","dhtml","digest","digitalcertificate","distributeddenialofservice","dmz","dns","doctype","documentdirective","documentenvironment","dom","documentobjectmodel","domain","domainname","domainsharding","dominator","dosattack","dtls","datagramtransportlayersecurity","dtmf","dualtonemultifrequencysignaling","dynamicprogramminglanguage","dynamictyping","ecma","ecmascript","effectiveconnectiontype","element","emptyelement","encapsulation","encryption","endianness","engine","entity","entityheader","event","exception","expando","fallbackalignment","falsy","favicon","fetchdirective","fetchmetadatarequestheader","firefoxos","firewall","firstcontentfulpaint","firstcpuidle","firstinputdelay","firstinteractive","firstmeaningfulpaint","firstpaint","firstclassfunction","flex","flexcontainer","flexitem","flexbox","forbiddenheadername","forbiddenresponseheadername","fork","fragmentainer","framerate","fps","ftp","ftu","function","fuzztesting","gaia","garbagecollection","gecko","generalheader","gif","gij","git","globalobject","globalscope","globalvariable","glyph","gonk","googlechrome","gpl","gpu","gracefuldegradation","grid","gridareas","gridaxis","gridcell","gridcolumn","gridcontainer","gridlines","gridrow","gridtracks","guard","gutters","gzipcompression","hash","head","highlevelprogramminglanguage","hmac","hoisting","host","hotlink","houdini","hpkp","hsts","html","html5","http","httpheader","http/2","http/3","https","hyperlink","hypertext","i18n","iana","icann","ice","ide","idempotent","identifier","idl","ietf","iife","imap","immutable","index","indexeddb","informationarchitecture","inheritance","inputmethodeditor","instance","internationalization","internet","intrinsicsize","ipaddress","ipv4","ipv6","irc","iso","isp","itu","jank","java","javascript","jpeg","jquery","json","key","keyword","latency","layoutviewport","lazyload","lgpl","ligature","localscope","localvariable","locale","localization","longtask","loop","losslesscompression","lossycompression","ltr","lefttoright","mainaxis","mainthread","markup","mathml","media","media","audiovisualpresentation","media","css","metadata","method","microsoftedge","microsoftinternetexplorer","middleware","mime","mimetype","minification","mitm","mixin","mobilefirst","modem","modernwebapps","modularity","mozillafirefox","mutable","mvc","namespace","nan","nat","native","navigationdirective","netscapenavigator","networkthrottling","nntp","node","node","dom","node","networking","node.js","nonnormative","normative","null","nullishvalue","number","object","objectreference","oop","opengl","openssl","operabrowser","operand","operator","origin","ota","owasp","p2p","pac","packet","pageloadtime","pageprediction","parameter","parentobject","parse","parser","pdf","perceivedperformance","percentencoding","php","pixel","placeholdernames","plaintext","png","polyfill","polymorphism","pop3","port","prefetch","preflightrequest","prerender","presto","primitive","privileged","privilegedcode","progressiveenhancement","progressivewebapps","promise","property","property","css","property","javascript","protocol","prototype","prototypebasedprogramming","proxyserver","pseudoclass","pseudoelement","pseudocode","publickeycryptography","python","qualityvalues","quaternion","quic","rail","randomnumbergenerator","rasterimage","rdf","realusermonitoring","rum","recursion","reference","reflow","regularexpression","renderingengine","repo","reportingdirective","requestheader","resourcetiming","responseheader","responsivewebdesign","rest","rgb","ril","robots.txt","roundtriptime","rtt","routers","rss","rtcp","rtpcontrolprotocol","rtf","rtl","righttoleft","rtp","realtimetransportprotocol)andsrtp(securertp","rtsp:realtimestreamingprotocol","ruby","safe","sameoriginpolicy","scm","scope","screenreader","scriptsupportingelement","scrollcontainer","scrollport","sctp","sdp","searchengine","secondleveldomain","securesocketslayer","ssl","selector","css","selfexecutinganonymousfunction","semantics","seo","serialization","server","servertiming","sessionhijacking","sgml","shadowtree","shim","signature","signature","functions","signature","security","simd","simpleheader","simpleresponseheader","sisd","site","sitemap","sld","sloppymode","slug","smoketest","smpte","societyofmotionpictureandtelevisionengineers","smtp","snappositions","soap","spa","singlepageapplication","specification","speculativeparsing","speedindex","sql","sqlinjection","sri","stackingcontext","statemachine","statement","staticmethod","statictyping","strictmode","string","stun","styleorigin","stylesheet","svg","svn","symbol","symmetrickeycryptography","synchronous","syntax","syntaxerror","syntheticmonitoring","tag","tcp","tcphandshake","tcpslowstart","telnet","texel","thread","threejs","timetofirstbyte","timetointeractive","tld","tofu","transmissioncontrolprotocol","tcp","transportlayersecurity","tls","treeshaking","trident","truthy","ttl","turn","type","typecoercion","typeconversion","udp","userdatagramprotocol","ui","undefined","unicode","uri","url","urn","usenet","useragent","utf8","ux","validator","value","variable","vendorprefix","viewport","visualviewport","voip","w3c","wai","wcag","webperformance","webserver","webstandards","webdav","webextensions","webgl","webidl","webkit","webm","webp","webrtc","websockets","webvtt","whatwg","whitespace","worldwideweb","wrapper","xforms","xhr","xmlhttprequest","xhtml","xinclude","xlink","xml","xpath","xquery","xslt","404","502"]
@client.event
async def on_ready():
print('Logged in as ' + str(client.user))
@client.event
async def on_message(message):
channel = message.channel
if (message.author != client.user
and any(trigger in channel.name for trigger in ['duck','quack','bot','spam'])
and any(trigger in message.content.lower() for trigger in [
'duck','quack','you',
'what','how','when','should','hey',
'bug','problem','question','error','issue','warning','crash'])):
latest_id[str(channel.id)] = message.id
await asyncio.sleep(random()) #Pause and ponder
if latest_id[str(channel.id)] == message.id: #Stops typing if there's a new message
reply = (( 'quack' if randint(0,36) else 'honk' ) * randint(1,5)
+ ( dict[randint(0,len(dict))] if randint(0,3) else '')
+ ( '!' if randint(0,1) else '?' ))
async with channel.typing():
await asyncio.sleep(random()*len(reply)/10)
if latest_id[str(channel.id)] == message.id: #Stops typing if there's a new message
await channel.send(reply)
client.run(os.environ['TOKEN'])
| 228.371429 | 6,799 | 0.741649 | 744 | 7,993 | 7.956989 | 0.830645 | 0.005405 | 0.005574 | 0.009122 | 0.039696 | 0.025507 | 0.025507 | 0.020608 | 0.020608 | 0.020608 | 0 | 0.004095 | 0.022269 | 7,993 | 34 | 6,800 | 235.088235 | 0.753423 | 0.01126 | 0 | 0.133333 | 0 | 0 | 0.663291 | 0.098481 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.1 | 0 | 0.1 | 0.033333 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
d8fc630b7e04f14aa08450f24a660cc7d29da2f0 | 498 | py | Python | tests/test_django_url_check.py | jambonsw/django-url-checks | 3cdad14b591cb9893c49b0b64cbff4282ae296eb | [
"BSD-2-Clause"
] | 5 | 2018-12-21T12:41:45.000Z | 2021-12-22T13:27:30.000Z | tests/test_django_url_check.py | jambonsw/django-url-checks | 3cdad14b591cb9893c49b0b64cbff4282ae296eb | [
"BSD-2-Clause"
] | 6 | 2018-12-20T20:05:41.000Z | 2020-06-24T14:30:19.000Z | tests/test_django_url_check.py | jambonsw/django-url-checks | 3cdad14b591cb9893c49b0b64cbff4282ae296eb | [
"BSD-2-Clause"
] | 1 | 2020-02-07T12:03:31.000Z | 2020-02-07T12:03:31.000Z | """Tests for django-url-check"""
import url_checks
def test_version():
"""Check that package has a version"""
assert hasattr(url_checks, "__version__")
assert isinstance(url_checks.__version__, str)
def test_default_app():
"""Check that package has a default Django app
https://docs.djangoproject.com/en/stable/ref/applications/#configuring-applications
"""
assert hasattr(url_checks, "default_app_config")
assert isinstance(url_checks.default_app_config, str)
| 27.666667 | 87 | 0.738956 | 65 | 498 | 5.353846 | 0.461538 | 0.12931 | 0.091954 | 0.109195 | 0.258621 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.148594 | 498 | 17 | 88 | 29.294118 | 0.820755 | 0.37751 | 0 | 0 | 0 | 0 | 0.101754 | 0 | 0 | 0 | 0 | 0 | 0.571429 | 1 | 0.285714 | true | 0 | 0.142857 | 0 | 0.428571 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2b32a44006ca2391ab5824fd4fe79790c8802d9e | 1,319 | py | Python | lena/core/exceptions.py | ynikitenko/lena | d0fbae47f21007685edbd4e77bc91413421bebd1 | [
"Apache-2.0"
] | 4 | 2020-03-01T14:01:48.000Z | 2021-02-23T19:33:36.000Z | lena/core/exceptions.py | ynikitenko/lena | d0fbae47f21007685edbd4e77bc91413421bebd1 | [
"Apache-2.0"
] | 1 | 2021-05-09T15:47:17.000Z | 2021-05-09T16:12:03.000Z | lena/core/exceptions.py | ynikitenko/lena | d0fbae47f21007685edbd4e77bc91413421bebd1 | [
"Apache-2.0"
] | null | null | null | """All Lena exceptions are subclasses of :exc:`LenaException`
and corresponding Python exceptions (if they exist).
"""
# pylint: disable=missing-docstring
# Most Exceptions here are familiar to Python programmers
# and are self-explanatory.
class LenaException(Exception):
"""Base class for all Lena exceptions."""
pass
class LenaAttributeError(LenaException, AttributeError):
pass
class LenaEnvironmentError(LenaException, EnvironmentError):
"""The base class for exceptions
that can occur outside the Python system,
like IOError or OSError.
"""
class LenaIndexError(LenaException, IndexError):
pass
class LenaKeyError(LenaException, KeyError):
pass
class LenaNotImplementedError(LenaException, NotImplementedError):
pass
class LenaRuntimeError(LenaException, RuntimeError):
"""Raised when an error does not belong to other categories."""
pass
class LenaStopFill(LenaException):
"""Signal that no more fill is accepted.
Analogous to StopIteration, but control flow is reversed.
"""
pass
class LenaTypeError(LenaException, TypeError):
pass
class LenaValueError(LenaException, ValueError):
pass
class LenaZeroDivisionError(LenaException, ZeroDivisionError):
# raised when, for example, mean can't be calculated
pass
| 21.274194 | 67 | 0.748294 | 139 | 1,319 | 7.100719 | 0.611511 | 0.082067 | 0.034448 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.177407 | 1,319 | 61 | 68 | 21.622951 | 0.909677 | 0.429871 | 0 | 0.47619 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.47619 | 0 | 0 | 0.52381 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
2b44faaf544ace051a436dbce52f4d76290a91b2 | 865 | py | Python | Python3/598.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 854 | 2018-11-09T08:06:16.000Z | 2022-03-31T06:05:53.000Z | Python3/598.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 29 | 2019-06-02T05:02:25.000Z | 2021-11-15T04:09:37.000Z | Python3/598.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 347 | 2018-12-23T01:57:37.000Z | 2022-03-12T14:51:21.000Z | __________________________________________________________________________________________________
sample 68 ms submission
class Solution:
def maxCount(self, m: int, n: int, ops: List[List[int]]) -> int:
rMin, cMin = sys.maxsize, sys.maxsize
for i in ops:
rMin = min(rMin, i[0])
cMin = min(cMin, i[1])
return min(m, rMin) * min(n, cMin)
__________________________________________________________________________________________________
sample 14136 kb submission
class Solution:
def maxCount(self, m: int, n: int, ops: List[List[int]]) -> int:
if not ops:
return m*n
row = min(m, min([op[0] for op in ops]))
col = min(n, min([op[1] for op in ops]))
return row * col
__________________________________________________________________________________________________
| 43.25 | 98 | 0.695954 | 92 | 865 | 3.347826 | 0.347826 | 0.048701 | 0.149351 | 0.168831 | 0.409091 | 0.409091 | 0.409091 | 0.409091 | 0.409091 | 0.409091 | 0 | 0.016129 | 0.211561 | 865 | 19 | 99 | 45.526316 | 0.435484 | 0 | 0 | 0.368421 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
990caa1dc0a4531b0d4971025b60986ddecb955d | 503 | py | Python | tensortrade/base/registry.py | bwcknr/tensortrade | 376f5e4cc4ad7df271774088884fbe88f8feb7d8 | [
"Apache-2.0"
] | 7 | 2020-09-28T23:36:40.000Z | 2022-02-22T02:00:32.000Z | tensortrade/base/registry.py | bwcknr/tensortrade | 376f5e4cc4ad7df271774088884fbe88f8feb7d8 | [
"Apache-2.0"
] | 4 | 2020-11-13T18:48:52.000Z | 2022-02-10T01:29:47.000Z | tensortrade/base/registry.py | bwcknr/tensortrade | 376f5e4cc4ad7df271774088884fbe88f8feb7d8 | [
"Apache-2.0"
] | 3 | 2020-11-23T17:31:59.000Z | 2021-04-08T10:55:03.000Z |
import numpy as np
_REGISTRY = {}
MAJOR_COMPONENTS = [
'exchanges',
'actions',
'rewards',
'features',
'slippage'
]
def get_major_component_names():
return MAJOR_COMPONENTS
def get_registry():
return _REGISTRY
def registered_names():
return list(np.unique([_REGISTRY[i] for i in _REGISTRY.keys()]))
def register(component, registered_name: str):
_REGISTRY[component] = registered_name
def get_registered_name(component):
return _REGISTRY[component]
| 14.371429 | 68 | 0.697813 | 57 | 503 | 5.859649 | 0.473684 | 0.053892 | 0.137725 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.194831 | 503 | 34 | 69 | 14.794118 | 0.824691 | 0 | 0 | 0 | 0 | 0 | 0.077689 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.263158 | false | 0 | 0.052632 | 0.210526 | 0.526316 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
994cd2a95f12891ad36675c85c469abca92b2aae | 1,308 | py | Python | zengin_code/bank.py | simota/zengin-py | 85022adb85f2ecc679e349e6a58dc8ccfcfc7e93 | [
"MIT"
] | null | null | null | zengin_code/bank.py | simota/zengin-py | 85022adb85f2ecc679e349e6a58dc8ccfcfc7e93 | [
"MIT"
] | null | null | null | zengin_code/bank.py | simota/zengin-py | 85022adb85f2ecc679e349e6a58dc8ccfcfc7e93 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import division, print_function, absolute_import # NOQA
from collections import OrderedDict
import six
class BankMeta(type):
banks = OrderedDict()
names = {}
fullnames = {}
def __setitem__(cls, code, bank):
cls.banks[code] = bank
cls.names[bank.name] = bank
cls.fullnames[bank.fullname] = bank
def __getitem__(cls, code):
return cls.banks[code]
@property
def all(cls):
return cls.banks
def by_name(cls, name):
bank = cls.names.get(name)
if bank:
return bank
return cls.fullnames.get(name)
class Bank(six.with_metaclass(BankMeta)):
def __init__(self, code, name, kana, hira, roma, fullname):
self.code = code
self.name = name
self.kana = kana
self.hira = hira
self.roma = roma
self.fullname = fullname
self.branches = OrderedDict()
self.named_branches = {}
self.__class__[code] = self
def branch_by_name(self, name):
return self.named_branches.get(name)
def branch_by_code(self, code):
return self.branches.get(code)
def add_branch(self, branch):
self.branches[branch.code] = branch
self.named_branches[branch.name] = branch
| 23.357143 | 72 | 0.615443 | 160 | 1,308 | 4.83125 | 0.28125 | 0.036223 | 0.065977 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.00106 | 0.279052 | 1,308 | 55 | 73 | 23.781818 | 0.818664 | 0.019878 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.205128 | false | 0 | 0.076923 | 0.102564 | 0.564103 | 0.025641 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
994dad2693b0adfe70fbcec848b4125ce7dd84c5 | 155 | py | Python | scans/reverse_lookup.py | Tuutaans/lazy_enumerator | 91eb059d6c173e60aff590b78f723168cd4264e3 | [
"MIT"
] | null | null | null | scans/reverse_lookup.py | Tuutaans/lazy_enumerator | 91eb059d6c173e60aff590b78f723168cd4264e3 | [
"MIT"
] | 6 | 2022-02-09T15:44:34.000Z | 2022-02-10T03:48:54.000Z | scans/reverse_lookup.py | Tuutaans/lazy_enumerator | 91eb059d6c173e60aff590b78f723168cd4264e3 | [
"MIT"
] | 2 | 2022-02-09T14:49:25.000Z | 2022-02-09T16:26:11.000Z | import subprocess
def reverse_lookup(target):
command = f"dig -x {target} @{target} \n"
com = subprocess.call(command, shell=True)
return com
| 22.142857 | 46 | 0.683871 | 21 | 155 | 5 | 0.761905 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.193548 | 155 | 6 | 47 | 25.833333 | 0.84 | 0 | 0 | 0 | 0 | 0 | 0.180645 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.2 | 0 | 0.6 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
995002fb554dd783ca394e2930d41e30f145a8c1 | 148 | py | Python | 1/1_4_img.py | Terfno/learn_DL | 0e1f3049c2c342915e1b7237506029a42539029e | [
"MIT"
] | null | null | null | 1/1_4_img.py | Terfno/learn_DL | 0e1f3049c2c342915e1b7237506029a42539029e | [
"MIT"
] | null | null | null | 1/1_4_img.py | Terfno/learn_DL | 0e1f3049c2c342915e1b7237506029a42539029e | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
from matplotlib.image import imread
lena = imread('../dataset/lena.png')
plt.imshow(lena)
plt.savefig('1_4z.png')
| 18.5 | 36 | 0.756757 | 23 | 148 | 4.826087 | 0.652174 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.015038 | 0.101351 | 148 | 7 | 37 | 21.142857 | 0.819549 | 0 | 0 | 0 | 0 | 0 | 0.182432 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
997b52fd0599097b22326f1ef0582ca7cbf7d568 | 106 | py | Python | src/settings.py | sequoia-tree/cs370 | 47bf7f56d20bd81abbdbd0502477afcd5f62bbbe | [
"CC-BY-4.0"
] | 1 | 2019-01-14T08:31:45.000Z | 2019-01-14T08:31:45.000Z | src/settings.py | sequoia-tree/teaching-cs | 47bf7f56d20bd81abbdbd0502477afcd5f62bbbe | [
"CC-BY-4.0"
] | null | null | null | src/settings.py | sequoia-tree/teaching-cs | 47bf7f56d20bd81abbdbd0502477afcd5f62bbbe | [
"CC-BY-4.0"
] | null | null | null | from os import pardir
from os.path import join
DEBUG = True
FREEZER_DESTINATION = join(pardir, 'build')
| 15.142857 | 43 | 0.764151 | 16 | 106 | 5 | 0.6875 | 0.15 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.160377 | 106 | 6 | 44 | 17.666667 | 0.898876 | 0 | 0 | 0 | 0 | 0 | 0.04717 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
9996eaaad1c12f808cf34a139489087702b7bf7b | 272 | py | Python | deepy/utils/__init__.py | uaca/deepy | 090fbad22a08a809b12951cd0d4984f5bd432698 | [
"MIT"
] | 260 | 2015-05-16T07:58:29.000Z | 2016-01-07T09:10:47.000Z | deepy/utils/__init__.py | uaca/deepy | 090fbad22a08a809b12951cd0d4984f5bd432698 | [
"MIT"
] | 20 | 2015-04-21T01:46:46.000Z | 2015-12-20T00:04:23.000Z | deepy/utils/__init__.py | zomux/deepy | 090fbad22a08a809b12951cd0d4984f5bd432698 | [
"MIT"
] | 50 | 2016-01-27T03:45:25.000Z | 2020-12-16T07:02:57.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from dim_to_var import dim_to_var
from fake_generator import FakeGenerator
from initializers import *
from map_dict import MapDict
from scanner import Scanner
from stream_pickler import StreamPickler
from timer import Timer
| 22.666667 | 40 | 0.808824 | 41 | 272 | 5.195122 | 0.585366 | 0.046948 | 0.075117 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004255 | 0.136029 | 272 | 11 | 41 | 24.727273 | 0.902128 | 0.154412 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
999d1ab84e475f97c08b3d4334916b1cde3b1bad | 1,283 | py | Python | fem/utilities/tables/table_data_2/_table_np_data.py | mjredmond/FEMApp | dd8cc53acf80d0a1bb83ce9c89bcfd51e85c6be8 | [
"MIT"
] | 1 | 2019-08-03T21:40:26.000Z | 2019-08-03T21:40:26.000Z | fem/utilities/tables2/table_data/_table_np_data.py | mjredmond/FEMApp | dd8cc53acf80d0a1bb83ce9c89bcfd51e85c6be8 | [
"MIT"
] | null | null | null | fem/utilities/tables2/table_data/_table_np_data.py | mjredmond/FEMApp | dd8cc53acf80d0a1bb83ce9c89bcfd51e85c6be8 | [
"MIT"
] | null | null | null | """
table_data.table_data
table data
author: Michael Redmond
"""
from __future__ import print_function, absolute_import
from weakref import ref
from ...error_handling import MyExceptions
from ._table_data import TableData
# noinspection PyProtectedMember
class TableNumpyData(TableData):
dtype = None
def __init__(self, data_list, index):
super(TableNumpyData, self).__init__()
self.data_list = ref(data_list)
""":type: ref[fem.utilities.tables.table_data._table_np_data_list.TableNumpyDataList]"""
self.index = index
""":type: int"""
def __getitem__(self, index):
return self.data_list()._data[self.index][index]
def __setitem__(self, index, value):
self.data_list()._data[self.index][index] = value
def __len__(self):
return self.data_list()._data.shape[1]
@property
def id(self):
raise NotImplementedError
@id.setter
def id(self, value):
raise NotImplementedError
def serialize(self):
raise NotImplementedError
def load(self, data):
# load from serialization
raise NotImplementedError
def subdata(self, index):
return None
@classmethod
def columns(cls):
return len(cls.dtype.names)
| 20.365079 | 96 | 0.670304 | 148 | 1,283 | 5.506757 | 0.378378 | 0.068712 | 0.07362 | 0.058896 | 0.107975 | 0.07362 | 0.07362 | 0 | 0 | 0 | 0 | 0.001014 | 0.231489 | 1,283 | 62 | 97 | 20.693548 | 0.825558 | 0.088854 | 0 | 0.129032 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.322581 | false | 0 | 0.129032 | 0.129032 | 0.645161 | 0.032258 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
99a433bd608086f44ff31ccb1678ee38d284a2e5 | 758 | py | Python | game/scripts/level0.py | PythonixCoders/PyWeek29 | 5c7492466481dec40619272a3da7fa4b9a72c1d6 | [
"MIT"
] | 8 | 2020-03-15T14:58:46.000Z | 2020-04-26T13:44:10.000Z | game/scripts/level0.py | flipcoder/Butterfly-Destroyers | 855b1981ea67796e0ce0d82b525a1cb75a9e358b | [
"MIT"
] | null | null | null | game/scripts/level0.py | flipcoder/Butterfly-Destroyers | 855b1981ea67796e0ce0d82b525a1cb75a9e358b | [
"MIT"
] | 4 | 2020-03-23T12:38:55.000Z | 2021-12-25T16:32:54.000Z | #!/usr/bin/env python
# Level Script
# Use scene.when to schedule events.
# Yield when you want to wait until the next event.
# This is a generator. Using a busy loop will halt the game.
from random import uniform
from game.entities.ai import CircleAi, ChasingAi
from game.scripts.level import Level
from game.constants import GREEN
class Level0(Level):
number = 0
name = "Tutorial"
ground = GREEN
music = "butterfly.ogg"
def __call__(self):
# self.scene.cloudy()
yield from super().__call__()
self.slow_type("You better right code if you want a tutorial", 5)
# TODO: Check for level clear ?
yield self.pause(15)
# yield from self.slow_type("Well done !", 5, "green", clear=True)
| 24.451613 | 74 | 0.671504 | 111 | 758 | 4.495496 | 0.648649 | 0.048096 | 0.048096 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010363 | 0.236148 | 758 | 30 | 75 | 25.266667 | 0.851468 | 0.386544 | 0 | 0 | 0 | 0 | 0.142232 | 0 | 0 | 0 | 0 | 0.033333 | 0 | 1 | 0.076923 | false | 0 | 0.307692 | 0 | 0.769231 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
41f12145610fb53a6d6b8d33db04b6137b246f5f | 208 | py | Python | moldyn/utils/datreant/core/__init__.py | open-molecular-dynamics/moldyn | 95a8be53981a2159a75e82c7321136bebc674bc8 | [
"MIT"
] | 10 | 2015-10-28T20:36:52.000Z | 2021-09-19T07:17:24.000Z | moldyn/utils/datreant/core/__init__.py | open-molecular-dynamics/moldyn | 95a8be53981a2159a75e82c7321136bebc674bc8 | [
"MIT"
] | 54 | 2015-11-10T23:52:56.000Z | 2022-03-07T20:51:37.000Z | moldyn/utils/datreant/core/__init__.py | open-molecular-dynamics/moldyn | 95a8be53981a2159a75e82c7321136bebc674bc8 | [
"MIT"
] | 2 | 2018-10-31T13:35:05.000Z | 2019-12-29T12:49:14.000Z | from ..manipulators import discover
from ..treants import Treant
from ..trees import Veg, Leaf, Tree
from ..collections import View, Bundle
__all__ = ['Treant', 'Tree', 'Leaf', 'Bundle', 'discover', 'View']
| 29.714286 | 66 | 0.716346 | 26 | 208 | 5.576923 | 0.538462 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.134615 | 208 | 6 | 67 | 34.666667 | 0.805556 | 0 | 0 | 0 | 0 | 0 | 0.153846 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.8 | 0 | 0.8 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
510ae942950bd4d62212d854652c88138bd09fe2 | 397 | py | Python | kubernetes_typed/client/models/v1_volume_attachment_source.py | nikhiljha/kubernetes-typed | 4f4b969aa400c88306f92560e56bda6d19b2a895 | [
"Apache-2.0"
] | 22 | 2020-12-10T13:06:02.000Z | 2022-02-13T21:58:15.000Z | kubernetes_typed/client/models/v1_volume_attachment_source.py | nikhiljha/kubernetes-typed | 4f4b969aa400c88306f92560e56bda6d19b2a895 | [
"Apache-2.0"
] | 4 | 2021-03-08T07:06:12.000Z | 2022-03-29T23:41:45.000Z | kubernetes_typed/client/models/v1_volume_attachment_source.py | nikhiljha/kubernetes-typed | 4f4b969aa400c88306f92560e56bda6d19b2a895 | [
"Apache-2.0"
] | 2 | 2021-09-05T19:18:28.000Z | 2022-03-14T02:56:17.000Z | # Code generated by `typeddictgen`. DO NOT EDIT.
"""V1VolumeAttachmentSourceDict generated type."""
from typing import TypedDict
from kubernetes_typed.client import V1PersistentVolumeSpecDict
V1VolumeAttachmentSourceDict = TypedDict(
"V1VolumeAttachmentSourceDict",
{
"inlineVolumeSpec": V1PersistentVolumeSpecDict,
"persistentVolumeName": str,
},
total=False,
)
| 26.466667 | 62 | 0.755668 | 29 | 397 | 10.310345 | 0.758621 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.01506 | 0.163728 | 397 | 14 | 63 | 28.357143 | 0.885542 | 0.231738 | 0 | 0 | 1 | 0 | 0.214047 | 0.093645 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.2 | 0 | 0.2 | 0 | 1 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
51315a99c462578ac86efb65b0abf4e9fa5910a7 | 273 | py | Python | build/modules/form_html.py | mu-perori/Manga109_AnnotationApp | 3b3be1146b6651e37861e211f952957df5952932 | [
"MIT"
] | 4 | 2022-03-11T10:34:15.000Z | 2022-03-28T14:23:12.000Z | build/modules/form_html.py | mu-perori/Manga109_AnnotationApp | 3b3be1146b6651e37861e211f952957df5952932 | [
"MIT"
] | null | null | null | build/modules/form_html.py | mu-perori/Manga109_AnnotationApp | 3b3be1146b6651e37861e211f952957df5952932 | [
"MIT"
] | null | null | null | # 各漫画のHTMLを作成
def make_html(output_path, src_path, manga_title):
with open(src_path + "/template.html") as f:
html = f.read().replace("manga_title", manga_title)
with open(output_path + "/" + manga_title + "/index.html", "w") as f:
f.write(html)
| 27.3 | 73 | 0.641026 | 40 | 273 | 4.15 | 0.475 | 0.240964 | 0.168675 | 0.216867 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.201465 | 273 | 9 | 74 | 30.333333 | 0.761468 | 0.040293 | 0 | 0 | 0 | 0 | 0.146154 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0 | 0 | 0.2 | 0 | 0 | 0 | 0 | null | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
513a617a89bdbe4fc5de6aa041beba0cc695019a | 234 | py | Python | irekua_rest_api/permissions/licences.py | IslasGECI/irekua-rest-api | 35cf5153ed7f54d12ebad2ac07d472585f04e3e7 | [
"BSD-4-Clause"
] | null | null | null | irekua_rest_api/permissions/licences.py | IslasGECI/irekua-rest-api | 35cf5153ed7f54d12ebad2ac07d472585f04e3e7 | [
"BSD-4-Clause"
] | 11 | 2020-03-28T18:51:50.000Z | 2022-01-13T01:47:40.000Z | irekua_rest_api/permissions/licences.py | IslasGECI/irekua-rest-api | 35cf5153ed7f54d12ebad2ac07d472585f04e3e7 | [
"BSD-4-Clause"
] | 1 | 2021-05-06T19:38:14.000Z | 2021-05-06T19:38:14.000Z | from rest_framework.permissions import BasePermission
class IsSigner(BasePermission):
def has_object_permission(self, request, view, obj):
user = request.user
signer = obj.signed_by
return user == signer
| 26 | 56 | 0.713675 | 27 | 234 | 6.037037 | 0.777778 | 0.122699 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.217949 | 234 | 8 | 57 | 29.25 | 0.89071 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.166667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
51631d2629d4dde83d7852360abbc473352692ea | 25,673 | py | Python | scripts/run_param_config.py | mskcc/igo-demux | 0ba5320592766a2bda1c5dd013c4eb0c167b5d05 | [
"Apache-2.0"
] | 2 | 2022-02-24T19:24:19.000Z | 2022-02-27T13:41:57.000Z | scripts/run_param_config.py | mskcc/igo-demux | 0ba5320592766a2bda1c5dd013c4eb0c167b5d05 | [
"Apache-2.0"
] | 15 | 2021-12-13T19:53:28.000Z | 2022-03-17T20:13:47.000Z | scripts/run_param_config.py | mskcc/igo-demux | 0ba5320592766a2bda1c5dd013c4eb0c167b5d05 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#!/usr/bin/env python
from collections import OrderedDict
# 1) Determined by recipe
TYPE = "TYPE"
# 2) Determined by genome & type (see: genome_reference_mapping)
DEFAULT = "DEFAULT_TYPE"
GENOME = "GENOME"
REFERENCE = "REFERENCE"
REF_FLAT = "REF_FLAT"
GTF = "GTF"
RIBOSOMAL_INTERVALS = "RIBOSOMAL_INTERVALS"
GTAG = "GTAG"
CELLRANGER_ATAC = "CELLRANGER_ATAC"
CELLRANGER_VDJ = "CELLRANGER_VDJ"
CELLRANGER_CNV = "CELLRANGER_CNV"
CELLRANGER_COUNT = "CELLRANGER_COUNT"
CELLRANGER_ARC = "CELLRANGER_ARC"
HAPLOTYPE_MAP = "HAPLOTYPE_MAP"
# 3) Determined by recipe (see: recipe_options_mapping)
BAITS="BAITS"
TARGETS="TARGETS"
MSKQ="MSKQ"
MD="MD"
DGN_REFERENCE="DGN_REFERENCE"
"""
D E P E N D E N C Y G R A P H
+-----------+
+-----------> opts +-------------+
| +-----------+ |
| |
+-----+------+ +-----------+ +-----v------+
| recipe +----> type +------> run_params |
+-----+------+ +-----+-----+ +------^-----+
| | |
| +-----v-----+ |
+-----------> refr +-------------+
+-----+-----+ |
^ |
+------------+ | |
| species +----------+-------------------+
+------------+
species/refr -> recipe -> opts -> type (Later options override previous options)
species/refr, species_genome_mapping: Default reference for organism
recipe, recipe_overrides: Specific reference required for recipe
opts, recipe_options_mapping: More specific options for a recipe (Not reference)
type, sample_type_mapping: WGS, RNA, or DNA
"""
def get_ordered_dic(unordered_dic):
"""Returns a dictionary ordered by the length of its keys
Args:
unordered_dic: Dictionary of stuff to order
Returns:
type, OrderedDict: Ordered dictionary by key-length
"""
return OrderedDict(sorted(unordered_dic.items(), key=lambda t: -len(t[0])))
""" Mapping of recipes to their type, default should be DNA """
recipe_type_mapping_UNORDERED = {
"MouseWholeGenome": { TYPE: "WGS" },
"ShallowWGS": { TYPE: "WGS" },
"10X_Genomics_WGS": { TYPE: "WGS" },
"WholeGenomeSequencing": { TYPE: "WGS" },
"HumanWholeGenome": { TYPE: "WGS" },
".*RNA.*": { TYPE: "RNA" },
".*96Well_SmartSeq2": { TYPE: "RNA" },
".*SMARTer.*": { TYPE: "RNA" },
"FusionDiscoverySeq": { TYPE: "RNA" },
".*Ribo.*": { TYPE: "RNA" },
# FOR NEW ENTRIES
# "{regex}": { TYPE: type }
".*": { TYPE: "DNA" } # DEFAULT
}
recipe_type_mapping = get_ordered_dic(recipe_type_mapping_UNORDERED)
""" Recipes that should have determine recipe (instead of species -> genome logic) """
recipe_overrides = {
"Human": {
"ADCC1_v3": "GRCh37",
"PCFDDR_.*": "hg19",
"IWG.*": "hg19",
"CH_v1": "hg19",
"Twist_Exome": "hg19",
"IDT_Exome_v1": "hg19",
"ADCC1_v2": "hg19",
"RDM": "hg19",
"myTYPE_V1": "hg19",
"PanCancerV2": "hg19",
"MissionBio-Heme": "hg19",
"WholeExome_v4": "hg19",
"AmpliSeq": "hg19",
"HemeBrainPACT_v1": "hg19"
},
"Mouse": {
"M-IMPACT_v1": "mm10",
"10X_Genomics_Multiome": "mm10"
}
}
""" Mapping of species to their genome-type """
species_genome_mapping_UNORDERED = {
"Human": "GRCh38",
"Mouse": "GRCm38",
"Mouse_GeneticallyModified": "GRCm38",
"Drosophilia": "dm3",
"Zebrafish": "danrer7",
"Chicken": "galGal4",
".*uberculosis": "mtubf11",
"S.Cerevisae": "sccer",
"other": "sccer",
"Fungus": "sccer",
"E.Coli": "ecolik12",
"Bacteria": "ecolik12",
"C.Elegans": "ce10",
"S.Pombe": "pombe",
"R.norvegicus": "rn6",
"E.Lambda": "elambda",
"Plasmid": "ecolik12",
# FOR NEW ENTRIES
# "{regex}": "{GENOME}"
".*": "INVALID" # DEFAULT
}
species_genome_mapping = get_ordered_dic(species_genome_mapping_UNORDERED)
""" Mapping of genome-type to their reference files """
genome_reference_mapping_UNORDERED = {
"hg19": {
DEFAULT: {
GENOME: "/igo/work/genomes/H.sapiens/hg19/BWA_0.7.5a/human_hg19.fa",
REFERENCE: "/igo/work/genomes/H.sapiens/hg19/human_hg19.fa",
HAPLOTYPE_MAP: "/home/igo/fingerprint_maps/map_files/hg19_ACCESS.map"
},
"RNA": {
REF_FLAT: "/home/igo/resources/BED-Targets/hg19-Ref_Flat.txt",
RIBOSOMAL_INTERVALS: "/igo/work//bed-targets/ucsc_hg19_rRNA.iList"
},
"miRNA": {
RIBOSOMAL_INTERVALS: "/home/igo/resources/BED-Targets/ucsc_hg19_rRNA.iList",
REF_FLAT: "/home/igo/resources/BED-Targets/hg19-Ref_Flat.txt",
GENOME: "/home/igo/resources/BED-Targets/human_Counting_miRNA_Genome.fasta",
GTAG: "human_miRNA"
}
},
"grch37": {
DEFAULT: {
GENOME: "/igo/work/genomes/H.sapiens/GRCh37/GRCh37.fasta",
REFERENCE: "/igo/work/genomes/H.sapiens/GRCh37/GRCh37.fasta",
HAPLOTYPE_MAP: "/home/igo/fingerprint_maps/map_files/GRCh37_ACCESS.map"
},
"RNA": {
GENOME: '/igo/work/nabors/bed_files/GRCh37_RNA_Ensembl/Homo_sapiens.GRCh37.75.dna.primary_assembly.fa',
REFERENCE: '/igo/work/nabors/bed_files/GRCh37_RNA_Ensembl/Homo_sapiens.GRCh37.75.dna.primary_assembly.fa',
REF_FLAT: '/igo/work/nabors/bed_files/GRCh37_RNA_Ensembl/refFlat_ensembl.v75.txt',
RIBOSOMAL_INTERVALS: '/igo/work/nabors/bed_files/GRCh37_RNA_Ensembl/Homo_sapiens.GRCh37.75.rRNA.interval_list'
},
},
"grch38": {
DEFAULT: {
GENOME: "/igo/work/nabors/genomes/hg38/hg38.fa",
REFERENCE: "/igo/work/nabors/genomes/hg38/hg38.fa",
CELLRANGER_ATAC: "/igo/work/nabors/genomes/10X_Genomics/ATAC/refdata-cellranger-atac-GRCh38-1.0.1",
CELLRANGER_VDJ: "/igo/work/nabors/genomes/10X_Genomics/VDJ/refdata-cellranger-vdj-GRCh38-alts-ensembl-2.0.0",
CELLRANGER_CNV: "/igo/work/nabors/10X_Genomics_references/CNV/refdata-GRCh38-1.0.0",
CELLRANGER_COUNT: "/igo/work/nabors/genomes/10X_Genomics/GEX/refdata-gex-GRCh38-2020-A",
CELLRANGER_ARC: "/igo/work/nabors/genomes/10X_Genomics/ARC/refdata-cellranger-arc-GRCh38-2020-A-2.0.0",
HAPLOTYPE_MAP: "/home/igo/fingerprint_maps/map_files/hg38_igo.map" # TODO - Verify this
},
"RNA": {
GENOME: "/igo/work/nabors/genomes/GRCh38_100/Homo_sapiens.GRCh38.dna.primary_assembly.fa",
REFERENCE: "/igo/work/nabors/genomes/GRCh38_100/Homo_sapiens.GRCh38.dna.primary_assembly.fa",
REF_FLAT: "/igo/work/nabors/bed_files/GRCh38_100_Ensembl/Homo_sapiens.GRCh38.100.ref.flat",
RIBOSOMAL_INTERVALS: "/igo/work/nabors/bed_files/GRCh38_100_Ensembl/SHORT__Homo_sapiens.GRCh38.100.rRNA.interval.list",
GTF: "/igo/work/nabors/bed_files/GRCh38_100_Ensembl/Homo_sapiens.GRCh38.100.gtf"
},
},
"grcm38": {
DEFAULT: {
GENOME: '/igo/work/nabors/genomes/GRCm38/Mus_musculus.GRCm38.dna.primary_assembly.fa',
REFERENCE: '/igo/work/nabors/genomes/GRCm38/Mus_musculus.GRCm38.dna.primary_assembly.fa',
CELLRANGER_ATAC: "/igo/work/nabors/genomes/10X_Genomics/ATAC/refdata-cellranger-atac-mm10-1.1.0",
CELLRANGER_VDJ: "/igo/work/nabors/genomes/10X_Genomics/VDJ/refdata-cellranger-vdj-GRCm38-alts-ensembl-2.2.0",
CELLRANGER_CNV: "/igo/work/nabors/10X_Genomics_references/CNV/refdata-GRCm38-1.0.0",
CELLRANGER_COUNT: "/igo/work/nabors/genomes/10X_Genomics/GEX/refdata-gex-mm10-2020-A"
},
"RNA": {
REF_FLAT: "/igo/work/nabors/genomes/GRCm38/Mus_musculus.GRCm38.99.ref_flat",
RIBOSOMAL_INTERVALS: "/igo/work/nabors/genomes/GRCm38/Mus_musculus.GRCm38.interval_list",
GTF: "/igo/work/nabors/genomes/GRCm38/Mus_musculus.GRCm38.99.gtf"
},
},
"mm9": {
DEFAULT: {
GENOME: "/igo/work/genomes/M.musculus/mm9/BWA_0.7.5a/mouse_mm9.fa",
REFERENCE: "/igo/work/genomes/M.musculus/mm9/mouse_mm9.fa"
},
"RNA": {
REF_FLAT: "/home/igo/resources/BED-Targets/mm9-Ref_Flat.txt",
RIBOSOMAL_INTERVALS: "/home/igo/resources/BED-Targets/mm9.ribosomal.interval_file"
},
"miRNA": {
REF_FLAT: "/home/igo/resources/BED-Targets/mm9-Ref_Flat.txt",
GENOME: "/home/igo/resources/BED-Targets/mouse_Counting_miRNA_Genome.fasta",
GTAG: "mouse_miRNA"
}
},
"mm10": {
DEFAULT: {
GENOME: "/igo/work/genomes/M.musculus/mm10/BWA_0.7.5a/mouse_mm10__All.fa",
REFERENCE: "/igo/work/genomes/M.musculus/mm10/BWA_0.7.5a/mouse_mm10__All.fa",
CELLRANGER_ATAC: "/igo/work/nabors/genomes/10X_Genomics/ATAC/refdata-cellranger-atac-mm10-1.1.0",
CELLRANGER_VDJ: "/igo/work/nabors/genomes/10X_Genomics/VDJ/refdata-cellranger-vdj-GRCm38-alts-ensembl-2.2.0",
CELLRANGER_CNV: "/igo/work/nabors/10X_Genomics_references/CNV/refdata-GRCm38-1.0.0",
CELLRANGER_COUNT: "/igo/work/nabors/genomes/10X_Genomics/GEX/refdata-gex-mm10-2020-A",
CELLRANGER_ARC: "/igo/work/nabors/genomes/10X_Genomics/ARC/refdata-cellranger-arc-mm10-2020-A-2.0.0"
},
"RNA": {
GENOME: '/igo/work/nabors/genomes/GRCm38/Mus_musculus.GRCm38.dna.primary_assembly.fa',
REFERENCE: '/igo/work/nabors/genomes/GRCm38/Mus_musculus.GRCm38.dna.primary_assembly.fa',
REF_FLAT: '/igo/work/nabors/genomes/GRCm38/Mus_musculus.GRCm38.99.ref_flat',
RIBOSOMAL_INTERVALS: '/igo/work/nabors/genomes/GRCm38/Mus_musculus.GRCm38.interval_list',
GTAG: 'GRCm38'
# REF_FLAT: "/home/igo/resources/BED-Targets/mm10-Ref_Flat.txt",
# RIBOSOMAL_INTERVALS: "/home/igo/resources/BED-Targets/mm10.ribosomal.interval_file"
},
"miRNA": {
REF_FLAT: "/home/igo/resources/BED-Targets/mm10-Ref_Flat.txt",
GENOME: "/home/igo/resources/BED-Targets/mouse_Counting_miRNA_Genome.fasta",
GTAG: "mouse_miRNA"
}
},
"rn6": {
DEFAULT: {
GENOME: "/igo/work/genomes/R.norvegicus/Rnor_6.0/BWA_0.7.5a/Rattus_norvegicus.Rnor_6.0.dna.toplevel.fa",
REFERENCE: "/igo/work/genomes/R.norvegicus/Rnor_6.0/Rattus_norvegicus.Rnor_6.0.dna.toplevel.fa"
},
"RNA": {
REF_FLAT: "/home/igo/resources/BED-Targets/Rattus_norvegicus.Rnor_6.0.94.ref_flat",
RIBOSOMAL_INTERVALS: "/home/igo/resources/BED-Targets/Rattus_norvegicus.Rnor_6.0.94.interval_list"
}
},
"dm3": {
DEFAULT: {
GENOME: "/igo/work/genomes/D.melanogaster/dm3/BWA_0.7.5a/dm3.fa",
REFERENCE: "/igo/work/genomes/D.melanogaster/dm3/BWA_0.7.5a/dm3.fa"
},
"RNA": {
REF_FLAT: "/home/igo/resources/BED-Targets/dm3-Ref_Flat.txt"
}
},
"galGal4": {
DEFAULT: {
GENOME: "/igo/work/genomes/G.gallus/BWA_0.7.5a/galGal4.fa",
REFERENCE: "/igo/work/genomes/G.gallus/BWA_0.7.5a/galGal4.fa"
},
"RNA": {
REF_FLAT: "/home/igo/resources/BED-Targets/galGal4-Ref_Flat.txt"
}
},
"sccer": {
DEFAULT: {
GENOME: "/igo/work/genomes/S.cerevisiae/sacCer2/UCSC/BWA_0.7.5a/UCSC_sacCer2.fasta",
REFERENCE: "/igo/work/genomes/S.cerevisiae/sacCer2/UCSC/BWA_0.7.5a/UCSC_sacCer2.fasta"
}
},
"danrer7": {
DEFAULT: {
GENOME: "/igo/work/genomes/D.rerio/danRer7/BWA_0.7.5a/danRer7.fa",
REFERENCE: "/igo/work/genomes/D.rerio/danRer7/BWA_0.7.5a/danRer7.fa"
},
"RNA": {
REF_FLAT: "/home/igo/resources/BED-Targets/danRer7-Ref_Flat.txt"
}
},
"ce10": {
DEFAULT: {
GENOME: "/igo/work/genomes/C.elegans/ce10/BWA_0.7.5a/ce10.fa",
REFERENCE: "/igo/work/genomes/C.elegans/ce10/ce10.fa",
REF_FLAT: "/home/igo/resources/BED-Targets/cel10-Ref_Flat.txt"
}
},
"mtubf11": {
DEFAULT: {
GENOME: "/igo/work/genomes/M.tuberculosis/f11/BWA_0.7.5a/mycobacterium_tuberculosis_f11__finished__4_contigs.fasta",
REFERENCE: "/igo/work/genomes/M.tuberculosis/f11/BWA_0.7.5a/mycobacterium_tuberculosis_f11__finished__4_contigs.fasta"
},
"RNA": {
REF_FLAT: "/home/igo/resources/BED-Targets/mycobacterium_tuberculosis_f11__RefFlat.txt"
}
},
"mtubh37r": {
DEFAULT: {
GENOME: "/igo/work/genomes/M.tuberculosis/h37rv_2/BWA_0.7.5a/mycobacterium_tuberculosis_h37rv2.fasta",
REFERENCE: "/igo/work/genomes/M.tuberculosis/h37rv_2/BWA_0.7.5a/mycobacterium_tuberculosis_h37rv2.fasta"
},
"RNA": {
REF_FLAT: "/home/igo/resources/BED-Targets/mycobacterium_tuberculosis_h37rv2_RefFlat.txt"
}
},
"ecolik12": {
DEFAULT: {
GENOME: "/igo/work/genomes/E.coli/K12/MG1655/BWA_0.7.x/eColi__MG1655.fa",
REFERENCE: "/igo/work/genomes/E.coli/K12/MG1655/BWA_0.7.x/eColi__MG1655.fa"
}
},
"pseudomonas": {
DEFAULT: {
GENOME: "/igo/work/genomes/P.aeruginosa/BWA_0.7.5a/NC_002516.fa",
REFERENCE: "/igo/work/genomes/P.aeruginosa/BWA_0.7.5a/NC_002516.fa"
}
},
"pombe": {
DEFAULT: {
GENOME: "/igo/work/genomes/S.pombe/Ensembl/BWA_0.7.5a/Schizosaccharomyces_pombe.ASM294v2.20.fa",
REFERENCE: "/igo/work/genomes/S.pombe/Ensembl/Schizosaccharomyces_pombe.ASM294v2.20.fa"
}
},
"ercc": {
DEFAULT: {
GENOME: "/home/igo/resources/BED-Targets/ERCC/BWA_0.7.5a/ERCC.fasta"
}
},
"elambda": {
DEFAULT: {
GENOME: "/igo/work/genomes/viruses/LAMBDA/Enterobacteriophage_lambda.fa",
REFERENCE: "/igo/work/genomes/viruses/LAMBDA/Enterobacteriophage_lambda.fa"
}
},
"ct24": {
DEFAULT: {
GENOME: '/igo/work/nabors/C_thermophilum/C_thermophilum.annotation.v2.4/C_thermophilum.annotation.v2.4.scaff.fa',
REFERENCE: '/igo/work/nabors/C_thermophilum/C_thermophilum.annotation.v2.4/C_thermophilum.annotation.v2.4.scaff.fa'
},
"RNA": {
REF_FLAT: '/igo/work/nabors/C_thermophilum/C_thermophilum.annotation.v2.4/C_thermophilum.annotation.v2.4.ref_flat',
RIBOSOMAL_INTERVALS: '/igo/work/nabors/C_thermophilum/C_thermophilum.annotation.v2.4/C_thermophilum.annotation.v2.4.interval_list'
}
},
".*": {
DEFAULT: {
GENOME: "INVALID",
REFERENCE: "INVALID"
}
},
}
genome_reference_mapping = get_ordered_dic(genome_reference_mapping_UNORDERED)
""" Mapping of recipe to additional run options """
recipe_options_mapping_UNORDERED = {
"IMPACT341": {
BAITS: "/home/igo/resources/ilist/IMPACT341/b37/picard_baits.interval_list",
TARGETS: "/home/igo/resources/ilist/IMPACT341/b37/picard_targets.interval_list",
MSKQ: "yes",
MD: "yes"
},
"IMPACT410.*": {
BAITS: "/home/igo/resources/ilist/IMPACT410/b37/picard_baits.interval_list",
TARGETS: "/home/igo/resources/ilist/IMPACT410/b37/picard_targets.interval_list",
MSKQ: "yes",
MD: "yes"
},
"IMPACT468": {
# NOTE: interval list file name "IMPACT468_BAITS" is stored in LIMS and passed to pipelines, change file name with caution
BAITS: "/home/igo/resources/ilist/IMPACT468/b37/IMPACT468_BAITS.interval_list",
TARGETS: "/home/igo/resources/ilist/IMPACT468/b37/IMPACT468_TARGETS.interval_list",
MSKQ: "yes",
MD: "yes"
},
"IMPACT505": {
# NOTE: interval list file name "IMPACT468_BAITS" is stored in LIMS and passed to pipelines, change file name with caution
BAITS: "/igo/home/igo/resources/ilist/hg38/IMPACT505/IMPACT505_BAITS.baits",
TARGETS: "/igo/home/igo/resources/ilist/hg38/IMPACT505/IMPACT505_TARGETS.targets",
MSKQ: "yes",
MD: "yes"
},
"HemePACT_v4": {
BAITS: "/igo/home/igo/resources/ilist/hg38/HemePACT_v4/HemePACT_v4_BAITS.baits",
TARGETS: "/igo/home/igo/resources/ilist/hg38/HemePACT_v4/HemePACT_v4_TARGETS.targets",
MSKQ: "yes",
MD: "yes"
},
"M-IMPACT_v1": {
BAITS: "/home/igo/resources/BED-Targets/IMPACT/MM_IMPACT/mm_IMPACT_v1_mm10_BAITS.iList",
TARGETS: "/home/igo/resources/BED-Targets/IMPACT/MM_IMPACT/mm_IMPACT_v1_mm10_TARGETS.iList",
MSKQ: "yes",
MD: "yes"
},
"M-IMPACT_v2": {
BAITS: "/home/igo/resources/BED-Targets/IMPACT/MM_IMPACT/M-IMPACT_v2.baits",
TARGETS: "/home/igo/resources/BED-Targets/IMPACT/MM_IMPACT/M-IMPACT_v2.targets",
MSKQ: "yes",
MD: "yes"
},
"WholeExomeSequencing": {
BAITS: "/home/igo/resources/ilist/IDT_Exome_v1_FP/b37/IDT_Exome_v1_FP_b37_baits.interval_list",
TARGETS: "/home/igo/resources/ilist/IDT_Exome_v1_FP/b37/IDT_Exome_v1_FP_b37_targets.interval_list",
MSKQ: "no",
MD: "yes"
},
"Twist_Exome": {
# TODO - Delete "Twist_Exome" or change interval lists to be GRCh37
BAITS: "/home/igo/resources/BED-Targets/Twist/Twist_Exome_Hg19_TARGETS.iList",
TARGETS: "/home/igo/resources/BED-Targets/Twist/Twist_Exome_Hg19_TARGETS.iList",
MSKQ: "no",
MD: "yes"
},
"Agilent_v4_51MB_Human": {
BAITS: "/home/igo/resources/ilist/AgilentExon_51MB_b37_v3/b37/AgilentExon_51MB_b37_v3_baits.interval_list",
TARGETS: "/home/igo/resources/ilist/AgilentExon_51MB_b37_v3/b37/AgilentExon_51MB_b37_v3_targets.interval_list",
MSKQ: "no",
MD: "yes"
},
"Agilent_MouseAllExonV1": {
BAITS: "/home/igo/resources/BED-Targets/Agilent_MouseAllExonV1_mm10_v1_baits.ilist",
TARGETS: "/home/igo/resources/BED-Targets/Agilent_MouseAllExonV1_mm10_v1_targets.ilist",
MSKQ: "no",
MD: "yes"
},
"IDT_Exome_v1_FP_Viral_Probes": {
BAITS: "/home/igo/resources/ilist/IDT_Exome_v1_FP/b37/IDT_Exome_v1_FP_b37_baits.interval_list",
TARGETS: "/home/igo/resources/ilist/IDT_Exome_v1_FP/b37/IDT_Exome_v1_FP_b37_targets.interval_list",
MSKQ: "no",
MD: "yes"
},
"IDT_Exome_v2_FP_Viral_Probes": {
BAITS: "/igo/home/igo/resources/ilist/hg38/IDT_Exome_v2_FP/IDT_Exome_v2_FP_BAITS.baits",
TARGETS: "/igo/home/igo/resources/ilist/hg38/IDT_Exome_v2_FP/IDT_Exome_v2_FP_TARGETS.targets",
MSKQ: "no",
MD: "yes"
},
"IDT_Exome_v1": {
BAITS: "/home/igo/resources/BED-Targets/xgen-exome-research-panel-BAITS.iList",
TARGETS: "/home/igo/resources/BED-Targets/xgen-exome-research-panel-TARGETS.iList",
MSKQ: "no",
MD: "yes"
},
"IDT_Exome_v1_FP": {
BAITS: "/home/igo/resources/ilist/IDT_Exome_v1_FP/b37/IDT_Exome_v1_FP_b37_baits.interval_list",
TARGETS: "/home/igo/resources/ilist/IDT_Exome_v1_FP/b37/IDT_Exome_v1_FP_b37_targets.interval_list",
MSKQ: "no",
MD: "yes"
},
"ADCC1_v2": {
BAITS: "/home/igo/resources/BED-Targets/ADCC1_V2/ADCC1_V2_BAITS.iList",
TARGETS: "/home/igo/resources/BED-Targets/ADCC1_V2/ADCC1_V2_TARGETS.iList",
MSKQ: "no",
MD: "yes"
},
"ADCC1_v3": {
BAITS: "/igo/work/nabors/bed_files/ADCC1_v3/ADCC1_v3_capture_targets_BAITS.interval_list",
TARGETS: "/igo/work/nabors/bed_files/ADCC1_v3/ADCC1_v3_primary_targets_TARGETS.interval_list",
MSKQ: "no",
MD: "yes"
},
"RDM": {
BAITS: "/home/igo/resources/BED-Targets/Rdm_Final_BAIT.iList",
TARGETS: "/home/igo/resources/BED-Targets/Rdm_Final_TARGET.iList",
MSKQ: "yes",
MD: "yes"
},
"myTYPE_V1": {
BAITS: "/home/igo/resources/BED-Targets/MM_MSK_permiss_BAIT.iList",
TARGETS: "/home/igo/resources/BED-Targets/MM_MSK_permiss_TARGET.iList",
MSKQ: "no",
MD: "yes"
},
"NR3C1": {
BAITS: "/home/igo/resources/BED-Targets/mm10_NR3C1_BAITS.iList",
TARGETS: "/home/igo/resources/BED-Targets/mm10_NR3C1_TARGETS.iList",
MSKQ: "yes",
MD: "yes"
},
"MSK-ACCESS_v1": {
BAITS: "/igo/home/igo/resources/ilist/hg38/MSK-ACCESS-v1/MSK-ACCESS-v1_0-probesAllwFP.baits",
TARGETS: "/igo/home/igo/resources/ilist/hg38/MSK-ACCESS-v1/MSK-ACCESS-v1_0-probesAllwFP.targets",
MSKQ: "no",
MD: "yes",
HAPLOTYPE_MAP: "/home/igo/fingerprint_maps/map_files/hg38_no_chr_ACCESS_unordered.map"
},
"PanCancerV2": {
BAITS: "/home/igo/resources/BED-Targets/PanCancerV2/PanCancerV2_BAITS.iList",
TARGETS: "/home/igo/resources/BED-Targets/PanCancerV2/PanCancerV2_TARGETS.iList",
MSKQ: "no",
MD: "yes"
},
"CH_v1": {
BAITS: "/home/igo/resources/BED-Targets/CH_v1/CH_v1_BAITS.interval_list",
TARGETS: "/home/igo/resources/BED-Targets/CH_v1/CH_v1_TARGETS.interval_list",
MSKQ: "no",
MD: "yes"
},
"MissionBio-Heme": {
BAITS: "/home/igo/resources/BED-Targets/Mission_Bio/AML_BAITS.interval_list",
TARGETS: "/home/igo/resources/BED-Targets/Mission_Bio/AML_TARGETS.interval_list",
MSKQ: "no",
MD: "yes"
},
"WholeExome_v4": {
BAITS: "/home/igo/resources/BED-Targets/IDT_Exome_v1_FP_BAITS.iList",
TARGETS: "/home/igo/resources/BED-Targets/IDT_Exome_v1_FP_TARGETS.iList",
MSKQ: "no",
MD: "yes"
},
"AmpliSeq": {
BAITS: "/home/igo/resources/BED-Targets/AmpliSeq.ComprehensiveCancerPanel/ComprehensiveCancer.dna_manifest.20180509.BAITS.interval_list",
TARGETS: "/home/igo/resources/BED-Targets/AmpliSeq.ComprehensiveCancerPanel/ComprehensiveCancer.dna_manifest.20180509.TARGETS.interval_list",
MSKQ: "no",
MD: "yes"
},
"PCFDDR_.*": {
BAITS: "/home/igo/resources/BED-Targets/PCFDDR_v1/PCFDDR_v1__BAITS.interval_list",
TARGETS: "/home/igo/resources/BED-Targets/PCFDDR_v1/PCFDDR_v1__TARGETS.interval_list",
MSKQ: "no",
MD: "yes"
},
"HemeBrainPACT_v1": {
BAITS: "/home/igo/resources/BED-Targets/HemeBrainPACT_v1/HemeBrainPACT_v1_BAITS.interval_list",
TARGETS: "/home/igo/resources/BED-Targets/HemeBrainPACT_v1/HemeBrainPACT_v1_TARGETS.interval_list",
MSKQ: "no",
MD: "yes"
},
"TWIST_mWES": {
BAITS: "/home/igo/resources/ilist/TWIST_mWES/Twist_mWES_BAITS.IntervalList",
TARGETS: "/home/igo/resources/ilist/TWIST_mWES/Twist_mWES_TARGETS.IntervalList"
},
"Twist_Kentsis_spikeinWES_RK_V3": {
BAITS: "/home/igo/resources/ilist/Twist_Kentsis_spikeinWES_RK_V3/Twist_Kentsis_spikeinWES_RK_V3_BAITS.intervalList",
TARGETS: "/home/igo/resources/ilist/Twist_Kentsis_spikeinWES_RK_V3/Twist_Kentsis_spikeinWES_RK_V3_TARGETS.intervalList"
},
"UBA1_plus_v1": {
BAITS: "/home/igo/resources/BED-Targets/UBA1_plus_v1/UBA1_plus_v1.baits",
TARGETS: "/home/igo/resources/BED-Targets/UBA1_plus_v1/UBA1_plus_v1.targets",
MSKQ: "no",
MD: "yes"
},
"CDH1_RNA": {
BAITS: "/igo/work/nabors/bed_files/CDH1_RNA/CDH1_RNA.baits",
TARGETS: "/igo/work/nabors/bed_files/CDH1_RNA/CDH1_RNA.targets",
MSKQ: "no",
MD: "yes"
},
"HumanWholeGenome": {
MSKQ: "no",
MD: "yes",
HAPLOTYPE_MAP: "", # TODO - Add this
GENOME: "/igo/work/genomes/H.sapiens/GRCh38.p13/ncbi-genomes-2021-09-23/GCF_000001405.39_GRCh38.p13_genomic.fna", # References that created DRAGEN reference
REFERENCE: "/igo/work/genomes/H.sapiens/GRCh38.p13/ncbi-genomes-2021-09-23/GCF_000001405.39_GRCh38.p13_genomic.fna",
DGN_REFERENCE: "/staging/ref/GRCh38"
},
"MouseWholeGenome": {
MSKQ: "no",
MD: "yes"
# TODO
# sh $DIR/../PicardScripts/LaunchPipelines.sh $RUNTYPE --input /igo/work/FASTQ/$RUNNAME/$PROJECT/ --genome $GENOME --type WGS --md $MARKDUPLICATES --mskq $MSKQ
},
"ShallowWGS": {
MSKQ: "no",
MD: "yes"
# TODO
# sh $DIR/../PicardScripts/LaunchPipelines.sh $RUNTYPE --input /igo/work/FASTQ/$RUNNAME/$PROJECT/ --genome $GENOME --type WGS --md $MARKDUPLICATES --mskq $MSKQ
},
"10X_Genomics_WGS": {
MSKQ: "no",
MD: "yes"
# TODO
# sh $DIR/../PicardScripts/LaunchPipelines.sh $RUNTYPE --input /igo/work/FASTQ/$RUNNAME/$PROJECT/ --genome $GENOME --type WGS --md $MARKDUPLICATES --mskq $MSKQ
},
"CustomAmplificationPCR": {
MSKQ: "no",
MD: "no"
# TODO
# sh $DIR/../PicardScripts/LaunchPipelines.sh $RUNTYPE --input /igo/work/FASTQ/$RUNNAME/$PROJECT/ --genome $GENOME --md $MARKDUPLICATES --mskq $MSKQ
},
"AmpliconSeq": {
MSKQ: "no",
MD: "yes"
# TODO
# sh $DIR/../PicardScripts/LaunchPipelines.sh $RUNTYPE --input /igo/work/FASTQ/$RUNNAME/$PROJECT/ --genome $GENOME --md $MARKDUPLICATES --mskq $MSKQ
},
"CRISPRSeq": {
MSKQ: "no",
MD: "yes"
# TODO
# sh ~/Scripts/PicardScripts/LaunchPipelines.sh $RUNTYPE --input /igo/work/FASTQ/$RUNNAME/$PROJECT/ --genome $GENOME --md $MARKDUPLICATES --mskq $MSKQ
},
"FusionDiscoverySeq": {
MSKQ: "no",
MD: "yes"
# TODO
# sh $DIR/../PicardScripts/LaunchPipelines.sh $RUNTYPE --input /igo/work/FASTQ/$RUNNAME/$PROJECT/ --genome $GENOME --type RNA --md $MARKDUPLICATES --mskq $MSKQ
},
".*RNA.*": {
MSKQ: "no",
MD: "yes"
# TODO
# sh $DIR/../PicardScripts/LaunchPipelines.sh $RUNTYPE --input /igo/work/FASTQ/$RUNNAME/$PROJECT/ --genome $GENOME --type RNA --md $MARKDUPLICATES --mskq $MSKQ
},
".*Ribo.*": {
MSKQ: "no",
MD: "yes"
# TODO
# sh $DIR/../PicardScripts/LaunchPipelines.sh $RUNTYPE --input /igo/work/FASTQ/$RUNNAME/$PROJECT/ --genome $GENOME --type RNA --md $MARKDUPLICATES --mskq $MSKQ
},
".*SMARTer.*": {
MSKQ: "no",
MD: "yes"
# TODO
# sh $DIR/../PicardScripts/LaunchPipelines.sh $RUNTYPE --input /igo/work/FASTQ/$RUNNAME/$PROJECT/ --genome $GENOME --type RNA --md $MARKDUPLICATES --mskq $MSKQ
},
".*96Well_SmartSeq2.*": {
MSKQ: "no",
MD: "yes"
# TODO
# sh $DIR/../PicardScripts/LaunchPipelines.sh $RUNTYPE --input /igo/work/FASTQ/$RUNNAME/$PROJECT/ --genome $GENOME --type RNA --md $MARKDUPLICATES --mskq $MSKQ
},
".*HemePACT.*v3.*": {
BAITS: "/home/igo/resources/ilist/HemePACT_v3/b37/HemePACT_v3_b37_baits.ilist",
TARGETS: "/home/igo/resources/ilist/HemePACT_v3/b37/HemePACT_v3_b37_targets.ilist",
MSKQ: "yes",
MD: "yes"
},
"IWG.*": {
BAITS: "/home/igo/resources/BED-Targets/papaemme_IWG_OID43089_hg19_MHC_RNA_max10_20oct2015_BAITS.iList",
TARGETS: "/home/igo/resources/BED-Targets/papaemme_IWG_OID43089_hg19_MHC_RNA_max10_20oct2015_TARGETS.iList",
MSKQ: "no",
MD: "yes"
},
".*08428_mm10.*": {
BAITS: "/home/igo/resources/BED-Targets/8428_mm10/8428_mm10_BAITS.iList",
TARGETS: "/home/igo/resources/BED-Targets/8428_mm10/8428_mm10_TARGETS.iList",
MSKQ: "no",
MD: "yes"
},
# FOR NEW ENTRIES
# "{regex}": { [KEY]: "{REFERENCE_FILE}", ... }
".*": {
MSKQ: "no",
MD: "yes"
} # DEFAULT
}
recipe_options_mapping = get_ordered_dic(recipe_options_mapping_UNORDERED)
| 39.375767 | 163 | 0.674795 | 3,362 | 25,673 | 4.947055 | 0.105592 | 0.0383 | 0.083694 | 0.0674 | 0.782468 | 0.750361 | 0.698533 | 0.640993 | 0.569264 | 0.488155 | 0 | 0.045777 | 0.154209 | 25,673 | 651 | 164 | 39.436252 | 0.720181 | 0.110038 | 0 | 0.273535 | 0 | 0.083481 | 0.637138 | 0.556373 | 0 | 0 | 0 | 0.001536 | 0 | 1 | 0.001776 | false | 0 | 0.001776 | 0 | 0.005329 | 0.007105 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
5a93b56ab3df066dab9c30ae4599306eeeacc570 | 1,175 | py | Python | core/board.py | Nimor111/pazaak-python | 0a3e39230c401e7d9f9d030b2279e583d70f3340 | [
"Apache-2.0"
] | 1 | 2021-09-18T05:50:46.000Z | 2021-09-18T05:50:46.000Z | core/board.py | Nimor111/pazaak-python | 0a3e39230c401e7d9f9d030b2279e583d70f3340 | [
"Apache-2.0"
] | 3 | 2021-10-05T23:24:53.000Z | 2022-02-18T03:19:56.000Z | core/board.py | Nimor111/pazaak-python | 0a3e39230c401e7d9f9d030b2279e583d70f3340 | [
"Apache-2.0"
] | 2 | 2019-07-08T08:36:22.000Z | 2021-09-18T05:50:48.000Z | from functools import reduce
import operator
from typing import List
from dataclasses import dataclass, field
import core.constants as constants
from core.player import Player
@dataclass
class Position:
x: int
y: int
@dataclass
class Board:
board: List[int] = field(
default_factory=lambda: [
[constants.EMPTY, constants.EMPTY, constants.EMPTY],
[constants.EMPTY, constants.EMPTY, constants.EMPTY],
[constants.EMPTY, constants.EMPTY, constants.EMPTY]
])
def move_new(self, position: Position, player: Player, *args, **kwargs):
raise NotImplementedError
def move(self, position: Position, player: Player, *args, **kwargs):
raise NotImplementedError
def print(self):
for row in self.board:
for col in row:
print(str(col), end=' ')
print()
def full(self, *args, **kwargs):
return not any(map(lambda x: x == constants.EMPTY, reduce(operator.iconcat, self.board, [])))
def empty_positions(self, player: Player):
raise NotImplementedError
def status(self, **kwargs):
raise NotImplementedError
| 25.543478 | 101 | 0.64766 | 133 | 1,175 | 5.699248 | 0.353383 | 0.184697 | 0.242744 | 0.295515 | 0.348285 | 0.348285 | 0.348285 | 0.348285 | 0.348285 | 0.348285 | 0 | 0 | 0.251915 | 1,175 | 45 | 102 | 26.111111 | 0.862344 | 0 | 0 | 0.242424 | 0 | 0 | 0.000851 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.181818 | false | 0 | 0.181818 | 0.030303 | 0.545455 | 0.090909 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
5ab1001df53ffae2ea2c4732d76a892857f5a9bd | 131 | py | Python | awesome/c_cpp/cpp-cheat/gdb/help.py | liujiamingustc/phd | 4f815a738abad43531d02ac66f5bd0d9a1def52a | [
"Apache-2.0"
] | 3 | 2021-01-06T03:01:18.000Z | 2022-03-21T03:02:55.000Z | awesome/c_cpp/cpp-cheat/gdb/help.py | liujiamingustc/phd | 4f815a738abad43531d02ac66f5bd0d9a1def52a | [
"Apache-2.0"
] | null | null | null | awesome/c_cpp/cpp-cheat/gdb/help.py | liujiamingustc/phd | 4f815a738abad43531d02ac66f5bd0d9a1def52a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""
Get information on the inferface.
"""
help(gdb)
help(gdb.command)
help(gdb.events)
help(gdb.function)
| 11.909091 | 33 | 0.709924 | 20 | 131 | 4.65 | 0.7 | 0.301075 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008621 | 0.114504 | 131 | 10 | 34 | 13.1 | 0.793103 | 0.419847 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
5ab6d197f6d244595049c02726c5a9fc9a778b52 | 1,130 | py | Python | tests/mtensorflow/test_tf_matrix.py | mumupy/mmdeeplearning | fb10a652197556d76ff025c631afa5645ca2cf24 | [
"Apache-2.0"
] | 9 | 2019-10-25T03:50:02.000Z | 2022-03-22T13:22:11.000Z | tests/mtensorflow/test_tf_matrix.py | mumupy/mmdeeplearning | fb10a652197556d76ff025c631afa5645ca2cf24 | [
"Apache-2.0"
] | 11 | 2019-12-11T14:47:54.000Z | 2022-02-10T00:23:57.000Z | tests/mtensorflow/test_tf_matrix.py | mumupy/mmdeeplearning | fb10a652197556d76ff025c631afa5645ca2cf24 | [
"Apache-2.0"
] | 1 | 2021-04-20T07:30:42.000Z | 2021-04-20T07:30:42.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/10/22 11:26
# @Author : ganliang
# @File : test_tf_matrix.py
# @Desc : 矩阵测试
import unittest
from mtensorflow import tf_matrix
class TestTensorflowMatrix(unittest.TestCase):
def test_matrix_matmul(self):
tf_matrix.matrix_matmul()
def test_matrix_transpose(self):
tf_matrix.matrix_transpose()
def test_matrix_trace(self):
tf_matrix.matrix_trace()
def test_matrix_determinant(self):
tf_matrix.matrix_determinant()
def test_matrix_inverse(self):
tf_matrix.matrix_inverse()
def test_matrix_svd(self):
tf_matrix.matrix_svd()
def test_matrix_qr(self):
tf_matrix.matrix_qr()
def test_matrix_diag(self):
tf_matrix.matrix_diag()
def test_matrix_reduce(self):
tf_matrix.matrix_reduce()
def test_matrix_cumsum(self):
tf_matrix.matrix_cumsum()
def test_matrix_segment(self):
tf_matrix.matrix_segment()
def test_matrix_condition(self):
tf_matrix.matrix_condition()
if __name__ == '__main__':
unittest.main()
| 21.320755 | 46 | 0.679646 | 146 | 1,130 | 4.856164 | 0.315068 | 0.157969 | 0.220028 | 0.304654 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.014739 | 0.219469 | 1,130 | 52 | 47 | 21.730769 | 0.789116 | 0.119469 | 0 | 0 | 0 | 0 | 0.008089 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.413793 | false | 0 | 0.068966 | 0 | 0.517241 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
5aba11e127ee7692266d30088bdc38a0761b5a49 | 131 | py | Python | alarmageddon/__init__.py | PearsonEducation/Alarmageddon | 71626baff9dd8066990eacef3f452f21315d4180 | [
"Apache-2.0"
] | 10 | 2015-01-22T14:11:31.000Z | 2020-08-07T11:41:29.000Z | alarmageddon/__init__.py | PearsonEducation/Alarmageddon | 71626baff9dd8066990eacef3f452f21315d4180 | [
"Apache-2.0"
] | 31 | 2015-01-07T20:38:16.000Z | 2019-04-12T14:06:42.000Z | alarmageddon/__init__.py | PearsonEducation/Alarmageddon | 71626baff9dd8066990eacef3f452f21315d4180 | [
"Apache-2.0"
] | 11 | 2015-01-07T01:42:01.000Z | 2019-03-19T06:32:20.000Z | """Alarmageddon main module"""
__version__ = "1.1.2"
from alarmageddon.run import run_tests, construct_publishers, load_config
| 16.375 | 73 | 0.770992 | 17 | 131 | 5.529412 | 0.823529 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.026087 | 0.122137 | 131 | 7 | 74 | 18.714286 | 0.791304 | 0.183206 | 0 | 0 | 0 | 0 | 0.050505 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
5ad862a436266f8215754ad931c6e1e64b1aef34 | 865 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v8_0/rename_items_in_status_field_of_material_request.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/patches/v8_0/rename_items_in_status_field_of_material_request.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v8_0/rename_items_in_status_field_of_material_request.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | from __future__ import unicode_literals
import frappe
def execute():
frappe.db.sql(
"""
UPDATE `tabMaterial Request`
SET status = CASE
WHEN docstatus = 2 THEN 'Cancelled'
WHEN docstatus = 0 THEN 'Draft'
ELSE CASE
WHEN status = 'Stopped' THEN 'Stopped'
WHEN status != 'Stopped' AND per_ordered = 0 THEN 'Pending'
WHEN per_ordered < 100 AND per_ordered > 0 AND status != 'Stopped'
THEN 'Partially Ordered'
WHEN per_ordered = 100 AND material_request_type = 'Purchase'
AND status != 'Stopped' THEN 'Ordered'
WHEN per_ordered = 100 AND material_request_type = 'Material Transfer'
AND status != 'Stopped' THEN 'Transferred'
WHEN per_ordered = 100 AND material_request_type = 'Material Issue'
AND status != 'Stopped' THEN 'Issued'
END
END
"""
) | 34.6 | 78 | 0.643931 | 104 | 865 | 5.192308 | 0.375 | 0.144444 | 0.157407 | 0.125926 | 0.309259 | 0.272222 | 0.272222 | 0.272222 | 0.272222 | 0 | 0 | 0.025437 | 0.272832 | 865 | 25 | 79 | 34.6 | 0.833068 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | true | 0 | 0.4 | 0 | 0.6 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
85216ffad53620eeec7575278599b767b04ae2a7 | 884 | py | Python | Django/mysite/backend/migrations/0011_auto_20201006_2153.py | Born7Sh/Shared-Economy-Based-Seat-Reservation-Platform-Service | cbed082c9a2aa912af5514d346adbde53e8b3ad8 | [
"Apache-2.0"
] | 1 | 2021-09-08T04:49:45.000Z | 2021-09-08T04:49:45.000Z | Django/mysite/backend/migrations/0011_auto_20201006_2153.py | Born7Sh/Shared-Economy-Based-Seat-Reservation-Platform-Service | cbed082c9a2aa912af5514d346adbde53e8b3ad8 | [
"Apache-2.0"
] | null | null | null | Django/mysite/backend/migrations/0011_auto_20201006_2153.py | Born7Sh/Shared-Economy-Based-Seat-Reservation-Platform-Service | cbed082c9a2aa912af5514d346adbde53e8b3ad8 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1 on 2020-10-06 12:53
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('backend', '0010_auto_20201003_1802'),
]
operations = [
migrations.AddField(
model_name='booking1',
name='phone',
field=models.CharField(blank=True, max_length=11),
),
migrations.AddField(
model_name='booking2',
name='phone',
field=models.CharField(blank=True, max_length=11),
),
migrations.AddField(
model_name='booking3',
name='phone',
field=models.CharField(blank=True, max_length=11),
),
migrations.AddField(
model_name='check',
name='phone',
field=models.CharField(blank=True, max_length=11),
),
]
| 26 | 62 | 0.557692 | 88 | 884 | 5.477273 | 0.454545 | 0.149378 | 0.190871 | 0.224066 | 0.574689 | 0.574689 | 0.574689 | 0.574689 | 0.574689 | 0.574689 | 0 | 0.068562 | 0.323529 | 884 | 33 | 63 | 26.787879 | 0.737458 | 0.048643 | 0 | 0.592593 | 1 | 0 | 0.09416 | 0.027414 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.037037 | 0 | 0.148148 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
852c1b1979cbcc9e8a64f40a5a76a29ad8c16bfa | 119 | py | Python | release/stubs.min/Tekla/Structures/ModelInternal_parts/dotStringProperty_t.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 182 | 2017-06-27T02:26:15.000Z | 2022-03-30T18:53:43.000Z | release/stubs.min/Tekla/Structures/ModelInternal_parts/dotStringProperty_t.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 28 | 2017-06-27T13:38:23.000Z | 2022-03-15T11:19:44.000Z | release/stubs.min/Tekla/Structures/ModelInternal_parts/dotStringProperty_t.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 67 | 2017-06-28T09:43:59.000Z | 2022-03-20T21:17:10.000Z | class dotStringProperty_t(object):
# no doc
aName=None
aValueString=None
FatherId=None
ValueStringIteration=None
| 14.875 | 34 | 0.806723 | 14 | 119 | 6.785714 | 0.785714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.12605 | 119 | 7 | 35 | 17 | 0.913462 | 0.05042 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
51934fec130aaed6b39efe0788487c7f11d76b6c | 153 | py | Python | plugins/webosint/who/whois.py | Appnet1337/OSINT-SAN | 8379c31eac598d0aff9d15ba74645800aa1352f4 | [
"BSD-2-Clause"
] | 313 | 2020-12-30T10:18:45.000Z | 2022-03-23T21:11:05.000Z | plugins/webosint/who/whois.py | ttt888ttt/OSINT-SAN | 6be6f859a3c689f1ab62807a171ee78a2dcc17af | [
"BSD-2-Clause"
] | 18 | 2020-12-18T18:19:09.000Z | 2022-03-30T11:44:57.000Z | plugins/webosint/who/whois.py | ttt888ttt/OSINT-SAN | 6be6f859a3c689f1ab62807a171ee78a2dcc17af | [
"BSD-2-Clause"
] | 65 | 2021-01-16T13:42:04.000Z | 2022-03-25T12:50:27.000Z | import requests
def whois_more(IP):
result = requests.get('http://api.hackertarget.com/whois/?q=' + IP).text
print('\n'+ result + '\n')
| 25.5 | 80 | 0.607843 | 21 | 153 | 4.380952 | 0.761905 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.196078 | 153 | 5 | 81 | 30.6 | 0.747967 | 0 | 0 | 0 | 0 | 0 | 0.267974 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0 | 0.5 | 0.25 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
51a4d9f7794752a536409d5dbaa91cd24000dcff | 840 | py | Python | ehelply_python_sdk/services/service_sdk_base.py | eHelply/Python-eHelply-SDK | b46f4408b25d85e2f869fa37cf882e20139b1beb | [
"Apache-2.0"
] | null | null | null | ehelply_python_sdk/services/service_sdk_base.py | eHelply/Python-eHelply-SDK | b46f4408b25d85e2f869fa37cf882e20139b1beb | [
"Apache-2.0"
] | null | null | null | ehelply_python_sdk/services/service_sdk_base.py | eHelply/Python-eHelply-SDK | b46f4408b25d85e2f869fa37cf882e20139b1beb | [
"Apache-2.0"
] | null | null | null | from typing import Union
from pydantic import BaseModel
import httpx
from ehelply_python_sdk.utils import SDKConfiguration
class SDKBase:
"""
Provides the base class for service SDKs
"""
def __init__(self, sdk_configuration: SDKConfiguration, requests_session: httpx.AsyncClient) -> None:
self.sdk_configuration: SDKConfiguration = sdk_configuration
self.requests_session: httpx.AsyncClient = requests_session
def get_base_url(self) -> str:
if self.sdk_configuration.base_url_override:
return self.sdk_configuration.base_url_override
else:
return "https://api.prod.ehelply.com"
def load(self) -> bool:
return True
def get_docs_url(self) -> str:
return "Not available yet"
def get_service_version(self) -> str:
return ""
| 27.096774 | 105 | 0.696429 | 100 | 840 | 5.61 | 0.47 | 0.142603 | 0.142603 | 0.128342 | 0.124777 | 0.124777 | 0 | 0 | 0 | 0 | 0 | 0 | 0.228571 | 840 | 30 | 106 | 28 | 0.865741 | 0.047619 | 0 | 0 | 0 | 0 | 0.057398 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.263158 | false | 0 | 0.210526 | 0.157895 | 0.789474 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
51b61ec9ca99d38b1a249dc644c21bb58d0a29e2 | 493 | py | Python | koku/api/migrations/0031_clone_schema.py | rubik-ai/koku | 3255d1c217b7b6685cb2e130bf4e025946e76fac | [
"Apache-2.0"
] | 157 | 2018-04-30T16:27:53.000Z | 2022-03-31T08:17:21.000Z | koku/api/migrations/0031_clone_schema.py | rubik-ai/koku | 3255d1c217b7b6685cb2e130bf4e025946e76fac | [
"Apache-2.0"
] | 3,250 | 2018-04-26T14:14:25.000Z | 2022-03-31T23:49:15.000Z | koku/api/migrations/0031_clone_schema.py | rubik-ai/koku | 3255d1c217b7b6685cb2e130bf4e025946e76fac | [
"Apache-2.0"
] | 65 | 2018-05-10T14:11:50.000Z | 2022-03-18T19:22:58.000Z | # Generated by Django 3.1.2 on 2020-10-14 12:24
import os
from django.db import migrations
from koku import migration_sql_helpers as msh
def apply_clone_schema(apps, schema_editor):
path = msh.find_db_functions_dir()
msh.apply_sql_file(schema_editor, os.path.join(path, "clone_schema.sql"), literal_placeholder=True)
class Migration(migrations.Migration):
dependencies = [("api", "0030_auto_20201007_1403")]
operations = [migrations.RunPython(code=apply_clone_schema)]
| 25.947368 | 103 | 0.770791 | 73 | 493 | 4.958904 | 0.657534 | 0.09116 | 0.088398 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.072093 | 0.127789 | 493 | 18 | 104 | 27.388889 | 0.769767 | 0.091278 | 0 | 0 | 1 | 0 | 0.09417 | 0.05157 | 0 | 0 | 0 | 0 | 0 | 1 | 0.111111 | false | 0 | 0.333333 | 0 | 0.777778 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
51d5974d025221a74566a1a363ac0e8418bd616c | 1,011 | py | Python | md/_nbdev.py | eschmidt42/molecular-dynamics | cd2f39324c6992e284d6024c40d578e0babb4aa3 | [
"Apache-2.0"
] | null | null | null | md/_nbdev.py | eschmidt42/molecular-dynamics | cd2f39324c6992e284d6024c40d578e0babb4aa3 | [
"Apache-2.0"
] | null | null | null | md/_nbdev.py | eschmidt42/molecular-dynamics | cd2f39324c6992e284d6024c40d578e0babb4aa3 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {"PairwiseDistance": "00_distance.ipynb",
"pairwise_dist_gram": "00_distance.ipynb",
"stackoverflow_pairwise_distance": "00_distance.ipynb",
"PairwiseDistance.stackoverflow_pairwise_distance": "00_distance.ipynb",
"torch_pairwise_distance": "00_distance.ipynb",
"PairwiseDistance.torch_pairwise_distance": "00_distance.ipynb",
"measure_execution_time": "00_distance.ipynb",
"get_time_stats": "00_distance.ipynb",
"DistanceMatrixIndexMapper": "00_distance.ipynb",
"Hull": "00_distance.ipynb",
"to_2dpositions": "00_distance.ipynb",
"Hull.to_2dpositions": "00_distance.ipynb",
"plot_atoms_and_hull": "00_distance.ipynb"}
modules = ["distance.py"]
doc_url = "https://eschmidt42.github.io/md/"
git_url = "https://github.com/eschmidt42/md/tree/master/"
def custom_doc_links(name): return None
| 38.884615 | 81 | 0.691395 | 115 | 1,011 | 5.704348 | 0.417391 | 0.198171 | 0.297256 | 0.158537 | 0.378049 | 0.292683 | 0 | 0 | 0 | 0 | 0 | 0.03796 | 0.166172 | 1,011 | 25 | 82 | 40.44 | 0.740214 | 0.035608 | 0 | 0 | 1 | 0 | 0.654676 | 0.194245 | 0 | 0 | 0 | 0 | 0 | 1 | 0.055556 | false | 0 | 0 | 0.055556 | 0.055556 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
51da57849665550d4751285dcf5f642809564fc3 | 857 | py | Python | saleor/graphql/crawler/resolvers.py | nlkhagva/ushop | abf637eb6f7224e2d65d62d72a0c15139c64bb39 | [
"CC-BY-4.0"
] | null | null | null | saleor/graphql/crawler/resolvers.py | nlkhagva/ushop | abf637eb6f7224e2d65d62d72a0c15139c64bb39 | [
"CC-BY-4.0"
] | 1 | 2022-02-15T03:31:12.000Z | 2022-02-15T03:31:12.000Z | saleor/graphql/crawler/resolvers.py | nlkhagva/ushop | abf637eb6f7224e2d65d62d72a0c15139c64bb39 | [
"CC-BY-4.0"
] | null | null | null | import graphene
from ...unurshop.crawler import models
from .types import Crawler
import tldextract
from datetime import datetime
CRAWLER_SEARCH_FIELDS = ("url", "shop", "completed")
def resolve_crawler(info, crawler_id=None):
assert crawler_id, "No crawler ID or slug provided."
user = info.context.user
crawler = graphene.Node.get_node_from_global_id(info, crawler_id, Crawler)
# Resolve to null if page is not published and user has no permission
# to manage pages.
return crawler
def resolve_crawlers(info, query):
user = info.context.user
return models.Crawler.objects.visible_to_user(user)
def resolve_crawler_lines(info, query):
return models.CrawlerLine.objects
def resolve_expired_crawler_lines(info, query):
return models.CrawlerLine.objects.filter(ustatus=1).filter(sync_at__lt=datetime.today()) | 27.645161 | 92 | 0.765461 | 120 | 857 | 5.291667 | 0.466667 | 0.062992 | 0.053543 | 0.059843 | 0.16063 | 0.16063 | 0.16063 | 0.16063 | 0 | 0 | 0 | 0.001372 | 0.149358 | 857 | 31 | 92 | 27.645161 | 0.869685 | 0.098016 | 0 | 0.111111 | 0 | 0 | 0.06096 | 0 | 0 | 0 | 0 | 0 | 0.055556 | 1 | 0.222222 | false | 0 | 0.277778 | 0.111111 | 0.722222 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
51f575e03bbfb247dbde008c41a54c50d46037fe | 762 | py | Python | stats/data/endpoints.py | vyahello/nba_stats | db16d84898dc7ee1b1a2dac513675dee9570c8ec | [
"MIT"
] | 3 | 2019-11-08T21:56:36.000Z | 2021-12-26T20:23:29.000Z | stats/data/endpoints.py | vyahello/nba_stats | db16d84898dc7ee1b1a2dac513675dee9570c8ec | [
"MIT"
] | 3 | 2019-11-09T16:11:51.000Z | 2019-11-09T16:14:37.000Z | stats/data/endpoints.py | vyahello/nba_stats | db16d84898dc7ee1b1a2dac513675dee9570c8ec | [
"MIT"
] | 1 | 2021-04-01T12:33:46.000Z | 2021-04-01T12:33:46.000Z | from abc import ABC, abstractmethod
from functools import lru_cache
from typing import Dict, Any
from stats.support.web_api.requests import Request, BotRequest
from stats.support.web_api.urls import Url
class Endpoint(ABC):
"""Abstract interface for some data set endpoint."""
@abstractmethod
def as_dict(self) -> Dict[Any, Any]:
pass
class UnifiedEndpoint(Endpoint):
"""Unified statistics interface endpoint data set."""
def __init__(self, *path: Any) -> None:
self._request: Request = BotRequest(Url('http://data.nba.net/10s/prod/v1', *path))
@lru_cache()
def as_dict(self) -> Dict[Any, Any]:
"""Decorate method to be invoked only once in a life cycle."""
return self._request.get().as_dict()
| 29.307692 | 90 | 0.692913 | 105 | 762 | 4.904762 | 0.533333 | 0.040777 | 0.062136 | 0.073786 | 0.174757 | 0.08932 | 0.08932 | 0 | 0 | 0 | 0 | 0.004854 | 0.188976 | 762 | 25 | 91 | 30.48 | 0.828479 | 0.198163 | 0 | 0.133333 | 0 | 0 | 0.052101 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0.066667 | 0.333333 | 0 | 0.733333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 3 |
51f67db00b2ca0e7c25d85f13e39c4c9cc382764 | 588 | py | Python | app/__init__.py | stuartlogan82/flex-interactions-api | caedac8b8ba25da96db5e6231b4c9011aa4bcff8 | [
"MIT"
] | 3 | 2018-12-21T17:11:13.000Z | 2019-09-07T20:28:30.000Z | app/__init__.py | stuartlogan82/flex-interactions-api | caedac8b8ba25da96db5e6231b4c9011aa4bcff8 | [
"MIT"
] | null | null | null | app/__init__.py | stuartlogan82/flex-interactions-api | caedac8b8ba25da96db5e6231b4c9011aa4bcff8 | [
"MIT"
] | null | null | null | from flask import Flask, render_template
from flask_sqlalchemy import SQLAlchemy
from config import config
db = SQLAlchemy()
def create_app(config_name):
app = Flask(__name__)
app.config.from_object(config[config_name])
config[config_name].init_app(app)
db.init_app(app)
@app.route('/')
def index():
return '<h1>API Running!</h1>'
@app.errorhandler(404)
def page_not_found(e):
return render_template('404.html'), 404
@app.errorhandler(500)
def server_error(e):
return render_template('500.html'), 500
return app
| 21 | 47 | 0.680272 | 80 | 588 | 4.775 | 0.375 | 0.109948 | 0.08377 | 0.109948 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.042735 | 0.204082 | 588 | 27 | 48 | 21.777778 | 0.773504 | 0 | 0 | 0 | 0 | 0 | 0.064626 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.210526 | false | 0 | 0.157895 | 0.157895 | 0.578947 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
cfae4ed3219798170f6507fe52a710fbb954ff96 | 142 | py | Python | skhubness/neighbors/nearest_centroid.py | saper0/scikit-hubness | a50507fe791d8712db46347056f159f18aeb31fa | [
"BSD-3-Clause"
] | 1 | 2020-04-30T19:36:59.000Z | 2020-04-30T19:36:59.000Z | skhubness/neighbors/nearest_centroid.py | saper0/scikit-hubness | a50507fe791d8712db46347056f159f18aeb31fa | [
"BSD-3-Clause"
] | null | null | null | skhubness/neighbors/nearest_centroid.py | saper0/scikit-hubness | a50507fe791d8712db46347056f159f18aeb31fa | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# SPDX-License-Identifier: BSD-3-Clause
from sklearn.neighbors import NearestCentroid
__all__ = ['NearestCentroid']
| 20.285714 | 45 | 0.732394 | 16 | 142 | 6.25 | 0.9375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.016 | 0.119718 | 142 | 6 | 46 | 23.666667 | 0.784 | 0.415493 | 0 | 0 | 0 | 0 | 0.1875 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
cfb1fdb9ea483257edfe1e4d162a2fd1fe6cfcf7 | 841 | py | Python | catstuff/tools/debug.py | modora/catstuff | 7a4ea67e26774e42e90d0c71a4b2c299fe506d73 | [
"MIT"
] | null | null | null | catstuff/tools/debug.py | modora/catstuff | 7a4ea67e26774e42e90d0c71a4b2c299fe506d73 | [
"MIT"
] | 7 | 2017-12-16T06:16:56.000Z | 2017-12-26T06:21:18.000Z | catstuff/tools/debug.py | modora/catstuff | 7a4ea67e26774e42e90d0c71a4b2c299fe506d73 | [
"MIT"
] | null | null | null | def print_vars(obj):
"""
Prints all non-private attributes variables (does not start with '_' and not method)
:param obj:
:return:
"""
for attr in dir(obj):
if attr[0] is "_" or callable(getattr(obj,attr)):
continue
print(attr, ":", getattr(obj, attr))
def print_methods(obj):
"""
Prints all non-private attributes methods (does not start with '_' and not method)
:param obj:
:return:
"""
for attr in dir(obj):
if attr[0] is "_" or not callable(getattr(obj,attr)):
continue
print(attr, ":", getattr(obj, attr))
def print_attr(obj):
"""
Prints all non-private attributes
:param obj:
:return:
"""
for attr in dir(obj):
if attr[0] is "_":
continue
print(attr, ":", getattr(obj, attr)) | 24.735294 | 88 | 0.562426 | 108 | 841 | 4.305556 | 0.277778 | 0.107527 | 0.150538 | 0.096774 | 0.909677 | 0.909677 | 0.636559 | 0.636559 | 0.636559 | 0.636559 | 0 | 0.005111 | 0.302021 | 841 | 34 | 89 | 24.735294 | 0.787053 | 0.313912 | 0 | 0.6 | 0 | 0 | 0.011811 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0 | 0 | 0.2 | 0.4 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
cfbc6280e94cfcdd61ef344b6f720a0cf7cefd9b | 264 | py | Python | test_autolens/integration/tests/imaging/lens_only/mock_nlo/lens_x2_light__separate.py | PyJedi/PyAutoLens | bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7 | [
"MIT"
] | 1 | 2020-04-06T20:07:56.000Z | 2020-04-06T20:07:56.000Z | test_autolens/integration/tests/imaging/lens_only/mock_nlo/lens_x2_light__separate.py | PyJedi/PyAutoLens | bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7 | [
"MIT"
] | null | null | null | test_autolens/integration/tests/imaging/lens_only/mock_nlo/lens_x2_light__separate.py | PyJedi/PyAutoLens | bcfb2e7b447aa24508fc648d60b6fd9b4fd852e7 | [
"MIT"
] | null | null | null | from test_autolens.integration.tests.imaging.lens_only import lens_x2_light__separate
from test_autolens.integration.tests.imaging.runner import run_a_mock
class TestCase:
def _test__lens_x2_light__separate(self):
run_a_mock(lens_x2_light__separate)
| 33 | 85 | 0.844697 | 40 | 264 | 5.025 | 0.5 | 0.089552 | 0.164179 | 0.283582 | 0.38806 | 0.38806 | 0 | 0 | 0 | 0 | 0 | 0.012658 | 0.102273 | 264 | 7 | 86 | 37.714286 | 0.835443 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.4 | 0 | 0.8 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
cfc3f041ca5e7168c41e7c2b31c9f842d38e9f59 | 335 | py | Python | azdocli/strategies/pipelineruns_get_strategy.py | migzpogi/azdo-cli | a96eb516568e7ff814accf41b5511a17b5da4197 | [
"MIT"
] | 1 | 2020-10-08T13:02:38.000Z | 2020-10-08T13:02:38.000Z | azdocli/strategies/pipelineruns_get_strategy.py | migzpogi/azdo-cli | a96eb516568e7ff814accf41b5511a17b5da4197 | [
"MIT"
] | null | null | null | azdocli/strategies/pipelineruns_get_strategy.py | migzpogi/azdo-cli | a96eb516568e7ff814accf41b5511a17b5da4197 | [
"MIT"
] | null | null | null | from azdocli.strategies.strategy_context import Strategy
from azdocli.lib.pipelines import PipelinesAPI
class PipelinerunsGetStrategy(Strategy):
def run_strategy(self):
pipelinesapi = PipelinesAPI(self.org_name, self.org_pat)
return pipelinesapi.get_pipelineruns(self.ctx['project_name'], self.ctx['pipeline_id']) | 41.875 | 95 | 0.791045 | 40 | 335 | 6.45 | 0.6 | 0.085271 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.119403 | 335 | 8 | 95 | 41.875 | 0.874576 | 0 | 0 | 0 | 0 | 0 | 0.068452 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.333333 | 0 | 0.833333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
cfc4b1843959b4f2cf46413e195e651a48bd3f52 | 7,410 | py | Python | chb/userdata/UserBType.py | kestreltechnology/CodeHawk-Binary | aa0b2534e0318e5fb3770ec7b4d78feb0feb2394 | [
"MIT"
] | null | null | null | chb/userdata/UserBType.py | kestreltechnology/CodeHawk-Binary | aa0b2534e0318e5fb3770ec7b4d78feb0feb2394 | [
"MIT"
] | null | null | null | chb/userdata/UserBType.py | kestreltechnology/CodeHawk-Binary | aa0b2534e0318e5fb3770ec7b4d78feb0feb2394 | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# CodeHawk Binary Analyzer
# Author: Henny Sipma
# ------------------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2021 Aarno Labs, LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------
"""Representation of a type in json."""
import xml.etree.ElementTree as ET
from abc import ABC, abstractmethod
from typing import Any, Dict, List, Optional
import chb.util.fileutil as UF
class UserBTypeStore:
def __init__(self, namedtypes: Dict[str, int]) -> None:
self._basetypes: Dict[str, "UserBType"] = {}
self._typedefs: Dict[str, "UserBType"] = {}
self._initialize(namedtypes)
def add_typedef(self, name: str, t: "UserBType") -> None:
self._typedefs[name] = t
def has_named_type(self, name) -> bool:
return name in self._basetypes or name in self._typedefs
def has_size_of(self, name) -> bool:
if name in self._basetypes:
return True
else:
return name in self._typedefs and self._typedefs[name].has_size()
def size_of(self, name: str) -> int:
if self.has_size_of(name):
if name in self._basetypes:
return self._basetypes[name].size
else:
return self._typedefs[name].size
else:
raise UF.CHBError("Size of named type: " + name + " not found")
def _initialize(self, namedtypes) -> None:
for (name, size) in namedtypes.items():
self._basetypes[name] = UserNamedBType(name, size=size)
class UserBType(ABC):
def __init__(self) -> None:
pass
@property
def is_named_type(self) -> bool:
return False
@property
def is_pointer_type(self) -> bool:
return False
@property
def is_array_type(self) -> bool:
return False
@property
def is_struct_type(self) -> bool:
return False
@property
@abstractmethod
def size(self) -> int:
...
def has_size(self) -> bool:
return False
def to_xml(self, node: ET.Element) -> None:
raise UF.CHBError("No implementation for to_xml: " + str(self))
def __str__(self) -> str:
return "btype"
class UserNamedBType(UserBType):
def __init__(self, name: str, size: Optional[int] = None) -> None:
self._name = name
self._size = size
@property
def name(self) -> str:
return self._name
def has_size(self) -> bool:
return self._size is not None
@property
def size(self) -> int:
if self._size is not None:
return self._size
else:
raise UF.CHBError("Size not available for " + self.name)
@property
def is_named_type(self) -> bool:
return True
def to_xml(self, node: ET.Element) -> None:
node.text = self.name
def __str__(self) -> str:
return self.name
class UserPointerBType(UserBType):
def __init__(self, tgt: UserBType) -> None:
self._tgt = tgt
@property
def target_type(self) -> UserBType:
return self._tgt
@property
def is_pointer_type(self) -> bool:
return True
def has_size(self) -> bool:
return True
@property
def size(self) -> int:
return 4
def to_xml(self, node: ET.Element) -> None:
ptrnode = ET.Element("ptr")
node.append(ptrnode)
self.target_type.to_xml(ptrnode)
def __str__(self) -> str:
return "*" + str(self.target_type)
class UserArrayBType(UserBType):
def __init__(self, tgt: UserBType, num_elements) -> None:
self._tgt = tgt
self._num_elements = num_elements
@property
def element_type(self) -> UserBType:
return self._tgt
@property
def num_elements(self) -> int:
return self._num_elements
@property
def is_array_type(self) -> bool:
return True
def has_size(self) -> bool:
return self.element_type.has_size()
@property
def size(self) -> int:
return self.element_type.size * self.num_elements
def to_xml(self, node: ET.Element) -> None:
anode = ET.Element("array")
node.append(anode)
self.element_type.to_xml(anode)
anode.set("size", str(self.num_elements))
def __str__(self) -> str:
return str(self.element_type) + "[" + str(self.num_elements) + "]"
class UserStructBType(UserBType):
def __init__(self, fields: List["UserStructBFieldInfo"]) -> None:
self._fields = fields
@property
def fields(self) -> List["UserStructBFieldInfo"]:
return self._fields
@property
def is_struct_type(self) -> bool:
return True
def has_size(self) -> bool:
return True
@property
def size(self) -> int:
return self.fields[-1].offset + self.fields[-1].size
def to_xml(self, node: ET.Element) -> None:
ffnode = ET.Element("fields")
node.append(ffnode)
for fld in self.fields:
fnode = ET.Element("field")
ffnode.append(fnode)
fld.to_xml(fnode)
def __str__(self) -> str:
lines: List[str] = []
for f in self.fields:
lines.append(str(f))
return "\n".join(lines)
class UserStructBFieldInfo:
def __init__(
self,
name: str,
btype: UserBType,
offset: int,
size: int) -> None:
self._name = name
self._btype = btype
self._offset = offset
self._size = size
@property
def name(self) -> str:
return self._name
@property
def field_type(self) -> "UserBType":
return self._btype
@property
def offset(self) -> int:
return self._offset
@property
def size(self) -> int:
return self._size
def to_xml(self, node: ET.Element) -> None:
node.set("name", self.name)
node.set("size", str(self.size))
node.set("offset", str(self.offset))
tnode = ET.Element("type")
node.append(tnode)
self.field_type.to_xml(tnode)
def __str__(self) -> str:
return str(self.offset).rjust(3) + " " + self.name + ": " + str(self.field_type)
| 26.945455 | 89 | 0.599325 | 919 | 7,410 | 4.670294 | 0.208923 | 0.053821 | 0.042404 | 0.033551 | 0.326654 | 0.280755 | 0.231128 | 0.189655 | 0.09343 | 0.069432 | 0 | 0.001473 | 0.267206 | 7,410 | 274 | 90 | 27.043796 | 0.78895 | 0.188124 | 0 | 0.47486 | 0 | 0 | 0.035756 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.284916 | false | 0.005587 | 0.022346 | 0.173184 | 0.553073 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
cfca66e88ac1b147c0764c6597200a0ddfe05662 | 1,983 | py | Python | arc852/utils.py | athenian-robotics/common-robotics-python | a2ede8fb3072cf1baa53672f76081aa6bfde397f | [
"MIT"
] | 1 | 2019-02-20T22:59:59.000Z | 2019-02-20T22:59:59.000Z | arc852/utils.py | athenian-robotics/common-robotics | a2ede8fb3072cf1baa53672f76081aa6bfde397f | [
"MIT"
] | null | null | null | arc852/utils.py | athenian-robotics/common-robotics | a2ede8fb3072cf1baa53672f76081aa6bfde397f | [
"MIT"
] | 1 | 2020-05-23T09:08:42.000Z | 2020-05-23T09:08:42.000Z | import logging
import platform
import sys
import time
def add_http_prefix(url):
return url if url.startswith("http://") or url.startswith("https://") else "http://" + url
# def mqtt_broker_info(val):
# # Broker hostname can be either "localhost" or "localhost:999"
# return (val[:val.index(":")], int(val[val.index(":") + 1:])) if ":" in val else (val, 1883)
def is_raspi():
return platform.system() == "Linux"
def is_windows():
return sys.platform == "win32"
def is_python3():
return sys.version_info[0] >= 3
def waitForKeyboardInterrupt():
try:
sleep()
except KeyboardInterrupt:
pass
def sleep():
while True:
time.sleep(60)
def current_time_millis():
return int(round(time.time() * 1000))
def strip_args(args, *excludes):
return {k: args[k] for k in args.keys() if k not in excludes}
def strip_loglevel(args):
return {k: args[k] for k in args.keys() if k != "loglevel"}
def setup_logging(filename=None,
filemode="a",
stream=sys.stderr,
level=logging.INFO,
format="%(asctime)s %(name)-10s %(funcName)-10s():%(lineno)i: %(levelname)-6s %(message)s"):
if filename:
logging.basicConfig(filename=filename, filemode=filemode, level=level, format=format)
else:
logging.basicConfig(stream=stream, level=level, format=format)
# As described at http://legacy.python.org/dev/peps/pep-0469/
try:
dict.iteritems
except AttributeError:
# Python 3
def itervalues(d):
return iter(d.values())
def iteritems(d):
return iter(d.items())
def listvalues(d):
return list(d.values())
def listitems(d):
return list(d.items())
else:
# Python 2
def itervalues(d):
return d.itervalues()
def iteritems(d):
return d.iteritems()
def listvalues(d):
return d.values()
def listitems(d):
return d.items()
| 20.030303 | 110 | 0.611195 | 257 | 1,983 | 4.66537 | 0.404669 | 0.046706 | 0.026689 | 0.020017 | 0.091743 | 0.091743 | 0.048374 | 0.048374 | 0.048374 | 0.048374 | 0 | 0.02008 | 0.246596 | 1,983 | 98 | 111 | 20.234694 | 0.782463 | 0.133132 | 0 | 0.218182 | 0 | 0.018182 | 0.071303 | 0.016949 | 0 | 0 | 0 | 0 | 0 | 1 | 0.327273 | false | 0.018182 | 0.072727 | 0.272727 | 0.672727 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
cfd07a6e8aaf155c6817862e586e1ea68668d02e | 174 | py | Python | setup.py | enmathe/gg_test | c4113e2ad81bb01791ac0b4dbb9cb5e843dfccf4 | [
"MIT"
] | null | null | null | setup.py | enmathe/gg_test | c4113e2ad81bb01791ac0b4dbb9cb5e843dfccf4 | [
"MIT"
] | null | null | null | setup.py | enmathe/gg_test | c4113e2ad81bb01791ac0b4dbb9cb5e843dfccf4 | [
"MIT"
] | 5 | 2021-05-19T15:19:31.000Z | 2021-06-15T13:35:24.000Z | aws_access_key_id = AKIAIOSFODNN7XXAMPPPqsdfq
aws_secret_access_key = "wJalrXUtnLAMI/K7MDENG/bPxRfiCYEXAMPLEKEYqsdfq"
some_key = "xoxb-262594206834-FGqllMF7t14v8N45q4i67vs4"
| 43.5 | 71 | 0.885057 | 17 | 174 | 8.647059 | 0.764706 | 0.122449 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.145455 | 0.051724 | 174 | 3 | 72 | 58 | 0.745455 | 0 | 0 | 0 | 0 | 0 | 0.5 | 0.5 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
cfd147fe128b4914a6b60649da5f15b887cb5d63 | 348 | py | Python | qualitymeter/java_components/java_method_parameter.py | fatemehkarimi/QualityMeter | 349aeff9cada12bba803aa21d8883220495c0d81 | [
"MIT"
] | 1 | 2022-03-04T06:00:44.000Z | 2022-03-04T06:00:44.000Z | qualitymeter/java_components/java_method_parameter.py | fatemehkarimi/QualityMeter | 349aeff9cada12bba803aa21d8883220495c0d81 | [
"MIT"
] | 5 | 2021-11-18T14:06:21.000Z | 2021-12-24T16:19:15.000Z | qualitymeter/java_components/java_method_parameter.py | fatemehkarimi/QualityMeter | 349aeff9cada12bba803aa21d8883220495c0d81 | [
"MIT"
] | 20 | 2021-11-15T05:06:47.000Z | 2022-02-14T13:35:56.000Z | """
Class for storing method parameters.
"""
class JavaMethodParameter:
def __init__(self, identifier, parameter_type):
self.__identifier = identifier
self.__type = parameter_type
@property
def identifier(self):
return self.__identifier
@property
def parameter_type(self):
return self.__type
| 19.333333 | 51 | 0.678161 | 35 | 348 | 6.314286 | 0.4 | 0.190045 | 0.153846 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.244253 | 348 | 17 | 52 | 20.470588 | 0.840304 | 0.103448 | 0 | 0.2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.3 | false | 0 | 0 | 0.2 | 0.6 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
cfe6ecc2b2ca3e608e5806ed28f31bb65cffdf98 | 20 | py | Python | language-python-test/test/features/lambda/lambda_arity0.py | wbadart/language-python | 6c048c215ff7fe4a5d5cc36ba3c17a666af74821 | [
"BSD-3-Clause"
] | null | null | null | language-python-test/test/features/lambda/lambda_arity0.py | wbadart/language-python | 6c048c215ff7fe4a5d5cc36ba3c17a666af74821 | [
"BSD-3-Clause"
] | null | null | null | language-python-test/test/features/lambda/lambda_arity0.py | wbadart/language-python | 6c048c215ff7fe4a5d5cc36ba3c17a666af74821 | [
"BSD-3-Clause"
] | null | null | null | l = lambda: 42
l()
| 6.666667 | 15 | 0.5 | 4 | 20 | 2.5 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.142857 | 0.3 | 20 | 2 | 16 | 10 | 0.571429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
cfe94532e264a651389c5652935d37fb9e8b4f30 | 48 | py | Python | tests/python/read_file.py | jacereda/py2nim | 56fc2699d31241c60bed726f59efea4bf46be238 | [
"MIT"
] | 10 | 2020-03-10T12:01:01.000Z | 2021-05-23T19:47:06.000Z | tests/python/read_file.py | jacereda/py2nim | 56fc2699d31241c60bed726f59efea4bf46be238 | [
"MIT"
] | null | null | null | tests/python/read_file.py | jacereda/py2nim | 56fc2699d31241c60bed726f59efea4bf46be238 | [
"MIT"
] | 1 | 2020-07-17T11:20:56.000Z | 2020-07-17T11:20:56.000Z | with open('a', 'r') as f:
source = f.read()
| 16 | 25 | 0.5 | 9 | 48 | 2.666667 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | 48 | 2 | 26 | 24 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0.041667 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
320f9c8b558ce9126aa1c3e677ce1e79386e8ef1 | 182 | py | Python | Neural_Networks_and_Deep_Learning/Week_1/L1.py | anoushkrit/MOOCs | 7bb4a031224af87a67d0c94043a8f15d7e718bb5 | [
"MIT"
] | 3 | 2019-10-28T19:03:43.000Z | 2021-12-02T14:39:53.000Z | Neural_Networks_and_Deep_Learning/Week_1/L1.py | anoushkrit/MOOCs | 7bb4a031224af87a67d0c94043a8f15d7e718bb5 | [
"MIT"
] | null | null | null | Neural_Networks_and_Deep_Learning/Week_1/L1.py | anoushkrit/MOOCs | 7bb4a031224af87a67d0c94043a8f15d7e718bb5 | [
"MIT"
] | 1 | 2020-12-22T05:57:27.000Z | 2020-12-22T05:57:27.000Z |
def L1(y_output, y_input):
""" L1 Loss Function calculates the sum of the absolute difference between the predicted and the input"""
return sum(abs(y_input - y_output)) | 36.4 | 110 | 0.714286 | 29 | 182 | 4.344828 | 0.62069 | 0.111111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013793 | 0.203297 | 182 | 5 | 111 | 36.4 | 0.855172 | 0.538462 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | false | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
5c550f82aeb50ba542ec078d0c07056c4c798ea7 | 357 | py | Python | CursoEmVideo/Exercicio053.py | LucasAlmeida0/Estudos | ae5b498c0bf3dee94f761a5fe49c77b0e270d483 | [
"MIT"
] | null | null | null | CursoEmVideo/Exercicio053.py | LucasAlmeida0/Estudos | ae5b498c0bf3dee94f761a5fe49c77b0e270d483 | [
"MIT"
] | null | null | null | CursoEmVideo/Exercicio053.py | LucasAlmeida0/Estudos | ae5b498c0bf3dee94f761a5fe49c77b0e270d483 | [
"MIT"
] | null | null | null | '''53 Crie um programa que leia uma frase qualquer e diga se ela é um palíndromo, desconsiderando os espaços. '''
frase = str(input('Digite uma frase: ')).replace(' ', '').upper()
print(f'O inverso de {frase} é {frase[::-1]}')
if frase == frase[::-1]:
print('A frase digitada é um palíndromo!')
else:
print('A frase digitada não é um palíndromo!')
| 39.666667 | 113 | 0.663866 | 56 | 357 | 4.232143 | 0.607143 | 0.037975 | 0.164557 | 0.160338 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013514 | 0.170868 | 357 | 8 | 114 | 44.625 | 0.787162 | 0.296919 | 0 | 0 | 0 | 0 | 0.512295 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.5 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
5c59ac79b3c1e4d1809a22b63cff4da38aa18e61 | 360 | py | Python | tests/app_test.py | azncoders/flask-api | 61bf70d7b52a41aee10177adff6a68c8f9188d9c | [
"MIT"
] | null | null | null | tests/app_test.py | azncoders/flask-api | 61bf70d7b52a41aee10177adff6a68c8f9188d9c | [
"MIT"
] | null | null | null | tests/app_test.py | azncoders/flask-api | 61bf70d7b52a41aee10177adff6a68c8f9188d9c | [
"MIT"
] | null | null | null | from app import my_app
def test_tc001_hello():
response = my_app.test_client().get('/')
assert response.status_code == 200
assert response.data == b'Johnny like pizza'
def test_tc002_secret():
response = my_app.test_client().get('/secret')
assert response.status_code == 200
assert response.data == b'Get outta here. Its my secret'
| 25.714286 | 60 | 0.7 | 53 | 360 | 4.54717 | 0.471698 | 0.232365 | 0.107884 | 0.141079 | 0.59751 | 0.59751 | 0.381743 | 0.381743 | 0.381743 | 0 | 0 | 0.040678 | 0.180556 | 360 | 13 | 61 | 27.692308 | 0.776271 | 0 | 0 | 0.222222 | 0 | 0 | 0.15 | 0 | 0 | 0 | 0 | 0 | 0.444444 | 1 | 0.222222 | false | 0 | 0.111111 | 0 | 0.333333 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
5c713675372693c19c73c94d48507584f96b47a9 | 305 | py | Python | tests/infrastructure/cli/test_taskit.py | MarlonIC/demo-clean-architecture-projects-tasks | 86f5add11145ec31404b4d41cad0467e6e436f77 | [
"MIT"
] | 11 | 2018-06-06T03:07:35.000Z | 2020-04-16T21:35:16.000Z | tests/infrastructure/cli/test_taskit.py | nubark/clean-architecture-python | e194136001662d31acb3b144de45b2b1a5dcbc7d | [
"MIT"
] | 2 | 2019-10-21T15:18:24.000Z | 2020-03-12T17:20:15.000Z | tests/infrastructure/cli/test_taskit.py | MarlonIC/demo-clean-architecture-projects-tasks | 86f5add11145ec31404b4d41cad0467e6e436f77 | [
"MIT"
] | 5 | 2020-06-24T02:22:08.000Z | 2021-11-11T07:33:23.000Z | from unittest.mock import Mock, ANY
from click.testing import CliRunner
from taskit.infrastructure.cli.taskit import cli, State
def test_cli_state(state):
assert isinstance(state, State)
def test_cli():
runner = CliRunner()
result = runner.invoke(cli, [])
assert result.exit_code == 0
| 21.785714 | 55 | 0.734426 | 42 | 305 | 5.238095 | 0.52381 | 0.072727 | 0.109091 | 0.136364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.003953 | 0.170492 | 305 | 13 | 56 | 23.461538 | 0.865613 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.222222 | 1 | 0.222222 | false | 0 | 0.333333 | 0 | 0.555556 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
5c77cf297b41568fc583e6f8a19a4915443b7710 | 113 | py | Python | 2 semester/PW/Coursera/Python/2 Week/6.py | kurpenok/Labs | 069c92b7964a1445d093313b38ebdc56318d2a73 | [
"MIT"
] | 1 | 2022-02-06T17:50:25.000Z | 2022-02-06T17:50:25.000Z | 2 semester/PW/Coursera/Python/2 Week/6.py | kurpenok/Labs | 069c92b7964a1445d093313b38ebdc56318d2a73 | [
"MIT"
] | null | null | null | 2 semester/PW/Coursera/Python/2 Week/6.py | kurpenok/Labs | 069c92b7964a1445d093313b38ebdc56318d2a73 | [
"MIT"
] | 1 | 2022-03-02T06:45:06.000Z | 2022-03-02T06:45:06.000Z | x = int(input())
y = int(input())
if (2 * y + 1 - x) % (y - x + 1) == 0:
print("YES")
else:
print("NO")
| 14.125 | 38 | 0.415929 | 20 | 113 | 2.35 | 0.6 | 0.340426 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.050633 | 0.300885 | 113 | 7 | 39 | 16.142857 | 0.544304 | 0 | 0 | 0 | 0 | 0 | 0.044248 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.333333 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
5c81788bf6a0104cb9618bf90d8f5b3640cc4f30 | 4,776 | py | Python | notebooks/py_scripts/01-configure.py | CBroz1/workflow-calcium-imaging | ac873d942e47f4fabbaf5cc1f8d2f4e5e905a5ce | [
"MIT"
] | null | null | null | notebooks/py_scripts/01-configure.py | CBroz1/workflow-calcium-imaging | ac873d942e47f4fabbaf5cc1f8d2f4e5e905a5ce | [
"MIT"
] | null | null | null | notebooks/py_scripts/01-configure.py | CBroz1/workflow-calcium-imaging | ac873d942e47f4fabbaf5cc1f8d2f4e5e905a5ce | [
"MIT"
] | null | null | null | # ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.13.7
# kernelspec:
# display_name: 'Python 3.7.9 64-bit (''workflow-calcium-imaging'': conda)'
# name: python379jvsc74a57bd01a512f474e195e32ad84236879d3bb44800a92b431919ef0b10d543f5012a23c
# ---
# # Configure DataJoint connection to the database
#
# + To run `workflow-calcium-imaging`, we need to properly set up the DataJoint configuration. The configuration will be saved in a file called `dj_local_conf.json` on each machine and this notebook walks you through the process.
#
# + The configuration only needs to be set up once. If you have gone through the configuration before, directly go to [02-workflow-structure](02-workflow-structure-optional.ipynb).
#
# ## Set up configuration in root directory of this package
#
# + As a convention, we set the configuration up in the root directory of the `workflow-calcium-imaging` package and always start importing DataJoint and pipeline modules from there.
import os
if os.path.basename(os.getcwd()) == 'notebooks':
os.chdir('..')
pwd
import datajoint as dj
# ## Configure database host address and credentials
#
# Now let's set up the host, user and password in the `dj.config` global variable
import getpass
dj.config['database.host'] = '{YOUR_HOST}'
dj.config['database.user'] = '{YOUR_USERNAME}'
dj.config['database.password'] = getpass.getpass() # enter the password securily
# You should be able to connect to the database at this stage.
dj.conn()
# ## Configure the `custom` field in `dj.config` for element-calcium-imaging
#
# + The major component of the current workflow is the [DataJoint element-calcium-imaging](https://github.com/datajoint/element-calcium-imaging). `element-calcium-imaging` requires configurations in the field `custom` in `dj.config`:
#
# ### Database prefix
#
# + Giving a prefix to schema could help on the configuration of privilege settings. For example, if we set prefix `neuro_`, every schema created with the current workflow will start with `neuro_`, e.g. `neuro_lab`, `neuro_subject`, `neuro_imaging` etc.
#
# + The prefix could be configurated as follows in `dj.config`:
dj.config['custom'] = {'database.prefix': 'neuro_'}
# ### Root directories for raw calcium imaging data and processed results
#
# + `imaging_root_data_dir` field indicates the root directory for the calcium imaging raw data from ScanImage or Scanbox (e.g. `*.tif`) or the processed results from Suite2p or CaImAn (e.g. `F.npy`). The root path typically do not contain information of subjects or sessions, all data from subjects/sessions should be subdirectories in the root path.
#
# + In the database, every path for the raw calcium imaging data is relative to this root path. The benefit is that the absolute path could be configured for each machine, and when data transfer happens, we just need to change the root directory in the config file.
#
# + The workflow supports multiple root directories. If there are multiple possible root directories, specify the `imaging_root_data_dir` as a list.
#
# + The root path(s) are specific to each machine, as the name of drive mount could be different for different operating systems or machines.
#
# + In the context of the workflow, all the paths saved into the database or saved in the config file need to be in the POSIX standards (Unix/Linux), with `/`. The path conversion for machines of any operating system is taken care of inside the elements.
# If using our example dataset, downloaded with this notebook [00-data-download](00-data-download-optional.ipynb), the root directory will be:
# If there is only one root path:
dj.config['custom']['imaging_root_data_dir'] = '/tmp/example_data'
# If there are multiple possible root paths:
dj.config['custom']['imaging_root_data_dir'] = ['/tmp/example_data']
dj.config
# ## Save the configuration as a json file
#
# With the proper configurations, we could save this as a file, either as a local json file, or a global file.
dj.config.save_local()
# ls
# Local configuration file is saved as `dj_local_conf.json` in the root directory of this package `workflow-calcium-imaging`. Next time if you change your directory to `workflow-calcium-imaging` before importing DataJoint and the pipeline packages, the configurations will get properly loaded.
#
# If saved globally, there will be a hidden configuration file saved in your root directory. The configuration will be loaded no matter where the directory is.
# +
# dj.config.save_global()
# -
# ## Next Step
#
# After the configuration, we will be able to run through the workflow with the [02-workflow-structure](02-workflow-structure-optional.ipynb) notebook.
| 49.237113 | 351 | 0.756072 | 715 | 4,776 | 5.004196 | 0.325874 | 0.029067 | 0.030743 | 0.020123 | 0.09251 | 0.070989 | 0.05422 | 0.05422 | 0.025713 | 0.025713 | 0 | 0.01936 | 0.156407 | 4,776 | 96 | 352 | 49.75 | 0.868702 | 0.863065 | 0 | 0 | 0 | 0 | 0.339721 | 0.073171 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.133333 | 0.2 | 0 | 0.2 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
5c96320d63c915866804208e15fc82d0dd30191a | 80 | py | Python | examples/with_beet/other_script.py | mcbeet/lectern | 41b4fd9907010e4317ce08018fe7e6f43b64610f | [
"MIT"
] | 10 | 2021-03-01T15:54:58.000Z | 2022-03-07T21:28:25.000Z | examples/with_beet/other_script.py | vberlier/lectern | 41b4fd9907010e4317ce08018fe7e6f43b64610f | [
"MIT"
] | 178 | 2021-02-25T02:56:07.000Z | 2022-03-31T01:14:24.000Z | examples/with_beet/other_script.py | vberlier/lectern | 41b4fd9907010e4317ce08018fe7e6f43b64610f | [
"MIT"
] | 1 | 2021-03-16T22:10:59.000Z | 2021-03-16T22:10:59.000Z | print("@function from_script:thing")
for i in range(10):
print(f"say {i}")
| 16 | 36 | 0.65 | 14 | 80 | 3.642857 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.029851 | 0.1625 | 80 | 4 | 37 | 20 | 0.731343 | 0 | 0 | 0 | 0 | 0 | 0.425 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.666667 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
5ce46f0e85c95a252c1eb2bc37e775183616f238 | 390 | py | Python | plone-chrigl-debian/src/collective.geo.file/collective/geo/file/interfaces.py | chrigl/docker-library | 5dc9a2c1f0d81aba42190d3ff0e28c1fab2240d1 | [
"Apache-2.0"
] | null | null | null | plone-chrigl-debian/src/collective.geo.file/collective/geo/file/interfaces.py | chrigl/docker-library | 5dc9a2c1f0d81aba42190d3ff0e28c1fab2240d1 | [
"Apache-2.0"
] | null | null | null | plone-chrigl-debian/src/collective.geo.file/collective/geo/file/interfaces.py | chrigl/docker-library | 5dc9a2c1f0d81aba42190d3ff0e28c1fab2240d1 | [
"Apache-2.0"
] | null | null | null | """Define interfaces for your add-on.
"""
from plone.theme.interfaces import IDefaultPloneLayer
from zope.interface import Interface
class IGeoFileLayer(IDefaultPloneLayer):
"""Marker interface that defines a Zope 3 browser layer.
"""
class IGisFile(Interface):
""" Marker interface for files containing GIS data.
Should just be used in the browser page definition!!! """
| 30 | 61 | 0.748718 | 48 | 390 | 6.083333 | 0.729167 | 0.10274 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.003067 | 0.164103 | 390 | 12 | 62 | 32.5 | 0.892638 | 0.502564 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
7a42c1fb5b2fca4e813dd65f07b5d482f883d658 | 155 | py | Python | ppmessage/core/email/__init__.py | gamert/ppmessage | dd4aaf29154679a093b2431d5e34af889ab16932 | [
"Apache-2.0"
] | 6 | 2017-11-03T17:31:52.000Z | 2020-06-14T09:14:36.000Z | ppmessage/core/email/__init__.py | gamert/ppmessage | dd4aaf29154679a093b2431d5e34af889ab16932 | [
"Apache-2.0"
] | 1 | 2017-02-21T01:07:22.000Z | 2017-04-07T04:48:02.000Z | ppmessage/core/email/__init__.py | gamert/ppmessage | dd4aaf29154679a093b2431d5e34af889ab16932 | [
"Apache-2.0"
] | 16 | 2017-08-08T01:25:47.000Z | 2019-09-17T16:32:06.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2010-2016 PPMessage.
# Guijin Ding, dingguijin@gmail.com
# All rights reserved
#
#
# core/email/__init__.py
#
| 11.923077 | 36 | 0.651613 | 20 | 155 | 4.85 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.070313 | 0.174194 | 155 | 12 | 37 | 12.916667 | 0.6875 | 0.858065 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
7a4fca6b4592f313c020601f29076471eebd4a6e | 46 | py | Python | lp_cfg.py | Breccia/pyLP | 7d2223f68aac1be00f84635df227184f4302ca4d | [
"MIT"
] | null | null | null | lp_cfg.py | Breccia/pyLP | 7d2223f68aac1be00f84635df227184f4302ca4d | [
"MIT"
] | null | null | null | lp_cfg.py | Breccia/pyLP | 7d2223f68aac1be00f84635df227184f4302ca4d | [
"MIT"
] | null | null | null | #!/usr/bin/python3
MAXIMIZE = 1
MINIMIZE = 2
| 9.2 | 18 | 0.673913 | 7 | 46 | 4.428571 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.078947 | 0.173913 | 46 | 4 | 19 | 11.5 | 0.736842 | 0.369565 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
7a5c751e71d09d432166956e1c70154fa29a230a | 249 | py | Python | liBlog/tutorial/urls.py | pylixm/liBlog | dcd3ff95161750c9680ac6ac418bee4ad8f2a350 | [
"MIT"
] | 7 | 2018-06-11T02:01:38.000Z | 2019-08-15T03:25:19.000Z | liBlog/tutorial/urls.py | pylixm/liBlog | dcd3ff95161750c9680ac6ac418bee4ad8f2a350 | [
"MIT"
] | 5 | 2020-02-12T00:49:26.000Z | 2021-09-07T23:58:28.000Z | liBlog/tutorial/urls.py | pylixm/liBlog | dcd3ff95161750c9680ac6ac418bee4ad8f2a350 | [
"MIT"
] | 1 | 2019-08-14T09:16:02.000Z | 2019-08-14T09:16:02.000Z | # -*- coding: utf-8 -*-
from django.conf.urls import url, include
from .views import IndexView, CountView
urlpatterns = [
url(r'count/$', CountView.as_view(), name='tutorial_count'),
url(r'$', IndexView.as_view(), name='tutorial_index'),
]
| 27.666667 | 64 | 0.678715 | 33 | 249 | 5 | 0.636364 | 0.048485 | 0.121212 | 0.218182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004651 | 0.136546 | 249 | 8 | 65 | 31.125 | 0.762791 | 0.084337 | 0 | 0 | 0 | 0 | 0.159292 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
7a7a87f9d356bf24404e96215ea1d5057b4b4d63 | 113 | py | Python | bug_free_game.py | spg1502/bug-free-game | 6dec7e2d083df0d6d786b66b45eee97d0b93030e | [
"MIT"
] | 1 | 2021-05-08T21:11:37.000Z | 2021-05-08T21:11:37.000Z | bug_free_game.py | spg1502/bug-free-game | 6dec7e2d083df0d6d786b66b45eee97d0b93030e | [
"MIT"
] | 4 | 2021-05-09T16:47:17.000Z | 2021-07-21T16:52:38.000Z | bug_free_game.py | spg1502/bug-free-game | 6dec7e2d083df0d6d786b66b45eee97d0b93030e | [
"MIT"
] | null | null | null | import pyglet
from pyglet_utils import game
debug = True
main_window = game.GameWindow(debug)
pyglet.app.run()
| 14.125 | 36 | 0.787611 | 17 | 113 | 5.117647 | 0.705882 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.132743 | 113 | 7 | 37 | 16.142857 | 0.887755 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
7a96459ffc3bf3e8612841c1378ce2ee8fe6b697 | 998 | py | Python | config.py | kisyular/dash-analyzer | 4c77973ea2511e1ddac0e0a655167365d5cb7512 | [
"MIT"
] | null | null | null | config.py | kisyular/dash-analyzer | 4c77973ea2511e1ddac0e0a655167365d5cb7512 | [
"MIT"
] | 2 | 2021-03-31T19:23:34.000Z | 2021-06-02T00:57:25.000Z | config.py | kisyular/dash-analyzer | 4c77973ea2511e1ddac0e0a655167365d5cb7512 | [
"MIT"
] | null | null | null | import os
basedir = os.path.abspath(os.path.dirname(__file__))
class BaseConfig:
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
'sqlite:///' + os.path.join(basedir, 'app.db')
SQLALCHEMY_TRACK_MODIFICATIONS = False
SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess'
MAIL_SERVER = 'stmp.gmail.com' # os.environ.get('MAIL_SERVER')
MAIL_PORT = 587 # int(os.environ.get('MAIL_PORT') or 25)
MAIL_USE_TLS = 1 # os.environ.get('MAIL_USE_TLS') is not None
MAIL_USERNAME = 'r4subscribe@gmail.com' # os.environ.get('MAIL_USERNAME')
MAIL_PASSWORD = 'eMR5MRtHtsv65Tx' # os.environ.get('MAIL_PASSWORD')
ADMINS = ['rkisyula12@gmail.com']
LANGUAGES = ['en', 'es', 'sw']
MS_TRANSLATOR_KEY = '3fc118366ce54022a18dfc6886f9c1bc' # os.environ.get('MS_TRANSLATOR_KEY')
ELASTICSEARCH_URL = os.environ.get('ELASTICSEARCH_URL')
POSTS_PER_PAGE = 10
LOG_TO_STDOUT = os.environ.get('LOG_TO_STDOUT')
| 47.52381 | 97 | 0.687375 | 134 | 998 | 4.858209 | 0.485075 | 0.138249 | 0.184332 | 0.122888 | 0.073733 | 0.073733 | 0 | 0 | 0 | 0 | 0 | 0.041112 | 0.171343 | 998 | 20 | 98 | 49.9 | 0.74607 | 0.211423 | 0 | 0 | 0 | 0 | 0.251282 | 0.067949 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.055556 | 0.055556 | 0 | 0.888889 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
7ab698c7b9eca1bd593cabacdad0c4a9466fad86 | 450 | py | Python | tests/estimator/classifier/GaussianNB/GaussianNBJSTest.py | midhunexeter/sklearn-porter | 945a67a1509b5c42d83e2a2f4a82d20aee2cfbce | [
"MIT"
] | 1,197 | 2016-08-30T14:49:34.000Z | 2022-03-30T05:38:52.000Z | tests/estimator/classifier/GaussianNB/GaussianNBJSTest.py | midhunexeter/sklearn-porter | 945a67a1509b5c42d83e2a2f4a82d20aee2cfbce | [
"MIT"
] | 80 | 2016-11-18T17:37:19.000Z | 2022-03-25T12:41:40.000Z | tests/estimator/classifier/GaussianNB/GaussianNBJSTest.py | midhunexeter/sklearn-porter | 945a67a1509b5c42d83e2a2f4a82d20aee2cfbce | [
"MIT"
] | 171 | 2016-08-25T20:05:27.000Z | 2022-03-28T07:39:54.000Z | # -*- coding: utf-8 -*-
from unittest import TestCase
from sklearn.naive_bayes import GaussianNB
from tests.estimator.classifier.Classifier import Classifier
from tests.language.JavaScript import JavaScript
class GaussianNBJSTest(JavaScript, Classifier, TestCase):
def setUp(self):
super(GaussianNBJSTest, self).setUp()
self.estimator = GaussianNB()
def tearDown(self):
super(GaussianNBJSTest, self).tearDown()
| 23.684211 | 60 | 0.74 | 48 | 450 | 6.916667 | 0.479167 | 0.054217 | 0.150602 | 0.174699 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002667 | 0.166667 | 450 | 18 | 61 | 25 | 0.882667 | 0.046667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.4 | 0 | 0.7 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
8fa7e28c2b6aa96a96e068bb18779703376cfcc9 | 436 | py | Python | chap05/list0507.py | ytianjin/GitTest | a657f46098728ad90f7140fadad356e8561c9a7a | [
"MIT"
] | null | null | null | chap05/list0507.py | ytianjin/GitTest | a657f46098728ad90f7140fadad356e8561c9a7a | [
"MIT"
] | null | null | null | chap05/list0507.py | ytianjin/GitTest | a657f46098728ad90f7140fadad356e8561c9a7a | [
"MIT"
] | null | null | null | # 打印输出位的逻辑与运算的结果、逻辑或运算的结果、逻辑异或运算的结果以及取反的结果
a = int(input('正整数a:'))
b = int(input('正整数b:'))
w = int(input('表示位数:'))
f = '{{:0{}b}}'.format(w)
m = 2 ** w - 1 # w位都相当于二进制数的1
print('a = ' + f.format(a))
print('b = ' + f.format(b))
print('a & b = ' + f.format(a & b))
print('a | b = ' + f.format(a | b))
print('a ^ b = ' + f.format(a ^ b))
print('~a = ' + f.format(~a & m))
print('~b = ' + f.format(~b & m)) | 27.25 | 43 | 0.479358 | 68 | 436 | 3.073529 | 0.279412 | 0.23445 | 0.191388 | 0.114833 | 0.497608 | 0.263158 | 0.263158 | 0.263158 | 0.263158 | 0.263158 | 0 | 0.012158 | 0.245413 | 436 | 16 | 44 | 27.25 | 0.6231 | 0.12156 | 0 | 0 | 0 | 0 | 0.180328 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.583333 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
8faa4e3658899b3f7b911670e0c848dbb5eb85a1 | 69 | py | Python | flask_app/__init__.py | Benton-Michael/login_reg | 2d0d515cbe9efb68b6a261c907120a1441200f07 | [
"MIT"
] | null | null | null | flask_app/__init__.py | Benton-Michael/login_reg | 2d0d515cbe9efb68b6a261c907120a1441200f07 | [
"MIT"
] | null | null | null | flask_app/__init__.py | Benton-Michael/login_reg | 2d0d515cbe9efb68b6a261c907120a1441200f07 | [
"MIT"
] | null | null | null | from flask import Flask
app = Flask(__name__)
app.secret_key = " "
| 11.5 | 23 | 0.710145 | 10 | 69 | 4.4 | 0.7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.188406 | 69 | 5 | 24 | 13.8 | 0.785714 | 0 | 0 | 0 | 0 | 0 | 0.014493 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
8fcc5efa8355d43605a3c7dfd6974dc7e925b276 | 439 | py | Python | extrabacon-2.0/improved/shellcode_8_4(6)5.py | JS-Burns/CVE-2016-6366 | 0ba7426a9bf2a01c807608b7e1b63f87fe2699a5 | [
"MIT"
] | 171 | 2016-09-22T23:35:35.000Z | 2021-12-21T21:56:17.000Z | extrabacon-2.0/improved/shellcode_8_4(6)5.py | FDlucifer/CVE-2016-6366 | 0ba7426a9bf2a01c807608b7e1b63f87fe2699a5 | [
"MIT"
] | 3 | 2016-09-27T01:05:07.000Z | 2016-11-02T03:12:21.000Z | extrabacon-2.0/improved/shellcode_8_4(6)5.py | FDlucifer/CVE-2016-6366 | 0ba7426a9bf2a01c807608b7e1b63f87fe2699a5 | [
"MIT"
] | 79 | 2016-09-22T23:16:29.000Z | 2021-05-07T16:17:13.000Z | ##
## this file autogenerated
## 8.4(6)5
##
jmp_esp_offset = "125.63.32.8"
saferet_offset = "166.11.228.8"
fix_ebp = "72"
pmcheck_bounds = "0.176.88.9"
pmcheck_offset = "96.186.88.9"
pmcheck_code = "85.49.192.137"
admauth_bounds = "0.32.8.8"
admauth_offset = "240.33.8.8"
admauth_code = "85.137.229.87"
# "8.4(6)5" = ["125.63.32.8","166.11.228.8","72","0.176.88.9","96.186.88.9","85.49.192.137","0.32.8.8","240.33.8.8","85.137.229.87"], | 25.823529 | 133 | 0.628702 | 96 | 439 | 2.770833 | 0.395833 | 0.045113 | 0.022556 | 0.030075 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.351759 | 0.093394 | 439 | 17 | 133 | 25.823529 | 0.316583 | 0.371298 | 0 | 0 | 1 | 0 | 0.337079 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
8fd748665f640e173660400916c49853c5bca617 | 11,348 | py | Python | cengal/user_interface/console/encoding_changer.py | FI-Mihej/Cengal | 516b9780da6ccc9168f8f89d7ba13dc29e24bc0b | [
"Apache-2.0"
] | 3 | 2018-07-23T18:48:58.000Z | 2021-07-18T14:17:20.000Z | cengal/user_interface/console/encoding_changer.py | FI-Mihej/Cengal | 516b9780da6ccc9168f8f89d7ba13dc29e24bc0b | [
"Apache-2.0"
] | null | null | null | cengal/user_interface/console/encoding_changer.py | FI-Mihej/Cengal | 516b9780da6ccc9168f8f89d7ba13dc29e24bc0b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
# Copyright © 2017 ButenkoMS. All rights reserved. Contacts: <gtalk@butenkoms.space>
#
# 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
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import sys
import os
from contextlib import contextmanager, redirect_stdout, redirect_stderr
from cengal.check_is_in_pycharm import IS_RUNNING_IN_PYCHARM
if 'nt' == os.name:
import win32console
import codecs
"""
Module Docstring
Docstrings: http://www.python.org/dev/peps/pep-0257/
"""
__author__ = "ButenkoMS <gtalk@butenkoms.space>"
__copyright__ = "Copyright © 2017 ButenkoMS. All rights reserved. Contacts: <gtalk@butenkoms.space>"
__credits__ = ["ButenkoMS <gtalk@butenkoms.space>", ]
__license__ = "Apache License, Version 2.0"
__version__ = "0.0.1"
__maintainer__ = "ButenkoMS <gtalk@butenkoms.space>"
__email__ = "gtalk@butenkoms.space"
__status__ = "Prototype"
# __status__ = "Development"
# __status__ = "Production"
# if 'nt' == os.name:
# @contextmanager
# def change_console_output_cp(new_output_cp=None, new_input_cp=None, encoding_error=None):
# """
# :param new_output_cp: ResultExistence(True, (65001, 'utf-8))
# :param new_input_cp: ResultExistence(True, (65001, 'utf-8))
# :return:
# """
# encoding_error = encoding_error or 'replace'
# cur_output_cp = None
# cur_input_cp = None
# cur_output_cp_name = str()
# cur_input_cp_name = str()
# original_stdout = sys.stdout
# original_stderr = sys.stderr
# original_stdin = sys.stdin
# original_stdout_fileno = sys.stdout.fileno()
# original_stderr_fileno = sys.stderr.fileno()
# original_stdin_fileno = sys.stdin.fileno()
# if 'nt' == os.name:
# if not IS_RUNNING_IN_PYCHARM:
# cur_output_cp = win32console.GetConsoleOutputCP()
# cur_output_cp_name = sys.stdout.encoding
# if (new_output_cp is not None) and new_output_cp.existence:
# # sys.stdout = codecs.getwriter(new_output_cp.result[1])(sys.stdout.buffer, encoding_error)
# # sys.stderr = codecs.getwriter(new_output_cp.result[1])(sys.stderr.buffer, encoding_error)
# # sys.stdout = codecs.getwriter(new_output_cp.result[1])(sys.stdout.detach(), encoding_error)
# # sys.stderr = codecs.getwriter(new_output_cp.result[1])(sys.stderr.detach(), encoding_error)
# sys.stdout = open(original_stdout_fileno, mode='w', encoding=new_output_cp.result[1], buffering=1)
# print('stdout:', sys.stdout.encoding)
# sys.stderr = open(original_stderr_fileno, mode='w', encoding=new_output_cp.result[1], buffering=1)
# print('stderr:', sys.stderr.encoding)
# win32console.SetConsoleOutputCP(new_output_cp.result[0])
# print('conout:', win32console.GetConsoleOutputCP())
# cur_input_cp = win32console.GetConsoleCP()
# cur_input_cp_name = sys.stdin.encoding
# if (new_input_cp is not None) and new_input_cp.existence:
# # sys.stdin = codecs.getwriter(new_input_cp.result[1])(sys.stdin.buffer, encoding_error)
# sys.stdin = open(original_stdin_fileno, mode='r', encoding=new_input_cp.result[1], buffering=1)
# print('stdin:', sys.stdin.encoding)
# win32console.SetConsoleCP(new_input_cp.result[0])
# print('conin:', win32console.GetConsoleOutputCP())
# try:
# yield ((cur_input_cp, cur_output_cp), (cur_input_cp_name, cur_output_cp_name))
# except:
# raise
# finally:
# if 'nt' == os.name:
# if not IS_RUNNING_IN_PYCHARM:
# if (new_output_cp is not None) and new_output_cp.existence:
# win32console.SetConsoleOutputCP(cur_output_cp)
# print('conout:', win32console.GetConsoleOutputCP())
# # sys.stdout.close()
# # sys.stdout = original_stdout
# # sys.stderr = original_stderr
# # sys.stdout = open(original_stdout_fileno, mode='w', encoding=cur_output_cp_name, buffering=1)
# print('stdout:', sys.stdout.encoding)
# # sys.stderr.close()
# # sys.stderr = open(original_stderr_fileno, mode='w', encoding=cur_output_cp_name, buffering=1)
# print('stderr:', sys.stderr.encoding)
# if (new_input_cp is not None) and new_input_cp.existence:
# win32console.SetConsoleCP(cur_input_cp)
# print('conin:', win32console.GetConsoleOutputCP())
# # sys.stdin.close()
# # sys.stdin = original_stdin
# # sys.stdin = open(original_stdin_fileno, mode='r', encoding=cur_input_cp_name, buffering=1)
# print('stdin:', sys.stdin.encoding)
# else:
# @contextmanager
# def change_console_output_cp(new_output_cp=None, new_input_cp=None, encoding_error=None):
# yield None
def fileno(file_or_fd):
fd = getattr(file_or_fd, 'fileno', lambda: file_or_fd)()
if not isinstance(fd, int):
raise ValueError("Expected a file (`.fileno()`) or a file descriptor")
return fd
if 'nt' == os.name:
@contextmanager
def change_console_output_cp(new_output_cp=None, new_input_cp=None, encoding_error=None):
"""
:param new_output_cp: ResultExistence(True, (65001, 'utf-8))
:param new_input_cp: ResultExistence(True, (65001, 'utf-8))
:return:
"""
encoding_error = encoding_error or 'replace'
cur_output_cp = None
cur_input_cp = None
cur_output_cp_name = str()
cur_input_cp_name = str()
original_stdout = sys.stdout
original_stderr = sys.stderr
original_stdin = sys.stdin
original_stdout_fileno = sys.stdout.fileno()
original_stderr_fileno = sys.stderr.fileno()
original_stdin_fileno = sys.stdin.fileno()
new_stdout = None
new_stderr = None
new_stdin = None
if 'nt' == os.name:
if IS_RUNNING_IN_PYCHARM:
yield None
else:
with os.fdopen(os.dup(original_stdout_fileno), 'wb') as copied_stdout, \
os.fdopen(os.dup(original_stderr_fileno), 'wb') as copied_stderr, \
os.fdopen(os.dup(original_stdin_fileno), 'wb') as copied_stdin, \
os.fdopen(os.dup(original_stdout_fileno), 'wb') as copied_stdout_buff, \
os.fdopen(os.dup(original_stderr_fileno), 'wb') as copied_stderr_buff, \
os.fdopen(os.dup(original_stdin_fileno), 'wb') as copied_stdin_buff:
# copied_stdout = os.fdopen(os.dup(original_stdout_fileno), 'wb')
# copied_stderr = os.fdopen(os.dup(original_stderr_fileno), 'wb')
# copied_stdin = os.fdopen(os.dup(original_stdin_fileno), 'wb')
# copied_stdout_buff = os.fdopen(os.dup(original_stdout_fileno), 'wb')
# copied_stderr_buff = os.fdopen(os.dup(original_stderr_fileno), 'wb')
# copied_stdin_buff = os.fdopen(os.dup(original_stdin_fileno), 'wb')
original_stdout.flush()
original_stderr.flush()
original_stdin.flush()
cur_output_cp = win32console.GetConsoleOutputCP()
cur_output_cp_name = sys.stdout.encoding
if (new_output_cp is not None) and new_output_cp.existence:
new_stdout = open(copied_stdout.fileno(), mode='w', encoding=new_output_cp.result[1],
buffering=1)
sys.stdout = new_stdout
# print('stdout:', sys.stdout.encoding)
new_stderr = open(copied_stderr.fileno(), mode='w', encoding=new_output_cp.result[1],
buffering=1)
sys.stderr = new_stderr
# print('stderr:', sys.stderr.encoding)
win32console.SetConsoleOutputCP(new_output_cp.result[0])
# print('conout:', win32console.GetConsoleOutputCP())
cur_input_cp = win32console.GetConsoleCP()
cur_input_cp_name = sys.stdin.encoding
if (new_input_cp is not None) and new_input_cp.existence:
new_stdin = open(copied_stdin.fileno(), mode='r', encoding=new_input_cp.result[1],
buffering=1)
sys.stdin = new_stdin
# print('stdin:', sys.stdin.encoding)
win32console.SetConsoleCP(new_input_cp.result[0])
# print('conin:', win32console.GetConsoleOutputCP())
try:
yield ((cur_input_cp, cur_output_cp), (cur_input_cp_name, cur_output_cp_name))
except:
raise
finally:
sys.stdout.flush()
sys.stderr.flush()
sys.stdin.flush()
if (new_output_cp is not None) and new_output_cp.existence:
win32console.SetConsoleOutputCP(cur_output_cp)
# print('conout:', win32console.GetConsoleOutputCP())
os.dup2(copied_stdout_buff.fileno(), original_stdout_fileno)
sys.stdout = original_stdout
# print('stdout:', sys.stdout.encoding)
os.dup2(copied_stderr_buff.fileno(), original_stderr_fileno)
sys.stderr = original_stderr
# print('stderr:', sys.stderr.encoding)
if (new_input_cp is not None) and new_input_cp.existence:
win32console.SetConsoleCP(cur_input_cp)
# print('conin:', win32console.GetConsoleOutputCP())
os.dup2(copied_stdin_buff.fileno(), original_stdin_fileno)
sys.stdin = original_stdin
# print('stdin:', sys.stdin.encoding)
else:
yield None
else:
@contextmanager
def change_console_output_cp(new_output_cp=None, new_input_cp=None, encoding_error=None):
yield None
| 52.055046 | 121 | 0.580543 | 1,253 | 11,348 | 4.975259 | 0.134876 | 0.056465 | 0.042348 | 0.025024 | 0.758742 | 0.73436 | 0.703722 | 0.696022 | 0.688001 | 0.645492 | 0 | 0.01486 | 0.31803 | 11,348 | 217 | 122 | 52.294931 | 0.790412 | 0.518153 | 0 | 0.21978 | 0 | 0 | 0.062476 | 0.02159 | 0 | 0 | 0 | 0 | 0 | 1 | 0.032967 | false | 0 | 0.065934 | 0 | 0.10989 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
890dc465fa034e313dece550d5331c2cf08d3ad7 | 439 | py | Python | homework5.py | AsanalievBakyt/FirstProject | 408d9dd5472c9dc18b5fe4d9f787031cac83c1f3 | [
"MIT"
] | null | null | null | homework5.py | AsanalievBakyt/FirstProject | 408d9dd5472c9dc18b5fe4d9f787031cac83c1f3 | [
"MIT"
] | null | null | null | homework5.py | AsanalievBakyt/FirstProject | 408d9dd5472c9dc18b5fe4d9f787031cac83c1f3 | [
"MIT"
] | null | null | null | # a = int(input())
# b = int(input())
# c = int(input())
# if a != b and a != c and b != c:
# print('разносторонний треугольник')
# elif a == b == c:
# print('равносторонний треугольник')
# else:
# print('равнобедренный треугольник')
# a = int(input())
# b = int(input())
# c = int(input())
#
# for number in a,b,c:
# if number % 2 == 0:
# print('четное', number)
# else:
# print('нечетное', number)
| 19.954545 | 41 | 0.530752 | 58 | 439 | 4.017241 | 0.362069 | 0.206009 | 0.077253 | 0.085837 | 0.23176 | 0.23176 | 0.23176 | 0.23176 | 0.23176 | 0 | 0 | 0.006173 | 0.261959 | 439 | 21 | 42 | 20.904762 | 0.712963 | 0.908884 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
890e0f3b8bafc5557f87d282343b3f50e66fc1f4 | 104 | py | Python | output/models/ibm_data/valid/s3_3_4/s3_3_4v30_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/ibm_data/valid/s3_3_4/s3_3_4v30_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/ibm_data/valid/s3_3_4/s3_3_4v30_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.ibm_data.valid.s3_3_4.s3_3_4v30_xsd.s3_3_4v30 import Root
__all__ = [
"Root",
]
| 17.333333 | 76 | 0.75 | 20 | 104 | 3.3 | 0.7 | 0.136364 | 0.212121 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.144444 | 0.134615 | 104 | 5 | 77 | 20.8 | 0.588889 | 0 | 0 | 0 | 0 | 0 | 0.038462 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
891242b600fe6767161a394956b4bf87375378b8 | 92 | py | Python | 10 films.py | SpacedKage/Pandas | df762c83b1e41f7b11ea14b6438a7e64d2ed2c28 | [
"MIT"
] | null | null | null | 10 films.py | SpacedKage/Pandas | df762c83b1e41f7b11ea14b6438a7e64d2ed2c28 | [
"MIT"
] | null | null | null | 10 films.py | SpacedKage/Pandas | df762c83b1e41f7b11ea14b6438a7e64d2ed2c28 | [
"MIT"
] | null | null | null | import pandas as pd
data = pd.read_csv("Movie-Data.csv")
print(data.iloc[0:10,0:12]) | 15.333333 | 37 | 0.663043 | 18 | 92 | 3.333333 | 0.722222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.077922 | 0.163043 | 92 | 6 | 38 | 15.333333 | 0.701299 | 0 | 0 | 0 | 0 | 0 | 0.159091 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0.333333 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
8914e1767bd859e8e5b36552fd59f91cac403514 | 908 | py | Python | setup.py | andreasgrv/mlconf | a1f2056cffb458ce3b845c5e4aab1a3a9e58a0c4 | [
"BSD-3-Clause"
] | 2 | 2019-08-29T12:59:28.000Z | 2020-05-01T11:11:08.000Z | setup.py | andreasgrv/mlconf | a1f2056cffb458ce3b845c5e4aab1a3a9e58a0c4 | [
"BSD-3-Clause"
] | null | null | null | setup.py | andreasgrv/mlconf | a1f2056cffb458ce3b845c5e4aab1a3a9e58a0c4 | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup
setup(
name='mlconf',
packages=['mlconf'],
version='0.0.7',
author='Andreas Grivas',
author_email='andreasgrv@gmail.com',
url = 'https://github.com/andreasgrv/mlconf',
download_url = 'https://github.com/andreasgrv/mlconf/archive/0.0.7.tar.gz',
license='BSD',
keywords='config argparse yaml machine-learning',
install_requires=['pyyaml', 'argparse'],
tests_require=['pytest'],
classifiers=['Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8'
],
)
| 37.833333 | 81 | 0.548458 | 87 | 908 | 5.678161 | 0.609195 | 0.153846 | 0.202429 | 0.210526 | 0.133603 | 0.133603 | 0 | 0 | 0 | 0 | 0 | 0.022293 | 0.30837 | 908 | 23 | 82 | 39.478261 | 0.764331 | 0 | 0 | 0 | 0 | 0.045455 | 0.495595 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.045455 | 0 | 0.045455 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
64dfbdc49051487dbe0465fddec7a2875ca1d55b | 157 | py | Python | Modulo_1/semana2/Practicas/practica2.py | rubens233/cocid_python | 492ebdf21817e693e5eb330ee006397272f2e0cc | [
"MIT"
] | null | null | null | Modulo_1/semana2/Practicas/practica2.py | rubens233/cocid_python | 492ebdf21817e693e5eb330ee006397272f2e0cc | [
"MIT"
] | null | null | null | Modulo_1/semana2/Practicas/practica2.py | rubens233/cocid_python | 492ebdf21817e693e5eb330ee006397272f2e0cc | [
"MIT"
] | 1 | 2022-03-04T00:57:18.000Z | 2022-03-04T00:57:18.000Z | # Escribir un programa que muestre por pantalla el resultado de la
# siguiente operación aritmética ((1*10)/2)-5.
operacion = ((1*10)/2)-5
print(operacion) | 39.25 | 67 | 0.732484 | 25 | 157 | 4.6 | 0.8 | 0.052174 | 0.069565 | 0.086957 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.074074 | 0.140127 | 157 | 4 | 68 | 39.25 | 0.777778 | 0.707006 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
8f16437e992464840595205822f3e00909779d6b | 466 | py | Python | report_reader.py | HeadCow/ARPS | fa7257f2aaee70391b8def527dd09f59aa5d26fa | [
"MIT"
] | 1 | 2021-04-09T09:49:11.000Z | 2021-04-09T09:49:11.000Z | report_reader.py | HeadCow/ARPS | fa7257f2aaee70391b8def527dd09f59aa5d26fa | [
"MIT"
] | null | null | null | report_reader.py | HeadCow/ARPS | fa7257f2aaee70391b8def527dd09f59aa5d26fa | [
"MIT"
] | null | null | null | import pymongo as pm
def connectDB():
conn = pm.MongoClient('localhost', 27017)
db = conn.get_database('report_db')
return db
def getColList(db):
return db.collection_names()
def getDocNum(col):
return col.find().count()
def match(col, matchDict):
return list(col.find(matchDict))
def main():
db = connectDB()
print(getColList(db))
col = db['col20170503']
print(getDocNum(col))
print(match(col, {'school':'HFUT'}))
if __name__ == '__main__':
main() | 18.64 | 42 | 0.699571 | 64 | 466 | 4.921875 | 0.5 | 0.050794 | 0.063492 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.032178 | 0.133047 | 466 | 25 | 43 | 18.64 | 0.747525 | 0 | 0 | 0 | 0 | 0 | 0.100642 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.263158 | false | 0 | 0.052632 | 0.157895 | 0.526316 | 0.157895 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
8f3e3bdc4ef16b14157ea85b0fd3c37d9c2f978e | 1,118 | py | Python | catkin_ws/src:/opt/ros/kinetic/lib/python2.7/dist-packages:/home/bala/duckietown/catkin_ws/src:/home/bala/duckietown/catkin_ws/src/lib/python2.7/site-packages/contracts/testing/library/isinstance_tc.py | johnson880319/Software | 045894227f359e0a3a3ec5b7a53f8d1ebc06acdd | [
"CC-BY-2.0"
] | 13 | 2018-03-28T23:07:01.000Z | 2022-03-12T06:01:21.000Z | catkin_ws/src:/opt/ros/kinetic/lib/python2.7/dist-packages:/home/bala/duckietown/catkin_ws/src:/home/bala/duckietown/catkin_ws/src/lib/python2.7/site-packages/contracts/testing/library/isinstance_tc.py | johnson880319/Software | 045894227f359e0a3a3ec5b7a53f8d1ebc06acdd | [
"CC-BY-2.0"
] | 11 | 2018-06-18T15:49:07.000Z | 2021-11-25T01:45:33.000Z | catkin_ws/src:/opt/ros/kinetic/lib/python2.7/dist-packages:/home/bala/duckietown/catkin_ws/src:/home/bala/duckietown/catkin_ws/src/lib/python2.7/site-packages/contracts/testing/library/isinstance_tc.py | johnson880319/Software | 045894227f359e0a3a3ec5b7a53f8d1ebc06acdd | [
"CC-BY-2.0"
] | 5 | 2018-03-28T23:07:05.000Z | 2021-12-09T19:02:00.000Z | from . import good, fail
class BaseClass():
pass
class SubClass(BaseClass):
pass
good('isinstance(BaseClass)', BaseClass())
good('isinstance(BaseClass)', SubClass())
good('isinstance(SubClass)', SubClass())
fail('isinstance(SubClass)', BaseClass())
class BaseClass2(object):
pass
class SubClass2(BaseClass2):
pass
good('isinstance(BaseClass2)', BaseClass2())
good('isinstance(BaseClass2)', SubClass2())
good('isinstance(SubClass2)', SubClass2())
fail('isinstance(SubClass2)', BaseClass2())
# Let's try with 3, old-style
class BaseClass3():
pass
class MidClass3(BaseClass3):
pass
class SubClass3(MidClass3):
pass
good('isinstance(BaseClass3)', BaseClass3())
good('isinstance(BaseClass3)', SubClass3())
good('isinstance(SubClass3)', SubClass3())
fail('isinstance(SubClass3)', BaseClass3())
class BaseClass4(object):
pass
class MidClass4(BaseClass4):
pass
class SubClass4(MidClass4):
pass
good('isinstance(BaseClass4)', BaseClass4())
good('isinstance(BaseClass4)', SubClass4())
good('isinstance(SubClass4)', SubClass4())
fail('isinstance(SubClass4)', BaseClass4())
| 20.327273 | 44 | 0.723614 | 113 | 1,118 | 7.159292 | 0.221239 | 0.207664 | 0.088999 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.038423 | 0.115385 | 1,118 | 54 | 45 | 20.703704 | 0.779575 | 0.02415 | 0 | 0.27027 | 0 | 0 | 0.3125 | 0.275735 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.27027 | 0.027027 | 0 | 0.297297 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
8f74a750b6d71b02a1d1e460332117bfedc1a90c | 6,136 | py | Python | tests/test_writer.py | rkevin-arch/RubyMarshal | fc0307ae8adc3964708eaac15aec8ec3ac720e1f | [
"WTFPL"
] | null | null | null | tests/test_writer.py | rkevin-arch/RubyMarshal | fc0307ae8adc3964708eaac15aec8ec3ac720e1f | [
"WTFPL"
] | null | null | null | tests/test_writer.py | rkevin-arch/RubyMarshal | fc0307ae8adc3964708eaac15aec8ec3ac720e1f | [
"WTFPL"
] | null | null | null | import io
import math
import re
from unittest import TestCase
from rubymarshal.classes import UsrMarshal, Symbol
from rubymarshal.reader import loads
from rubymarshal.writer import Writer, writes
__author__ = "Matthieu Gallet"
def long_write(obj):
fd = io.BytesIO()
writer = Writer(fd)
writer.write_long(obj)
return fd.getvalue()
class Constant:
def __init__(self, name):
self.name = name
class ConstantWriter(Writer):
def write_python_object(self, obj):
if isinstance(obj, Constant):
return self.write(Symbol(obj.name))
super().write_python_object(obj)
class CustomWriter(TestCase):
def test_write_constant(self):
dumped = writes([Constant("test")], cls=ConstantWriter)
read_constant = loads(dumped)
self.assertEqual([Symbol("test")], read_constant)
class TestWriteLong(TestCase):
def test_0(self):
self.assertEqual(b"\x00", long_write(0))
def test_1(self):
self.assertEqual(b"\x06", long_write(1))
def test_122(self):
self.assertEqual(b"\x7F", long_write(122))
def test_123(self):
self.assertEqual(b"\x01{", long_write(123))
def test_255(self):
self.assertEqual(b"\x01\xFF", long_write(255))
def test_256(self):
self.assertEqual(b"\x02\x00\x01", long_write(256))
def test_65535(self):
self.assertEqual(b"\x02\xFF\xFF", long_write(65535))
def test_65536(self):
self.assertEqual(b"\x03\x00\x00\x01", long_write(65536))
def test_65537000(self):
self.assertEqual(b"\x04\xE8\x03\xE8\x03", long_write(65537000))
def test__1(self):
self.assertEqual(b"\xFA", long_write(-1))
def test__123(self):
self.assertEqual(b"\x80", long_write(-123))
def test__124(self):
self.assertEqual(b"\xFF\x84", long_write(-124))
def test__256(self):
self.assertEqual(b"\xfe\x00\xff", long_write(-256))
def test__512(self):
self.assertEqual(b"\xfe\x00\xfe", long_write(-512))
def test__768(self):
self.assertEqual(b"\xFE\x00\xFD", long_write(-768))
def test__257(self):
self.assertEqual(b"\xFE\xFF\xFE", long_write(-257))
def test__259(self):
self.assertEqual(b"\xFE\xFD\xFE", long_write(-259))
def test__65536(self):
self.assertEqual(b"\xfd\x00\x00\xff", long_write(-65536))
def test__65537(self):
self.assertEqual(b"\xFD\xFF\xFF\xFE", long_write(-65537))
def test__65537000(self):
self.assertEqual(b"\xFC\x18\xFC\x17\xFC", long_write(-65537000))
class TestIdemPotent(TestCase):
def read_write(self, x):
self.assertEqual(loads(writes(x)), x)
class TestLong(TestIdemPotent):
def test_0(self):
self.read_write(0)
def test_1(self):
self.read_write(1)
def test_122(self):
self.read_write(122)
def test_123(self):
self.read_write(123)
def test_255(self):
self.read_write(255)
def test_256(self):
self.read_write(256)
def test_65536(self):
self.read_write(65536)
def test_65535(self):
self.read_write(65535)
def test_65537000(self):
self.read_write(65537000)
def test__1(self):
self.read_write(-1)
def test__123(self):
self.read_write(-123)
def test__124(self):
self.read_write(-124)
def test__256(self):
self.read_write(-256)
def test__257(self):
self.read_write(-257)
def test__259(self):
self.read_write(-259)
def test__65536(self):
self.read_write(-65536)
def test__65537(self):
self.read_write(-65537)
def test__65537000(self):
self.read_write(-65537000)
def test_long(self):
self.read_write(1234567890123456789)
def test_longlong(self):
self.read_write(
1234567890123456789012343294802948320948209482309842309483209482309482309482309840
)
class TestNil(TestIdemPotent):
def test_nil(self):
self.read_write(None)
class TestBool(TestIdemPotent):
def test_true(self):
self.read_write(True)
def test_false(self):
self.read_write(False)
class TestArray(TestIdemPotent):
def test_num_3(self):
self.read_write([1, 2, 3])
def test_recursive(self):
self.read_write([1, 2, 3, [False, None], [42]])
class TestString(TestIdemPotent):
def test_0(self):
self.read_write("")
def test_1(self):
self.read_write("a")
def test_5(self):
self.read_write("abcde")
def test_unicode(self):
self.read_write("✓")
class TestHash(TestIdemPotent):
def test_num_2(self):
self.read_write({1: 2, 3: 4})
def test_recursive(self):
self.read_write({1: 2, 3: 4, 5: [1, 2, 3], 6: {7: 8}, 9: "test"})
class TestFloat(TestIdemPotent):
def test_num_0(self):
self.read_write(0.0)
def test_num_1(self):
self.read_write(1.0)
def test_num_1_2(self):
self.read_write(1.2)
def test_num__1(self):
self.read_write(-1.0)
def test_num_1234567890_123456789(self):
self.read_write(1234567890.1234567)
def test_num_inf(self):
self.read_write(float("inf"))
def test_num_nan(self):
self.assertTrue(math.isnan(loads(writes(float("nan")))))
def test_num__inf(self):
self.read_write(float("-inf"))
class TestRegexp(TestIdemPotent):
def test_noflag(self):
self.assertEqual(b"\x04\bI/\att\x00\x06:\x06EF", writes(re.compile("tt")))
self.assertEqual(
b"\x04\bI/\att\x01\x06:\x06EF", writes(re.compile("tt", re.IGNORECASE))
)
self.read_write(re.compile("tt"))
def test_flag(self):
self.read_write(re.compile("tt", re.IGNORECASE))
self.read_write(re.compile("tt", re.MULTILINE))
class TestUsrMarshal(TestIdemPotent):
def test_usr(self):
a = UsrMarshal("Gem::Version")
a.marshal_load(["0.1.2"])
self.read_write(a)
class TestSymbol(TestIdemPotent):
def test_symbol(self):
self.read_write("test_symbol")
| 23.242424 | 94 | 0.639342 | 845 | 6,136 | 4.429586 | 0.157396 | 0.11969 | 0.149345 | 0.181672 | 0.506546 | 0.443495 | 0.399679 | 0.211328 | 0.184611 | 0.184611 | 0 | 0.110178 | 0.223435 | 6,136 | 263 | 95 | 23.330798 | 0.675131 | 0 | 0 | 0.228571 | 0 | 0 | 0.056877 | 0.008801 | 0 | 0 | 0 | 0 | 0.142857 | 1 | 0.388571 | false | 0 | 0.04 | 0 | 0.525714 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
8f763dc32740c84faae12c07a24bb9c75f127b9e | 1,033 | py | Python | importer/migrations/0003_auto_20180709_0933.py | juliecentofanti172/juliecentofanti.github.io | 446ea8522b9f4a6709124ebb6e0f675acf7fe205 | [
"CC0-1.0"
] | 134 | 2018-05-23T14:00:29.000Z | 2022-03-10T15:47:53.000Z | importer/migrations/0003_auto_20180709_0933.py | ptrourke/concordia | 56ff364dbf38cb8a763df489479821fe43b76d69 | [
"CC0-1.0"
] | 1,104 | 2018-05-22T20:18:22.000Z | 2022-03-31T17:28:40.000Z | importer/migrations/0003_auto_20180709_0933.py | ptrourke/concordia | 56ff364dbf38cb8a763df489479821fe43b76d69 | [
"CC0-1.0"
] | 32 | 2018-05-22T20:22:38.000Z | 2021-12-21T14:11:44.000Z | # Generated by Django 2.0.7 on 2018-07-09 09:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("importer", "0002_auto_20180709_0833")]
operations = [
migrations.AlterField(
model_name="campaignitemassetcount",
name="campaign_item_asset_count",
field=models.IntegerField(blank=True, default=0, null=True),
),
migrations.AlterField(
model_name="campaigntaskdetails",
name="campaign_asset_count",
field=models.IntegerField(blank=True, default=0, null=True),
),
migrations.AlterField(
model_name="campaigntaskdetails",
name="campaign_item_count",
field=models.IntegerField(blank=True, default=0, null=True),
),
migrations.AlterField(
model_name="campaigntaskdetails",
name="campaign_page_count",
field=models.IntegerField(blank=True, default=0, null=True),
),
]
| 32.28125 | 72 | 0.623427 | 102 | 1,033 | 6.156863 | 0.401961 | 0.127389 | 0.159236 | 0.184713 | 0.640127 | 0.640127 | 0.640127 | 0.640127 | 0.640127 | 0.640127 | 0 | 0.046235 | 0.267183 | 1,033 | 31 | 73 | 33.322581 | 0.783355 | 0.043562 | 0 | 0.6 | 1 | 0 | 0.19574 | 0.070994 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.08 | 0 | 0.2 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
56b4c87928c8ebc3b548ac95e2fa6293330a2830 | 245 | py | Python | server/api/__init__.py | gustavodsf/rdx_hack | 3b504bf8181495fdd1c3a06f963970469f6655f1 | [
"MIT"
] | null | null | null | server/api/__init__.py | gustavodsf/rdx_hack | 3b504bf8181495fdd1c3a06f963970469f6655f1 | [
"MIT"
] | null | null | null | server/api/__init__.py | gustavodsf/rdx_hack | 3b504bf8181495fdd1c3a06f963970469f6655f1 | [
"MIT"
] | 1 | 2017-12-02T15:27:53.000Z | 2017-12-02T15:27:53.000Z | """This py describe the class the could be accessed by other."""
__author__ = "Gustavo Figueiredo"
__copyright__ = "CASA"
__version__ = "1.0.1"
__maintainer__ = "Gustavo Figueiredo"
__email__ = "gustavodsf1@gmail.com"
__status__ = "Development"
| 30.625 | 64 | 0.755102 | 29 | 245 | 5.551724 | 0.862069 | 0.21118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.018692 | 0.126531 | 245 | 7 | 65 | 35 | 0.733645 | 0.236735 | 0 | 0 | 0 | 0 | 0.425414 | 0.116022 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
56c15f444181b447099d24aa4a59d1e5d09ba62e | 282 | py | Python | src/twitchy/constants.py | CodeSpent/PyTwitch | 82a46b5fa1355ce46f29b8eb397d748a4f4cdb2a | [
"MIT"
] | 2 | 2020-11-17T21:14:44.000Z | 2020-11-24T20:31:21.000Z | src/twitchy/constants.py | CodeSpent/twitch-helix | 82a46b5fa1355ce46f29b8eb397d748a4f4cdb2a | [
"MIT"
] | 5 | 2020-10-13T05:58:48.000Z | 2020-11-25T19:34:48.000Z | src/twitchy/constants.py | CodeSpent/Twitchy | 82a46b5fa1355ce46f29b8eb397d748a4f4cdb2a | [
"MIT"
] | 3 | 2020-10-21T18:33:16.000Z | 2020-11-24T23:42:03.000Z | BASE_HELIX_URL = "https://api.twitch.tv/helix/"
# token url will return a 404 if trailing slash is added
BASE_AUTH_URL = "https://id.twitch.tv/oauth2/token"
TOKEN_VALIDATION_URL = "https://id.twitch.tv/oauth2/validate"
WEBHOOKS_HUB_URL = "https://api.twitch.tv/helix/webhooks/hub"
| 40.285714 | 61 | 0.762411 | 47 | 282 | 4.404255 | 0.510638 | 0.154589 | 0.10628 | 0.164251 | 0.463768 | 0.463768 | 0 | 0 | 0 | 0 | 0 | 0.019455 | 0.088652 | 282 | 6 | 62 | 47 | 0.785992 | 0.191489 | 0 | 0 | 0 | 0 | 0.606195 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
56e0d5b4b05d787a560a10f10a9289ab0dceb741 | 430 | py | Python | src/apis/text/text/sentiment-analyses/distilbert-base-uncased/distilbert-base-uncased.py | jqueguiner/ai-api-marketplace- | 485f2ad4f530af8f54017b76db6e027aab6e65e0 | [
"MIT"
] | null | null | null | src/apis/text/text/sentiment-analyses/distilbert-base-uncased/distilbert-base-uncased.py | jqueguiner/ai-api-marketplace- | 485f2ad4f530af8f54017b76db6e027aab6e65e0 | [
"MIT"
] | null | null | null | src/apis/text/text/sentiment-analyses/distilbert-base-uncased/distilbert-base-uncased.py | jqueguiner/ai-api-marketplace- | 485f2ad4f530af8f54017b76db6e027aab6e65e0 | [
"MIT"
] | null | null | null | from happytransformer import HappyTextClassification
import json
def predict(text):
happy_tc = HappyTextClassification("DISTILBERT", "distilbert-base-uncased", num_labels=2)
result = happy_tc.classify_text(text)
#print(result) # TextClassificationResult(label='LABEL_0', score=0.9998761415481567)
return json.dumps({"label": "POSITIVE" if result.label == "LABEL_0" else "NEGATIVE", "score": result.score})
| 43 | 113 | 0.748837 | 49 | 430 | 6.44898 | 0.612245 | 0.044304 | 0.06962 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.053333 | 0.127907 | 430 | 9 | 114 | 47.777778 | 0.789333 | 0.193023 | 0 | 0 | 0 | 0 | 0.191304 | 0.066667 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.333333 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
56f44c4345afebee09683f677c92a9b0bbc64dde | 4,380 | py | Python | article-code/tailbiter0.py | darius/tailbiter | 48277a1b764e3f37a7f3d919172ac0aa601839f5 | [
"MIT"
] | 41 | 2016-06-22T01:45:16.000Z | 2022-03-01T05:57:55.000Z | article-code/tailbiter0.py | darius/tailbiter | 48277a1b764e3f37a7f3d919172ac0aa601839f5 | [
"MIT"
] | 1 | 2019-01-20T15:44:06.000Z | 2019-03-03T19:50:57.000Z | article-code/tailbiter0.py | darius/tailbiter | 48277a1b764e3f37a7f3d919172ac0aa601839f5 | [
"MIT"
] | 1 | 2019-10-10T06:45:32.000Z | 2019-10-10T06:45:32.000Z | import ast, collections, dis, types, sys
from functools import reduce
from itertools import chain
from check_subset import check_conformity
def Instruction(opcode, arg):
return bytes([opcode] if arg is None else [opcode, arg % 256, arg // 256])
def concat(assemblies): return b''.join(assemblies)
def SetLineNo(lineno): return b''
def make_lnotab(assembly): return 1, b''
def plumb_depths(assembly): return 10
def assemble(assembly): return assembly
def denotation(opcode):
if opcode < dis.HAVE_ARGUMENT:
return Instruction(opcode, None)
else:
return lambda arg: Instruction(opcode, arg)
op = type('op', (), dict([(name, denotation(opcode))
for name, opcode in dis.opmap.items()]))
def make_table():
table = collections.defaultdict(lambda: len(table))
return table
def collect(table):
return tuple(sorted(table, key=table.get))
def run(filename, module_name):
f = open(filename)
source = f.read()
f.close()
return module_from_ast(module_name, filename, ast.parse(source))
def module_from_ast(module_name, filename, t):
code = code_for_module(module_name, filename, t)
module = types.ModuleType(module_name, ast.get_docstring(t))
exec(code, module.__dict__)
return module
def code_for_module(module_name, filename, t):
return CodeGen(filename, StubScope()).compile_module(t, module_name)
class StubScope: freevars, cellvars, derefvars = (), (), ()
class CodeGen(ast.NodeVisitor):
def __init__(self, filename, scope):
self.filename = filename
self.scope = scope
self.constants = make_table()
self.names = make_table()
self.varnames = make_table()
def compile_module(self, t, name):
assembly = self(t.body) + self.load_const(None) + op.RETURN_VALUE
return self.make_code(assembly, name, 0)
def make_code(self, assembly, name, argcount):
kwonlyargcount = 0
nlocals = len(self.varnames)
stacksize = plumb_depths(assembly)
flags = ( (0x02 if nlocals else 0)
| (0x10 if self.scope.freevars else 0)
| (0x40 if not self.scope.derefvars else 0))
firstlineno, lnotab = make_lnotab(assembly)
return types.CodeType(argcount, kwonlyargcount,
nlocals, stacksize, flags, assemble(assembly),
self.collect_constants(),
collect(self.names), collect(self.varnames),
self.filename, name, firstlineno, lnotab,
self.scope.freevars, self.scope.cellvars)
def __call__(self, t):
if isinstance(t, list): return concat(map(self, t))
assembly = self.visit(t)
return SetLineNo(t.lineno) + assembly if hasattr(t, 'lineno') else assembly
def generic_visit(self, t):
raise NotImplementedError()
def load_const(self, constant):
return op.LOAD_CONST(self.constants[constant, type(constant)])
def collect_constants(self):
return tuple([constant for constant,_ in collect(self.constants)])
def visit_NameConstant(self, t): return self.load_const(t.value) # for None/True/False
def visit_Num(self, t): return self.load_const(t.n)
def visit_Str(self, t): return self.load_const(t.s)
visit_Bytes = visit_Str
def visit_Name(self, t):
if isinstance(t.ctx, ast.Load): return self.load(t.id)
elif isinstance(t.ctx, ast.Store): return self.store(t.id)
else: assert False
def load(self, name): return op.LOAD_NAME(self.names[name])
def store(self, name): return op.STORE_NAME(self.names[name])
def visit_Call(self, t):
assert len(t.args) < 256 and len(t.keywords) < 256
return (self(t.func) + self(t.args) + self(t.keywords)
+ op.CALL_FUNCTION((len(t.keywords) << 8) | len(t.args)))
def visit_keyword(self, t):
return self.load_const(t.arg) + self(t.value)
def visit_Expr(self, t):
return self(t.value) + op.POP_TOP
def visit_Assign(self, t):
def compose(left, right): return op.DUP_TOP + left + right
return self(t.value) + reduce(compose, map(self, t.targets))
if __name__ == '__main__':
sys.argv.pop(0)
run(sys.argv[0], '__main__')
| 39.818182 | 90 | 0.638356 | 574 | 4,380 | 4.728223 | 0.249129 | 0.036846 | 0.02395 | 0.027634 | 0.111275 | 0.083272 | 0.060427 | 0 | 0 | 0 | 0 | 0.009679 | 0.245205 | 4,380 | 109 | 91 | 40.183486 | 0.811252 | 0.004338 | 0 | 0 | 0 | 0 | 0.005506 | 0 | 0 | 0 | 0.002753 | 0 | 0.021277 | 1 | 0.319149 | false | 0 | 0.042553 | 0.191489 | 0.574468 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.