hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c78a9dbe76748ffc4b552241c18002c06e087035 | 1,920 | py | Python | workflow/src/routing.py | mibexsoftware/alfred-stash-workflow | 5cdba4d14c8998b937c1aa6af8e3417251fac540 | [
"MIT"
] | 13 | 2016-03-31T16:19:59.000Z | 2019-09-26T20:47:57.000Z | workflow/src/routing.py | mibexsoftware/alfred-stash-workflow | 5cdba4d14c8998b937c1aa6af8e3417251fac540 | [
"MIT"
] | 6 | 2015-09-18T15:24:43.000Z | 2019-10-23T16:51:39.000Z | workflow/src/routing.py | mibexsoftware/alfred-stash-workflow | 5cdba4d14c8998b937c1aa6af8e3417251fac540 | [
"MIT"
] | 3 | 2015-09-16T18:05:32.000Z | 2020-01-04T19:41:21.000Z | # -*- coding: utf-8 -*-
from src import icons, __version__
from src.actions import HOST_URL
from src.actions.configure import ConfigureWorkflowAction
from src.actions.help import HelpWorkflowAction
from src.actions.index import IndexWorkflowAction
from src.actions.projects import ProjectWorkflowAction
from src.actions.... | 39.183673 | 105 | 0.678125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 352 | 0.183333 |
c78c8acd4546ee0e8cf65b0df48d4a928c3e7481 | 1,262 | py | Python | model/model.py | CaoHoangTung/shark-cop-server | 38cb494d45297b723b4ef6bf82b8c9e53c2993a0 | [
"MIT"
] | 2 | 2020-10-02T03:01:32.000Z | 2020-12-06T09:21:06.000Z | model/model.py | CaoHoangTung/shark-cop-server | 38cb494d45297b723b4ef6bf82b8c9e53c2993a0 | [
"MIT"
] | null | null | null | model/model.py | CaoHoangTung/shark-cop-server | 38cb494d45297b723b4ef6bf82b8c9e53c2993a0 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
from sklearn.svm import SVC
from sklearn.metrics import classification_report, confusion_matrix
from mlxtend.plotting import plot_decision_regions
# from sklearn import datasets
from pandas.plotti... | 33.210526 | 103 | 0.759113 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 202 | 0.160063 |
c78d0f81c7f3ce50a968bb140ed1caaa45e4bf4b | 547 | py | Python | PE032.py | CaptainSora/Python-Project-Euler | 056400f434eec837ece5ef06653b310ebfcc3d4e | [
"MIT"
] | null | null | null | PE032.py | CaptainSora/Python-Project-Euler | 056400f434eec837ece5ef06653b310ebfcc3d4e | [
"MIT"
] | null | null | null | PE032.py | CaptainSora/Python-Project-Euler | 056400f434eec837ece5ef06653b310ebfcc3d4e | [
"MIT"
] | null | null | null | from itertools import count
from _pandigital_tools import is_pandigital
def pand_products():
"""
Returns the sum of all numbers n which have a factorization a * b = n such
that a, b, n are (cumulatively) 1 through 9 pandigital.
"""
total = set()
for a in range(2, 100):
for b in count(... | 23.782609 | 78 | 0.570384 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 150 | 0.274223 |
c78d62ba8abdde61ef2fb89e7ca95a09bbcfc5d2 | 282 | py | Python | v1/models.py | jdubansky/openstates.org | 6fd5592aae554c4bb201f0a76ed3605bff5204c2 | [
"MIT"
] | 1 | 2022-01-17T11:54:28.000Z | 2022-01-17T11:54:28.000Z | v1/models.py | washabstract/openstates.org | dc541ae5cd09dd3b3db623178bf32a03d0246f01 | [
"MIT"
] | null | null | null | v1/models.py | washabstract/openstates.org | dc541ae5cd09dd3b3db623178bf32a03d0246f01 | [
"MIT"
] | null | null | null | from django.db import models
from openstates.data.models import Bill
class LegacyBillMapping(models.Model):
legacy_id = models.CharField(max_length=20, primary_key=True)
bill = models.ForeignKey(
Bill, related_name="legacy_mapping", on_delete=models.CASCADE
)
| 28.2 | 69 | 0.758865 | 210 | 0.744681 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.056738 |
c78e2f38914cd69e3bd290dd0efeba4071626991 | 14,594 | py | Python | corehq/apps/accounting/utils.py | satyaakam/commcare-hq | 233f255ff20ab3a16013e9fdfdb9c1dcf632e415 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/accounting/utils.py | satyaakam/commcare-hq | 233f255ff20ab3a16013e9fdfdb9c1dcf632e415 | [
"BSD-3-Clause"
] | 1 | 2021-06-02T04:45:16.000Z | 2021-06-02T04:45:16.000Z | corehq/apps/accounting/utils.py | satyaakam/commcare-hq | 233f255ff20ab3a16013e9fdfdb9c1dcf632e415 | [
"BSD-3-Clause"
] | null | null | null | import datetime
import logging
from collections import defaultdict, namedtuple
from django.conf import settings
from django.template.loader import render_to_string
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django_prbac.models import Grant, Role, UserRole
from corehq... | 34.419811 | 114 | 0.688434 | 0 | 0 | 0 | 0 | 849 | 0.058175 | 0 | 0 | 1,226 | 0.084007 |
c78ed3281b65fd17334bed8b20f794b80892e233 | 802 | py | Python | RSA/Algorithm/EEA.py | Pumpkin-NN/Cryptography | 968e3f55fcc6a02d0badeec157776ca8f07607b8 | [
"MIT"
] | null | null | null | RSA/Algorithm/EEA.py | Pumpkin-NN/Cryptography | 968e3f55fcc6a02d0badeec157776ca8f07607b8 | [
"MIT"
] | null | null | null | RSA/Algorithm/EEA.py | Pumpkin-NN/Cryptography | 968e3f55fcc6a02d0badeec157776ca8f07607b8 | [
"MIT"
] | null | null | null |
def extended_euclidean_algorithm(a, b):
# Initial s = 1
s = 1
list_s = []
list_t = []
# Algorithm
while b > 0:
# Find the remainder of a, b
r = a % b
if r > 0:
# The t expression
t = (r - (a * s)) // b
list_t.append(t)
list... | 23.588235 | 57 | 0.438903 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 209 | 0.260599 |
c790959983852e5ff5dc7391f5d9c3bf229bac12 | 435 | py | Python | hci/command/commands/le_apcf_commands/apcf_service_data.py | cc4728/python-hci | d988f69c55972af445ec3ba04fd4cd1199593d10 | [
"MIT"
] | 3 | 2021-12-16T14:32:45.000Z | 2022-01-25T03:10:48.000Z | hci/command/commands/le_apcf_commands/apcf_service_data.py | cc4728/python-hci | d988f69c55972af445ec3ba04fd4cd1199593d10 | [
"MIT"
] | null | null | null | hci/command/commands/le_apcf_commands/apcf_service_data.py | cc4728/python-hci | d988f69c55972af445ec3ba04fd4cd1199593d10 | [
"MIT"
] | 1 | 2022-01-25T03:10:50.000Z | 2022-01-25T03:10:50.000Z | from ..le_apcf_command_pkt import LE_APCF_Command
from struct import pack, unpack
from enum import IntEnum
"""
This pare base on spec <<Android BT HCI Requirement for BLE feature>> v0.52
Advertisement Package Content filter
"""
class APCF_Service_Data(LE_APCF_Command):
def __init__(self):
# TODO generate... | 25.588235 | 75 | 0.698851 | 204 | 0.468966 | 0 | 0 | 0 | 0 | 0 | 0 | 147 | 0.337931 |
c790fdff7571a6a4a1222a967671954a3b60828b | 1,468 | py | Python | source/documentModel/representations/DocumentNGramSymWinGraph.py | Vyvy-vi/Ngram-Graphs | 3b990e5fd92543f7152b4a2c8e689e771578c047 | [
"Apache-2.0"
] | 178 | 2016-09-21T19:51:28.000Z | 2021-09-07T17:37:06.000Z | source/documentModel/representations/DocumentNGramSymWinGraph.py | Vyvy-vi/Ngram-Graphs | 3b990e5fd92543f7152b4a2c8e689e771578c047 | [
"Apache-2.0"
] | null | null | null | source/documentModel/representations/DocumentNGramSymWinGraph.py | Vyvy-vi/Ngram-Graphs | 3b990e5fd92543f7152b4a2c8e689e771578c047 | [
"Apache-2.0"
] | 17 | 2016-10-21T02:11:13.000Z | 2020-10-07T19:11:54.000Z | """
DocumentNGramSymWinGraph.py
Created on May 23, 2017, 4:56 PM
"""
import networkx as nx
import pygraphviz as pgv
import matplotlib.pyplot as plt
from networkx.drawing.nx_agraph import graphviz_layout
from DocumentNGramGraph import DocumentNGramGraph
class DocumentNGramSymWinGraph(DocumentNGramGraph):
#... | 26.690909 | 55 | 0.52248 | 1,195 | 0.814033 | 0 | 0 | 0 | 0 | 0 | 0 | 380 | 0.258856 |
c791642581cbd1a8e05d99ab1f306e65029dc666 | 2,212 | py | Python | examples/EC2Conditions.py | DrLuke/troposphere | 05672a2b0cf87215dbd6a2a656669e0d3c92d0e5 | [
"BSD-2-Clause"
] | 1 | 2021-04-03T22:24:36.000Z | 2021-04-03T22:24:36.000Z | examples/EC2Conditions.py | cartermeyers/troposphere | 4b42fa0d65f73cec28184b5349aa198fb8ee5b2e | [
"BSD-2-Clause"
] | 1 | 2021-06-25T15:20:46.000Z | 2021-06-25T15:20:46.000Z | examples/EC2Conditions.py | cartermeyers/troposphere | 4b42fa0d65f73cec28184b5349aa198fb8ee5b2e | [
"BSD-2-Clause"
] | 5 | 2020-05-10T13:50:32.000Z | 2021-09-09T09:06:54.000Z | from __future__ import print_function
from troposphere import (
Template, Parameter, Ref, Condition, Equals, And, Or, Not, If
)
from troposphere import ec2
parameters = {
"One": Parameter(
"One",
Type="String",
),
"Two": Parameter(
"Two",
Type="String",
),
"Thr... | 22.343434 | 77 | 0.573689 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 767 | 0.346745 |
c79252ab386af5d00249bc02769ec35279e30201 | 768 | py | Python | fist_phase/08_objects.py | kapuni/exercise_py | b60ba8462d2545cae57483bcb0b3428b03c5d522 | [
"MIT"
] | null | null | null | fist_phase/08_objects.py | kapuni/exercise_py | b60ba8462d2545cae57483bcb0b3428b03c5d522 | [
"MIT"
] | null | null | null | fist_phase/08_objects.py | kapuni/exercise_py | b60ba8462d2545cae57483bcb0b3428b03c5d522 | [
"MIT"
] | null | null | null | class Student(object):
# __init__是一个特殊方法用于在创建对象时进行初始化操作
# 通过这个方法我们可以为学生对象绑定name和age两个属性
def __init__(self, name, age):
self.name = name
self.age = age
def study(self, course_name):
print('%s正在学习%s.' % (self.name, course_name))
# PEP 8要求标识符的名字用全小写多个单词用下划线连接
# 但是部分程序员和公司... | 23.272727 | 53 | 0.605469 | 728 | 0.67658 | 0 | 0 | 0 | 0 | 0 | 0 | 552 | 0.513011 |
c79307bf6012742aa0a7a562893d0160e400a873 | 1,108 | py | Python | lrtc_lib/data/load_dataset.py | MovestaDev/low-resource-text-classification-framework | 4380755a65b35265e84ecbf4b87e872d79e8f079 | [
"Apache-2.0"
] | 57 | 2020-11-18T15:13:06.000Z | 2022-03-28T22:33:26.000Z | lrtc_lib/data/load_dataset.py | MovestaDev/low-resource-text-classification-framework | 4380755a65b35265e84ecbf4b87e872d79e8f079 | [
"Apache-2.0"
] | 5 | 2021-02-23T22:11:07.000Z | 2021-12-13T00:13:48.000Z | lrtc_lib/data/load_dataset.py | MovestaDev/low-resource-text-classification-framework | 4380755a65b35265e84ecbf4b87e872d79e8f079 | [
"Apache-2.0"
] | 14 | 2021-02-10T08:55:27.000Z | 2022-02-23T22:37:54.000Z | # (c) Copyright IBM Corporation 2020.
# LICENSE: Apache License 2.0 (Apache-2.0)
# http://www.apache.org/licenses/LICENSE-2.0
import logging
from lrtc_lib.data_access import single_dataset_loader
from lrtc_lib.data_access.processors.dataset_part import DatasetPart
from lrtc_lib.oracle_data_access import gold_labels_... | 35.741935 | 115 | 0.730144 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 286 | 0.258123 |
c79467938af160abb2d49f1add583ea15a8cc080 | 8,019 | py | Python | graphql_compiler/compiler/emit_match.py | BarracudaPff/code-golf-data-pythpn | 42e8858c2ebc6a061012bcadb167d29cebb85c5e | [
"MIT"
] | null | null | null | graphql_compiler/compiler/emit_match.py | BarracudaPff/code-golf-data-pythpn | 42e8858c2ebc6a061012bcadb167d29cebb85c5e | [
"MIT"
] | null | null | null | graphql_compiler/compiler/emit_match.py | BarracudaPff/code-golf-data-pythpn | 42e8858c2ebc6a061012bcadb167d29cebb85c5e | [
"MIT"
] | null | null | null | """Convert lowered IR basic blocks to MATCH query strings."""
from collections import deque
import six
from .blocks import Filter, MarkLocation, QueryRoot, Recurse, Traverse
from .expressions import TrueLiteral
from .helpers import get_only_element_from_collection, validate_safe_string
def _get_vertex_location_name(loc... | 52.411765 | 152 | 0.775907 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,872 | 0.233446 |
c794ff339d897246d1f9ee7d50c25c7781c1ee06 | 3,286 | py | Python | mo_leduc.py | mohamedun/Deep-CFR | ec3a7fb06e11bd6cc65bb2bf6f16108ee41f7234 | [
"MIT"
] | null | null | null | mo_leduc.py | mohamedun/Deep-CFR | ec3a7fb06e11bd6cc65bb2bf6f16108ee41f7234 | [
"MIT"
] | null | null | null | mo_leduc.py | mohamedun/Deep-CFR | ec3a7fb06e11bd6cc65bb2bf6f16108ee41f7234 | [
"MIT"
] | null | null | null | from PokerRL.game.games import StandardLeduc
from PokerRL.game.games import BigLeduc
from PokerRL.eval.rl_br.RLBRArgs import RLBRArgs
from PokerRL.eval.lbr.LBRArgs import LBRArgs
from PokerRL.game.bet_sets import POT_ONLY
from DeepCFR.EvalAgentDeepCFR import EvalAgentDeepCFR
from DeepCFR.TrainingProfile import Training... | 54.766667 | 119 | 0.370663 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 263 | 0.080037 |
c7964aa0abe4f31ae2f01cae5205b2c444d9f154 | 8,436 | py | Python | geocircles/backend/gamestate.py | tmick0/geocircles | 12845d006eeb0a4032679209a953c1cb072d06d7 | [
"MIT"
] | null | null | null | geocircles/backend/gamestate.py | tmick0/geocircles | 12845d006eeb0a4032679209a953c1cb072d06d7 | [
"MIT"
] | null | null | null | geocircles/backend/gamestate.py | tmick0/geocircles | 12845d006eeb0a4032679209a953c1cb072d06d7 | [
"MIT"
] | null | null | null | import sqlite3
from enum import Enum
import random
__all__ = ['state_mgr', 'game_state', 'next_state']
class game_state (Enum):
NEW_GAME = 0
WAITING_FOR_HOST = 1
HOST_CHOOSING = 2
GUEST_GUESSING = 3
GUEST_CHOOSING = 4
HOST_GUESSING = 5
def next_state(s):
if s == game_state.WAITING_FOR_H... | 36.838428 | 159 | 0.580844 | 7,839 | 0.929232 | 0 | 0 | 0 | 0 | 0 | 0 | 3,965 | 0.470009 |
c79748fa89a41d17ad6e31fcee8a32474231a1c4 | 27 | py | Python | tests/unit/providers/callables/__init__.py | YelloFam/python-dependency-injector | 541131e33858ee1b8b5a7590d2bb9f929740ea1e | [
"BSD-3-Clause"
] | null | null | null | tests/unit/providers/callables/__init__.py | YelloFam/python-dependency-injector | 541131e33858ee1b8b5a7590d2bb9f929740ea1e | [
"BSD-3-Clause"
] | null | null | null | tests/unit/providers/callables/__init__.py | YelloFam/python-dependency-injector | 541131e33858ee1b8b5a7590d2bb9f929740ea1e | [
"BSD-3-Clause"
] | null | null | null | """Tests for callables."""
| 13.5 | 26 | 0.62963 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.962963 |
c799f39a2d11cd8cf47042ccb70ce866c8193b11 | 191 | py | Python | dss/dss_capi_gr/__init__.py | dss-extensions/dss_python | f6c4440a14287d06f1bd10180484b349f764ba7e | [
"BSD-3-Clause"
] | 24 | 2019-03-07T20:24:24.000Z | 2022-03-23T17:58:00.000Z | dss/dss_capi_gr/__init__.py | dss-extensions/dss_python | f6c4440a14287d06f1bd10180484b349f764ba7e | [
"BSD-3-Clause"
] | 32 | 2019-02-14T03:46:31.000Z | 2022-03-23T00:01:28.000Z | dss/dss_capi_ir/__init__.py | PMeira/dss_python | 2dbc72ed875108d3f98d21cb0a488bab6b0d7f4c | [
"BSD-3-Clause"
] | 5 | 2019-02-19T04:54:49.000Z | 2022-03-23T10:40:51.000Z | '''
A compatibility layer for DSS C-API that mimics the official OpenDSS COM interface.
Copyright (c) 2016-2019 Paulo Meira
'''
from __future__ import absolute_import
from .IDSS import IDSS
| 23.875 | 83 | 0.78534 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 128 | 0.670157 |
c79a2fb3f10def9e365b5ba6af795f7018c3bbe1 | 693 | py | Python | museflow/components/embedding_layer.py | BILLXZY1215/museflow | 241a98ef7b3f435f29bd5d2861ac7b17d4c091d8 | [
"BSD-3-Clause"
] | null | null | null | museflow/components/embedding_layer.py | BILLXZY1215/museflow | 241a98ef7b3f435f29bd5d2861ac7b17d4c091d8 | [
"BSD-3-Clause"
] | null | null | null | museflow/components/embedding_layer.py | BILLXZY1215/museflow | 241a98ef7b3f435f29bd5d2861ac7b17d4c091d8 | [
"BSD-3-Clause"
] | null | null | null | from .component import Component, using_scope
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
class EmbeddingLayer(Component):
def __init__(self, input_size, output_size, name='embedding'):
Component.__init__(self, name=name)
self.input_size = input_size
self.output_size = out... | 27.72 | 78 | 0.681097 | 585 | 0.844156 | 0 | 0 | 100 | 0.1443 | 0 | 0 | 29 | 0.041847 |
c79bb693d6ca4d67f78e8585c83eae0b233a16e3 | 76 | py | Python | hydrocarbon_problem/env/__init__.py | lollcat/Aspen-RL | 0abefb9e7def7762e829ac4d621519d9d01592c0 | [
"MIT"
] | 1 | 2021-12-09T04:27:33.000Z | 2021-12-09T04:27:33.000Z | hydrocarbon_problem/env/__init__.py | lollcat/Aspen-RL | 0abefb9e7def7762e829ac4d621519d9d01592c0 | [
"MIT"
] | 2 | 2021-12-09T08:47:12.000Z | 2022-03-25T16:07:56.000Z | hydrocarbon_problem/env/__init__.py | lollcat/Aspen-RL | 0abefb9e7def7762e829ac4d621519d9d01592c0 | [
"MIT"
] | 1 | 2022-03-23T13:53:54.000Z | 2022-03-23T13:53:54.000Z | from hydrocarbon_problem.env.types_ import Observation, Done, Stream, Column | 76 | 76 | 0.855263 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c79c07c8078e5f1d72628e2e7fc0c80e75f6489c | 12,955 | py | Python | addon_common/common/decorators.py | Unnoen/retopoflow | 73c7cfc10a0b58937198d60e308ba5248b446490 | [
"OML"
] | 1 | 2022-01-10T23:40:21.000Z | 2022-01-10T23:40:21.000Z | addon_common/common/decorators.py | Unnoen/retopoflow | 73c7cfc10a0b58937198d60e308ba5248b446490 | [
"OML"
] | null | null | null | addon_common/common/decorators.py | Unnoen/retopoflow | 73c7cfc10a0b58937198d60e308ba5248b446490 | [
"OML"
] | null | null | null | '''
Copyright (C) 2021 CG Cookie
http://cgcookie.com
hello@cgcookie.com
Created by Jonathan Denning, Jonathan Williamson
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 ... | 33.475452 | 143 | 0.542802 | 5,070 | 0.391355 | 0 | 0 | 1,364 | 0.105288 | 0 | 0 | 2,388 | 0.18433 |
c79d02fd3237e472a6910ab89fe822c176242e9f | 11,414 | py | Python | venv/Lib/site-packages/pandas/tests/window/moments/test_moments_consistency_ewm.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 28,899 | 2016-10-13T03:32:12.000Z | 2022-03-31T21:39:05.000Z | venv/Lib/site-packages/pandas/tests/window/moments/test_moments_consistency_ewm.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 31,004 | 2016-10-12T23:22:27.000Z | 2022-03-31T23:17:38.000Z | venv/Lib/site-packages/pandas/tests/window/moments/test_moments_consistency_ewm.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 15,149 | 2016-10-13T03:21:31.000Z | 2022-03-31T18:46:47.000Z | import numpy as np
import pytest
from pandas import (
DataFrame,
Series,
concat,
)
import pandas._testing as tm
@pytest.mark.parametrize("func", ["cov", "corr"])
def test_ewm_pairwise_cov_corr(func, frame):
result = getattr(frame.ewm(span=10, min_periods=5), func)()
result = result.loc[(slice(Non... | 34.173653 | 88 | 0.615297 | 0 | 0 | 0 | 0 | 9,779 | 0.856755 | 0 | 0 | 992 | 0.086911 |
c79e030266cfddaf92e93230023130a13241d6c0 | 6,895 | py | Python | brainex/query.py | ebuntel/BrainExTemp | 991038155a6e9289af90da3d800210841ef23ff1 | [
"MIT"
] | 1 | 2020-09-04T16:15:26.000Z | 2020-09-04T16:15:26.000Z | brainex/query.py | ebuntel/Brainextemp | 991038155a6e9289af90da3d800210841ef23ff1 | [
"MIT"
] | null | null | null | brainex/query.py | ebuntel/Brainextemp | 991038155a6e9289af90da3d800210841ef23ff1 | [
"MIT"
] | null | null | null |
# TODO finish implementing query
import math
from pyspark import SparkContext
# from genex.cluster import sim_between_seq
from brainex.op.query_op import sim_between_seq
from brainex.parse import strip_function, remove_trailing_zeros
from .classes import Sequence
from brainex.database import genexengine
def query(... | 33.634146 | 119 | 0.639014 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,347 | 0.485424 |
c79e23eb5e67f7342ba09df2a42c01c2772ded3a | 4,161 | py | Python | main.py | orgr/arbitrage_bot | 39365dce0dcae0f6bb4baf1d7c32392e28b6c623 | [
"MIT"
] | null | null | null | main.py | orgr/arbitrage_bot | 39365dce0dcae0f6bb4baf1d7c32392e28b6c623 | [
"MIT"
] | 1 | 2021-12-13T03:48:08.000Z | 2021-12-13T04:58:36.000Z | main.py | orgr/arbitrage_bot | 39365dce0dcae0f6bb4baf1d7c32392e28b6c623 | [
"MIT"
] | null | null | null | import sys
import time
from typing import List
import asyncio
import ccxt.async_support as ccxt
# import ccxt
import itertools
from enum import Enum
class Color(Enum):
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
RESET = '\033[0m'
def colorize(s, color: Color):
#... | 30.152174 | 111 | 0.564768 | 713 | 0.171353 | 0 | 0 | 0 | 0 | 2,598 | 0.624369 | 609 | 0.146359 |
c79ee6a1b6ebeba170b33fbfe523726f9f206dbb | 1,497 | py | Python | examples/click-ninja/clickninja-final.py | predicatemike/predigame | 096e8379beb1d40ccb3f19ed2bb3ad82b405bb7f | [
"Apache-2.0"
] | null | null | null | examples/click-ninja/clickninja-final.py | predicatemike/predigame | 096e8379beb1d40ccb3f19ed2bb3ad82b405bb7f | [
"Apache-2.0"
] | null | null | null | examples/click-ninja/clickninja-final.py | predicatemike/predigame | 096e8379beb1d40ccb3f19ed2bb3ad82b405bb7f | [
"Apache-2.0"
] | null | null | null | WIDTH = 20
HEIGHT = 14
TITLE = 'Click Ninja'
BACKGROUND = 'board'
def destroy(s):
sound('swoosh')
if s.name == 'taco':
score(50)
else:
score(5)
# draw a splatting image at the center position of the image
image('redsplat', center=s.event_pos, size=2).fade(1.0)
s.fade(0.25)
def ... | 24.145161 | 86 | 0.549766 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 253 | 0.169005 |
c79f981e96642b4e8be1f381e054bf741fdc029f | 7,166 | py | Python | nni/retiarii/hub/pytorch/nasbench201.py | nbl97/nni | 1530339d3e964a5ea95a0afde1775ec9167cdcc0 | [
"MIT"
] | 2,305 | 2018-09-07T12:42:26.000Z | 2019-05-06T20:14:24.000Z | nni/retiarii/hub/pytorch/nasbench201.py | nbl97/nni | 1530339d3e964a5ea95a0afde1775ec9167cdcc0 | [
"MIT"
] | 379 | 2018-09-10T10:19:50.000Z | 2019-05-06T18:04:46.000Z | nni/retiarii/hub/pytorch/nasbench201.py | nbl97/nni | 1530339d3e964a5ea95a0afde1775ec9167cdcc0 | [
"MIT"
] | 314 | 2018-09-08T05:36:08.000Z | 2019-05-06T08:48:51.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from typing import Callable, Dict
import torch
import torch.nn as nn
from nni.retiarii import model_wrapper
from nni.retiarii.nn.pytorch import NasBench201Cell
__all__ = ['NasBench201']
OPS_WITH_STRIDE = {
'none': lambda C_in, C_out, st... | 34.786408 | 110 | 0.579542 | 6,161 | 0.859754 | 0 | 0 | 1,935 | 0.270025 | 0 | 0 | 458 | 0.063913 |
c7a0f4dd6f424ce5b114a5129ff1abc4021aa810 | 1,195 | py | Python | setup.py | Pasha13666/dialog_py | c54a0e06dc0a5f86d9791b8cbd6fcfacb5b644ff | [
"MIT"
] | 1 | 2021-02-17T07:38:01.000Z | 2021-02-17T07:38:01.000Z | setup.py | Pasha13666/dialog_py | c54a0e06dc0a5f86d9791b8cbd6fcfacb5b644ff | [
"MIT"
] | null | null | null | setup.py | Pasha13666/dialog_py | c54a0e06dc0a5f86d9791b8cbd6fcfacb5b644ff | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='dialog_py',
version='1.0a1',
description='Python API for cdialog/linux dialog',
long_description=long_de... | 31.447368 | 88 | 0.620921 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 676 | 0.56569 |
c7a18f6b2dc263a28bbb7cb8d8990ce3618a2615 | 8,334 | py | Python | test/test_who.py | rliebz/whoswho | 0c411e418c240fcec6ea0a23d15bd003056c65d0 | [
"MIT"
] | 28 | 2018-02-14T23:14:59.000Z | 2021-07-08T07:24:54.000Z | test/test_who.py | rliebz/whoswho | 0c411e418c240fcec6ea0a23d15bd003056c65d0 | [
"MIT"
] | 1 | 2019-01-21T15:25:49.000Z | 2019-01-23T19:03:06.000Z | test/test_who.py | rliebz/whoswho | 0c411e418c240fcec6ea0a23d15bd003056c65d0 | [
"MIT"
] | 2 | 2018-09-27T05:46:46.000Z | 2020-07-16T05:19:02.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
import nose
from nose.tools import *
from whoswho import who, config
from nameparser.config.titles import TITLES as NAMEPARSER_TITLES
class TestMatch(unittest.TestCase):
def setUp(self):
self.name = 'Robert Evan Liebowitz... | 40.852941 | 83 | 0.636069 | 8,025 | 0.959469 | 0 | 0 | 840 | 0.10043 | 0 | 0 | 2,429 | 0.290411 |
c7a1b4eccd5313fe3d7a77b6d5633a8332809125 | 2,012 | py | Python | endpoints/UserEndpoint.py | GardenersGalore/server | f7d7f8ae07b56fc3c4fbe46f0784329cd94ace2d | [
"MIT"
] | null | null | null | endpoints/UserEndpoint.py | GardenersGalore/server | f7d7f8ae07b56fc3c4fbe46f0784329cd94ace2d | [
"MIT"
] | 1 | 2021-06-02T00:35:43.000Z | 2021-06-02T00:35:43.000Z | endpoints/UserEndpoint.py | GardenersGalore/server | f7d7f8ae07b56fc3c4fbe46f0784329cd94ace2d | [
"MIT"
] | null | null | null | import json
from flask import request
from flask_restful import Resource, abort, reqparse
from models.User import User
"""
POST Creates a new resource.
GET Retrieves a resource.
PUT Updates an existing resource.
DELETE Deletes a resource.
"""
class UserEndpoint(Resource)... | 24.240964 | 97 | 0.548708 | 1,719 | 0.854374 | 0 | 0 | 0 | 0 | 0 | 0 | 570 | 0.2833 |
c7a2778b2130c187c84f5bc78fd439f687e7ad10 | 450 | py | Python | passy_forms/forms/forms.py | vleon1/passy | fe48ed9f932eb6df9dbe463344b034218c81567b | [
"Apache-2.0"
] | null | null | null | passy_forms/forms/forms.py | vleon1/passy | fe48ed9f932eb6df9dbe463344b034218c81567b | [
"Apache-2.0"
] | 19 | 2017-02-18T17:53:56.000Z | 2017-03-11T22:09:06.000Z | passy_forms/forms/forms.py | vleon1/passy | fe48ed9f932eb6df9dbe463344b034218c81567b | [
"Apache-2.0"
] | null | null | null | from django.forms import forms
class Form(forms.Form):
def get_value(self, name):
self.is_valid() # making sure we tried to clean the data before accessing it
if self.is_bound and name in self.cleaned_data:
return self.cleaned_data[name]
field = self[name]
... | 23.684211 | 86 | 0.622222 | 412 | 0.915556 | 0 | 0 | 0 | 0 | 0 | 0 | 63 | 0.14 |
c7a2d818488a83ba3e02cfaea886aa5551f314ae | 1,172 | py | Python | assignment4/rorxornotencode.py | gkweb76/SLAE | c0aef9610a5f75568a0e65c4a91a3bb5a56e6fc6 | [
"MIT"
] | 15 | 2015-08-11T09:50:00.000Z | 2021-10-02T19:30:53.000Z | assignment4/rorxornotencode.py | gkweb76/SLAE | c0aef9610a5f75568a0e65c4a91a3bb5a56e6fc6 | [
"MIT"
] | null | null | null | assignment4/rorxornotencode.py | gkweb76/SLAE | c0aef9610a5f75568a0e65c4a91a3bb5a56e6fc6 | [
"MIT"
] | 9 | 2015-08-11T09:51:55.000Z | 2021-10-18T18:04:11.000Z | #!/usr/bin/python
# Title: ROR/XOR/NOT encoder
# File: rorxornotencode.py
# Author: Guillaume Kaddouch
# SLAE-681
import sys
ror = lambda val, r_bits, max_bits: \
((val & (2**max_bits-1)) >> r_bits%max_bits) | \
(val << (max_bits-(r_bits%max_bits)) & (2**max_bits-1))
shellcode = (
"\x31\xc0\x50\x68\x6e\x2f\... | 23.44 | 102 | 0.562287 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 529 | 0.451365 |
c7a32b4c1d013fec417f68425b02fe13d88c171e | 9,292 | py | Python | authalligator_client/entities.py | closeio/authalligator-client | fe93c9d2333d2949e44c48a2dd0a9a266734e026 | [
"MIT"
] | null | null | null | authalligator_client/entities.py | closeio/authalligator-client | fe93c9d2333d2949e44c48a2dd0a9a266734e026 | [
"MIT"
] | null | null | null | authalligator_client/entities.py | closeio/authalligator-client | fe93c9d2333d2949e44c48a2dd0a9a266734e026 | [
"MIT"
] | 1 | 2021-01-31T13:08:48.000Z | 2021-01-31T13:08:48.000Z | import datetime
from enum import Enum
from typing import Any, Callable, Dict, List, Optional, Type, TypeVar, Union, cast
import attr
import ciso8601
import structlog
from attr import converters
from . import enums
from .utils import as_json_dict, to_snake_case
logger = structlog.get_logger()
class Omitted(Enum):
... | 35.19697 | 88 | 0.660461 | 5,400 | 0.581145 | 0 | 0 | 5,471 | 0.588786 | 0 | 0 | 4,293 | 0.46201 |
c7a3e79d5fcb0530f653c35813c95268647570c7 | 9,739 | py | Python | library/device.py | lompal/USBIPManager | b03d8d9c0befcd70b7f67cfe61c0664f48d2939d | [
"MIT"
] | 24 | 2019-01-25T20:40:07.000Z | 2020-11-20T08:12:14.000Z | library/device.py | lompal/USBIPManager | b03d8d9c0befcd70b7f67cfe61c0664f48d2939d | [
"MIT"
] | 3 | 2018-11-28T14:04:57.000Z | 2020-09-14T08:35:09.000Z | library/device.py | lompal/USBIPManager | b03d8d9c0befcd70b7f67cfe61c0664f48d2939d | [
"MIT"
] | 6 | 2019-08-23T05:30:26.000Z | 2020-11-20T08:12:03.000Z | from library import config, ini, lang, log, performance, periphery, queue
from asyncio import get_event_loop
from threading import Thread, Event
from PyQt5.QtCore import QObject, pyqtSignal
from PyQt5.QtWidgets import QTreeWidgetItem
# noinspection PyPep8Naming
class Signal(QObject):
""" PyQt signals for correct... | 36.339552 | 118 | 0.618133 | 9,411 | 0.966321 | 0 | 0 | 0 | 0 | 1,399 | 0.143649 | 2,409 | 0.247356 |
c7a3f3c709f3111aed4b0e26101a434835f55c66 | 3,959 | py | Python | agent/minimax/submission.py | youkeyao/SJTU-CS410-Snakes-3V3-Group06 | 180ab3714686cdd879454cf103affc6bb03b7fcd | [
"MIT"
] | 1 | 2022-01-09T13:59:34.000Z | 2022-01-09T13:59:34.000Z | agent/minimax/submission.py | youkeyao/SJTU-CS410-Snakes-3V3-Group06 | 180ab3714686cdd879454cf103affc6bb03b7fcd | [
"MIT"
] | null | null | null | agent/minimax/submission.py | youkeyao/SJTU-CS410-Snakes-3V3-Group06 | 180ab3714686cdd879454cf103affc6bb03b7fcd | [
"MIT"
] | null | null | null | DEPTH = 3
# Action
class Action:
top = [1, 0, 0, 0]
bottom = [0, 1, 0, 0]
left = [0, 0, 1, 0]
right = [0, 0, 0, 1]
actlist = [(-1, 0), (1, 0), (0, -1), (0, 1)]
mapAct = {
actlist[0]: top,
actlist[1]: bottom,
actlist[2]: left,
actlist[3]: right
}
def go(s... | 32.186992 | 99 | 0.51023 | 3,747 | 0.946451 | 0 | 0 | 0 | 0 | 0 | 0 | 113 | 0.028543 |
c7a4ae3d4e412782ea4851134b89f174c5ee6fd3 | 224 | py | Python | public_html/python/Empty_Python_Page.py | Asher-Simcha/help | 23c52c136a885d76aa0e2e024cbf1587091f41a7 | [
"BSD-3-Clause"
] | null | null | null | public_html/python/Empty_Python_Page.py | Asher-Simcha/help | 23c52c136a885d76aa0e2e024cbf1587091f41a7 | [
"BSD-3-Clause"
] | null | null | null | public_html/python/Empty_Python_Page.py | Asher-Simcha/help | 23c52c136a885d76aa0e2e024cbf1587091f41a7 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/pyton
# Title:
# Author:
# Additional Authors:
# Filename:
# Description:
# Version:
# Date:
# Last Modified:
# Location_of_the_Video:
# Meta_data_for_YouTube:
# Web_Site_For_Video:
# Start Your Code Here
#EOF
| 12.444444 | 24 | 0.71875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 207 | 0.924107 |
c7a9038c8840f231377e3ea552d065f35efee699 | 289 | py | Python | Python/first_flask_project/utilities/file_reader.py | maxxxxxdlp/code_share | 4f9375bf4bdf6048b54b22bd1fa0d3ad010de7ef | [
"MIT"
] | null | null | null | Python/first_flask_project/utilities/file_reader.py | maxxxxxdlp/code_share | 4f9375bf4bdf6048b54b22bd1fa0d3ad010de7ef | [
"MIT"
] | 33 | 2021-07-11T22:55:42.000Z | 2022-01-07T23:23:43.000Z | Python/first_flask_project/utilities/file_reader.py | maxxxxxdlp/code_share | 4f9375bf4bdf6048b54b22bd1fa0d3ad010de7ef | [
"MIT"
] | null | null | null | def read_csv(root, file_name, keys):
with open('{root}private_static/csv/{file_name}.csv'.format(root=root, file_name=file_name)) as file:
data = file.read()
lines = data.split("\n")
return [dict(zip(keys, line.split(','))) for i, line in enumerate(lines) if i != 0]
| 36.125 | 105 | 0.650519 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 0.16955 |
c7a95d54d497e531abccb6e65c1f8ff7b1fbb2e5 | 7,202 | py | Python | semester3/oop/lab3/parser/client/MasterService/client.py | no1sebomb/University-Labs | 1da5e7486f0b8a6119c077945aba8c89cdfc2e50 | [
"WTFPL"
] | null | null | null | semester3/oop/lab3/parser/client/MasterService/client.py | no1sebomb/University-Labs | 1da5e7486f0b8a6119c077945aba8c89cdfc2e50 | [
"WTFPL"
] | null | null | null | semester3/oop/lab3/parser/client/MasterService/client.py | no1sebomb/University-Labs | 1da5e7486f0b8a6119c077945aba8c89cdfc2e50 | [
"WTFPL"
] | 1 | 2020-11-01T23:54:52.000Z | 2020-11-01T23:54:52.000Z | # coding=utf-8
from parser.client import *
from parser.client.ResponseItem import *
with (Path(__file__).resolve().parent / "config.json").open("rt") as siteConfigFile:
SITE_CONFIG = json.load(siteConfigFile)
class MasterService(Client):
class Link:
main = "https://steering.com.ua/"
login =... | 43.648485 | 120 | 0.509303 | 7,082 | 0.970004 | 0 | 0 | 0 | 0 | 0 | 0 | 1,474 | 0.20189 |
c7a995a9727073409d096c9586ccf8c67b8e8dc3 | 7,320 | py | Python | sketchduino/template.py | rodrigopmatias/sketchduino | 567023d69cd21bf1f573d2a26fc855183abdef7e | [
"Apache-2.0"
] | null | null | null | sketchduino/template.py | rodrigopmatias/sketchduino | 567023d69cd21bf1f573d2a26fc855183abdef7e | [
"Apache-2.0"
] | 3 | 2015-01-09T20:31:22.000Z | 2015-01-09T20:31:22.000Z | sketchduino/template.py | rodrigopmatias/sketchduino | 567023d69cd21bf1f573d2a26fc855183abdef7e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Copyright 2012 Rodrigo Pinheiro Matias <rodrigopmatias@gmail.com>
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 r... | 27.518797 | 138 | 0.630464 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,222 | 0.986612 |
c7a9d270039cb319b1e7bd45460f8d2badbcbfe0 | 1,562 | py | Python | Tic-Tac-Pi/gameObjects/TextObject.py | mstubinis/Tic-Tac-Pi | b96db58332be4975f4a5b18b6dd45a0eac859528 | [
"MIT"
] | 2 | 2016-04-13T02:52:46.000Z | 2017-11-20T22:41:36.000Z | Tic-Tac-Pi/gameObjects/TextObject.py | mstubinis/Tic-Tac-Pi | b96db58332be4975f4a5b18b6dd45a0eac859528 | [
"MIT"
] | null | null | null | Tic-Tac-Pi/gameObjects/TextObject.py | mstubinis/Tic-Tac-Pi | b96db58332be4975f4a5b18b6dd45a0eac859528 | [
"MIT"
] | 3 | 2016-04-14T02:29:32.000Z | 2020-04-27T06:08:07.000Z | import pygame
from pygame.locals import *
import resourceManager
class TextObject(pygame.sprite.Sprite):
def __init__(self,pos,fontSize,fontcolor,textstring):
pygame.sprite.Sprite.__init__(self) #call Sprite initializer
self.position = pos
self.message = textstring
self.color = fon... | 31.24 | 68 | 0.596031 | 1,495 | 0.957106 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.015365 |
c7aa2635f7e1d5416d843dacc6078257816ee795 | 2,268 | py | Python | src/encoded/server_defaults.py | beta-cell-network/beta-cell-nw | 093b078fdb7932ebfcbc0715aeeb2261eda3ee52 | [
"MIT"
] | 4 | 2018-01-04T22:31:08.000Z | 2021-07-15T17:39:16.000Z | src/encoded/server_defaults.py | beta-cell-network/beta-cell-nw | 093b078fdb7932ebfcbc0715aeeb2261eda3ee52 | [
"MIT"
] | 7 | 2017-10-31T23:47:47.000Z | 2022-01-10T00:12:42.000Z | src/encoded/server_defaults.py | beta-cell-network/beta-cell-nw | 093b078fdb7932ebfcbc0715aeeb2261eda3ee52 | [
"MIT"
] | 10 | 2017-09-14T00:57:07.000Z | 2021-07-27T23:41:14.000Z | from datetime import datetime
from jsonschema_serialize_fork import NO_DEFAULT
from pyramid.security import effective_principals
from pyramid.threadlocal import get_current_request
from string import (
digits,
ascii_uppercase,
)
import random
import uuid
from snovault.schema_utils import server_default
A... | 28 | 98 | 0.740741 | 0 | 0 | 0 | 0 | 1,029 | 0.453704 | 0 | 0 | 299 | 0.131834 |
c7aa99e86ce9b9941bb3c2dee52be602130563cd | 200 | py | Python | app/__init__.py | geirowew/SapAPI | dda0d839722d28c7a30d58c8b3d5076a503fd837 | [
"MIT"
] | 1 | 2021-10-11T20:20:50.000Z | 2021-10-11T20:20:50.000Z | app/__init__.py | geirowew/SapAPI | dda0d839722d28c7a30d58c8b3d5076a503fd837 | [
"MIT"
] | null | null | null | app/__init__.py | geirowew/SapAPI | dda0d839722d28c7a30d58c8b3d5076a503fd837 | [
"MIT"
] | 2 | 2021-01-22T10:52:04.000Z | 2021-10-06T10:28:07.000Z | from flask import Flask
#from config import Config
import config
app = Flask(__name__)
#app.config.from_object(Config)
app.config.from_object(config)
#from app import routes
from app import gettoken | 20 | 31 | 0.81 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.4 |
c7ae90de0db880bd9c87e6ef499b2ab425e89a1b | 19 | py | Python | todo/task/__init__.py | BenMcLean981/flask-todo | 9827f4993c7d4af0c42ed2a891f2eb56227f1644 | [
"MIT"
] | null | null | null | todo/task/__init__.py | BenMcLean981/flask-todo | 9827f4993c7d4af0c42ed2a891f2eb56227f1644 | [
"MIT"
] | null | null | null | todo/task/__init__.py | BenMcLean981/flask-todo | 9827f4993c7d4af0c42ed2a891f2eb56227f1644 | [
"MIT"
] | null | null | null | """Todo module."""
| 9.5 | 18 | 0.526316 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.947368 |
c7aedff29cfbc578d32b6b83c7dce7618a9b1e46 | 680 | py | Python | src/pvt_model/pvt_system/pipe.py | BenWinchester/PVTModel | 6bf3976b06f406f632e0a9e525cd8b05359da239 | [
"MIT"
] | 1 | 2021-05-11T14:15:11.000Z | 2021-05-11T14:15:11.000Z | src/pvt_model/pvt_system/pipe.py | BenWinchester/PVTModel | 6bf3976b06f406f632e0a9e525cd8b05359da239 | [
"MIT"
] | 14 | 2021-02-23T11:53:08.000Z | 2021-11-16T10:45:31.000Z | src/pvt_model/pvt_system/pipe.py | BenWinchester/PVTModel | 6bf3976b06f406f632e0a9e525cd8b05359da239 | [
"MIT"
] | null | null | null | #!/usr/bin/python3.7
########################################################################################
# pvt_collector/pipe.py - Represents a pipe within the system.
#
# Author: Ben Winchester
# Copyright: Ben Winchester, 2021
######################################################################################... | 21.25 | 88 | 0.507353 | 186 | 0.273529 | 0 | 0 | 197 | 0.289706 | 0 | 0 | 567 | 0.833824 |
c7b0b81ceafaed0e74acb2a5f98af6b65a8f276d | 1,850 | py | Python | tests/test_api_account_state.py | luisparravicini/ioapi | f9d60a28032fd54163ea15b8256aba1d48ec4dcc | [
"MIT"
] | null | null | null | tests/test_api_account_state.py | luisparravicini/ioapi | f9d60a28032fd54163ea15b8256aba1d48ec4dcc | [
"MIT"
] | null | null | null | tests/test_api_account_state.py | luisparravicini/ioapi | f9d60a28032fd54163ea15b8256aba1d48ec4dcc | [
"MIT"
] | 1 | 2020-05-03T04:34:32.000Z | 2020-05-03T04:34:32.000Z | import unittest
import os
import json
import requests
import requests_mock
from ioapi import api_url, IOService, AuthorizationError, UnexpectedResponseCodeError
class APIAccountStateTestCase(unittest.TestCase):
def setUp(self):
self.service = IOService()
@requests_mock.mock()
def test_account_st... | 31.355932 | 85 | 0.656216 | 1,686 | 0.911351 | 0 | 0 | 1,094 | 0.591351 | 0 | 0 | 126 | 0.068108 |
c7b0f4e12943a98dbd413a45f48a80cdcaf7bcf6 | 6,517 | py | Python | testData/devSeedData.py | bgporter/wastebook | 79885a8d503452e1fbeb8ff445cedd2daafff2a0 | [
"MIT"
] | null | null | null | testData/devSeedData.py | bgporter/wastebook | 79885a8d503452e1fbeb8ff445cedd2daafff2a0 | [
"MIT"
] | null | null | null | testData/devSeedData.py | bgporter/wastebook | 79885a8d503452e1fbeb8ff445cedd2daafff2a0 | [
"MIT"
] | null | null | null | '''
fake posts to bootstrap a development database. Put any interesting cases
useful for development in here.
'''
from datetime import datetime
POST_DATA_1 = [
{
"created" : datetime(2015, 10, 1),
"published": datetime(2015, 10, 1),
"edited": datetime(2015, 10, 1),
"rende... | 29.224215 | 77 | 0.399724 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,459 | 0.377321 |
c7b11734daef5c05aa9cf025632e59324996f20e | 2,954 | py | Python | customer_support/utils.py | rtnpro/django-customer-support | 6de8d9301fe01a42fa6799757a107be69ee82426 | [
"MIT"
] | 1 | 2017-05-06T04:49:45.000Z | 2017-05-06T04:49:45.000Z | customer_support/utils.py | rtnpro/django-customer-support | 6de8d9301fe01a42fa6799757a107be69ee82426 | [
"MIT"
] | null | null | null | customer_support/utils.py | rtnpro/django-customer-support | 6de8d9301fe01a42fa6799757a107be69ee82426 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from django.shortcuts import render
import simplejson
import datetime
from django.http import HttpResponse
class GenericItemBase(object):
ITEM_ATTRS = []
def __init__(self, identifier):
self.identifier = identifier
def jsonify(self, value):
"""
... | 25.912281 | 69 | 0.613067 | 2,796 | 0.946513 | 0 | 0 | 0 | 0 | 0 | 0 | 278 | 0.09411 |
c7b4d983814129255c3038e65a92199d05319e32 | 6,061 | py | Python | tobit.py | AlvaroCorrales/tobit | 6993b1cfe58010cd59aac477ced3c2525342244f | [
"MIT"
] | 1 | 2021-04-13T03:14:01.000Z | 2021-04-13T03:14:01.000Z | tobit.py | AlvaroCorrales/tobit | 6993b1cfe58010cd59aac477ced3c2525342244f | [
"MIT"
] | null | null | null | tobit.py | AlvaroCorrales/tobit | 6993b1cfe58010cd59aac477ced3c2525342244f | [
"MIT"
] | null | null | null | import math
import warnings
import numpy as np
import pandas as pd
from scipy.optimize import minimize
import scipy.stats
from scipy.stats import norm # edit
from scipy.special import log_ndtr
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error, mean_absolute_error
def sp... | 33.120219 | 123 | 0.620855 | 2,755 | 0.454545 | 0 | 0 | 0 | 0 | 0 | 0 | 1,311 | 0.216301 |
c7b509b05f7f3079575b9250d0a2891a9795c878 | 1,554 | py | Python | setup.py | Raymond38324/hagworm | 196d4735719f586d52a1cd9f21aedd00e16b59b0 | [
"Apache-2.0"
] | null | null | null | setup.py | Raymond38324/hagworm | 196d4735719f586d52a1cd9f21aedd00e16b59b0 | [
"Apache-2.0"
] | null | null | null | setup.py | Raymond38324/hagworm | 196d4735719f586d52a1cd9f21aedd00e16b59b0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import setuptools
with open(r'README.md', r'r', encoding="utf8") as stream:
long_description = stream.read()
setuptools.setup(
name=r'hagworm',
version=r'3.0.0',
license=r'Apache License Version 2.0',
platforms=[r'all'],
author=r'Shaobo.Wang',
author_email=r'wsb310... | 28.254545 | 62 | 0.548263 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 824 | 0.530245 |
c7b513ddbd33e479f8df70d1c5b9306a2ec0133a | 3,072 | py | Python | mercury_ml/keras/containers.py | gabrieloexle/mercury-ml | cc663f84a26ee66ae105bbfc0cd1cbd5629031cd | [
"MIT"
] | null | null | null | mercury_ml/keras/containers.py | gabrieloexle/mercury-ml | cc663f84a26ee66ae105bbfc0cd1cbd5629031cd | [
"MIT"
] | null | null | null | mercury_ml/keras/containers.py | gabrieloexle/mercury-ml | cc663f84a26ee66ae105bbfc0cd1cbd5629031cd | [
"MIT"
] | null | null | null | """
Simple IoC containers that provide direct access to various Keras providers
"""
class ModelSavers:
from mercury_ml.keras.providers import model_saving
save_hdf5 = model_saving.save_keras_hdf5
save_tensorflow_graph = model_saving.save_tensorflow_graph
save_tensorrt_pbtxt_config = model_saving.save_... | 38.4 | 113 | 0.823893 | 2,962 | 0.964193 | 0 | 0 | 0 | 0 | 0 | 0 | 255 | 0.083008 |
c7b60df7ecb95aad435c61ec7e818259064a9562 | 1,851 | py | Python | Code Injector/code_injector_BeEF.py | crake7/Defensor-Fortis- | 086b055a10b9ac55f444e8d13b4031f998415438 | [
"MIT"
] | null | null | null | Code Injector/code_injector_BeEF.py | crake7/Defensor-Fortis- | 086b055a10b9ac55f444e8d13b4031f998415438 | [
"MIT"
] | null | null | null | Code Injector/code_injector_BeEF.py | crake7/Defensor-Fortis- | 086b055a10b9ac55f444e8d13b4031f998415438 | [
"MIT"
] | 1 | 2021-12-20T11:44:51.000Z | 2021-12-20T11:44:51.000Z | #!/usr/bin/env python
import netfilterqueue
import scapy.all as scapy
import re
def set_load(packet, load):
packet[scapy.Raw].load = load
del packet[scapy.IP].len
del packet[scapy.IP].chksum
del packet[scapy.TCP].chksum
return packet
def process_packet(packet):
"""Modify downloads files on t... | 37.02 | 90 | 0.622366 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 523 | 0.28255 |
c7b66acfc0f1fc9f0407ccd4877bc57ccf79afa1 | 4,691 | py | Python | pycardcast/net/aiohttp.py | Elizafox/pycardcast | 36fb8009f32f733fd18a7f3263a61362fdb75ec3 | [
"WTFPL"
] | null | null | null | pycardcast/net/aiohttp.py | Elizafox/pycardcast | 36fb8009f32f733fd18a7f3263a61362fdb75ec3 | [
"WTFPL"
] | null | null | null | pycardcast/net/aiohttp.py | Elizafox/pycardcast | 36fb8009f32f733fd18a7f3263a61362fdb75ec3 | [
"WTFPL"
] | 1 | 2020-04-09T10:12:46.000Z | 2020-04-09T10:12:46.000Z | # Copyright © 2015 Elizabeth Myers.
# All rights reserved.
# This file is part of the pycardcast project. See LICENSE in the root
# directory for licensing information.
import asyncio
import aiohttp
from pycardcast.net import CardcastAPIBase
from pycardcast.deck import (DeckInfo, DeckInfoNotFoundError,
... | 37.830645 | 78 | 0.563206 | 4,091 | 0.87191 | 3,648 | 0.777494 | 3,312 | 0.705882 | 0 | 0 | 779 | 0.166027 |
c7b71c7227264e168736696fa5f4ef910e4d9c22 | 2,345 | py | Python | libtiepie/triggeroutput.py | TiePie/python-libtiepie | d2a9875855298a58d6a16be5b61aaa89a558e7d8 | [
"MIT"
] | 6 | 2020-01-04T02:00:35.000Z | 2022-03-22T00:32:26.000Z | libtiepie/triggeroutput.py | TiePie/python-libtiepie | d2a9875855298a58d6a16be5b61aaa89a558e7d8 | [
"MIT"
] | 3 | 2020-08-05T15:16:29.000Z | 2022-03-21T07:00:27.000Z | libtiepie/triggeroutput.py | TiePie/python-libtiepie | d2a9875855298a58d6a16be5b61aaa89a558e7d8 | [
"MIT"
] | null | null | null | from ctypes import *
from .api import api
from .const import *
from .library import library
class TriggerOutput(object):
""""""
def __init__(self, handle, index):
self._handle = handle
self._index = index
def _get_enabled(self):
""" Check whether a trigger output is enabled. """
... | 33.028169 | 72 | 0.665245 | 2,250 | 0.959488 | 0 | 0 | 0 | 0 | 0 | 0 | 329 | 0.140299 |
c7b7578b3382d7cf2565fe8fe7621c5d451e663b | 1,374 | py | Python | conduit_rest/radish/conduit_rest_steps.py | dduleba/tw2019-ui-tests | 5f149c6c2bdb9f2d69a02c038248374f6b0b5903 | [
"MIT"
] | 1 | 2019-09-27T23:12:07.000Z | 2019-09-27T23:12:07.000Z | conduit_rest/radish/conduit_rest_steps.py | dduleba/conduit-tests | 5f149c6c2bdb9f2d69a02c038248374f6b0b5903 | [
"MIT"
] | null | null | null | conduit_rest/radish/conduit_rest_steps.py | dduleba/conduit-tests | 5f149c6c2bdb9f2d69a02c038248374f6b0b5903 | [
"MIT"
] | null | null | null | import time
from faker import Faker
from radish_ext.radish.step_config import StepConfig
from conduit.client import ConduitClient, ConduitConfig
class ConduitStepsConfig(StepConfig):
def __init__(self, context):
super().__init__(context)
self._faker = None
self.client = ConduitClient(Co... | 31.227273 | 114 | 0.61936 | 1,134 | 0.825328 | 0 | 0 | 248 | 0.180495 | 0 | 0 | 132 | 0.09607 |
c7b88fe5b2537ef40175e1a577b998fdb2d3a5c9 | 1,233 | py | Python | SummaryExternalClient.py | Hackillinois2k18/Main-Repo | e998cc3283e0469b98a842220a30a72c5b105dad | [
"MIT"
] | 5 | 2020-03-10T03:23:18.000Z | 2021-11-12T17:06:51.000Z | SummaryExternalClient.py | Hackillinois2k18/FyveBot | e998cc3283e0469b98a842220a30a72c5b105dad | [
"MIT"
] | 3 | 2018-02-24T05:25:28.000Z | 2018-02-24T05:43:49.000Z | SummaryExternalClient.py | Hackillinois2k18/Main-Repo | e998cc3283e0469b98a842220a30a72c5b105dad | [
"MIT"
] | 3 | 2019-01-20T14:50:11.000Z | 2021-11-12T17:06:55.000Z | import requests
import credentials
class SummaryExternalClient:
def pullSummaryForUrl(self, artUrl, title):
url = "https://api.aylien.com/api/v1/summarize"
headers = {"X-AYLIEN-TextAPI-Application-Key": credentials.AYLIEN_APP_KEY,
"X-AYLIEN-TextAPI-Application-ID" : credentials... | 35.228571 | 82 | 0.586375 | 1,194 | 0.96837 | 0 | 0 | 0 | 0 | 0 | 0 | 299 | 0.242498 |
c7b8b9fdf2de5fb240b87971d0e7f35941af2c81 | 1,485 | py | Python | tests/test_render.py | isuruf/conda-build | 9f163925f5d03a46e921162892bf4c6bc86b1072 | [
"BSD-3-Clause"
] | null | null | null | tests/test_render.py | isuruf/conda-build | 9f163925f5d03a46e921162892bf4c6bc86b1072 | [
"BSD-3-Clause"
] | 1 | 2019-10-08T15:03:56.000Z | 2019-10-08T15:03:56.000Z | tests/test_render.py | awwad/conda-build | b0be80283ec2e3ef7e49b5da923b1438e74e27b5 | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
from conda_build import api
from conda_build import render
import pytest
def test_output_with_noarch_says_noarch(testing_metadata):
testing_metadata.meta['build']['noarch'] = 'python'
output = api.get_output_file_path(testing_metadata)
assert os.path.sep + "noarch" + os.path.sep in o... | 33 | 65 | 0.690909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 350 | 0.23569 |
c7b8e20d5ed5e23189a112d56d8a749537d1ecec | 173 | py | Python | ABC/007/b.py | fumiyanll23/AtCoder | 362ca9fcacb5415c1458bc8dee5326ba2cc70b65 | [
"MIT"
] | null | null | null | ABC/007/b.py | fumiyanll23/AtCoder | 362ca9fcacb5415c1458bc8dee5326ba2cc70b65 | [
"MIT"
] | null | null | null | ABC/007/b.py | fumiyanll23/AtCoder | 362ca9fcacb5415c1458bc8dee5326ba2cc70b65 | [
"MIT"
] | null | null | null | def main():
# input
A = input()
# compute
# output
if A == 'a':
print(-1)
else:
print('a')
if __name__ == '__main__':
main()
| 10.8125 | 26 | 0.421965 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.231214 |
c7b94b2b66d38c20024028b233b4eaed057202d2 | 5,057 | py | Python | SPAE/read_write.py | simon-schuler/SPAE | 2b970e30838da258b969b316488e7963d66119be | [
"MIT"
] | null | null | null | SPAE/read_write.py | simon-schuler/SPAE | 2b970e30838da258b969b316488e7963d66119be | [
"MIT"
] | 1 | 2021-04-12T20:28:55.000Z | 2021-04-12T20:28:55.000Z | SPAE/read_write.py | simon-schuler/SPAE | 2b970e30838da258b969b316488e7963d66119be | [
"MIT"
] | null | null | null | #Writing MOOG parameter file for the parameter, abundance, and error calculations.
#The parameter file only needs to be written once, at beginning of the routine, because the output
#files are overwritten with each itereation of the routine, only minimal output data are needed.
#
#The user can choose to have the param... | 41.45082 | 168 | 0.489816 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,760 | 0.348032 |
c7ba2b5a0bc557fae2df973eed4ab42b40580f6e | 1,862 | py | Python | lectures/optimization/optimization_plots.py | carolinalvarez/ose-course-scientific-computing | 4b816fa81320c88fc5f35b203f0541e0a1a00939 | [
"MIT"
] | null | null | null | lectures/optimization/optimization_plots.py | carolinalvarez/ose-course-scientific-computing | 4b816fa81320c88fc5f35b203f0541e0a1a00939 | [
"MIT"
] | null | null | null | lectures/optimization/optimization_plots.py | carolinalvarez/ose-course-scientific-computing | 4b816fa81320c88fc5f35b203f0541e0a1a00939 | [
"MIT"
] | null | null | null | """Plots for optimization lecture."""
import matplotlib.pyplot as plt
import numpy as np
from matplotlib import cm
def plot_contour(f, allvecs, legend_path):
"""Plot contour graph for function f."""
# Create array from values with at least two dimensions.
allvecs = np.atleast_2d(allvecs)
X, Y, Z = _g... | 27.791045 | 96 | 0.605263 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 594 | 0.319012 |
c7ba60efd06c8906b83387592b8347e6da526db9 | 7,141 | py | Python | gdsfactory/functions.py | simbilod/gdsfactory | 4d76db32674c3edb4d16260e3177ee29ef9ce11d | [
"MIT"
] | null | null | null | gdsfactory/functions.py | simbilod/gdsfactory | 4d76db32674c3edb4d16260e3177ee29ef9ce11d | [
"MIT"
] | null | null | null | gdsfactory/functions.py | simbilod/gdsfactory | 4d76db32674c3edb4d16260e3177ee29ef9ce11d | [
"MIT"
] | null | null | null | """All functions return a Component so you can easily pipe or compose them.
There are two types of functions:
- decorators: return the original component
- containers: return a new component
"""
from functools import lru_cache, partial
import numpy as np
from omegaconf import OmegaConf
from pydantic import validate... | 25.967273 | 87 | 0.669654 | 0 | 0 | 0 | 0 | 3,884 | 0.543901 | 0 | 0 | 2,808 | 0.393222 |
c7ba7f82e01986b93c50e54b040c99061ee59d08 | 26,640 | py | Python | OverlayUFOs/Overlay UFOs.roboFontExt/lib/OverlayUFOs.py | connordavenport/fbOpenTools | 794c71d504cea1248c256bea11d5249b0a4144a1 | [
"Unlicense"
] | null | null | null | OverlayUFOs/Overlay UFOs.roboFontExt/lib/OverlayUFOs.py | connordavenport/fbOpenTools | 794c71d504cea1248c256bea11d5249b0a4144a1 | [
"Unlicense"
] | null | null | null | OverlayUFOs/Overlay UFOs.roboFontExt/lib/OverlayUFOs.py | connordavenport/fbOpenTools | 794c71d504cea1248c256bea11d5249b0a4144a1 | [
"Unlicense"
] | null | null | null | #coding=utf-8
from __future__ import division
"""
# OVERLAY UFOS
For anyone looking in here, sorry the code is so messy. This is a standalone version of a script with a lot of dependencies.
"""
import os
from AppKit import * #@PydevCodeAnalysisIgnore
from vanilla import * #@PydevCodeAnalysisIgnore
from mojo.drawingT... | 39.118943 | 182 | 0.575526 | 25,360 | 0.95188 | 0 | 0 | 114 | 0.004279 | 0 | 0 | 7,435 | 0.279071 |
c7ba815c300287faa117210ec887325390625523 | 114 | py | Python | nautapy/__init__.py | armandofcom/nautapy | 6907e350021752b54998f6b0b5674dccc8ca9ddd | [
"MIT"
] | 25 | 2020-03-20T05:02:09.000Z | 2022-03-29T13:24:36.000Z | nautapy/__init__.py | armandofcom/nautapy | 6907e350021752b54998f6b0b5674dccc8ca9ddd | [
"MIT"
] | 7 | 2020-01-22T23:10:25.000Z | 2021-06-02T21:41:27.000Z | nautapy/__init__.py | armandofcom/nautapy | 6907e350021752b54998f6b0b5674dccc8ca9ddd | [
"MIT"
] | 14 | 2020-03-20T05:02:18.000Z | 2022-03-29T13:24:39.000Z | import os
appdata_path = os.path.expanduser("~/.local/share/nautapy")
os.makedirs(appdata_path, exist_ok=True)
| 16.285714 | 59 | 0.763158 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.210526 |
c7bb3480194f9fe2fbc061710221cb965aa24166 | 9,368 | py | Python | pyteamup/Calendar.py | LogicallyUnfit/pyTeamUp | a398fe6808d506ca4e05090b58e0a697aa1f46e5 | [
"MIT"
] | 5 | 2019-04-11T14:52:19.000Z | 2022-03-13T10:39:22.000Z | pyteamup/Calendar.py | LogicallyUnfit/pyTeamUp | a398fe6808d506ca4e05090b58e0a697aa1f46e5 | [
"MIT"
] | 9 | 2019-04-11T14:49:59.000Z | 2021-11-30T08:34:31.000Z | pyteamup/Calendar.py | LogicallyUnfit/pyTeamUp | a398fe6808d506ca4e05090b58e0a697aa1f46e5 | [
"MIT"
] | 3 | 2019-04-11T14:17:00.000Z | 2021-07-15T06:59:13.000Z | import requests
import json
import datetime
import sys
from dateutil.parser import parse as to_datetime
try:
import pandas as pd
except:
pass
from pyteamup.utils.utilities import *
from pyteamup.utils.constants import *
from pyteamup.Event import Event
class Calendar:
def __init__(self, cal_id, api_key):... | 39.694915 | 144 | 0.627242 | 9,102 | 0.971605 | 0 | 0 | 1,261 | 0.134607 | 0 | 0 | 2,897 | 0.309244 |
c7bd4060064aa4ccc776c07aa7678497ec65e795 | 8,232 | py | Python | configs/regnet.py | roatienza/agmax | 2a7299cc506605aeaaf64b6155b5c826c71d5786 | [
"Apache-2.0"
] | 2 | 2021-11-05T13:09:12.000Z | 2022-03-04T05:07:33.000Z | configs/regnet.py | roatienza/agmax | 2a7299cc506605aeaaf64b6155b5c826c71d5786 | [
"Apache-2.0"
] | 1 | 2021-11-04T10:06:57.000Z | 2021-11-07T08:35:39.000Z | configs/regnet.py | roatienza/agmax | 2a7299cc506605aeaaf64b6155b5c826c71d5786 | [
"Apache-2.0"
] | null | null | null |
from . import constant
parameters = {
'RegNet' : { "lr": 0.1, "epochs": 100, "weight_decay": 5e-5, "batch_size": 128, "nesterov": True, "init_backbone":True, "init_extractor":True,},
}
backbone_config = {
"RegNetX002" : {"channels": 3, "dropout": 0.2,},
"RegNetY004" : {"channels": ... | 68.6 | 153 | 0.409621 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,627 | 0.319121 |
c7bde259829ba295ad5078b7f30b72f3fddb4e13 | 1,608 | py | Python | examples/ws2812/main.py | ivankravets/pumbaa | 2a1869cc204e3128516ed6fa9f89529aedec1702 | [
"MIT"
] | 69 | 2016-09-04T18:36:18.000Z | 2021-07-04T21:51:54.000Z | examples/ws2812/main.py | ivankravets/pumbaa | 2a1869cc204e3128516ed6fa9f89529aedec1702 | [
"MIT"
] | 42 | 2016-09-02T20:10:19.000Z | 2020-07-01T05:54:01.000Z | examples/ws2812/main.py | ivankravets/pumbaa | 2a1869cc204e3128516ed6fa9f89529aedec1702 | [
"MIT"
] | 11 | 2016-09-29T14:33:23.000Z | 2021-02-28T19:30:49.000Z | #
# @section License
#
# The MIT License (MIT)
#
# Copyright (c) 2016-2017, Erik Moqvist
#
# 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 ... | 29.236364 | 69 | 0.735075 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,234 | 0.767413 |
c7be4754a949474c9764e2ad170025656a516b5f | 740 | py | Python | reports/urls.py | aysiu/manana | 8af8b57c72f6154affdb5f3a9a3469a49e5818fe | [
"Apache-2.0"
] | 9 | 2016-02-16T23:53:40.000Z | 2020-07-13T16:04:18.000Z | reports/urls.py | aysiu/manana | 8af8b57c72f6154affdb5f3a9a3469a49e5818fe | [
"Apache-2.0"
] | null | null | null | reports/urls.py | aysiu/manana | 8af8b57c72f6154affdb5f3a9a3469a49e5818fe | [
"Apache-2.0"
] | 4 | 2016-02-16T23:56:13.000Z | 2019-05-20T15:12:14.000Z | from django.conf.urls import patterns, include, url
urlpatterns = patterns('reports.views',
url(r'^index/*$', 'index'),
url(r'^dashboard/*$', 'dashboard'),
url(r'^$', 'index'),
url(r'^detail/(?P<serial>[^/]+)$', 'detail'),
url(r'^detailpkg/(?P<serial>[^/]+)/(?P<manifest_name>[^/]+)$', 'detail_pkg')... | 41.111111 | 81 | 0.554054 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 496 | 0.67027 |
c7be660a1e99ce3791843752d3993ac9fa123bdb | 5,812 | py | Python | BackEnd/venv/lib/python3.8/site-packages/pytest_flask/fixtures.py | MatheusBrodt/App_LabCarolVS | 9552149ceaa9bee15ef9a45fab2983c6651031c4 | [
"MIT"
] | null | null | null | BackEnd/venv/lib/python3.8/site-packages/pytest_flask/fixtures.py | MatheusBrodt/App_LabCarolVS | 9552149ceaa9bee15ef9a45fab2983c6651031c4 | [
"MIT"
] | 1 | 2019-08-20T18:42:14.000Z | 2019-08-20T18:42:14.000Z | BackEnd/venv/lib/python3.8/site-packages/pytest_flask/fixtures.py | MatheusBrodt/App_LabCarolVS | 9552149ceaa9bee15ef9a45fab2983c6651031c4 | [
"MIT"
] | 1 | 2019-08-20T18:11:48.000Z | 2019-08-20T18:11:48.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
import multiprocessing
import pytest
import socket
import signal
import os
import logging
try:
from urllib2 import URLError, urlopen
except ImportError:
from urllib.error import URLError
from urllib.request import urlopen
from flask import _request... | 28.213592 | 89 | 0.635754 | 2,223 | 0.382485 | 176 | 0.030282 | 2,889 | 0.497075 | 0 | 0 | 2,374 | 0.408465 |
c7be8fc77e58c39c645eb0be54b3d89d725dc934 | 7,700 | py | Python | tableauserverclient/server/endpoint/endpoint.py | jorwoods/server-client-python | fefd6f18d8a6617829c6323879d2c3ed77a4cda6 | [
"CC0-1.0",
"MIT"
] | 1 | 2021-12-22T21:34:17.000Z | 2021-12-22T21:34:17.000Z | tableauserverclient/server/endpoint/endpoint.py | jorwoods/server-client-python | fefd6f18d8a6617829c6323879d2c3ed77a4cda6 | [
"CC0-1.0",
"MIT"
] | null | null | null | tableauserverclient/server/endpoint/endpoint.py | jorwoods/server-client-python | fefd6f18d8a6617829c6323879d2c3ed77a4cda6 | [
"CC0-1.0",
"MIT"
] | null | null | null | from .exceptions import (
ServerResponseError,
InternalServerError,
NonXMLResponseError,
EndpointUnavailableError,
)
from functools import wraps
from xml.etree.ElementTree import ParseError
from ..query import QuerySet
import logging
try:
from distutils2.version import NormalizedVersion as Version
... | 33.189655 | 118 | 0.632597 | 5,068 | 0.658182 | 0 | 0 | 1,975 | 0.256494 | 0 | 0 | 2,171 | 0.281948 |
c7c0ec1f2d22d969372f765fb0d7aef4a98be04f | 4,617 | py | Python | spec/test_importer.py | lajohnston/anki-freeplane | 746e3dd714653df428f0541609b9c51e29cd2726 | [
"MIT"
] | 15 | 2016-10-06T00:27:26.000Z | 2022-03-04T04:24:50.000Z | spec/test_importer.py | eljay26/anki-freeplane | 746e3dd714653df428f0541609b9c51e29cd2726 | [
"MIT"
] | null | null | null | spec/test_importer.py | eljay26/anki-freeplane | 746e3dd714653df428f0541609b9c51e29cd2726 | [
"MIT"
] | 6 | 2016-11-08T06:55:47.000Z | 2021-03-24T22:15:14.000Z | import unittest
from freeplane_importer.importer import Importer
from mock import Mock
from mock import MagicMock
from mock import call
from freeplane_importer.model_not_found_exception import ModelNotFoundException
class TestImporter(unittest.TestCase):
def setUp(self):
self.mock_collection = Mock()
... | 38.157025 | 90 | 0.719731 | 4,397 | 0.95235 | 0 | 0 | 0 | 0 | 0 | 0 | 234 | 0.050682 |
c7c11d6e36451e4175726cdb9543215d1fb0fff9 | 1,089 | py | Python | analysis/fitexp.py | mfkasim91/idcovid19 | 3e51b16354581a4e0defc635f837f93faff26afc | [
"BSD-3-Clause"
] | null | null | null | analysis/fitexp.py | mfkasim91/idcovid19 | 3e51b16354581a4e0defc635f837f93faff26afc | [
"BSD-3-Clause"
] | null | null | null | analysis/fitexp.py | mfkasim91/idcovid19 | 3e51b16354581a4e0defc635f837f93faff26afc | [
"BSD-3-Clause"
] | null | null | null | import argparse
import numpy as np
from scipy.stats import linregress
import matplotlib.pyplot as plt
parser = argparse.ArgumentParser()
parser.add_argument("--plot", action="store_const", default=False, const=True)
args = parser.parse_args()
data = np.loadtxt("../data/data.csv", skiprows=1, usecols=list(range(1,8)),... | 35.129032 | 134 | 0.665748 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 135 | 0.123967 |
c7c22a9174889ccacec698f1b477ffd20a7822b0 | 1,716 | py | Python | .venv/lib/python3.7/site-packages/jedi/inference/lazy_value.py | ITCRStevenLPZ/Proyecto2-Analisis-de-Algoritmos | 4acdbc423428fb2e0068720add69e7870c87929a | [
"Apache-2.0"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | .venv/lib/python3.7/site-packages/jedi/inference/lazy_value.py | ITCRStevenLPZ/Proyecto2-Analisis-de-Algoritmos | 4acdbc423428fb2e0068720add69e7870c87929a | [
"Apache-2.0"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | .venv/lib/python3.7/site-packages/jedi/inference/lazy_value.py | ITCRStevenLPZ/Proyecto2-Analisis-de-Algoritmos | 4acdbc423428fb2e0068720add69e7870c87929a | [
"Apache-2.0"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | from jedi.inference.base_value import ValueSet, NO_VALUES
from jedi.common import monkeypatch
class AbstractLazyValue(object):
def __init__(self, data, min=1, max=1):
self.data = data
self.min = min
self.max = max
def __repr__(self):
return '<%s: %s>' % (self.__class__.__name_... | 27.677419 | 83 | 0.674825 | 1,448 | 0.843823 | 0 | 0 | 0 | 0 | 0 | 0 | 241 | 0.140443 |
c7c399f4aa408e4541e327b125cd44ba175da7ef | 1,901 | py | Python | percept/plot.py | joshleeb/PerceptronVis | 2d0e2f1969e11498533f190f5598c174b7584513 | [
"MIT"
] | null | null | null | percept/plot.py | joshleeb/PerceptronVis | 2d0e2f1969e11498533f190f5598c174b7584513 | [
"MIT"
] | null | null | null | percept/plot.py | joshleeb/PerceptronVis | 2d0e2f1969e11498533f190f5598c174b7584513 | [
"MIT"
] | null | null | null | import matplotlib.lines as lines
import matplotlib.pyplot as plt
COLOR_CLASSIFICATIONS = [
'black', # Unclassified
'blue', # Classified True (1)
'red' # Classified False (0)
]
def generate_line(ax, p0, p1, color='black', style='-'):
'''
Generates a line between points p0 and p1 which... | 29.246154 | 79 | 0.637559 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 570 | 0.299842 |
c7c444c1fb4481f333fa9c3252930b474ff296c2 | 27,392 | py | Python | openpype/hosts/flame/api/lib.py | j-cube/OpenPype | f0849cbd08070a320d19bb55b7e368189a57e3ab | [
"MIT"
] | 1 | 2022-02-08T15:40:41.000Z | 2022-02-08T15:40:41.000Z | openpype/hosts/flame/api/lib.py | zafrs/OpenPype | 4b8e7e1ed002fc55b31307efdea70b0feaed474f | [
"MIT"
] | 2 | 2022-03-18T01:46:03.000Z | 2022-03-18T01:46:16.000Z | openpype/hosts/flame/api/lib.py | zafrs/OpenPype | 4b8e7e1ed002fc55b31307efdea70b0feaed474f | [
"MIT"
] | null | null | null | import sys
import os
import re
import json
import pickle
import tempfile
import itertools
import contextlib
import xml.etree.cElementTree as cET
from copy import deepcopy
from xml.etree import ElementTree as ET
from pprint import pformat
from .constants import (
MARKER_COLOR,
MARKER_DURATION,
MARKER_NAME,
... | 29.109458 | 79 | 0.593531 | 13,810 | 0.504162 | 2,053 | 0.074949 | 3,960 | 0.144568 | 0 | 0 | 6,952 | 0.253797 |
c7c5220186916c25d94c94c265afef27d8cdfced | 1,287 | py | Python | newanalysis/plot_performances.py | nriesterer/cogsci-individualization | da97bf0a6b53f440670e22ff591348f3d3fab230 | [
"MIT"
] | null | null | null | newanalysis/plot_performances.py | nriesterer/cogsci-individualization | da97bf0a6b53f440670e22ff591348f3d3fab230 | [
"MIT"
] | null | null | null | newanalysis/plot_performances.py | nriesterer/cogsci-individualization | da97bf0a6b53f440670e22ff591348f3d3fab230 | [
"MIT"
] | null | null | null | import sys
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
if len(sys.argv) != 3:
print('usage: python plot_performances.py <group_csv> <indiv_csv>')
exit()
group_file = sys.argv[1]
indiv_file = sys.argv[2]
# Load the data
df_group = pd.read_csv(group_file)
df_i... | 28.6 | 98 | 0.700855 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 329 | 0.255633 |
c7c52b0c2a58b302536c4281e3d875f7998a6140 | 611 | py | Python | src/helpers.py | demirdagemir/thesis | 4a48bddf815c91729e27484548bb7bbf7ddeda64 | [
"MIT"
] | null | null | null | src/helpers.py | demirdagemir/thesis | 4a48bddf815c91729e27484548bb7bbf7ddeda64 | [
"MIT"
] | null | null | null | src/helpers.py | demirdagemir/thesis | 4a48bddf815c91729e27484548bb7bbf7ddeda64 | [
"MIT"
] | null | null | null | from Aion.utils.data import getADBPath
import subprocess
def dumpLogCat(apkTarget):
# Aion/shared/DroidutanTest.py
# Define frequently-used commands
# TODO: Refactor adbID
adbID = "192.168.58.101:5555"
adbPath = getADBPath()
dumpLogcatCmd = [adbPath, "-s", adbID, "logcat", "-d"]
clearLogca... | 33.944444 | 97 | 0.680851 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 194 | 0.317512 |
c7c5b3d53e6ad031199ab57c86f15523078de6cc | 1,969 | py | Python | tests/test_show.py | domi007/pigskin | c379284ebbbdb3a9df42de70227041e3c137b6dc | [
"MIT"
] | 6 | 2018-08-15T13:29:22.000Z | 2020-09-12T14:39:20.000Z | tests/test_show.py | domi007/pigskin | c379284ebbbdb3a9df42de70227041e3c137b6dc | [
"MIT"
] | 26 | 2018-08-15T13:08:49.000Z | 2020-01-12T22:27:38.000Z | tests/test_show.py | domi007/pigskin | c379284ebbbdb3a9df42de70227041e3c137b6dc | [
"MIT"
] | 4 | 2018-08-15T13:52:26.000Z | 2019-04-28T17:09:04.000Z | from collections import OrderedDict
import pytest
import vcr
try: # Python 2.7
# requests's ``json()`` function returns strings as unicode (as per the
# JSON spec). In 2.7, those are of type unicode rather than str. basestring
# was created to help with that.
# https://docs.python.org/2/library/func... | 24.6125 | 79 | 0.584053 | 1,532 | 0.77806 | 0 | 0 | 1,557 | 0.790757 | 0 | 0 | 582 | 0.295582 |
c7c66a8f8b52a73b0ced73b9208760d1628d3b03 | 3,165 | py | Python | integration_test/basic_op_capi.py | cl9200/nbase-arc | 47c124b11b0bb2e8a8428c6d628ce82dc24c1ade | [
"Apache-2.0"
] | null | null | null | integration_test/basic_op_capi.py | cl9200/nbase-arc | 47c124b11b0bb2e8a8428c6d628ce82dc24c1ade | [
"Apache-2.0"
] | null | null | null | integration_test/basic_op_capi.py | cl9200/nbase-arc | 47c124b11b0bb2e8a8428c6d628ce82dc24c1ade | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2015 Naver Corp.
#
# 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... | 28.00885 | 113 | 0.653081 | 2,415 | 0.763033 | 0 | 0 | 111 | 0.035071 | 0 | 0 | 1,147 | 0.362401 |
c7c6a85099fcd6a3265a36a9b36bdf7fa4e9b9a7 | 5,509 | py | Python | examples/scripts/flopy_lake_example.py | andrewcalderwood/flopy | 0432ce96a0a5eec4d20adb4d384505632a2db3dc | [
"CC0-1.0",
"BSD-3-Clause"
] | 351 | 2015-01-03T15:18:48.000Z | 2022-03-31T09:46:43.000Z | examples/scripts/flopy_lake_example.py | andrewcalderwood/flopy | 0432ce96a0a5eec4d20adb4d384505632a2db3dc | [
"CC0-1.0",
"BSD-3-Clause"
] | 1,256 | 2015-01-15T21:10:42.000Z | 2022-03-31T22:43:06.000Z | examples/scripts/flopy_lake_example.py | andrewcalderwood/flopy | 0432ce96a0a5eec4d20adb4d384505632a2db3dc | [
"CC0-1.0",
"BSD-3-Clause"
] | 553 | 2015-01-31T22:46:48.000Z | 2022-03-31T17:43:35.000Z | import os
import sys
import numpy as np
import matplotlib.pyplot as plt
import flopy
def run():
workspace = os.path.join("lake")
# make sure workspace directory exists
if not os.path.exists(workspace):
os.makedirs(workspace)
fext = "png"
narg = len(sys.argv)
iarg = 0
if narg > 1:... | 35.089172 | 103 | 0.626429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,760 | 0.500998 |
c7c6afa7ba07a568b76988ebc296a4b468c42738 | 11,428 | py | Python | P2/Caso2/clustering.py | Ocete/Inteligenica-de-Negocio | 0c3bb3914893c608790002743530aba535be7249 | [
"MIT"
] | null | null | null | P2/Caso2/clustering.py | Ocete/Inteligenica-de-Negocio | 0c3bb3914893c608790002743530aba535be7249 | [
"MIT"
] | null | null | null | P2/Caso2/clustering.py | Ocete/Inteligenica-de-Negocio | 0c3bb3914893c608790002743530aba535be7249 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Documentación sobre clustering en Python:
http://scikit-learn.org/stable/modules/clustering.html
http://www.learndatasci.com/k-means-clustering-algorithms-python-intro/
http://hdbscan.readthedocs.io/en/latest/comparing_clustering_algorithms.html
https://joernhees.de... | 37.468852 | 187 | 0.651995 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,561 | 0.398236 |
c7c71735421912226dadf924d3330fb19e4f6af5 | 9,029 | py | Python | signal_processing/ecg_preproc.py | DeepPSP/cpsc2020 | 47acb884ea1f2f819e564d8a17ad37001ed0df27 | [
"BSD-3-Clause"
] | 1 | 2021-12-07T11:44:48.000Z | 2021-12-07T11:44:48.000Z | signal_processing/ecg_preproc.py | wenh06/cpsc2020 | 47acb884ea1f2f819e564d8a17ad37001ed0df27 | [
"BSD-3-Clause"
] | null | null | null | signal_processing/ecg_preproc.py | wenh06/cpsc2020 | 47acb884ea1f2f819e564d8a17ad37001ed0df27 | [
"BSD-3-Clause"
] | 1 | 2021-05-25T14:56:02.000Z | 2021-05-25T14:56:02.000Z | """
preprocess of (single lead) ecg signal:
band pass --> remove baseline --> find rpeaks --> denoise (mainly deal with motion artefact)
TODO:
1. motion artefact detection,
and slice the signal into continuous (no motion artefact within) segments
2. to add
References:
-----------
[1] https://github... | 34.59387 | 175 | 0.646694 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,572 | 0.395614 |
c7c75c3cc68eb1ff8bc4c52efd3bee52faa60a5f | 761 | bzl | Python | ocaml/bootstrap.bzl | mobileink/obazl | eb9d10d1aac040dbc05a038265276e3ab3a52233 | [
"Apache-2.0"
] | null | null | null | ocaml/bootstrap.bzl | mobileink/obazl | eb9d10d1aac040dbc05a038265276e3ab3a52233 | [
"Apache-2.0"
] | null | null | null | ocaml/bootstrap.bzl | mobileink/obazl | eb9d10d1aac040dbc05a038265276e3ab3a52233 | [
"Apache-2.0"
] | null | null | null | ## mv to //:WORKSPACE.bzl ocaml_configure
load("//ocaml/_bootstrap:ocaml.bzl", _ocaml_configure = "ocaml_configure")
# load("//ocaml/_bootstrap:obazl.bzl", _obazl_configure = "obazl_configure")
load("//ocaml/_rules:ocaml_repository.bzl" , _ocaml_repository = "ocaml_repository")
# load("//ocaml/_rules:opam_confi... | 38.05 | 96 | 0.768725 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 607 | 0.797635 |
c7c963a523b032b23261574567ab5a4c018c9176 | 44 | py | Python | tsts.py | tedtroxell/metrician | d4164dbff8db5645ee8beca11dc55ba6c26c4cb6 | [
"MIT"
] | null | null | null | tsts.py | tedtroxell/metrician | d4164dbff8db5645ee8beca11dc55ba6c26c4cb6 | [
"MIT"
] | null | null | null | tsts.py | tedtroxell/metrician | d4164dbff8db5645ee8beca11dc55ba6c26c4cb6 | [
"MIT"
] | null | null | null | from metrician.explainations.tests import *
| 22 | 43 | 0.840909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c7c9b4be102dc7ada3fac5b424f329fc54878619 | 3,021 | py | Python | simple/facenet.py | taflahi/facenet | 64e74744437e18978782b497b42300b8d4a2342b | [
"MIT"
] | 5 | 2018-09-25T21:04:39.000Z | 2020-09-03T20:07:37.000Z | simple/facenet.py | SoloSynth1/facenet | 64e74744437e18978782b497b42300b8d4a2342b | [
"MIT"
] | null | null | null | simple/facenet.py | SoloSynth1/facenet | 64e74744437e18978782b497b42300b8d4a2342b | [
"MIT"
] | 14 | 2018-10-15T00:03:24.000Z | 2020-08-11T05:04:24.000Z | import tensorflow as tf
from .. src.align import detect_face
from .. src import facenet
from .. simple import download_model
import sys
import os
from os.path import expanduser
import copy
import cv2
import numpy as np
from scipy import spatial
minsize = 20 # minimum size of face
threshold = [0.6, 0.7, 0.7] # three ... | 35.127907 | 96 | 0.620655 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 336 | 0.111221 |
c7cb28d53e6c7e1382fc471314a689bf2b0e9252 | 172 | py | Python | athena/athena/errors.py | aculich/openmappr | c9e5b4cfc974a6eda9cbc8a0ea6f8a96ce35efba | [
"MIT"
] | 19 | 2018-04-05T23:33:33.000Z | 2022-03-24T00:18:20.000Z | athena/athena/errors.py | aculich/openmappr | c9e5b4cfc974a6eda9cbc8a0ea6f8a96ce35efba | [
"MIT"
] | 13 | 2018-01-10T23:31:11.000Z | 2018-07-20T12:55:02.000Z | athena/athena/errors.py | aculich/openmappr | c9e5b4cfc974a6eda9cbc8a0ea6f8a96ce35efba | [
"MIT"
] | 5 | 2018-02-12T05:33:19.000Z | 2019-09-21T22:43:02.000Z |
class AthenaError(Exception):
"""base class for all athena exceptions"""
pass
class AthenaMongoError(AthenaError):
"""Class for all mongo related errors"""
pass | 21.5 | 46 | 0.726744 | 169 | 0.982558 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 0.476744 |
c7cb2a8553964cb9e86d2c3de96decefdde5eb6c | 89 | py | Python | tf2stats/__init__.py | TheAntecedent/Quintessence | f32dc1b11ded212121ebc0f925d15c845cb6ea4b | [
"MIT"
] | 1 | 2019-10-08T04:38:08.000Z | 2019-10-08T04:38:08.000Z | tf2stats/__init__.py | TheAntecedent/Quintessence | f32dc1b11ded212121ebc0f925d15c845cb6ea4b | [
"MIT"
] | 1 | 2021-04-30T20:51:05.000Z | 2021-04-30T20:51:05.000Z | tf2stats/__init__.py | TheAntecedent/Quintessence | f32dc1b11ded212121ebc0f925d15c845cb6ea4b | [
"MIT"
] | null | null | null | from .aggregated_stats import *
from .game_stats import *
from .stat_definitions import * | 29.666667 | 31 | 0.808989 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c7cb514f4b628937e89d11a214a0267002c52972 | 1,515 | py | Python | tests/test_messages/test_inbound/test_manage_all_link_record.py | michaeldavie/pyinsteon | e5b2e2910f4eff1474f158051fa71f75c2077dd6 | [
"MIT"
] | 15 | 2020-07-08T05:29:14.000Z | 2022-03-24T18:56:26.000Z | tests/test_messages/test_inbound/test_manage_all_link_record.py | michaeldavie/pyinsteon | e5b2e2910f4eff1474f158051fa71f75c2077dd6 | [
"MIT"
] | 107 | 2019-06-03T09:23:02.000Z | 2022-03-31T23:12:38.000Z | tests/test_messages/test_inbound/test_manage_all_link_record.py | michaeldavie/pyinsteon | e5b2e2910f4eff1474f158051fa71f75c2077dd6 | [
"MIT"
] | 16 | 2019-01-24T01:09:49.000Z | 2022-02-24T03:48:42.000Z | """Test Manage All-Link Record."""
import unittest
from binascii import unhexlify
from pyinsteon.address import Address
from pyinsteon.constants import AckNak, ManageAllLinkRecordAction, MessageId
from pyinsteon.protocol.messages.all_link_record_flags import \
AllLinkRecordFlags
from tests import set_log_levels
fr... | 30.3 | 76 | 0.654785 | 1,119 | 0.738614 | 0 | 0 | 0 | 0 | 0 | 0 | 239 | 0.157756 |
c7cbc44076f7cb93b253c24fadcf22b9899a01e8 | 5,054 | py | Python | Clock/Clock_Fig3F.py | chAwater/OpenFig | d37d59c6a77d76c7d8a9e8623ce94a95406f1843 | [
"MIT"
] | null | null | null | Clock/Clock_Fig3F.py | chAwater/OpenFig | d37d59c6a77d76c7d8a9e8623ce94a95406f1843 | [
"MIT"
] | null | null | null | Clock/Clock_Fig3F.py | chAwater/OpenFig | d37d59c6a77d76c7d8a9e8623ce94a95406f1843 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Figure Info.
#
# | Title | Journal | Authors | Article Date | Code Date | Figure | Links |
# |:------|:-------:|:-------:|:------------:|:---------:|:------:|:-----:|
# |A microfluidic approach for experimentally modelling <br> the intercellular coupling system of a mammalian... | 28.234637 | 248 | 0.564108 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,142 | 0.22596 |
c7cbd8f6da109df8e878fcc548912f6a3815a1c2 | 10,733 | py | Python | rameniaapp/views/report.py | awlane/ramenia | 6bf8e75a1f279ac584daa4ee19927ffccaa67551 | [
"MIT"
] | null | null | null | rameniaapp/views/report.py | awlane/ramenia | 6bf8e75a1f279ac584daa4ee19927ffccaa67551 | [
"MIT"
] | null | null | null | rameniaapp/views/report.py | awlane/ramenia | 6bf8e75a1f279ac584daa4ee19927ffccaa67551 | [
"MIT"
] | null | null | null | from django.shortcuts import render, HttpResponse, HttpResponseRedirect
from django.template import loader
from django.conf import settings
from django.contrib.auth.models import User
from rameniaapp.models import ReviewReport, ProfileReport, NoodleReport, Report, Review, Profile, Noodle
from django.views.generic impor... | 39.171533 | 104 | 0.644461 | 4,914 | 0.45784 | 0 | 0 | 4,848 | 0.451691 | 0 | 0 | 2,895 | 0.269729 |
c7cce7b123c5282102e29d889ac9141ac4ccb76e | 10,135 | py | Python | pyparser.py | ddurvaux/PyUnpacker | 13c90379c26c4a9ae8c2c4d94e26f2de9709ae1d | [
"MIT"
] | null | null | null | pyparser.py | ddurvaux/PyUnpacker | 13c90379c26c4a9ae8c2c4d94e26f2de9709ae1d | [
"MIT"
] | 1 | 2017-02-06T11:06:11.000Z | 2017-02-06T11:07:29.000Z | pyparser.py | ddurvaux/PyUnpacker | 13c90379c26c4a9ae8c2c4d94e26f2de9709ae1d | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# This tool is an attempt to automate some taks related
# to malware unpacking.
#
# Most (if not all) of the tricks used in this tool
# directly comes from an excellent course given
# by Nicolas Brulez (@nicolasbrulez)
#
# Tool developped by David DURVAUX for Autopsit
# (commercial brand of N-Labs... | 29.207493 | 152 | 0.651998 | 6,410 | 0.632462 | 0 | 0 | 0 | 0 | 0 | 0 | 5,191 | 0.512185 |
c7cf1b7d56bb02ccf14d9d4fb7fbc22544c1690f | 512 | py | Python | mjml/elements/head/mj_style.py | ESA-CCI-ODP/mjml-stub | ffd824923de85f3c02fca7f83ef6b540be048414 | [
"MIT"
] | 23 | 2020-10-02T14:52:21.000Z | 2022-03-24T16:05:21.000Z | mjml/elements/head/mj_style.py | ESA-CCI-ODP/mjml-stub | ffd824923de85f3c02fca7f83ef6b540be048414 | [
"MIT"
] | 17 | 2020-10-07T14:48:06.000Z | 2022-03-18T13:56:11.000Z | mjml/elements/head/mj_style.py | ESA-CCI-ODP/mjml-stub | ffd824923de85f3c02fca7f83ef6b540be048414 | [
"MIT"
] | 8 | 2021-01-13T11:54:41.000Z | 2022-03-10T15:50:55.000Z |
from ._head_base import HeadComponent
__all__ = ['MjStyle']
class MjStyle(HeadComponent):
@classmethod
def default_attrs(cls):
return {
'inline' : '',
}
def handler(self):
add = self.context['add']
inline_attr = 'inlineStyle' if (self.get_attr('inl... | 24.380952 | 89 | 0.597656 | 446 | 0.871094 | 0 | 0 | 105 | 0.205078 | 0 | 0 | 107 | 0.208984 |
c7cf29c510e55652c76da9423af99e7754022e49 | 3,399 | py | Python | model_zoo/official/nlp/bert/src/sample_process.py | i4oolish/mindspore | dac3be31d0f2c0a3516200f47af30980e566601b | [
"Apache-2.0"
] | 2 | 2020-08-12T16:14:40.000Z | 2020-12-04T03:05:57.000Z | model_zoo/official/nlp/bert/src/sample_process.py | dilingsong/mindspore | 4276050f2494cfbf8682560a1647576f859991e8 | [
"Apache-2.0"
] | null | null | null | model_zoo/official/nlp/bert/src/sample_process.py | dilingsong/mindspore | 4276050f2494cfbf8682560a1647576f859991e8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 33.653465 | 78 | 0.562518 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 757 | 0.222713 |
c7d08a1b7fd50820c50ef7603b8e08a3f497a3ac | 2,273 | py | Python | lang_model/data_loader.py | alex44jzy/FancyALMLDLNLP | c55a67a51de72339f4ab13bd46008eb418d293a3 | [
"MIT"
] | null | null | null | lang_model/data_loader.py | alex44jzy/FancyALMLDLNLP | c55a67a51de72339f4ab13bd46008eb418d293a3 | [
"MIT"
] | null | null | null | lang_model/data_loader.py | alex44jzy/FancyALMLDLNLP | c55a67a51de72339f4ab13bd46008eb418d293a3 | [
"MIT"
] | null | null | null | import torch
from torch.nn import functional as F
from torch.utils.data import Dataset
from gensim.corpora.dictionary import Dictionary
class LangDataset(Dataset):
def __init__(self, src_sents, trg_sents, max_len=-1):
self.src_sents = src_sents
self.trg_sents = trg_sents
# Create the voca... | 37.262295 | 114 | 0.635724 | 2,134 | 0.938847 | 0 | 0 | 0 | 0 | 0 | 0 | 709 | 0.311923 |
c7d12defacc5fa8896212434511fb502a03f0a3b | 74,691 | py | Python | models_nonconvex_simple2/ndcc13persp.py | grossmann-group/pyomo-MINLP-benchmarking | 714f0a0dffd61675649a805683c0627af6b4929e | [
"MIT"
] | null | null | null | models_nonconvex_simple2/ndcc13persp.py | grossmann-group/pyomo-MINLP-benchmarking | 714f0a0dffd61675649a805683c0627af6b4929e | [
"MIT"
] | null | null | null | models_nonconvex_simple2/ndcc13persp.py | grossmann-group/pyomo-MINLP-benchmarking | 714f0a0dffd61675649a805683c0627af6b4929e | [
"MIT"
] | null | null | null | # MINLP written by GAMS Convert at 08/20/20 01:30:45
#
# Equation counts
# Total E G L N X C B
# 297 170 42 85 0 0 0 0
#
# Variable counts
# x b i s1s s2s sc ... | 53.085288 | 120 | 0.629634 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 699 | 0.009359 |
c7d378679d5e763e0a3427a5a59048ba70934d41 | 4,322 | py | Python | tests/pytests/scenarios/multimaster/conftest.py | lllamnyp/salt | de112e5b362191e3708e170b7eb8e990787ad412 | [
"Apache-2.0"
] | null | null | null | tests/pytests/scenarios/multimaster/conftest.py | lllamnyp/salt | de112e5b362191e3708e170b7eb8e990787ad412 | [
"Apache-2.0"
] | null | null | null | tests/pytests/scenarios/multimaster/conftest.py | lllamnyp/salt | de112e5b362191e3708e170b7eb8e990787ad412 | [
"Apache-2.0"
] | null | null | null | import logging
import os
import shutil
import subprocess
import pytest
import salt.utils.platform
log = logging.getLogger(__name__)
@pytest.fixture(scope="package", autouse=True)
def skip_on_tcp_transport(request):
if request.config.getoption("--transport") == "tcp":
pytest.skip("Multimaster under the T... | 31.547445 | 85 | 0.679084 | 0 | 0 | 3,550 | 0.821379 | 4,167 | 0.964137 | 0 | 0 | 876 | 0.202684 |
c7d37af76275d31df153580818ea0db96b86762e | 1,210 | py | Python | supermario/supermario 1117/start_state.py | Kimmiryeong/2DGP_GameProject | ad3fb197aab27227fc92fd404b2c310f8d0827ca | [
"MIT"
] | null | null | null | supermario/supermario 1117/start_state.py | Kimmiryeong/2DGP_GameProject | ad3fb197aab27227fc92fd404b2c310f8d0827ca | [
"MIT"
] | null | null | null | supermario/supermario 1117/start_state.py | Kimmiryeong/2DGP_GameProject | ad3fb197aab27227fc92fd404b2c310f8d0827ca | [
"MIT"
] | null | null | null | import game_framework
from pico2d import *
import title_state
name = "StartState"
image = None
logo_time = 0.0
def enter():
global image
image = load_image('kpu_credit.png')
def exit():
global image
del(image)
def update():
global logo_time
if (logo_time > 1.0):
logo_time = 0.8
... | 11.747573 | 48 | 0.634711 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 56 | 0.046281 |
c7d524f7dbf8736dbbb40f3bb15a61c60aba8191 | 22,620 | py | Python | egs/librispeech/ASR/transducer/test_rnn.py | rosrad/icefall | 6f282731286a6855658c6882c3c938437448e05e | [
"Apache-2.0"
] | null | null | null | egs/librispeech/ASR/transducer/test_rnn.py | rosrad/icefall | 6f282731286a6855658c6882c3c938437448e05e | [
"Apache-2.0"
] | null | null | null | egs/librispeech/ASR/transducer/test_rnn.py | rosrad/icefall | 6f282731286a6855658c6882c3c938437448e05e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2021 Xiaomi Corp. (authors: Fangjun Kuang)
#
# See ../../../../LICENSE for clarification regarding multiple authors
#
# 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... | 29.530026 | 79 | 0.642706 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,128 | 0.049867 |
c7d594ecefc0ecfe585fc9557bf2ed8617f874e6 | 1,944 | py | Python | settings.py | SalinderSidhu/CHIP8 | 46a01aa7675805b84809d1e9762905de8fdccc66 | [
"MIT"
] | 4 | 2015-12-22T15:03:43.000Z | 2016-07-28T08:11:48.000Z | settings.py | SalinderSidhu/CHIP8 | 46a01aa7675805b84809d1e9762905de8fdccc66 | [
"MIT"
] | null | null | null | settings.py | SalinderSidhu/CHIP8 | 46a01aa7675805b84809d1e9762905de8fdccc66 | [
"MIT"
] | null | null | null | import configparser
class Settings:
'''The Settings class is a wrapper for configparser and it's functions.
This class simplifies the tasks of loading, storing and manipulating
settings data.'''
def __init__(self, filename):
'''Create a new Settings object with a specific file name.'''
... | 36.679245 | 79 | 0.646091 | 1,921 | 0.988169 | 0 | 0 | 0 | 0 | 0 | 0 | 816 | 0.419753 |
c7d59e3cde73fd0dad74b149197ee60ec8e8c83b | 3,900 | py | Python | demisto_sdk/commands/common/hook_validations/release_notes.py | yalonso7/demisto-sdk | 4b832078cdadb0b604a064532975e8be68ac726a | [
"MIT"
] | null | null | null | demisto_sdk/commands/common/hook_validations/release_notes.py | yalonso7/demisto-sdk | 4b832078cdadb0b604a064532975e8be68ac726a | [
"MIT"
] | null | null | null | demisto_sdk/commands/common/hook_validations/release_notes.py | yalonso7/demisto-sdk | 4b832078cdadb0b604a064532975e8be68ac726a | [
"MIT"
] | null | null | null | from __future__ import print_function
import itertools
from demisto_sdk.commands.common.constants import VALIDATED_PACK_ITEM_TYPES
from demisto_sdk.commands.common.errors import Errors
from demisto_sdk.commands.common.hook_validations.base_validator import \
BaseValidator
from demisto_sdk.commands.common.tools im... | 50 | 120 | 0.661795 | 3,391 | 0.869487 | 0 | 0 | 0 | 0 | 0 | 0 | 640 | 0.164103 |
c7d5fc15217b2b0e024e35082215227dc7639d0e | 14,326 | py | Python | PyOpenGL/PyGame/ex06/src/mathematics.py | hoppfull/Legacy-Python | 43f465bfdb76c91f2ac16aabb0783fdf5f459adb | [
"MIT"
] | null | null | null | PyOpenGL/PyGame/ex06/src/mathematics.py | hoppfull/Legacy-Python | 43f465bfdb76c91f2ac16aabb0783fdf5f459adb | [
"MIT"
] | null | null | null | PyOpenGL/PyGame/ex06/src/mathematics.py | hoppfull/Legacy-Python | 43f465bfdb76c91f2ac16aabb0783fdf5f459adb | [
"MIT"
] | null | null | null | import numpy as np
class ProjectionMatrix():
"""This matrix provides projection distortion.
Projection distortion is when things that are far away
appear smaller and things that are close appear bigger.
This works flawlessly so far. Takes in screen-size and
provides near- and far clipping. fov is f... | 34.603865 | 100 | 0.454279 | 14,274 | 0.99637 | 0 | 0 | 0 | 0 | 0 | 0 | 3,986 | 0.278235 |
c7d672fb0397af44cf591c05913dd9f20b250483 | 1,652 | py | Python | test_utils/mocks.py | radomd92/botjagwar | 1dc96600c40041057a9f9afde38c31ca34b8db38 | [
"MIT"
] | 7 | 2015-01-23T17:24:04.000Z | 2022-01-12T16:54:24.000Z | test_utils/mocks.py | radomd92/botjagwar | 1dc96600c40041057a9f9afde38c31ca34b8db38 | [
"MIT"
] | 18 | 2017-12-09T01:11:23.000Z | 2021-09-22T13:26:24.000Z | test_utils/mocks.py | radomd92/botjagwar | 1dc96600c40041057a9f9afde38c31ca34b8db38 | [
"MIT"
] | 1 | 2015-06-22T02:17:55.000Z | 2015-06-22T02:17:55.000Z | from xml.dom import minidom
import pywikibot
from api.decorator import time_this
SiteMock = pywikibot.Site
class PageMock(pywikibot.Page):
def __init__(self, *args, **kwargs):
super(PageMock, self).__init__(*args, **kwargs)
self.filename = "test_data/test_pages_%s.xml" % self.site.lang
... | 36.711111 | 78 | 0.624092 | 1,474 | 0.892252 | 0 | 0 | 478 | 0.289346 | 0 | 0 | 223 | 0.134988 |
c7d6da38ffc0a1fb86619973f197115c4b076c8a | 5,796 | py | Python | dl_tensorflow/deepdream.py | jarvisqi/deep_learning | 988a5b0551ccf2c480a519c66aca149053826d30 | [
"MIT"
] | 32 | 2017-10-26T13:37:36.000Z | 2021-03-24T09:06:45.000Z | dl_tensorflow/deepdream.py | 2892778775/deep_learning | 988a5b0551ccf2c480a519c66aca149053826d30 | [
"MIT"
] | 3 | 2018-11-19T05:55:46.000Z | 2019-03-01T05:20:43.000Z | dl_tensorflow/deepdream.py | 2892778775/deep_learning | 988a5b0551ccf2c480a519c66aca149053826d30 | [
"MIT"
] | 38 | 2017-11-08T15:42:48.000Z | 2021-05-10T00:42:33.000Z | import os
from functools import partial
from io import BytesIO
import numpy as np
import PIL.Image
import scipy.misc
import tensorflow as tf
graph = tf.Graph()
sess = tf.InteractiveSession(graph=graph)
model_fn = "./models/tensorflow_inception_graph.pb"
with tf.gfile.FastGFile(model_fn, 'rb') as f:
graph_def = tf... | 30.031088 | 104 | 0.619393 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,630 | 0.253106 |
c7d6e3bbbed972de89ca1f857b7b3b2178ada3d2 | 1,829 | py | Python | admin.py | BlueBlock/usage-reporter | e30bbef6d281944d62f716c37aff17861a653967 | [
"MIT"
] | 4 | 2018-08-30T06:16:35.000Z | 2022-02-18T08:06:21.000Z | admin.py | BlueBlock/usage-reporter | e30bbef6d281944d62f716c37aff17861a653967 | [
"MIT"
] | 1 | 2018-03-29T17:04:44.000Z | 2018-03-29T17:04:44.000Z | admin.py | BlueBlock/usage-reporter | e30bbef6d281944d62f716c37aff17861a653967 | [
"MIT"
] | 4 | 2018-01-31T06:55:32.000Z | 2022-01-16T10:39:18.000Z | import calendar
import datetime
import logging
import os
import webapp2
import dbmodel
TESTING = os.environ.get('SERVER_SOFTWARE', '').startswith('Development')
class ResetHandler(webapp2.RequestHandler):
def get(self):
timestamp = calendar.timegm(datetime.datetime.utcnow().timetuple())
self.re... | 35.173077 | 115 | 0.632586 | 1,569 | 0.857846 | 0 | 0 | 0 | 0 | 0 | 0 | 430 | 0.235101 |
c7d717769a7df13adf5117eb840b41a6b41f5506 | 2,708 | py | Python | napari/utils/colormaps/categorical_colormap_utils.py | Zac-HD/napari | 102a7e8f845893c874d2b86f9371d41130100b89 | [
"BSD-3-Clause"
] | 1 | 2021-04-24T10:10:54.000Z | 2021-04-24T10:10:54.000Z | napari/utils/colormaps/categorical_colormap_utils.py | Zac-HD/napari | 102a7e8f845893c874d2b86f9371d41130100b89 | [
"BSD-3-Clause"
] | 2 | 2021-05-17T02:15:08.000Z | 2022-03-12T21:19:52.000Z | napari/utils/colormaps/categorical_colormap_utils.py | Zac-HD/napari | 102a7e8f845893c874d2b86f9371d41130100b89 | [
"BSD-3-Clause"
] | null | null | null | from dataclasses import dataclass
from itertools import cycle
from typing import Dict, Union
import numpy as np
from ...layers.utils.color_transformations import (
transform_color,
transform_color_cycle,
)
@dataclass(eq=False)
class ColorCycle:
"""A dataclass to hold a color cycle for the fallback_color... | 25.308411 | 73 | 0.64771 | 1,022 | 0.3774 | 60 | 0.022157 | 1,043 | 0.385155 | 0 | 0 | 467 | 0.172452 |