hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 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 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1633a9fb3de8a2d02c1b973e0da5225da5fdee84 | 25,426 | py | Python | create_coherency_dataset.py | UKPLab/acl20-dialogue-coherence-assessment | 328b888855dc833b4b0c05c259ee7115f4219dbe | [
"MIT"
] | 12 | 2020-05-03T12:41:53.000Z | 2021-11-19T06:45:56.000Z | create_coherency_dataset.py | UKPLab/acl20-dialogue-coherence-assessment | 328b888855dc833b4b0c05c259ee7115f4219dbe | [
"MIT"
] | 2 | 2020-07-02T08:19:19.000Z | 2021-12-03T16:58:02.000Z | create_coherency_dataset.py | UKPLab/acl20-dialogue-coherence-assessment | 328b888855dc833b4b0c05c259ee7115f4219dbe | [
"MIT"
] | 4 | 2020-08-27T08:36:55.000Z | 2021-08-19T21:53:31.000Z | import math
import os
from copy import deepcopy
from ast import literal_eval
import pandas as pd
from math import factorial
import random
from collections import Counter, defaultdict
import sys
from nltk import word_tokenize
from tqdm import tqdm, trange
import argparse
import numpy as np
import re
import csv
from skle... | 39.977987 | 146 | 0.532801 |
163549f9139dc6999e9e0ca088584cc51b142caa | 12,432 | py | Python | tests/test_selections.py | swimmio/sqlalchemy_swimm | d24accb7792743cf586bd7062531d108e7063eba | [
"MIT"
] | null | null | null | tests/test_selections.py | swimmio/sqlalchemy_swimm | d24accb7792743cf586bd7062531d108e7063eba | [
"MIT"
] | null | null | null | tests/test_selections.py | swimmio/sqlalchemy_swimm | d24accb7792743cf586bd7062531d108e7063eba | [
"MIT"
] | null | null | null | import typing
import pytest
from src import selections
| 24.617822 | 91 | 0.178571 |
1635645909c86684dc1d01665725f73b3baa25cb | 348 | py | Python | tests/utils/test_clean_accounting_column.py | richardqiu/pyjanitor | aa3150e7b8e2adc4733ea206ea9c3093e21d4025 | [
"MIT"
] | 2 | 2020-09-06T22:11:01.000Z | 2022-03-19T23:57:24.000Z | tests/utils/test_clean_accounting_column.py | richardqiu/pyjanitor | aa3150e7b8e2adc4733ea206ea9c3093e21d4025 | [
"MIT"
] | 1 | 2021-05-17T15:30:04.000Z | 2021-07-29T09:39:56.000Z | tests/utils/test_clean_accounting_column.py | richardqiu/pyjanitor | aa3150e7b8e2adc4733ea206ea9c3093e21d4025 | [
"MIT"
] | 1 | 2020-08-10T20:30:20.000Z | 2020-08-10T20:30:20.000Z | import pytest
from janitor.utils import _clean_accounting_column
| 21.75 | 61 | 0.761494 |
16369f4689956af64363c246df723fffbf5f3a5e | 7,164 | py | Python | downloadParagraph.py | icadot86/bert | 42070209183dab3b5ff59b0dea1398a9538960f3 | [
"Apache-2.0"
] | null | null | null | downloadParagraph.py | icadot86/bert | 42070209183dab3b5ff59b0dea1398a9538960f3 | [
"Apache-2.0"
] | null | null | null | downloadParagraph.py | icadot86/bert | 42070209183dab3b5ff59b0dea1398a9538960f3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
import sys, getopt
import urllib
import requests
import requests_cache
import re
import time
from bs4 import BeautifulSoup
from requests import Session
sys.path.append("/home/taejoon1kim/BERT/my_bert")
from utils.cacheUtils import cacheExist, writeCache, readCache, getDownloadCachePath
from utils.path... | 35.82 | 458 | 0.564768 |
1637357f64028a6c4c7d59c4294f21b8d56010e2 | 2,861 | py | Python | data_io.py | LucasChenLC/courseManager2 | 3f91ea72dbc0a3f3afcc88c7f0959edb6c33adf9 | [
"MIT"
] | null | null | null | data_io.py | LucasChenLC/courseManager2 | 3f91ea72dbc0a3f3afcc88c7f0959edb6c33adf9 | [
"MIT"
] | null | null | null | data_io.py | LucasChenLC/courseManager2 | 3f91ea72dbc0a3f3afcc88c7f0959edb6c33adf9 | [
"MIT"
] | null | null | null | from xml.dom.minidom import Document, parse
'''
course_list = []
course_list.append(Course('Advance Math'))
course_list.append(Course('Linear Algebra'))
course_list.append(Course('Procedure Oriented Programming'))
course_list.append(Course('Object Oriented Programming'))
course_list[-1].add_pre_course(course_list,... | 37.644737 | 124 | 0.71828 |
163841fc5da39772ff971e9eff1ba89827ff6817 | 1,003 | py | Python | tests/rules/test_git_rm_local_modifications.py | jlandrum/theheck | d2c008b6ca14220504be95f887253ddd9f5e9f72 | [
"MIT"
] | null | null | null | tests/rules/test_git_rm_local_modifications.py | jlandrum/theheck | d2c008b6ca14220504be95f887253ddd9f5e9f72 | [
"MIT"
] | null | null | null | tests/rules/test_git_rm_local_modifications.py | jlandrum/theheck | d2c008b6ca14220504be95f887253ddd9f5e9f72 | [
"MIT"
] | null | null | null | import pytest
from theheck.rules.git_rm_local_modifications import match, get_new_command
from theheck.types import Command
| 34.586207 | 81 | 0.67996 |
16384fd421a05dbe791af899ad03aaf8e20b6076 | 6,078 | py | Python | application.py | statisticsnorway/microdata-data-service | d477b7b75589d4c977771122558c948c040a1106 | [
"Apache-2.0"
] | null | null | null | application.py | statisticsnorway/microdata-data-service | d477b7b75589d4c977771122558c948c040a1106 | [
"Apache-2.0"
] | 7 | 2021-10-08T13:40:33.000Z | 2022-02-04T10:37:55.000Z | application.py | statisticsnorway/microdata-data-service | d477b7b75589d4c977771122558c948c040a1106 | [
"Apache-2.0"
] | null | null | null | import logging
import json_logging
import tomlkit
import uvicorn
from fastapi import FastAPI, status
from fastapi.encoders import jsonable_encoder
from fastapi.openapi.docs import (
get_redoc_html,
get_swagger_ui_html,
get_swagger_ui_oauth2_redirect_html,
)
from fastapi.responses import JSONResponse
from f... | 33.766667 | 109 | 0.74054 |
16386e8f49ac83e2f9c436adbc056266858401ad | 18,764 | py | Python | graspologic/embed/n2v.py | dtborders/graspologic | 8ea9a47cabe35ad28ec9d381e525358c2027f619 | [
"MIT"
] | null | null | null | graspologic/embed/n2v.py | dtborders/graspologic | 8ea9a47cabe35ad28ec9d381e525358c2027f619 | [
"MIT"
] | null | null | null | graspologic/embed/n2v.py | dtborders/graspologic | 8ea9a47cabe35ad28ec9d381e525358c2027f619 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation and contributors.
# Licensed under the MIT License.
import logging
import math
import time
from typing import Any, List, Optional, Tuple, Union
import networkx as nx
import numpy as np
from ..utils import remap_node_ids
def node2vec_embed(
graph: Union[nx.Graph, nx.DiGraph... | 35.537879 | 127 | 0.627052 |
1638d587cabcf4138e331d614308389b13e85fb7 | 8,421 | py | Python | bot.py | NotBlizzard/blizzybot | 41a6f07e4d3bb97772b07aa9d6a3af935b78fb9a | [
"MIT"
] | null | null | null | bot.py | NotBlizzard/blizzybot | 41a6f07e4d3bb97772b07aa9d6a3af935b78fb9a | [
"MIT"
] | null | null | null | bot.py | NotBlizzard/blizzybot | 41a6f07e4d3bb97772b07aa9d6a3af935b78fb9a | [
"MIT"
] | null | null | null | # bot.py
# TODO:
# organize imports
# organize
from websocket import create_connection
from threading import Thread
from battle import Battle
import commands
import traceback
import requests
import inspect
import json
from fractions import Fraction
import random
import time
import sys
import re
imp... | 36.141631 | 131 | 0.517278 |
16391df203c1efac2e1f8b82d3e69209d5e07f18 | 10,758 | py | Python | stRT/tdr/widgets/changes.py | Yao-14/stAnalysis | d08483ce581f5b03cfcad8be500aaa64b0293f74 | [
"BSD-3-Clause"
] | null | null | null | stRT/tdr/widgets/changes.py | Yao-14/stAnalysis | d08483ce581f5b03cfcad8be500aaa64b0293f74 | [
"BSD-3-Clause"
] | null | null | null | stRT/tdr/widgets/changes.py | Yao-14/stAnalysis | d08483ce581f5b03cfcad8be500aaa64b0293f74 | [
"BSD-3-Clause"
] | null | null | null | from typing import Optional, Tuple, Union
import numpy as np
import pandas as pd
import pyvista as pv
from pyvista import DataSet, MultiBlock, PolyData, UnstructuredGrid
try:
from typing import Literal
except ImportError:
from typing_extensions import Literal
from .ddrtree import DDRTree, cal_ncenter
from .s... | 31.734513 | 125 | 0.635899 |
16394617ff3197501b57f08cd314d25d52093a16 | 842 | py | Python | test/test_add_group.py | nkoshkina/Python_Training3 | e917440d37883dbcaa527a0700bcfa1478a1c1ce | [
"Apache-2.0"
] | null | null | null | test/test_add_group.py | nkoshkina/Python_Training3 | e917440d37883dbcaa527a0700bcfa1478a1c1ce | [
"Apache-2.0"
] | null | null | null | test/test_add_group.py | nkoshkina/Python_Training3 | e917440d37883dbcaa527a0700bcfa1478a1c1ce | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from model.group import Group
import pytest
import allure_pytest
| 36.608696 | 93 | 0.693587 |
163995382115c67384ddb8a508342f8bf7650216 | 1,164 | py | Python | cyberbrain/frame_tree.py | testinggg-art/Cyberbrain | e38c74c174e23aa386d005b03f09b30aa1b3a0ae | [
"MIT"
] | null | null | null | cyberbrain/frame_tree.py | testinggg-art/Cyberbrain | e38c74c174e23aa386d005b03f09b30aa1b3a0ae | [
"MIT"
] | null | null | null | cyberbrain/frame_tree.py | testinggg-art/Cyberbrain | e38c74c174e23aa386d005b03f09b30aa1b3a0ae | [
"MIT"
] | null | null | null | from __future__ import annotations
from .frame import Frame
from .generated.communication_pb2 import CursorPosition
| 28.390244 | 87 | 0.670103 |
163c66ec8f6a6a9ebf21f694414728829c5d030d | 7,851 | py | Python | src/otp_yubikey/models.py | moggers87/django-otp-yubikey | 2d7cf9dc91ba57b65aa62254532997cc1e6261dd | [
"BSD-2-Clause"
] | null | null | null | src/otp_yubikey/models.py | moggers87/django-otp-yubikey | 2d7cf9dc91ba57b65aa62254532997cc1e6261dd | [
"BSD-2-Clause"
] | null | null | null | src/otp_yubikey/models.py | moggers87/django-otp-yubikey | 2d7cf9dc91ba57b65aa62254532997cc1e6261dd | [
"BSD-2-Clause"
] | null | null | null | from __future__ import absolute_import, division, print_function, unicode_literals
from base64 import b64decode
from binascii import hexlify, unhexlify
from struct import pack
import six
from django.db import models
from django.utils.encoding import force_text
from django_otp.models import Device
from django_otp.ut... | 27.644366 | 139 | 0.640683 |
163cbfb7a11f70465bec9d58e23cdc35d6fe4e2c | 5,976 | py | Python | v1/hsvfilter.py | gavinIRL/RHBot | 1e22ae5ca7b67ebd6a72c23d9f46d5a8eb6e99cf | [
"MIT"
] | null | null | null | v1/hsvfilter.py | gavinIRL/RHBot | 1e22ae5ca7b67ebd6a72c23d9f46d5a8eb6e99cf | [
"MIT"
] | 60 | 2021-03-29T14:29:49.000Z | 2021-05-03T06:06:19.000Z | v1/hsvfilter.py | gavinIRL/RHBot | 1e22ae5ca7b67ebd6a72c23d9f46d5a8eb6e99cf | [
"MIT"
] | null | null | null | import typing
# custom data structure to hold the state of an HSV filter
# Putting this here out of the way as it's a chonk
# For a given item string case it will return the optimal filter and the correct position to look
def grab_object_preset(object_name=None, **kwargs) -> typing.Tuple[HsvFilter, list]:
if obj... | 49.38843 | 97 | 0.593373 |
163d64f557e7427d0b9ba345ed63cc3b52a618e5 | 14,278 | py | Python | glue/core/tests/test_state_objects.py | HPLegion/glue | 1843787ccb4de852dfe103ff58473da13faccf5f | [
"BSD-3-Clause"
] | null | null | null | glue/core/tests/test_state_objects.py | HPLegion/glue | 1843787ccb4de852dfe103ff58473da13faccf5f | [
"BSD-3-Clause"
] | null | null | null | glue/core/tests/test_state_objects.py | HPLegion/glue | 1843787ccb4de852dfe103ff58473da13faccf5f | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from numpy.testing import assert_allclose
from echo import CallbackProperty, ListCallbackProperty
from glue.core import Data, DataCollection
from .test_state import clone
from ..state_objects import (State, StateAttributeLimitsHelper,
StateAttributeSingleValueHelper,
... | 27.832359 | 96 | 0.588178 |
163d903313e3ca0e241b2c27dfd7fddcb15bbfdb | 287 | py | Python | ecommerce_api/core/cart/exceptions.py | victormartinez/ecommerceapi | a887d9e938050c15ebf52001f63d7aa7f33fa5ee | [
"MIT"
] | null | null | null | ecommerce_api/core/cart/exceptions.py | victormartinez/ecommerceapi | a887d9e938050c15ebf52001f63d7aa7f33fa5ee | [
"MIT"
] | null | null | null | ecommerce_api/core/cart/exceptions.py | victormartinez/ecommerceapi | a887d9e938050c15ebf52001f63d7aa7f33fa5ee | [
"MIT"
] | null | null | null | from typing import Iterable, Optional
| 31.888889 | 68 | 0.700348 |
163dc7048c89ab3ce7a0707b33435bed5fbe6660 | 6,742 | py | Python | test/unit/test_record.py | jsoref/neo4j-python-driver | 32c130c9a975dbf8c0d345b362d096b5e1dd3e5b | [
"Apache-2.0"
] | null | null | null | test/unit/test_record.py | jsoref/neo4j-python-driver | 32c130c9a975dbf8c0d345b362d096b5e1dd3e5b | [
"Apache-2.0"
] | null | null | null | test/unit/test_record.py | jsoref/neo4j-python-driver | 32c130c9a975dbf8c0d345b362d096b5e1dd3e5b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Copyright (c) 2002-2018 "Neo Technology,"
# Network Engine for Objects in Lund AB [http://neotechnology.com]
#
# This file is part of Neo4j.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Li... | 43.496774 | 116 | 0.590923 |
163ee50e70aae9c38787e48d9c60c83c946fac91 | 9,923 | py | Python | tests/integration_tests/test_dashboards.py | hugocool/explainerdashboard | e725528c3d94a1a45b51bd9632686d0697274f54 | [
"MIT"
] | 1 | 2021-11-19T09:30:56.000Z | 2021-11-19T09:30:56.000Z | tests/integration_tests/test_dashboards.py | hugocool/explainerdashboard | e725528c3d94a1a45b51bd9632686d0697274f54 | [
"MIT"
] | null | null | null | tests/integration_tests/test_dashboards.py | hugocool/explainerdashboard | e725528c3d94a1a45b51bd9632686d0697274f54 | [
"MIT"
] | null | null | null |
import dash
from catboost import CatBoostClassifier, CatBoostRegressor
from xgboost import XGBClassifier, XGBRegressor
from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor
from explainerdashboard.explainers import ClassifierExplainer, RegressionExplainer
from explainerdashboard.datasets import... | 44.698198 | 102 | 0.665121 |
163f5e0eb3de89d92ad7d61128630ed72fcd3690 | 1,079 | py | Python | code/scripts/GeneratePNG_Preview_AsIs.py | dgrechka/bengaliai-cv19 | 9ef15c5b140628337ae6efe0d76e7ec5d291dc17 | [
"MIT"
] | null | null | null | code/scripts/GeneratePNG_Preview_AsIs.py | dgrechka/bengaliai-cv19 | 9ef15c5b140628337ae6efe0d76e7ec5d291dc17 | [
"MIT"
] | null | null | null | code/scripts/GeneratePNG_Preview_AsIs.py | dgrechka/bengaliai-cv19 | 9ef15c5b140628337ae6efe0d76e7ec5d291dc17 | [
"MIT"
] | null | null | null | import tensorflow as tf
import sys
import os
from glob import glob
import png
sys.path.append(os.path.join(__file__,'..','..'))
from tfDataIngest import tfDataSetParquet as tfDsParquet
inputDataDir = sys.argv[1]
outputDir = sys.argv[2]
# test app
if __name__ == "__main__":
files = glob(os.path.join(inputDataDir... | 29.972222 | 85 | 0.636701 |
1640d2033b3fc61dda0183c87b5baa9f8cbed3bd | 2,763 | py | Python | widgets/datepicker_ctrl/codegen.py | RSabet/wxGlade | 8b62eb8397308e60977857455b2765727b1b940f | [
"MIT"
] | 225 | 2018-03-26T11:23:22.000Z | 2022-03-24T09:44:08.000Z | widgets/datepicker_ctrl/codegen.py | RSabet/wxGlade | 8b62eb8397308e60977857455b2765727b1b940f | [
"MIT"
] | 403 | 2018-01-03T19:47:28.000Z | 2018-03-23T17:43:39.000Z | widgets/datepicker_ctrl/codegen.py | DietmarSchwertberger/wxGlade | 8e78cdc509d458cc896d47315e19f3daa6c09213 | [
"MIT"
] | 47 | 2018-04-08T16:48:38.000Z | 2021-12-21T20:08:44.000Z | """\
Code generator functions for wxDatePickerCtrl objects
@copyright: 2002-2007 Alberto Griggio
@copyright: 2014-2016 Carsten Grohmann
@copyright: 2016-2021 Dietmar Schwertberger
@license: MIT (see LICENSE.txt) - THIS PROGRAM COMES WITH NO WARRANTY
"""
import common, compat
import wcodegen
def xrc_code_generat... | 33.695122 | 106 | 0.615635 |
1642121cd961a12c79b579c9fabd08e8a6ce9bc8 | 3,960 | py | Python | train.py | lck1201/simple-effective-3Dpose-baseline | 790a185b44e48a9cc619f52b6615aae729bff76b | [
"MIT"
] | 20 | 2019-03-29T12:20:10.000Z | 2021-02-07T08:32:18.000Z | train.py | motokimura/simple-effective-3Dpose-baseline | 790a185b44e48a9cc619f52b6615aae729bff76b | [
"MIT"
] | 10 | 2019-04-03T15:25:00.000Z | 2021-03-26T16:23:33.000Z | train.py | motokimura/simple-effective-3Dpose-baseline | 790a185b44e48a9cc619f52b6615aae729bff76b | [
"MIT"
] | 7 | 2019-06-02T13:25:27.000Z | 2020-12-17T06:07:17.000Z | import pprint
import mxnet as mx
from mxnet import gluon
from mxnet import init
from lib.core.get_optimizer import *
from lib.core.metric import MPJPEMetric
from lib.core.loss import MeanSquareLoss
from lib.core.loader import JointsDataIter
from lib.network import get_net
from lib.net_module import *
from lib.utils i... | 41.684211 | 124 | 0.646212 |
1643d3915575e537c0423b05a3b3b1e3b7eb7865 | 6,789 | py | Python | FastLinear/generate_memory_bank.py | WangFeng18/dino | 1a4e49bd0e99d7e205338b14994a1d57c3084cfe | [
"Apache-2.0"
] | null | null | null | FastLinear/generate_memory_bank.py | WangFeng18/dino | 1a4e49bd0e99d7e205338b14994a1d57c3084cfe | [
"Apache-2.0"
] | null | null | null | FastLinear/generate_memory_bank.py | WangFeng18/dino | 1a4e49bd0e99d7e205338b14994a1d57c3084cfe | [
"Apache-2.0"
] | null | null | null | import os
from tqdm import tqdm
import torch.backends.cudnn as cudnn
import torch
from datasets import ImageNetInstance, ImageNetInstanceLMDB
from torchvision import transforms
import argparse
from BaseTaskModel.task_network import get_moco_network, get_swav_network, get_selfboost_network, get_minmaxent_network, get_si... | 44.664474 | 174 | 0.705259 |
16447f2400735bc0538f6c77d41578715bdd08b9 | 2,489 | py | Python | tests/utils/test_mercator.py | anuragtr/fabric8-analytics-rudra | 13fb15539d195fcb89ced02b205d034ec0c18e00 | [
"Apache-2.0"
] | 1 | 2019-05-13T09:31:19.000Z | 2019-05-13T09:31:19.000Z | tests/utils/test_mercator.py | anuragtr/fabric8-analytics-rudra | 13fb15539d195fcb89ced02b205d034ec0c18e00 | [
"Apache-2.0"
] | null | null | null | tests/utils/test_mercator.py | anuragtr/fabric8-analytics-rudra | 13fb15539d195fcb89ced02b205d034ec0c18e00 | [
"Apache-2.0"
] | null | null | null | import pytest
from rudra.utils.mercator import SimpleMercator
| 34.09589 | 82 | 0.526718 |
16449c2c8a80a3f0f14b7a2a74915dc78441651d | 139 | py | Python | tests/checks/run_performance_tests.py | stjordanis/mljar-supervised | 8c3f9d1ed527dfcfdaef91cf82e2779c5832e294 | [
"MIT"
] | 1,882 | 2018-11-05T13:20:54.000Z | 2022-03-31T14:31:46.000Z | tests/checks/run_performance_tests.py | stjordanis/mljar-supervised | 8c3f9d1ed527dfcfdaef91cf82e2779c5832e294 | [
"MIT"
] | 499 | 2019-03-14T09:57:51.000Z | 2022-03-30T06:00:43.000Z | tests/checks/run_performance_tests.py | stjordanis/mljar-supervised | 8c3f9d1ed527dfcfdaef91cf82e2779c5832e294 | [
"MIT"
] | 277 | 2019-02-08T21:32:13.000Z | 2022-03-29T03:26:05.000Z | import os
import sys
import unittest
from tests.tests_bin_class.test_performance import *
if __name__ == "__main__":
unittest.main()
| 15.444444 | 52 | 0.769784 |
1645daef0bb42b38a2691d6bb4f86fefa0af94a5 | 283 | py | Python | task/CheckAllocations.py | wookiee2187/vc3-login-pod | 3c0f5490c094bf0b4587a743efac68d722ea5ee2 | [
"MIT"
] | 1 | 2019-07-17T19:01:34.000Z | 2019-07-17T19:01:34.000Z | task/CheckAllocations.py | wookiee2187/vc3-login-pod | 3c0f5490c094bf0b4587a743efac68d722ea5ee2 | [
"MIT"
] | null | null | null | task/CheckAllocations.py | wookiee2187/vc3-login-pod | 3c0f5490c094bf0b4587a743efac68d722ea5ee2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from vc3master.task import VC3Task | 16.647059 | 58 | 0.590106 |
16477f8a306c6c85422ce092acee78844c0cd611 | 4,037 | py | Python | django_airbrake/utils/client.py | Captricity/airbrake-django | 2ea126653883732a13f1a80c9e567b7076601620 | [
"BSD-3-Clause"
] | null | null | null | django_airbrake/utils/client.py | Captricity/airbrake-django | 2ea126653883732a13f1a80c9e567b7076601620 | [
"BSD-3-Clause"
] | 2 | 2016-07-12T15:44:02.000Z | 2016-08-19T20:31:49.000Z | django_airbrake/utils/client.py | Captricity/airbrake-django | 2ea126653883732a13f1a80c9e567b7076601620 | [
"BSD-3-Clause"
] | null | null | null | import sys
import traceback
from django.conf import settings
from django.urls import resolve
from lxml import etree
from six.moves.urllib.request import urlopen, Request
| 34.211864 | 107 | 0.566757 |
1648b2044844b3d9b645771b179a716a797264e9 | 599 | py | Python | src/spaceone/inventory/connector/snapshot.py | jean1042/plugin-azure-cloud-services | 3a75a516c9a4d1e8a4962988934ead3fd40e8494 | [
"Apache-2.0"
] | 1 | 2020-12-08T11:59:54.000Z | 2020-12-08T11:59:54.000Z | src/spaceone/inventory/connector/snapshot.py | jean1042/plugin-azure-cloud-services | 3a75a516c9a4d1e8a4962988934ead3fd40e8494 | [
"Apache-2.0"
] | 4 | 2021-01-26T10:43:37.000Z | 2021-12-17T10:13:33.000Z | src/spaceone/inventory/connector/snapshot.py | jean1042/plugin-azure-cloud-services | 3a75a516c9a4d1e8a4962988934ead3fd40e8494 | [
"Apache-2.0"
] | 2 | 2021-01-13T03:24:05.000Z | 2021-01-19T07:25:45.000Z | import logging
from spaceone.inventory.libs.connector import AzureConnector
from spaceone.inventory.error import *
from spaceone.inventory.error.custom import *
__all__ = ['SnapshotConnector']
_LOGGER = logging.getLogger(__name__)
| 28.52381 | 69 | 0.721202 |
1649638736a414c6fde2874636d2e6f9fe9164e4 | 2,912 | py | Python | docs/tutorial/context/app.py | theasylum/wired | 6b6a3e83702b18ebb41ca1f94e957bdf7e44986d | [
"MIT"
] | 12 | 2018-07-22T15:40:35.000Z | 2020-12-27T21:39:18.000Z | docs/tutorial/context/app.py | theasylum/wired | 6b6a3e83702b18ebb41ca1f94e957bdf7e44986d | [
"MIT"
] | 36 | 2019-03-23T13:47:25.000Z | 2020-11-28T18:08:14.000Z | docs/tutorial/context/app.py | theasylum/wired | 6b6a3e83702b18ebb41ca1f94e957bdf7e44986d | [
"MIT"
] | 6 | 2019-03-23T20:08:57.000Z | 2021-06-03T16:52:06.000Z | """
A customer walks into a store. Do the steps to interact with them:
- Get *a* (not *the*) greeter
- Interact with them
Simple wired application:
- Settings that say what punctuation to use
- Registry
- Two factories that says hello, one for the FrenchCustomer context
- A default Customer and FrenchCustomer
... | 25.54386 | 74 | 0.712569 |
1649bff1d5c282f752cad12fddde82da77d3b6ea | 3,133 | py | Python | feast/DetectionModules/ldar_program.py | GeoSensorWebLab/FEAST_PtE | 63ff8b7925873d756666f3c0c4b9f0f84abd5eb2 | [
"MIT"
] | 10 | 2020-03-26T20:12:19.000Z | 2022-02-14T22:47:01.000Z | feast/DetectionModules/ldar_program.py | GeoSensorWebLab/FEAST_PtE | 63ff8b7925873d756666f3c0c4b9f0f84abd5eb2 | [
"MIT"
] | 1 | 2021-07-14T21:14:12.000Z | 2021-07-14T21:14:12.000Z | feast/DetectionModules/ldar_program.py | GeoSensorWebLab/FEAST_PtE | 63ff8b7925873d756666f3c0c4b9f0f84abd5eb2 | [
"MIT"
] | 9 | 2020-03-27T22:57:31.000Z | 2021-09-29T17:29:35.000Z | """
This module defines the LDARProgram class.
"""
import numpy as np
import copy
from .repair import Repair
from ..EmissionSimModules.result_classes import ResultDiscrete, ResultContinuous
| 48.2 | 120 | 0.679221 |
164cf23737de25e42e24acaa15cc12f759dc3323 | 12,783 | py | Python | src/CycleGAN.py | sjmoran/SIDGAN | 169bd69974bbb7f5760c28a00c231a856017e51c | [
"0BSD"
] | 25 | 2020-09-17T06:29:41.000Z | 2022-03-22T06:38:37.000Z | src/CycleGAN.py | sjmoran/SIDGAN | 169bd69974bbb7f5760c28a00c231a856017e51c | [
"0BSD"
] | 2 | 2021-05-30T09:00:46.000Z | 2021-11-24T08:34:26.000Z | src/CycleGAN.py | sjmoran/SIDGAN | 169bd69974bbb7f5760c28a00c231a856017e51c | [
"0BSD"
] | 5 | 2020-10-16T00:44:10.000Z | 2021-11-04T15:59:55.000Z | #Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
#This program is free software; you can redistribute it and/or modify it under the terms of the BSD 0-Clause License.
#This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of ... | 46.824176 | 181 | 0.586013 |
164e763a74e067d7e8c03c1d5ec3635ec5b33a02 | 876 | py | Python | application/fastapi/main.py | edson-dev/neoway | f792e16c0f627e8b94b54f001e87e076f36311ab | [
"MIT"
] | null | null | null | application/fastapi/main.py | edson-dev/neoway | f792e16c0f627e8b94b54f001e87e076f36311ab | [
"MIT"
] | null | null | null | application/fastapi/main.py | edson-dev/neoway | f792e16c0f627e8b94b54f001e87e076f36311ab | [
"MIT"
] | null | null | null | import uvicorn
from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
from routes import doc, api
from fastapi.templating import Jinja2Templates
from starlette.requests import Request
# configure static and templates file on jinja 2
app = FastAPI(
title=f"Technical Case",
description=f"endpoi... | 28.258065 | 90 | 0.745434 |
164f24393208739c6bb0a99eb1b2e8ed9fcd90d3 | 58,056 | py | Python | civis/io/_tables.py | jsfalk/civis-python | 39b6498b2d67d838d720d9631d74f3d3d43f7c1a | [
"BSD-3-Clause"
] | null | null | null | civis/io/_tables.py | jsfalk/civis-python | 39b6498b2d67d838d720d9631d74f3d3d43f7c1a | [
"BSD-3-Clause"
] | null | null | null | civis/io/_tables.py | jsfalk/civis-python | 39b6498b2d67d838d720d9631d74f3d3d43f7c1a | [
"BSD-3-Clause"
] | null | null | null | import json
import concurrent.futures
import csv
from os import path
import io
import logging
import os
import shutil
from tempfile import TemporaryDirectory
import warnings
import zlib
import gzip
import zipfile
from civis import APIClient
from civis._utils import maybe_get_random_name
from civis.base import EmptyRe... | 40.798313 | 79 | 0.617111 |
164f6ae0c583900eea5f44762f6006a785208240 | 2,218 | py | Python | tests/unit/small_text/integrations/pytorch/test_strategies.py | chschroeder/small-text | ef28e91ba0c94fe938dde4f16253aa8695ea13b7 | [
"MIT"
] | 218 | 2021-05-26T16:38:53.000Z | 2022-03-30T09:48:54.000Z | tests/unit/small_text/integrations/pytorch/test_strategies.py | chschroeder/small-text | ef28e91ba0c94fe938dde4f16253aa8695ea13b7 | [
"MIT"
] | 9 | 2021-10-16T23:23:02.000Z | 2022-02-22T15:23:11.000Z | tests/unit/small_text/integrations/pytorch/test_strategies.py | chschroeder/small-text | ef28e91ba0c94fe938dde4f16253aa8695ea13b7 | [
"MIT"
] | 21 | 2021-06-24T11:19:44.000Z | 2022-03-12T16:29:53.000Z | import unittest
import pytest
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
from small_text.integrations.pytorch.query_strategies import (
BADGE,
ExpectedGradientLength,
ExpectedGradientLengthMaxWord)
except PytorchNotFoundError:
pass
| 30.383562 | 94 | 0.712353 |
164ff194ddd6475fcc83a8af8f5b4d32701c55ea | 886 | py | Python | pymterm/colour/tango.py | stonewell/pymterm | af36656d5f7fb008533178d14b00d83d72ba00cf | [
"MIT"
] | 102 | 2016-07-21T06:39:02.000Z | 2022-03-09T19:34:03.000Z | pymterm/colour/tango.py | stonewell/pymterm | af36656d5f7fb008533178d14b00d83d72ba00cf | [
"MIT"
] | 2 | 2017-01-11T13:43:34.000Z | 2020-01-19T12:06:47.000Z | pymterm/colour/tango.py | stonewell/pymterm | af36656d5f7fb008533178d14b00d83d72ba00cf | [
"MIT"
] | 4 | 2020-03-22T04:08:35.000Z | 2021-06-27T23:38:02.000Z | TANGO_PALLETE = [
'2e2e34343636',
'cccc00000000',
'4e4e9a9a0606',
'c4c4a0a00000',
'34346565a4a4',
'757550507b7b',
'060698989a9a',
'd3d3d7d7cfcf',
'555557575353',
'efef29292929',
'8a8ae2e23434',
'fcfce9e94f4f',
'72729f9fcfcf',
'adad7f7fa8a8',
'34... | 24.611111 | 69 | 0.613995 |
16506683fe35155169d6fbcd3b4087bff7394386 | 22,681 | py | Python | user_manager/oauth/oauth2.py | voegtlel/auth-manager-backend | 20d40de0abc9deeb3fcddd892ffe2e635301917a | [
"MIT"
] | null | null | null | user_manager/oauth/oauth2.py | voegtlel/auth-manager-backend | 20d40de0abc9deeb3fcddd892ffe2e635301917a | [
"MIT"
] | null | null | null | user_manager/oauth/oauth2.py | voegtlel/auth-manager-backend | 20d40de0abc9deeb3fcddd892ffe2e635301917a | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
from enum import Enum
from typing import List, Optional, Tuple, Dict, Any, Union
import time
from authlib.common.security import generate_token
from authlib.consts import default_json_headers
from authlib.oauth2 import (
OAuth2Request,
AuthorizationServer as _Authorizat... | 40.501786 | 121 | 0.680217 |
16517f3c2ccf47bb7eb0759cee7e8d2e4ec1a86f | 3,553 | py | Python | src/adsb/sbs/server.py | claws/adsb | 4a7d35880dece6baaf24370fab445e2571fc19e9 | [
"MIT"
] | 7 | 2018-07-11T00:50:47.000Z | 2021-09-29T10:36:44.000Z | src/adsb/sbs/server.py | claws/adsb | 4a7d35880dece6baaf24370fab445e2571fc19e9 | [
"MIT"
] | 3 | 2020-06-13T23:27:42.000Z | 2020-07-22T03:06:16.000Z | src/adsb/sbs/server.py | claws/adsb | 4a7d35880dece6baaf24370fab445e2571fc19e9 | [
"MIT"
] | 3 | 2020-01-08T19:05:42.000Z | 2022-02-11T02:22:23.000Z |
import asyncio
import datetime
import logging
import socket
from . import protocol
from typing import Tuple
from asyncio import AbstractEventLoop
logger = logging.getLogger(__name__)
def deregister_protocol(self, peer: Tuple[str, int]) -> None:
""" De-register a protocol instance from the server.
... | 32.59633 | 77 | 0.565156 |
1652c769892c847b99d4a49f23694f814ea670c4 | 2,803 | py | Python | src/robusta/core/model/events.py | kandahk/robusta | 61a2001cb1c4e90e8a74b810463ec99e6cb80787 | [
"MIT"
] | null | null | null | src/robusta/core/model/events.py | kandahk/robusta | 61a2001cb1c4e90e8a74b810463ec99e6cb80787 | [
"MIT"
] | null | null | null | src/robusta/core/model/events.py | kandahk/robusta | 61a2001cb1c4e90e8a74b810463ec99e6cb80787 | [
"MIT"
] | null | null | null | import logging
import uuid
from enum import Enum
from typing import List, Optional, Dict, Any
from dataclasses import dataclass, field
from pydantic import BaseModel
from ...integrations.scheduled.playbook_scheduler import PlaybooksScheduler
from ..reporting.base import Finding, BaseBlock
# Right now:
# 1. this i... | 35.481013 | 135 | 0.708883 |
1653cd2fffd32e2ad6ea59e14f67f33d48afc170 | 560 | py | Python | examples/django_mongoengine/bike/models.py | pfrantz/graphene-mongo | f7d4f3e194ec41793e6da547934c34e11fd9ef51 | [
"MIT"
] | 260 | 2018-02-03T01:00:42.000Z | 2022-02-18T12:42:01.000Z | examples/django_mongoengine/bike/models.py | pfrantz/graphene-mongo | f7d4f3e194ec41793e6da547934c34e11fd9ef51 | [
"MIT"
] | 159 | 2018-02-09T07:35:03.000Z | 2022-03-20T03:43:23.000Z | examples/django_mongoengine/bike/models.py | pfrantz/graphene-mongo | f7d4f3e194ec41793e6da547934c34e11fd9ef51 | [
"MIT"
] | 124 | 2018-02-04T20:19:01.000Z | 2022-03-25T21:40:41.000Z | from mongoengine import Document
from mongoengine.fields import (
FloatField,
StringField,
ListField,
URLField,
ObjectIdField,
)
| 20 | 35 | 0.642857 |
1653e68a3494182dbc33ba8410b68bb9f85c16c2 | 97 | py | Python | src/tensor/tensor/movement/__init__.py | jedhsu/tensor | 3b2fe21029fa7c50b034190e77d79d1a94ea5e8f | [
"Apache-2.0"
] | null | null | null | src/tensor/tensor/movement/__init__.py | jedhsu/tensor | 3b2fe21029fa7c50b034190e77d79d1a94ea5e8f | [
"Apache-2.0"
] | null | null | null | src/tensor/tensor/movement/__init__.py | jedhsu/tensor | 3b2fe21029fa7c50b034190e77d79d1a94ea5e8f | [
"Apache-2.0"
] | null | null | null | from ._movement import Movement
from .path import MovementPath
from .paths import MovementPaths
| 19.4 | 32 | 0.835052 |
1654499e8423c0c8a91eb13123406b32dfc847c1 | 8,988 | py | Python | opticalmapping/standalone/om_augmenter.py | sauloal/ipython | 35c24a10330da3e54b5ee29df54ee263f5268d18 | [
"MIT"
] | null | null | null | opticalmapping/standalone/om_augmenter.py | sauloal/ipython | 35c24a10330da3e54b5ee29df54ee263f5268d18 | [
"MIT"
] | null | null | null | opticalmapping/standalone/om_augmenter.py | sauloal/ipython | 35c24a10330da3e54b5ee29df54ee263f5268d18 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import os
import sys
from om_shared import *
if __name__ == '__main__':
if len(sys.argv) ==1:
print "no arguments given"
sys.exit(1)
args = parse_args(sys.argv[1:])
main(args)
"""
# $ cd D:\Plextor\data\Acquisitie\BioNanoGenomics\MyLycopersicumWorks... | 61.561644 | 1,184 | 0.595683 |
1654fce2866f6b2ef021c29092efa26419e5ba83 | 4,918 | py | Python | uhd_restpy/testplatform/sessions/ixnetwork/impairment/profile/fixedclassifier/fixedclassifier.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 20 | 2019-05-07T01:59:14.000Z | 2022-02-11T05:24:47.000Z | uhd_restpy/testplatform/sessions/ixnetwork/impairment/profile/fixedclassifier/fixedclassifier.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 60 | 2019-04-03T18:59:35.000Z | 2022-02-22T12:05:05.000Z | uhd_restpy/testplatform/sessions/ixnetwork/impairment/profile/fixedclassifier/fixedclassifier.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 13 | 2019-05-20T10:48:31.000Z | 2021-10-06T07:45:44.000Z | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# 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,... | 41.677966 | 187 | 0.700895 |
16557fb191c1ea62849d52d444fde47864d855b9 | 43,651 | py | Python | lantz/drivers/sacher/Sacher_EPOS.py | mtsolmn/lantz-drivers | f48caf9000ddd08f2abb837d832e341410af4788 | [
"BSD-3-Clause"
] | 4 | 2019-05-04T00:10:53.000Z | 2020-10-22T18:08:40.000Z | lantz/drivers/sacher/Sacher_EPOS.py | mtsolmn/lantz-drivers | f48caf9000ddd08f2abb837d832e341410af4788 | [
"BSD-3-Clause"
] | 3 | 2019-07-12T13:44:17.000Z | 2020-10-22T19:32:08.000Z | lantz/drivers/sacher/Sacher_EPOS.py | mtsolmn/lantz-drivers | f48caf9000ddd08f2abb837d832e341410af4788 | [
"BSD-3-Clause"
] | 9 | 2019-04-03T17:07:03.000Z | 2021-02-15T21:53:55.000Z | # sacher_epos.py, python wrapper for sacher epos motor
# David Christle <christle@uchicago.edu>, August 2014
#
"""
Possbily Maxon EPOS now
"""
"""
This is the actual version that works
But only in the lab32 virtual environment
"""
# from instrument import Instrument
# import qt
import ctypes
import ctypes.wintypes
i... | 41.532826 | 147 | 0.625644 |
165616f6329f47d7fc22c8cc1eb0970f40d768d9 | 1,652 | py | Python | tools/generate_lst.py | haotianliu001/HRNet-Lesion | 9dae108879456e084b2200e39d7e58c1c08c2b16 | [
"MIT"
] | null | null | null | tools/generate_lst.py | haotianliu001/HRNet-Lesion | 9dae108879456e084b2200e39d7e58c1c08c2b16 | [
"MIT"
] | null | null | null | tools/generate_lst.py | haotianliu001/HRNet-Lesion | 9dae108879456e084b2200e39d7e58c1c08c2b16 | [
"MIT"
] | null | null | null | import argparse
import os
image_dir = 'image'
label_dir = 'label'
splits = ['train', 'val', 'test']
image_dirs = [
'image/{}',
'image/{}_crop'
]
label_dirs = [
'label/{}/annotations',
'label/{}/annotations_crop',
]
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argu... | 30.036364 | 116 | 0.579903 |
1658161ce6f6978b51d0a1fdd4a0ce93c2160124 | 897 | py | Python | examples/example.py | f-dangel/unfoldNd | 63e9abc4867d8678c2ac00da567dc106e9f6f2c7 | [
"MIT"
] | 21 | 2021-03-04T04:56:20.000Z | 2022-03-31T11:15:28.000Z | examples/example.py | f-dangel/unfoldNd | 63e9abc4867d8678c2ac00da567dc106e9f6f2c7 | [
"MIT"
] | 12 | 2021-02-16T16:16:23.000Z | 2021-05-28T06:00:41.000Z | examples/example.py | f-dangel/unfoldNd | 63e9abc4867d8678c2ac00da567dc106e9f6f2c7 | [
"MIT"
] | 1 | 2021-11-04T12:52:19.000Z | 2021-11-04T12:52:19.000Z | """How to use ``unfoldNd``. A comparison with ``torch.nn.Unfold``."""
# imports, make this example deterministic
import torch
import unfoldNd
torch.manual_seed(0)
# random batched RGB 32x32 image-shaped input tensor of batch size 64
inputs = torch.randn((64, 3, 32, 32))
# module hyperparameters
kernel_size = 3
dil... | 24.916667 | 71 | 0.753623 |
1658fa9a24f0d70843df0f950d0081f1ffadc11b | 797 | py | Python | src/pretix/helpers/escapejson.py | NicsTr/pretix | e6d2380d9ed1836cc64a688b2be20d00a8500eab | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-04-25T00:11:00.000Z | 2020-04-25T00:11:00.000Z | src/pretix/helpers/escapejson.py | NicsTr/pretix | e6d2380d9ed1836cc64a688b2be20d00a8500eab | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/pretix/helpers/escapejson.py | NicsTr/pretix | e6d2380d9ed1836cc64a688b2be20d00a8500eab | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from django.utils.encoding import force_str
from django.utils.functional import keep_lazy
from django.utils.safestring import SafeText, mark_safe
_json_escapes = {
ord('>'): '\\u003E',
ord('<'): '\\u003C',
ord('&'): '\\u0026',
}
_json_escapes_attr = {
ord('>'): '\\u003E',
ord('<'): '\\u003C',
... | 25.709677 | 75 | 0.6399 |
1659ed45e2efb246708ee177c0a31eb71473cb9b | 1,813 | py | Python | pyxley/charts/plotly/base.py | snowind/pyxley | cff9e50b8d80b9794c6907355e541f166959cd6c | [
"MIT"
] | 2,536 | 2015-06-26T20:12:30.000Z | 2022-03-01T07:26:44.000Z | pyxley/charts/plotly/base.py | zhiaozhou/pyxley | 2dab00022d977d986169cd8a629b3a2f91be893f | [
"MIT"
] | 51 | 2015-07-17T14:16:43.000Z | 2021-07-09T21:34:36.000Z | pyxley/charts/plotly/base.py | zhiaozhou/pyxley | 2dab00022d977d986169cd8a629b3a2f91be893f | [
"MIT"
] | 335 | 2015-07-16T20:22:00.000Z | 2022-02-25T07:18:15.000Z |
from ..charts import Chart
from flask import jsonify, request
_BASE_CONFIG = {
"showLink": False,
"displaylogo": False,
"modeBarButtonsToRemove": ["sendDataToCloud"]
}
| 27.059701 | 73 | 0.492554 |
165b5afa3e28ca226423cdaac8f6894170030430 | 576 | py | Python | pyqt/getting_started/close_window.py | CospanDesign/python | 9f911509aae7abd9237c14a4635294c7719c9129 | [
"MIT"
] | 5 | 2015-12-12T20:16:45.000Z | 2020-02-21T19:50:31.000Z | pyqt/getting_started/close_window.py | CospanDesign/python | 9f911509aae7abd9237c14a4635294c7719c9129 | [
"MIT"
] | null | null | null | pyqt/getting_started/close_window.py | CospanDesign/python | 9f911509aae7abd9237c14a4635294c7719c9129 | [
"MIT"
] | 2 | 2020-06-01T06:27:06.000Z | 2022-03-10T13:21:03.000Z | #!/usr/bin/python
import sys
from PyQt4 import QtGui
from PyQt4 import QtCore
if __name__ == "__main__":
main()
| 19.2 | 65 | 0.682292 |
165bd59707bf7d41b2fcb3dbf5d490a2e8660a09 | 732 | py | Python | test/means/test_zero_mean.py | bdecost/gpytorch | a5f1ad3e47daf3f8db04b605fb13ff3f9f871e3a | [
"MIT"
] | null | null | null | test/means/test_zero_mean.py | bdecost/gpytorch | a5f1ad3e47daf3f8db04b605fb13ff3f9f871e3a | [
"MIT"
] | null | null | null | test/means/test_zero_mean.py | bdecost/gpytorch | a5f1ad3e47daf3f8db04b605fb13ff3f9f871e3a | [
"MIT"
] | 1 | 2018-11-15T10:03:40.000Z | 2018-11-15T10:03:40.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import torch
import unittest
from gpytorch.means import ZeroMean
| 28.153846 | 78 | 0.629781 |
165bdb25d95d9e2ecf502312358485ebe1274976 | 1,948 | py | Python | generator/contact.py | rizzak/python_training | 38bbe5d7e38892e8dcc28caeae1481b98cce7356 | [
"Apache-2.0"
] | null | null | null | generator/contact.py | rizzak/python_training | 38bbe5d7e38892e8dcc28caeae1481b98cce7356 | [
"Apache-2.0"
] | null | null | null | generator/contact.py | rizzak/python_training | 38bbe5d7e38892e8dcc28caeae1481b98cce7356 | [
"Apache-2.0"
] | null | null | null | import jsonpickle
import random
import string
from model.contact import Contact
import os.path
import getopt
import sys
try:
opts, args = getopt.getopt(sys.argv[1:], "n:f:", ["number of contacts", "file"])
except getopt.GetoptError as err:
getopt.usage()
sys.exit(2)
n = 5
f = "data/contacts.json"
for o,... | 40.583333 | 153 | 0.664271 |
165cb63df5c2c12565813006cb857ecc7266b584 | 9,952 | py | Python | Lib/test/test_runpy.py | arvindm95/unladen-swallow | 8175e37eaea7ca66ed03283b46bc1d2db0d3f9c3 | [
"PSF-2.0"
] | 2,293 | 2015-01-02T12:46:10.000Z | 2022-03-29T09:45:43.000Z | python/src/Lib/test/test_runpy.py | weiqiangzheng/sl4a | d3c17dca978cbeee545e12ea240a9dbf2a6999e9 | [
"Apache-2.0"
] | 315 | 2015-05-31T11:55:46.000Z | 2022-01-12T08:36:37.000Z | python/src/Lib/test/test_runpy.py | weiqiangzheng/sl4a | d3c17dca978cbeee545e12ea240a9dbf2a6999e9 | [
"Apache-2.0"
] | 1,033 | 2015-01-04T07:48:40.000Z | 2022-03-24T09:34:37.000Z | # Test the runpy module
import unittest
import os
import os.path
import sys
import tempfile
from test.test_support import verbose, run_unittest, forget
from runpy import _run_code, _run_module_code, run_module
# Note: This module can't safely test _run_module_as_main as it
# runs its tests in the current process, whic... | 39.181102 | 82 | 0.60621 |
165d5b352de2106b373e88fa207e7c0361117e91 | 4,795 | py | Python | experiments/_pytorch/_grpc_server/protofiles/imagedata_pb2.py | RedisAI/benchmarks | 65b8509b81795da73f25f51941c61fbd9765914c | [
"MIT"
] | 6 | 2019-04-18T10:17:52.000Z | 2021-07-02T19:57:08.000Z | experiments/_pytorch/_grpc_server/protofiles/imagedata_pb2.py | hhsecond/benchmarks | 65b8509b81795da73f25f51941c61fbd9765914c | [
"MIT"
] | 1 | 2021-07-21T12:17:08.000Z | 2021-07-21T12:17:08.000Z | experiments/_pytorch/_grpc_server/protofiles/imagedata_pb2.py | hhsecond/benchmarks | 65b8509b81795da73f25f51941c61fbd9765914c | [
"MIT"
] | 2 | 2020-03-15T00:37:57.000Z | 2022-02-26T04:36:00.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: imagedata.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf i... | 30.935484 | 365 | 0.740563 |
165e5478bb41b24d4a9ab5bce186c085b7367f24 | 4,937 | py | Python | app/api/admin_sales/discounted.py | akashtalole/python-flask-restful-api | 475d8fd7be1724183716a197aac4257f8fbbeac4 | [
"MIT"
] | 3 | 2019-09-05T05:28:49.000Z | 2020-06-10T09:03:37.000Z | app/api/admin_sales/discounted.py | akashtalole/python-flask-restful-api | 475d8fd7be1724183716a197aac4257f8fbbeac4 | [
"MIT"
] | null | null | null | app/api/admin_sales/discounted.py | akashtalole/python-flask-restful-api | 475d8fd7be1724183716a197aac4257f8fbbeac4 | [
"MIT"
] | null | null | null | from sqlalchemy import func
from flask_rest_jsonapi import ResourceList
from marshmallow_jsonapi import fields
from marshmallow_jsonapi.flask import Schema
from app.api.helpers.utilities import dasherize
from app.api.bootstrap import api
from app.models import db
from app.models.discount_code import DiscountCode
from ... | 41.838983 | 102 | 0.552157 |
165e549759c53b8757e058aa4a4e0a0e6b69b060 | 407 | py | Python | spacy/lang/sr/__init__.py | g4brielvs/spaCy | cca8651fc8133172ebaa9d9fc438ed1fbf34fb33 | [
"BSD-3-Clause",
"MIT"
] | 4 | 2021-08-11T05:46:23.000Z | 2021-09-11T05:16:57.000Z | spacy/lang/sr/__init__.py | g4brielvs/spaCy | cca8651fc8133172ebaa9d9fc438ed1fbf34fb33 | [
"BSD-3-Clause",
"MIT"
] | 1 | 2021-03-01T19:01:37.000Z | 2021-03-01T19:01:37.000Z | spacy/lang/sr/__init__.py | g4brielvs/spaCy | cca8651fc8133172ebaa9d9fc438ed1fbf34fb33 | [
"BSD-3-Clause",
"MIT"
] | 2 | 2021-01-26T17:29:02.000Z | 2021-03-13T08:54:53.000Z | from .stop_words import STOP_WORDS
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .lex_attrs import LEX_ATTRS
from ...language import Language
__all__ = ["Serbian"]
| 21.421053 | 54 | 0.781327 |
165e63725354de429a448d866f665cccca991916 | 656 | py | Python | mmdet/ops/dcn/__init__.py | TJUsym/TJU_Advanced_CV_Homework | 2d85943390e9ba53b80988e0ab8d50aef0cd17da | [
"Apache-2.0"
] | 1,158 | 2019-04-26T01:08:32.000Z | 2022-03-30T06:46:24.000Z | mmdet/ops/dcn/__init__.py | TJUsym/TJU_Advanced_CV_Homework | 2d85943390e9ba53b80988e0ab8d50aef0cd17da | [
"Apache-2.0"
] | 148 | 2021-03-18T09:44:02.000Z | 2022-03-31T06:01:39.000Z | mmdet/ops/dcn/__init__.py | TJUsym/TJU_Advanced_CV_Homework | 2d85943390e9ba53b80988e0ab8d50aef0cd17da | [
"Apache-2.0"
] | 197 | 2020-01-29T09:58:27.000Z | 2022-03-25T12:08:56.000Z | from .functions.deform_conv import deform_conv, modulated_deform_conv
from .functions.deform_pool import deform_roi_pooling
from .modules.deform_conv import (DeformConv, ModulatedDeformConv,
DeformConvPack, ModulatedDeformConvPack)
from .modules.deform_pool import (DeformRoIPooling, De... | 46.857143 | 76 | 0.739329 |
165f2a4da2ed50464bfa13f0495fc689063e0199 | 1,189 | py | Python | api/skill/serializer.py | zaubermaerchen/imas_cg_api | 45ebdde8c47ff4fabbf58b75721721f142afb46b | [
"MIT"
] | 2 | 2016-02-01T21:03:53.000Z | 2018-10-20T09:15:12.000Z | api/skill/serializer.py | zaubermaerchen/imas_cg_api | 45ebdde8c47ff4fabbf58b75721721f142afb46b | [
"MIT"
] | 1 | 2020-01-05T12:50:35.000Z | 2020-01-05T12:50:35.000Z | api/skill/serializer.py | zaubermaerchen/imas_cg_api | 45ebdde8c47ff4fabbf58b75721721f142afb46b | [
"MIT"
] | null | null | null | # coding: utf-8
from rest_framework import serializers
from data.models import Skill, SkillValue
| 26.422222 | 72 | 0.64508 |
1660d7a15a18998c6c8ae4f9e573b184061a0341 | 5,061 | py | Python | Codes/Converting_RGB_to_GreyScale.py | sichkar-valentyn/Image_processing_in_Python | 43d7c979bcd742cc202a28c2dea6ea5bc87562a2 | [
"MIT"
] | 3 | 2018-12-02T03:59:51.000Z | 2019-11-20T18:37:41.000Z | Codes/Converting_RGB_to_GreyScale.py | sichkar-valentyn/Image_processing_in_Python | 43d7c979bcd742cc202a28c2dea6ea5bc87562a2 | [
"MIT"
] | null | null | null | Codes/Converting_RGB_to_GreyScale.py | sichkar-valentyn/Image_processing_in_Python | 43d7c979bcd742cc202a28c2dea6ea5bc87562a2 | [
"MIT"
] | 2 | 2018-10-18T07:01:26.000Z | 2022-03-22T08:22:33.000Z | # File: Converting_RGB_to_GreyScale.py
# Description: Opening RGB image as array, converting to GreyScale and saving result into new file
# Environment: PyCharm and Anaconda environment
#
# MIT License
# Copyright (c) 2018 Valentyn N Sichkar
# github.com/sichkar-valentyn
#
# Reference to:
# Valentyn N Sichkar. Image pr... | 33.966443 | 99 | 0.752223 |
1661f7c0c438355d7d875aa2c983973094881c84 | 3,193 | py | Python | template_renderer.py | hamza-gheggad/gcp-iam-collector | 02b46453b9ec23af07a0d81f7250f1de61e0ee23 | [
"Apache-2.0"
] | null | null | null | template_renderer.py | hamza-gheggad/gcp-iam-collector | 02b46453b9ec23af07a0d81f7250f1de61e0ee23 | [
"Apache-2.0"
] | null | null | null | template_renderer.py | hamza-gheggad/gcp-iam-collector | 02b46453b9ec23af07a0d81f7250f1de61e0ee23 | [
"Apache-2.0"
] | null | null | null | import colorsys
import json
from jinja2 import Environment, PackageLoader
import graph
| 31.303922 | 91 | 0.593173 |
166293ba707b563d24827825716e3e79a6848c40 | 13,007 | py | Python | powerapi/cli/tools.py | danglotb/powerapi | 67b2508588bfe1e20d90f9fe6bccda34d3455262 | [
"BSD-3-Clause"
] | null | null | null | powerapi/cli/tools.py | danglotb/powerapi | 67b2508588bfe1e20d90f9fe6bccda34d3455262 | [
"BSD-3-Clause"
] | null | null | null | powerapi/cli/tools.py | danglotb/powerapi | 67b2508588bfe1e20d90f9fe6bccda34d3455262 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2018, INRIA
# Copyright (c) 2018, University of Lille
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, t... | 49.268939 | 128 | 0.667948 |
1662a331dbe1e237d08e9e21a3e8d596bcbce6c4 | 2,477 | py | Python | pyxrd/mixture/models/insitu_behaviours/insitu_behaviour.py | PyXRD/pyxrd | 26bacdf64f3153fa74b8caa62e219b76d91a55c1 | [
"BSD-2-Clause"
] | 27 | 2018-06-15T15:28:18.000Z | 2022-03-10T12:23:50.000Z | pyxrd/mixture/models/insitu_behaviours/insitu_behaviour.py | PyXRD/pyxrd | 26bacdf64f3153fa74b8caa62e219b76d91a55c1 | [
"BSD-2-Clause"
] | 22 | 2018-06-14T08:29:16.000Z | 2021-07-05T13:33:44.000Z | pyxrd/mixture/models/insitu_behaviours/insitu_behaviour.py | PyXRD/pyxrd | 26bacdf64f3153fa74b8caa62e219b76d91a55c1 | [
"BSD-2-Clause"
] | 8 | 2019-04-13T13:03:51.000Z | 2021-06-19T09:29:11.000Z | # coding=UTF-8
# ex:ts=4:sw=4:et=on
#
# Copyright (c) 2013, Mathijs Dumon
# All rights reserved.
# Complete license can be found in the LICENSE file.
from mvc.models.properties import StringProperty
from pyxrd.generic.io.custom_io import storables, Storable
from pyxrd.generic.models.base import DataModel
from pyxrd.... | 34.402778 | 103 | 0.583771 |
16635cf724808862aeb33d75c907fed77d96d1fc | 857 | py | Python | 1 plainProgrammingBug/start 1 plainProgrammingBug.py | vishalbelsare/SLAPP3 | da187b771831aaaabaee16a26ad341db2e968104 | [
"CC0-1.0"
] | 8 | 2017-10-18T05:19:17.000Z | 2020-03-24T21:23:52.000Z | 1 plainProgrammingBug/start 1 plainProgrammingBug.py | vishalbelsare/SLAPP3 | da187b771831aaaabaee16a26ad341db2e968104 | [
"CC0-1.0"
] | null | null | null | 1 plainProgrammingBug/start 1 plainProgrammingBug.py | vishalbelsare/SLAPP3 | da187b771831aaaabaee16a26ad341db2e968104 | [
"CC0-1.0"
] | 4 | 2017-10-25T09:07:49.000Z | 2019-08-18T09:17:58.000Z | # start 1 plainProgrammingBug.py
import random
# returns -1, 0, 1 with equal probability
SimpleBug()
"""
you can eliminate the randomMove() function substituting
xPos += randomMove()
yPos += randomMove()
with
xPos += random.randint(-1, 1)
yPos += random.randint(-1,... | 19.930233 | 69 | 0.568261 |
166407e573ed13b6f495ddb118b6bb572fdf1148 | 423 | py | Python | ba5a-min-coins/money_change.py | kjco/bioinformatics-algorithms | 3c466157b89c1cbd54749563e39d86a307d7a3f3 | [
"MIT"
] | null | null | null | ba5a-min-coins/money_change.py | kjco/bioinformatics-algorithms | 3c466157b89c1cbd54749563e39d86a307d7a3f3 | [
"MIT"
] | null | null | null | ba5a-min-coins/money_change.py | kjco/bioinformatics-algorithms | 3c466157b89c1cbd54749563e39d86a307d7a3f3 | [
"MIT"
] | null | null | null |
money = 8074
#money = 18705
#coin_list = [24,23,21,5,3,1]
coin_list = [24,13,12,7,5,3,1]
#coin_list = map(int, open('dataset_71_8.txt').read().split(','))
d = {0:0}
for m in range(1,money+1):
min_coin = 1000000
for coin in coin_list:
if m >= coin:
if d[m-coin]+1 < min_coin:... | 18.391304 | 66 | 0.51773 |
1665579643c424a545b6a8b3af94a1a9e0f4f184 | 357 | py | Python | examples/remove_comments.py | igordejanovic/textx-bibtex | b1374a39b96da9c1bc979c367b9ed3feb04f4f01 | [
"MIT"
] | 1 | 2020-06-17T21:51:33.000Z | 2020-06-17T21:51:33.000Z | examples/remove_comments.py | igordejanovic/textx-bibtex | b1374a39b96da9c1bc979c367b9ed3feb04f4f01 | [
"MIT"
] | null | null | null | examples/remove_comments.py | igordejanovic/textx-bibtex | b1374a39b96da9c1bc979c367b9ed3feb04f4f01 | [
"MIT"
] | null | null | null | """
Remove comments from bib file.
"""
from textx import metamodel_for_language
from txbibtex import bibentry_str
BIB_FILE = 'references.bib'
bibfile = metamodel_for_language('bibtex').model_from_file(BIB_FILE)
# Drop line comments.
print('\n'.join([bibentry_str(e) for e in bibfile.entries
if e.__cla... | 27.461538 | 68 | 0.739496 |
1665f41d1c03f32167e2cea236d3cf7a022b6b61 | 3,202 | py | Python | google-cloud-sdk/lib/surface/compute/resource_policies/create/group_placement.py | bopopescu/Social-Lite | ee05d6a7431c36ff582c8d6b58bb20a8c5f550bf | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/lib/surface/compute/resource_policies/create/group_placement.py | bopopescu/Social-Lite | ee05d6a7431c36ff582c8d6b58bb20a8c5f550bf | [
"Apache-2.0"
] | 4 | 2020-07-21T12:51:46.000Z | 2022-01-22T10:29:25.000Z | google-cloud-sdk/lib/surface/compute/resource_policies/create/group_placement.py | bopopescu/Social-Lite | ee05d6a7431c36ff582c8d6b58bb20a8c5f550bf | [
"Apache-2.0"
] | 1 | 2020-07-25T18:17:57.000Z | 2020-07-25T18:17:57.000Z | # -*- coding: utf-8 -*- #
# Copyright 2019 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 37.232558 | 109 | 0.777327 |
16661518293e1bbad26be3766a9addb9bc564758 | 629 | py | Python | paperoni/io.py | notoraptor/paperoni | acdf2d3d790b98d6a171177ffd9d6342f86bc7ea | [
"MIT"
] | 88 | 2020-08-27T17:58:58.000Z | 2021-12-01T19:29:56.000Z | paperoni/io.py | notoraptor/paperoni | acdf2d3d790b98d6a171177ffd9d6342f86bc7ea | [
"MIT"
] | 8 | 2020-08-27T02:54:11.000Z | 2022-02-01T13:35:41.000Z | paperoni/io.py | notoraptor/paperoni | acdf2d3d790b98d6a171177ffd9d6342f86bc7ea | [
"MIT"
] | 6 | 2020-08-25T16:43:28.000Z | 2021-12-08T16:41:02.000Z | import json
from .papers import Papers
from .researchers import Researchers
def ResearchersFile(filename):
"""Parse a file containing researchers."""
try:
with open(filename, "r") as file:
data = json.load(file)
except FileNotFoundError:
data = {}
return Researchers(data, ... | 25.16 | 67 | 0.655008 |
16666943ca1f78d9acd45c2909883bd0b65b734d | 934 | py | Python | src/lib/sd2/test_addresses.py | zachkont/sd2 | 92d8c55a8c7ac51c00ba514be01955aa7162e4ef | [
"Apache-2.0"
] | null | null | null | src/lib/sd2/test_addresses.py | zachkont/sd2 | 92d8c55a8c7ac51c00ba514be01955aa7162e4ef | [
"Apache-2.0"
] | null | null | null | src/lib/sd2/test_addresses.py | zachkont/sd2 | 92d8c55a8c7ac51c00ba514be01955aa7162e4ef | [
"Apache-2.0"
] | null | null | null | #############################################################################
# Copyright (c) 2017 SiteWare Corp. All right reserved
#############################################################################
import logging
import pytest
from . import addresses
| 30.129032 | 77 | 0.626338 |
166739b28ed7ffa22c5f71499709f1fd302bd933 | 1,914 | py | Python | config_model.py | Asha-ai/BERT_abstractive_proj | f0e8f659d6b8821cfe0d15f4075e8cb890efdfe9 | [
"Apache-2.0"
] | 17 | 2020-01-11T15:15:21.000Z | 2021-12-08T10:03:36.000Z | config_model.py | Asha-ai/BERT_abstractive_proj | f0e8f659d6b8821cfe0d15f4075e8cb890efdfe9 | [
"Apache-2.0"
] | 6 | 2020-03-01T17:14:58.000Z | 2021-05-21T16:05:03.000Z | config_model.py | Asha-ai/BERT_abstractive_proj | f0e8f659d6b8821cfe0d15f4075e8cb890efdfe9 | [
"Apache-2.0"
] | 8 | 2020-05-11T21:24:51.000Z | 2021-07-23T09:18:46.000Z | import texar.tf as tx
beam_width = 5
hidden_dim = 768
bert = {
'pretrained_model_name': 'bert-base-uncased'
}
# See https://texar.readthedocs.io/en/latest/code/modules.html#texar.tf.modules.BERTEncoder.default_hparams
bert_encoder = {}
# From https://github.com/asyml/texar/blob/413e07f859acbbee979f274b52942edd5... | 31.377049 | 128 | 0.653083 |
16677a6fe2ff1b1e4b01bda4446f100594d88c8e | 390 | py | Python | wishes/migrations/0005_auto_20201029_0904.py | e-elson/bd | e35c59686e5ec81925c22353e269601f286634db | [
"MIT"
] | null | null | null | wishes/migrations/0005_auto_20201029_0904.py | e-elson/bd | e35c59686e5ec81925c22353e269601f286634db | [
"MIT"
] | null | null | null | wishes/migrations/0005_auto_20201029_0904.py | e-elson/bd | e35c59686e5ec81925c22353e269601f286634db | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-10-29 09:04
from django.db import migrations, models
| 20.526316 | 55 | 0.594872 |
166802c5b61892041a13896dbed6ef514fd83df2 | 7,115 | py | Python | undeployed/legacy/Landsat/DNtoReflectance.py | NASA-DEVELOP/dnppy | 8f7ef6f0653f5a4ea730ee557c72a2c89c06ce0b | [
"NASA-1.3"
] | 65 | 2015-09-10T12:59:56.000Z | 2022-02-27T22:09:03.000Z | undeployed/legacy/Landsat/DNtoReflectance.py | snowzm/dnppy | 8f7ef6f0653f5a4ea730ee557c72a2c89c06ce0b | [
"NASA-1.3"
] | 40 | 2015-04-08T19:23:30.000Z | 2015-08-04T15:53:11.000Z | undeployed/legacy/Landsat/DNtoReflectance.py | snowzm/dnppy | 8f7ef6f0653f5a4ea730ee557c72a2c89c06ce0b | [
"NASA-1.3"
] | 45 | 2015-08-14T19:09:38.000Z | 2022-02-15T18:53:16.000Z | #-------------------------------------------------------------------------------
# Name: Landsat Digital Numbers to Radiance/Reflectance
# Purpose: To convert landsat 4,5, or 7 pixel values from digital numbers
# to Radiance, Reflectance, or Temperature
# Author: Quinten Geddes Quinte... | 42.100592 | 113 | 0.619115 |
1668b92419e5394d4eb735fba074c84b5eb16b19 | 1,396 | py | Python | .modules/.theHarvester/discovery/twittersearch.py | termux-one/EasY_HaCk | 0a8d09ca4b126b027b6842e02fa0c29d8250e090 | [
"Apache-2.0"
] | 1,103 | 2018-04-20T14:08:11.000Z | 2022-03-29T06:22:43.000Z | .modules/.theHarvester/discovery/twittersearch.py | sshourya948/EasY_HaCk | 0a8d09ca4b126b027b6842e02fa0c29d8250e090 | [
"Apache-2.0"
] | 29 | 2019-04-03T14:52:38.000Z | 2022-03-24T12:33:05.000Z | .modules/.theHarvester/discovery/twittersearch.py | sshourya948/EasY_HaCk | 0a8d09ca4b126b027b6842e02fa0c29d8250e090 | [
"Apache-2.0"
] | 262 | 2017-09-16T22:15:50.000Z | 2022-03-31T00:38:42.000Z | import string
import requests
import sys
import myparser
import re
| 32.465116 | 169 | 0.592407 |
166903b8515452d27e1a1b1b4a84d3d174d4f220 | 708 | py | Python | scrap_instagram.py | genaforvena/nn_scrapper | 897766a52202aa056afd657995ed39b2b91e1fe2 | [
"Apache-2.0"
] | null | null | null | scrap_instagram.py | genaforvena/nn_scrapper | 897766a52202aa056afd657995ed39b2b91e1fe2 | [
"Apache-2.0"
] | null | null | null | scrap_instagram.py | genaforvena/nn_scrapper | 897766a52202aa056afd657995ed39b2b91e1fe2 | [
"Apache-2.0"
] | null | null | null | import urllib.request
import json
access_token = "265791501.a4af066.f45a9f44719a4b2cb2d137118524e32b"
api_url = "https://api.instagram.com/v1"
nn_lat = 56.296504
nn_lng = 43.936059
locations = request("/locations/search", "lat=" + str(nn_lat) + "&lng=" + str(nn_lng))["data"]
print(locations)
for location in locatio... | 29.5 | 94 | 0.706215 |
16693286bda8fc5cb36e02f9aa7765ff20fcfe4e | 7,066 | py | Python | tests/unit/utils/test_validators.py | kajusK/HiddenPlaces | aa976f611a419bc33f8a65f0314956ec09fe2bfd | [
"MIT"
] | null | null | null | tests/unit/utils/test_validators.py | kajusK/HiddenPlaces | aa976f611a419bc33f8a65f0314956ec09fe2bfd | [
"MIT"
] | null | null | null | tests/unit/utils/test_validators.py | kajusK/HiddenPlaces | aa976f611a419bc33f8a65f0314956ec09fe2bfd | [
"MIT"
] | null | null | null | """Unit tests for app.validators. """
from wtforms import ValidationError
import flask
from pytest import raises
from app.utils.validators import password_rules, image_file, allowed_file
def _run_validator_check(subtests, validator, valid, invalid):
"""Runs tests again validator with valid and invalid inputs.
... | 35.686869 | 78 | 0.644495 |
166add4d1cc09be73d6135b394a15f57ecfca1b9 | 615 | py | Python | ts_eval/utils/nans.py | vshulyak/ts-eval | 2049b1268cf4272f5fa1471851523f8da14dd84c | [
"MIT"
] | 1 | 2021-07-12T08:58:07.000Z | 2021-07-12T08:58:07.000Z | ts_eval/utils/nans.py | vshulyak/ts-eval | 2049b1268cf4272f5fa1471851523f8da14dd84c | [
"MIT"
] | null | null | null | ts_eval/utils/nans.py | vshulyak/ts-eval | 2049b1268cf4272f5fa1471851523f8da14dd84c | [
"MIT"
] | null | null | null | import warnings
import numpy as np
def nans_in_same_positions(*arrays):
"""
Compares all provided arrays to see if they have NaNs in the same positions.
"""
if len(arrays) == 0:
return True
for arr in arrays[1:]:
if not (np.isnan(arrays[0]) == np.isnan(arr)).all():
ret... | 24.6 | 80 | 0.642276 |
166b671e9115e476c69bab6e6077599dd6b6cdea | 5,434 | py | Python | tests/authorization/test_searches.py | UOC/dlkit | a9d265db67e81b9e0f405457464e762e2c03f769 | [
"MIT"
] | 2 | 2018-02-23T12:16:11.000Z | 2020-10-08T17:54:24.000Z | tests/authorization/test_searches.py | UOC/dlkit | a9d265db67e81b9e0f405457464e762e2c03f769 | [
"MIT"
] | 87 | 2017-04-21T18:57:15.000Z | 2021-12-13T19:43:57.000Z | tests/authorization/test_searches.py | UOC/dlkit | a9d265db67e81b9e0f405457464e762e2c03f769 | [
"MIT"
] | 1 | 2018-03-01T16:44:25.000Z | 2018-03-01T16:44:25.000Z | """Unit tests of authorization searches."""
import pytest
from ..utilities.general import is_never_authz, is_no_authz, uses_cataloging, uses_filesystem_only
from dlkit.abstract_osid.osid import errors
from dlkit.primordium.id.primitives import Id
from dlkit.primordium.type.primitives import Type
from dlkit.runtime ... | 36.469799 | 176 | 0.749724 |
166ccaa355ece2f923c461999fa3eb16171b7163 | 350 | py | Python | mechroutines/models/_flux.py | keceli/mechdriver | 978994ba5c77b6df00078b639c4482dacf269440 | [
"Apache-2.0"
] | 1 | 2022-03-22T20:47:04.000Z | 2022-03-22T20:47:04.000Z | mechroutines/models/_flux.py | keceli/mechdriver | 978994ba5c77b6df00078b639c4482dacf269440 | [
"Apache-2.0"
] | 1 | 2021-02-12T21:11:16.000Z | 2021-12-07T21:32:14.000Z | mechroutines/models/_flux.py | keceli/mechdriver | 978994ba5c77b6df00078b639c4482dacf269440 | [
"Apache-2.0"
] | 8 | 2019-12-18T20:09:46.000Z | 2020-11-14T16:37:28.000Z | """
NEW: Handle flux files
"""
import autofile
def read_flux(ts_save_path, vrc_locs=(0,)):
""" Read the geometry from the filesys
"""
vrc_fs = autofile.fs.vrctst(ts_save_path)
if vrc_fs[-1].file.flux.exists(vrc_locs):
flux_str = vrc_fs[-1].file.flux.read(vrc_locs)
else:
flux_st... | 18.421053 | 54 | 0.64 |
166ddfdb964d4dc41f4f840af0cda8cfbfe5a687 | 4,990 | py | Python | RandomForest/RandomForest.py | nachiket273/ML_Algo_Implemented | 74ae47fdf620545fdf8c934c5997784faadaebb7 | [
"MIT"
] | 7 | 2020-08-03T13:43:53.000Z | 2022-02-18T20:38:51.000Z | RandomForest/RandomForest.py | nachiket273/ML_Algo_Implemented | 74ae47fdf620545fdf8c934c5997784faadaebb7 | [
"MIT"
] | null | null | null | RandomForest/RandomForest.py | nachiket273/ML_Algo_Implemented | 74ae47fdf620545fdf8c934c5997784faadaebb7 | [
"MIT"
] | 2 | 2020-09-06T21:54:16.000Z | 2022-01-22T19:59:33.000Z | import math
import numpy as np
import pandas as pd
from sklearn.base import BaseEstimator
import sys
import os
sys.path.append(os.path.abspath('../DecisionTree'))
from DecisionTree import DecisionTree
| 40.901639 | 93 | 0.546293 |
166e1671aebcb4e327d8e4f8b8b62dc58ec16062 | 556 | py | Python | tests/basics/generator_pend_throw.py | iotctl/pycopy | eeb841afea61b19800d054b3b289729665fc9aa4 | [
"MIT"
] | 663 | 2018-12-30T00:17:59.000Z | 2022-03-14T05:03:41.000Z | tests/basics/generator_pend_throw.py | iotctl/pycopy | eeb841afea61b19800d054b3b289729665fc9aa4 | [
"MIT"
] | 41 | 2019-06-06T08:31:19.000Z | 2022-02-13T16:53:41.000Z | tests/basics/generator_pend_throw.py | iotctl/pycopy | eeb841afea61b19800d054b3b289729665fc9aa4 | [
"MIT"
] | 60 | 2019-06-01T04:25:00.000Z | 2022-02-25T01:47:31.000Z |
g = gen()
try:
g.pend_throw
except AttributeError:
print("SKIP")
raise SystemExit
print(next(g))
print(next(g))
g.pend_throw(ValueError())
v = None
try:
v = next(g)
except Exception as e:
print("raised", repr(e))
print("ret was:", v)
# It's legal to pend exception in a just-started generator,... | 15.444444 | 73 | 0.624101 |
166e4003ce5bc54874ebae493377303b4c270f29 | 4,511 | py | Python | src/UnitTypes/ProjectileModule.py | USArmyResearchLab/ARL_Battlespace | 2f17a478f62c20a4db387d5d3e4bbeaa3197cd49 | [
"MIT"
] | 1 | 2022-03-31T19:15:04.000Z | 2022-03-31T19:15:04.000Z | src/UnitTypes/ProjectileModule.py | USArmyResearchLab/ARL_Battlespace | 2f17a478f62c20a4db387d5d3e4bbeaa3197cd49 | [
"MIT"
] | null | null | null | src/UnitTypes/ProjectileModule.py | USArmyResearchLab/ARL_Battlespace | 2f17a478f62c20a4db387d5d3e4bbeaa3197cd49 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Dec 15 09:49:47 2020
@author: james.z.hare
"""
from src.UnitModule import UnitClass, advance
from copy import deepcopy
import math
# Will be used as the projectile for the missile launcher unit | 32.221429 | 158 | 0.62137 |
166ed868a00e2876de6024b3dcf661e7d6afc455 | 216 | py | Python | OOP_MiniQuiz/run_car_Level2.py | HelloYeew/helloyeew-lab-computer-programming-i | 60b05072f32f23bab4a336b506ba7f66e52c045d | [
"MIT"
] | null | null | null | OOP_MiniQuiz/run_car_Level2.py | HelloYeew/helloyeew-lab-computer-programming-i | 60b05072f32f23bab4a336b506ba7f66e52c045d | [
"MIT"
] | null | null | null | OOP_MiniQuiz/run_car_Level2.py | HelloYeew/helloyeew-lab-computer-programming-i | 60b05072f32f23bab4a336b506ba7f66e52c045d | [
"MIT"
] | null | null | null | from car import *
car1 = Car("Nissan","Tiida",450000)
car2 = Car("Toyota","Vios",400000)
car3 = Car("BMW","X3",3400000)
compare(car3,car1)
compare(car1,car2) | 18 | 35 | 0.671296 |
166f10041a007d09adb3797f8fd4bf54942b5eeb | 1,513 | py | Python | prelude/monads.py | michel-slm/python-prelude | b3ca89ff2bf150f772764f59d2796d2fcce1013d | [
"MIT"
] | 2 | 2015-05-12T16:12:56.000Z | 2020-08-26T20:52:47.000Z | prelude/monads.py | michel-slm/python-prelude | b3ca89ff2bf150f772764f59d2796d2fcce1013d | [
"MIT"
] | null | null | null | prelude/monads.py | michel-slm/python-prelude | b3ca89ff2bf150f772764f59d2796d2fcce1013d | [
"MIT"
] | null | null | null | from abc import ABCMeta, abstractmethod
from prelude.typeclasses import Monad
from prelude.decorators import monad_eq, singleton
| 18.9125 | 50 | 0.613351 |
16715a2b77e2526acf8bf40591ec7bc531389bde | 848 | py | Python | Deep Sort/src/imgconverter.py | JJavier98/TFG-Dron-de-Vigilancia | 7fd68a981854ac480ad2f0c936a0dd58d2a9f38b | [
"MIT"
] | null | null | null | Deep Sort/src/imgconverter.py | JJavier98/TFG-Dron-de-Vigilancia | 7fd68a981854ac480ad2f0c936a0dd58d2a9f38b | [
"MIT"
] | null | null | null | Deep Sort/src/imgconverter.py | JJavier98/TFG-Dron-de-Vigilancia | 7fd68a981854ac480ad2f0c936a0dd58d2a9f38b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
import roslib
roslib.load_manifest('msgs_to_cv2')
import sys
import rospy
import cv2
from std_msgs.msg import String
from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
if __name__ == '__main__':
main(sys.argv)
| 20.190476 | 77 | 0.741745 |
16718d7813439bbbc33bc80e98b6e4741d2b5b6c | 261 | py | Python | foodx_devops_tools/azure/__init__.py | Food-X-Technologies/foodx_devops_tools | 57d1bf1304d9c9a386eaffa427f9eb36c410c350 | [
"MIT"
] | 3 | 2021-06-23T20:53:43.000Z | 2022-01-26T14:19:43.000Z | foodx_devops_tools/azure/__init__.py | Food-X-Technologies/foodx_devops_tools | 57d1bf1304d9c9a386eaffa427f9eb36c410c350 | [
"MIT"
] | 33 | 2021-08-09T15:44:51.000Z | 2022-03-03T18:28:02.000Z | foodx_devops_tools/azure/__init__.py | Food-X-Technologies/foodx_devops_tools | 57d1bf1304d9c9a386eaffa427f9eb36c410c350 | [
"MIT"
] | 1 | 2021-06-23T20:53:52.000Z | 2021-06-23T20:53:52.000Z | # Copyright (c) 2021 Food-X Technologies
#
# This file is part of foodx_devops_tools.
#
# You should have received a copy of the MIT License along with
# foodx_devops_tools. If not, see <https://opensource.org/licenses/MIT>.
"""Azure related utilities."""
| 29 | 73 | 0.731801 |
16725a52de27142aa18864c727dddea44204b666 | 5,940 | py | Python | beartype/vale/__init__.py | posita/beartype | e56399686e1f2ffd5128a4030b19314504e32450 | [
"MIT"
] | null | null | null | beartype/vale/__init__.py | posita/beartype | e56399686e1f2ffd5128a4030b19314504e32450 | [
"MIT"
] | null | null | null | beartype/vale/__init__.py | posita/beartype | e56399686e1f2ffd5128a4030b19314504e32450 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright (c) 2014-2021 Beartype authors.
# See "LICENSE" for further details.
'''
**Beartype validators.**
This submodule publishes a PEP-compliant hierarchy of subscriptable (indexable)
classes enabling callers ... | 45.343511 | 99 | 0.711616 |
16730d6f4856a5911d4dfcf4a29a2f5449a0ddb0 | 3,536 | py | Python | tests/test_authentication.py | movermeyer/cellardoor | 25192b07224ff7bd33fd29ebac07340bef53a2ed | [
"MIT"
] | null | null | null | tests/test_authentication.py | movermeyer/cellardoor | 25192b07224ff7bd33fd29ebac07340bef53a2ed | [
"MIT"
] | 3 | 2015-01-31T14:53:06.000Z | 2015-02-01T19:04:30.000Z | tests/test_authentication.py | movermeyer/cellardoor | 25192b07224ff7bd33fd29ebac07340bef53a2ed | [
"MIT"
] | 2 | 2015-01-31T14:54:28.000Z | 2018-03-05T17:33:42.000Z | import unittest
from mock import Mock
import base64
from cellardoor import errors
from cellardoor.authentication import *
from cellardoor.authentication.basic import BasicAuthIdentifier
| 30.747826 | 95 | 0.756505 |
16731efe14cf79a4c56966e84b709e60bb9faf4f | 42 | py | Python | src/styleaug/__init__.py | somritabanerjee/speedplusbaseline | 5913c611d8c182ad8070abcf5f1baffc554dfd90 | [
"MIT"
] | 69 | 2019-04-09T18:05:33.000Z | 2022-03-11T05:58:59.000Z | src/styleaug/__init__.py | somritabanerjee/speedplusbaseline | 5913c611d8c182ad8070abcf5f1baffc554dfd90 | [
"MIT"
] | 6 | 2019-04-01T12:04:10.000Z | 2022-01-19T11:49:13.000Z | src/styleaug/__init__.py | somritabanerjee/speedplusbaseline | 5913c611d8c182ad8070abcf5f1baffc554dfd90 | [
"MIT"
] | 13 | 2019-05-22T19:08:36.000Z | 2021-08-13T01:21:47.000Z | from .styleAugmentor import StyleAugmentor | 42 | 42 | 0.904762 |
167422ad1c22d904c1fb3127c28d48e06243100c | 2,698 | py | Python | configs/classification/imagenet/mixups/convnext/convnext_tiny_smooth_mix_8xb256_accu2_ema_fp16.py | Westlake-AI/openmixup | ea81250819e740dd823e30cb7ce382d14a3c1b91 | [
"Apache-2.0"
] | 10 | 2021-12-30T10:22:27.000Z | 2022-03-30T02:31:38.000Z | configs/classification/imagenet/mixups/convnext/convnext_tiny_smooth_mix_8xb256_accu2_ema_fp16.py | Westlake-AI/openmixup | ea81250819e740dd823e30cb7ce382d14a3c1b91 | [
"Apache-2.0"
] | 3 | 2022-01-20T21:02:48.000Z | 2022-03-19T13:49:45.000Z | configs/classification/imagenet/mixups/convnext/convnext_tiny_smooth_mix_8xb256_accu2_ema_fp16.py | Westlake-AI/openmixup | ea81250819e740dd823e30cb7ce382d14a3c1b91 | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../../../_base_/datasets/imagenet/swin_sz224_4xbs256.py',
'../../../_base_/default_runtime.py',
]
# model settings
model = dict(
type='MixUpClassification',
pretrained=None,
alpha=0.2,
mix_mode="cutmix",
mix_args=dict(
attentivemix=dict(grid_size=32, top_k=None, beta=8),... | 34.151899 | 111 | 0.640474 |
16748f009db0117be1d076ddc5a413db7e45e64c | 2,274 | py | Python | mcstasscript/interface/reader.py | PaNOSC-ViNYL/McStasScript | bd94ebc6cac290c3c9662871df40d76edbe4a44e | [
"BSD-3-Clause"
] | 3 | 2019-08-29T14:15:06.000Z | 2021-03-04T12:08:48.000Z | mcstasscript/interface/reader.py | PaNOSC-ViNYL/McStasScript | bd94ebc6cac290c3c9662871df40d76edbe4a44e | [
"BSD-3-Clause"
] | 37 | 2019-03-05T12:28:32.000Z | 2022-03-22T10:11:23.000Z | mcstasscript/interface/reader.py | PaNOSC-ViNYL/McStasScript | bd94ebc6cac290c3c9662871df40d76edbe4a44e | [
"BSD-3-Clause"
] | 6 | 2019-10-21T20:19:10.000Z | 2022-03-09T10:12:16.000Z | import os
from mcstasscript.instr_reader.control import InstrumentReader
from mcstasscript.interface.instr import McStas_instr
| 28.425 | 79 | 0.579595 |
1676599bdfdd4b081bb8bb20aa32589f69c604ef | 3,701 | py | Python | src/regrtest.py | ucsd-progsys/csolve-bak | 89cfeb5403e617f45ece4bae9f88f8e6cd7ca934 | [
"BSD-3-Clause"
] | null | null | null | src/regrtest.py | ucsd-progsys/csolve-bak | 89cfeb5403e617f45ece4bae9f88f8e6cd7ca934 | [
"BSD-3-Clause"
] | 1 | 2018-04-24T10:43:07.000Z | 2018-04-24T10:43:07.000Z | src/regrtest.py | ucsd-progsys/csolve-bak | 89cfeb5403e617f45ece4bae9f88f8e6cd7ca934 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2009 The Regents of the University of California. All rights reserved.
#
# Permission is hereby granted, without written agreement and without
# license or royalty fees, to use, copy, modify, and distribute this
# software and its documentation for any purpose, provided that the
# abov... | 38.154639 | 107 | 0.676574 |
16766ccc57f251df7ba9394a55b7eabdd7d12e46 | 2,925 | py | Python | country_capital_guesser.py | NathanMH/ComputerClub | 197585c1a77f71ee363547740d6e09f945e7526f | [
"MIT"
] | null | null | null | country_capital_guesser.py | NathanMH/ComputerClub | 197585c1a77f71ee363547740d6e09f945e7526f | [
"MIT"
] | null | null | null | country_capital_guesser.py | NathanMH/ComputerClub | 197585c1a77f71ee363547740d6e09f945e7526f | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
#######################
"""####################
Index:
1. Imports and Readme
2. Functions
3. Main
4. Testing
####################"""
#######################
###################################################################
# 1. IMPORTS AND README
#############################... | 33.62069 | 160 | 0.494017 |
1676c1cee546273be3e4746fcf8ddcdf0ca583bb | 2,288 | py | Python | data_analysis/audiocommons_ffont/scripts/rekordbox_xml_to_analysis_rhythm_rekordbox_file.py | aframires/freesound-loop-annotator | a24e0c23bfc671e41e8627150e7b9fcae5c8cb13 | [
"Apache-2.0"
] | 18 | 2020-01-22T14:58:18.000Z | 2022-02-21T12:07:51.000Z | data_analysis/audiocommons_ffont/scripts/rekordbox_xml_to_analysis_rhythm_rekordbox_file.py | aframires/freesound-loop-annotator | a24e0c23bfc671e41e8627150e7b9fcae5c8cb13 | [
"Apache-2.0"
] | 2 | 2020-02-24T13:14:05.000Z | 2020-09-21T13:34:53.000Z | data_analysis/audiocommons_ffont/scripts/rekordbox_xml_to_analysis_rhythm_rekordbox_file.py | aframires/freesound-loop-annotator | a24e0c23bfc671e41e8627150e7b9fcae5c8cb13 | [
"Apache-2.0"
] | 1 | 2020-01-22T14:55:36.000Z | 2020-01-22T14:55:36.000Z | # Need this to import from parent directory when running outside pycharm
import os
import sys
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir))
from ac_utils.general import save_to_json, load_from_json
import click
import xml.etree.ElementTree
from urllib import unquote
if __name... | 39.448276 | 119 | 0.660402 |
1676d72870f651008f4e3aca9c90ccf681a85a4a | 5,947 | py | Python | inventree/part.py | SergeoLacruz/inventree-python | 94681428f61de4ca51171e685812ebc436b9be42 | [
"MIT"
] | null | null | null | inventree/part.py | SergeoLacruz/inventree-python | 94681428f61de4ca51171e685812ebc436b9be42 | [
"MIT"
] | null | null | null | inventree/part.py | SergeoLacruz/inventree-python | 94681428f61de4ca51171e685812ebc436b9be42 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import logging
import re
import inventree.base
import inventree.stock
import inventree.company
import inventree.build
logger = logging.getLogger('inventree')
| 27.920188 | 82 | 0.626534 |
167719b0cc59eef9b7fff6f4ce109cd0d2fe8bc1 | 12,932 | py | Python | tests/test_web_urldispatcher.py | avstarkov/aiohttp | b0a03cffccf677bf316227522a9b841c15dcb869 | [
"Apache-2.0"
] | null | null | null | tests/test_web_urldispatcher.py | avstarkov/aiohttp | b0a03cffccf677bf316227522a9b841c15dcb869 | [
"Apache-2.0"
] | null | null | null | tests/test_web_urldispatcher.py | avstarkov/aiohttp | b0a03cffccf677bf316227522a9b841c15dcb869 | [
"Apache-2.0"
] | null | null | null | import functools
import os
import shutil
import tempfile
from unittest import mock
from unittest.mock import MagicMock
import pytest
from aiohttp import abc, web
from aiohttp.web_urldispatcher import SystemRoute
async def test_follow_symlink(tmp_dir_path, aiohttp_client):
"""
Tests the access to a symlink... | 27.514894 | 79 | 0.634009 |
1678ba6ffacdb3dc2a1730ee864aab5b2813d801 | 13,683 | py | Python | R-GMM-VGAE/model_citeseer.py | nairouz/R-GAE | acc7bfe36153a4c7d6f68e21a557bb4d99dab639 | [
"MIT"
] | 26 | 2021-07-18T01:31:48.000Z | 2022-03-31T03:23:11.000Z | R-GMM-VGAE/model_citeseer.py | Fawzidev/R-GAE | 80988ddf951f1723091a04b617ce4fc6d20ab9ce | [
"MIT"
] | 3 | 2021-10-01T07:24:42.000Z | 2021-11-03T14:25:55.000Z | R-GMM-VGAE/model_citeseer.py | Fawzidev/R-GAE | 80988ddf951f1723091a04b617ce4fc6d20ab9ce | [
"MIT"
] | 7 | 2021-07-18T01:47:01.000Z | 2022-01-24T21:09:10.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Authors : Nairouz Mrabah (mrabah.nairouz@courrier.uqam.ca) & Mohamed Fawzi Touati (touati.mohamed_fawzi@courrier.uqam.ca)
# @Paper : Rethinking Graph Autoencoder Models for Attributed Graph Clustering
# @License : MIT License
import torch
import numpy as np
import tor... | 46.699659 | 259 | 0.625448 |
16796b947c516147ed6529d69a08e17bbd4afe73 | 3,005 | py | Python | odoo-13.0/addons/stock_account/models/account_chart_template.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/addons/stock_account/models/account_chart_template.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/addons/stock_account/models/account_chart_template.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, models, _
import logging
_logger = logging.getLogger(__name__)
| 47.698413 | 180 | 0.577704 |
167a0dd80799c1a419238ba6164d01472b85e5d4 | 6,094 | py | Python | lib/roi_data/loader.py | BarneyQiao/pcl.pytorch | 4e0280e5e1470f705e620eda26f881d627c5016c | [
"MIT"
] | 233 | 2019-05-10T07:17:42.000Z | 2022-03-30T09:24:16.000Z | lib/roi_data/loader.py | Michael-Steven/Crack_Image_WSOD | 4e8591a7c0768cee9eb7240bb9debd54824f5b33 | [
"MIT"
] | 78 | 2019-05-10T21:10:47.000Z | 2022-03-29T13:57:32.000Z | lib/roi_data/loader.py | Michael-Steven/Crack_Image_WSOD | 4e8591a7c0768cee9eb7240bb9debd54824f5b33 | [
"MIT"
] | 57 | 2019-05-10T07:17:37.000Z | 2022-03-24T04:43:24.000Z | import math
import numpy as np
import numpy.random as npr
import torch
import torch.utils.data as data
import torch.utils.data.sampler as torch_sampler
from torch.utils.data.dataloader import default_collate
from torch._six import int_classes as _int_classes
from core.config import cfg
from roi_data.minibatch import ... | 38.56962 | 97 | 0.639317 |
167a8c5cf5187907cc0dbc578ad93057948ece69 | 28,272 | py | Python | venv/Lib/site-packages/sklearn/linear_model/tests/test_least_angle.py | andywu113/fuhe_predict | 7fd816ae83467aa659d420545cd3e25a5e933d5f | [
"MIT"
] | 3 | 2019-06-05T12:11:20.000Z | 2022-01-17T13:53:06.000Z | venv/Lib/site-packages/sklearn/linear_model/tests/test_least_angle.py | kevinten10/Clothing-Classification | 9aac6e339651137179f4e4da36fe7743cf4bdca4 | [
"MIT"
] | 3 | 2021-06-08T20:58:27.000Z | 2022-03-12T00:16:49.000Z | venv/Lib/site-packages/sklearn/linear_model/tests/test_least_angle.py | kevinten10/Clothing-Classification | 9aac6e339651137179f4e4da36fe7743cf4bdca4 | [
"MIT"
] | 1 | 2019-02-11T22:36:12.000Z | 2019-02-11T22:36:12.000Z | import warnings
from distutils.version import LooseVersion
import numpy as np
import pytest
from scipy import linalg
from sklearn.model_selection import train_test_split
from sklearn.utils.testing import assert_allclose
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.testing import ass... | 38.360923 | 79 | 0.616051 |
167b4e3bb5a00625d3f0b289e41e2bc170fabc61 | 3,128 | py | Python | parser.py | FeroxTL/pynginxconfig-new | 71cb78c635930b0a764d3274646d436e8d2f1c4d | [
"MIT"
] | 8 | 2016-03-25T04:22:39.000Z | 2022-02-12T21:46:47.000Z | parser.py | Winnerer/pynginxconfig | 71cb78c635930b0a764d3274646d436e8d2f1c4d | [
"MIT"
] | null | null | null | parser.py | Winnerer/pynginxconfig | 71cb78c635930b0a764d3274646d436e8d2f1c4d | [
"MIT"
] | 3 | 2019-01-26T15:54:54.000Z | 2022-02-12T21:46:47.000Z | #coding: utf8
import copy
import re
from blocks import Block, EmptyBlock, KeyValueOption, Comment, Location
qwe = EmptyBlock()
parse("""#{ asd #qweqeqwe{}
servername qweqweqweqweqwe; # comment {lalalal} #1
server {
listen
8080
tls;
root /data/up1;
location / {
l200;
}
lo... | 24.825397 | 113 | 0.545716 |
167b69684843eed85973a69dafe6205fbdff9406 | 845 | py | Python | cocos2d/tools/jenkins-scripts/configs/cocos-2dx-develop-win32.py | triompha/EarthWarrior3D | d68a347902fa1ca1282df198860f5fb95f326797 | [
"MIT"
] | null | null | null | cocos2d/tools/jenkins-scripts/configs/cocos-2dx-develop-win32.py | triompha/EarthWarrior3D | d68a347902fa1ca1282df198860f5fb95f326797 | [
"MIT"
] | null | null | null | cocos2d/tools/jenkins-scripts/configs/cocos-2dx-develop-win32.py | triompha/EarthWarrior3D | d68a347902fa1ca1282df198860f5fb95f326797 | [
"MIT"
] | null | null | null | import os
import subprocess
import sys
print 'Build Config:'
print ' Host:win7 x86'
print ' Branch:develop'
print ' Target:win32'
print ' "%VS110COMNTOOLS%..\IDE\devenv.com" "build\cocos2d-win32.vc2012.sln" /Build "Debug|Win32"'
if(os.path.exists('build/cocos2d-win32.vc2012.sln') == False):
node_... | 33.8 | 127 | 0.668639 |
167cfaccf65c4a217ee921178f5ab5094fc6d8a6 | 241 | py | Python | iris_sdk/models/data/ord/rate_center_search_order.py | NumberAI/python-bandwidth-iris | 0e05f79d68b244812afb97e00fd65b3f46d00aa3 | [
"MIT"
] | 2 | 2020-04-13T13:47:59.000Z | 2022-02-23T20:32:41.000Z | iris_sdk/models/data/ord/rate_center_search_order.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2020-09-18T20:59:24.000Z | 2021-08-25T16:51:42.000Z | iris_sdk/models/data/ord/rate_center_search_order.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2018-12-12T14:39:50.000Z | 2020-11-17T21:42:29.000Z | #!/usr/bin/env python
from iris_sdk.models.base_resource import BaseData
from iris_sdk.models.maps.ord.rate_center_search_order import \
RateCenterSearchOrderMap | 30.125 | 64 | 0.834025 |
167df72d7c85276ff20ea4552c3c38a522dba306 | 7,024 | py | Python | optimizer.py | thanusha22/CEC-1 | 02ad9247b006a348cc871a5714cf5abfa4a516af | [
"MIT"
] | null | null | null | optimizer.py | thanusha22/CEC-1 | 02ad9247b006a348cc871a5714cf5abfa4a516af | [
"MIT"
] | null | null | null | optimizer.py | thanusha22/CEC-1 | 02ad9247b006a348cc871a5714cf5abfa4a516af | [
"MIT"
] | null | null | null |
from pathlib import Path
import optimizers.PSO as pso
import optimizers.MVO as mvo
import optimizers.GWO as gwo
import optimizers.MFO as mfo
import optimizers.CS as cs
import optimizers.BAT as bat
import optimizers.WOA as woa
import optimizers.FFA as ffa
import optimizers.SSA as ssa
import optimizers.GA as ga
import o... | 38.173913 | 111 | 0.58955 |
167e133f17b315eee99f736bb553b46a271cd9cc | 1,614 | py | Python | tests/fields/test_primitive_types.py | slawak/dataclasses-avroschema | 04e69a176b3e72bfa0acd3edbd044ecd161b1a68 | [
"MIT"
] | null | null | null | tests/fields/test_primitive_types.py | slawak/dataclasses-avroschema | 04e69a176b3e72bfa0acd3edbd044ecd161b1a68 | [
"MIT"
] | null | null | null | tests/fields/test_primitive_types.py | slawak/dataclasses-avroschema | 04e69a176b3e72bfa0acd3edbd044ecd161b1a68 | [
"MIT"
] | null | null | null | import dataclasses
import pytest
from dataclasses_avroschema import fields
from . import consts
| 34.340426 | 87 | 0.76456 |