hexsha stringlengths 40 40 | size int64 24 287k | ext stringclasses 2
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 7 126 | max_stars_repo_name stringlengths 8 97 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 6 | max_stars_count float64 1 15.9k ⌀ | 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 7 126 | max_issues_repo_name stringlengths 8 97 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 7 | max_issues_count float64 1 14.6k ⌀ | 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 7 126 | max_forks_repo_name stringlengths 8 97 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 7 | max_forks_count float64 1 8.43k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 24 287k | avg_line_length float64 12.3 530 | max_line_length int64 24 10.2k | alphanum_fraction float64 0.41 0.88 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4f49aa977ab9bbd0f8065ca2b090584768f9022c | 1,736 | py | Python | color/color2.py | nebiutadele/2022-02-28-Alta3-Python | 9c065540bfdf432103bfffac6eae4972c9f9061a | [
"MIT"
] | null | null | null | color/color2.py | nebiutadele/2022-02-28-Alta3-Python | 9c065540bfdf432103bfffac6eae4972c9f9061a | [
"MIT"
] | null | null | null | color/color2.py | nebiutadele/2022-02-28-Alta3-Python | 9c065540bfdf432103bfffac6eae4972c9f9061a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Alta3 Research || Author RZFeeser@alta3.com
Learning how to use functions"""
## Installs the crayons package.
## python3 -m pip install crayons
## import statements ALWAYS go up top
import crayons
def main():
"""run time code. Always indent under function"""
# print 'red string' in... | 34.039216 | 118 | 0.68894 |
4f4aa9f6cde34245c22f658c223f7f879a4f102e | 30,096 | py | Python | src/paql/package_query.py | mattfeel/Scalable-PaQL-Queries | 993733f6d8afb607e2789d7b5ffb6535e0b5c8ce | [
"MIT"
] | 6 | 2016-10-04T05:35:24.000Z | 2020-11-12T09:31:42.000Z | src/paql/package_query.py | matteo-brucato/Scalable-PaQL-Queries | 993733f6d8afb607e2789d7b5ffb6535e0b5c8ce | [
"MIT"
] | null | null | null | src/paql/package_query.py | matteo-brucato/Scalable-PaQL-Queries | 993733f6d8afb607e2789d7b5ffb6535e0b5c8ce | [
"MIT"
] | 3 | 2017-08-02T23:55:23.000Z | 2020-05-17T19:46:04.000Z | import gc
import hashlib
import itertools
import logging
import math
import sys
import traceback
from logging import warning, debug
import numpy as np
from pulp import LpProblem, LpMinimize, LpVariable, LpInteger, CPLEX, LpStatus
from src.dbms.utils import sql_get_all_attributes, sql_table_column_data_type
from src.p... | 41.283951 | 120 | 0.554326 |
4f4a97e35757ebe49c3484c56a9ee824088c0411 | 116,081 | py | Python | plotting.py | jfoley-yw/scrabble | 049a69572138b06341af163ec69e18a1eb20b737 | [
"MIT"
] | 1 | 2021-04-01T14:24:17.000Z | 2021-04-01T14:24:17.000Z | plotting.py | jfoley-yw/scrabble | 049a69572138b06341af163ec69e18a1eb20b737 | [
"MIT"
] | 3 | 2021-04-05T01:09:16.000Z | 2021-04-19T20:19:30.000Z | plotting.py | jfoley-yw/scrabble | 049a69572138b06341af163ec69e18a1eb20b737 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
import statistics
# Scores for ABPruning Depth 2 on rack size 5
# nodes = [5, 101, 56, 64, 100, 71, 135, 55, 39, 14, 85, 12, 21, 48, 17, 21, 64, 214, 93, 9, 14, 6, 16, 12, 42, 17, 25, 117, 35, 37, 35, 89, 6, 70, 22, 80, 16, 64, 70, 51, 21, 39, 46... | 530.050228 | 10,170 | 0.711874 |
4f4aaad52aa59474e76d982060300703501fbd44 | 160 | py | Python | core/bodyparts/__init__.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | 3 | 2017-10-28T11:28:38.000Z | 2018-09-12T09:47:00.000Z | core/bodyparts/__init__.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | core/bodyparts/__init__.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | from core.bodyparts.base import (
Torso, Teeth, Tail, Nose, Neck,
Muzzle, Mouth, Heart, Lungs, Head, Hand, Foot, Fangs, Eye,
Ear, Arm, Brain, Leg
)
| 26.666667 | 62 | 0.65 |
4f4a24ec2ae4972532fb3b29c2aaddff0748d2ea | 719 | py | Python | destinator/util/listener.py | PJUllrich/distributed-systems | b362c1c6783fbd1659448277aab6c158485d7c3c | [
"MIT"
] | null | null | null | destinator/util/listener.py | PJUllrich/distributed-systems | b362c1c6783fbd1659448277aab6c158485d7c3c | [
"MIT"
] | null | null | null | destinator/util/listener.py | PJUllrich/distributed-systems | b362c1c6783fbd1659448277aab6c158485d7c3c | [
"MIT"
] | null | null | null | import logging
import threading
MESSAGE_SIZE = 1024
logger = logging.getLogger(__name__)
class Listener(threading.Thread):
def __init__(self, sock, queue):
super().__init__()
self.daemon = True
self.cancelled = False
self.sock = sock
self.queue = queue
def run(self)... | 23.966667 | 75 | 0.600834 |
4f4c168083a04a814702809e1d88fdaa878b4426 | 2,212 | py | Python | tests/helpers/__init__.py | Aetf/cc-modern-cmake | 4421755acf85a30a42f3f48b6d2e1a5130fd3f46 | [
"BSD-2-Clause"
] | null | null | null | tests/helpers/__init__.py | Aetf/cc-modern-cmake | 4421755acf85a30a42f3f48b6d2e1a5130fd3f46 | [
"BSD-2-Clause"
] | 3 | 2021-03-29T18:28:19.000Z | 2021-03-29T18:28:20.000Z | tests/helpers/__init__.py | Aetf/cc-modern-cmake | 4421755acf85a30a42f3f48b6d2e1a5130fd3f46 | [
"BSD-2-Clause"
] | null | null | null | from __future__ import print_function, division, absolute_import
from contextlib import contextmanager
import os
import difflib
import pytest
try:
from pathlib import Path
except ImportError:
from pathlib2 import Path
@contextmanager
def inside_dir(dirpath):
"""
Execute code from inside the given di... | 26.97561 | 88 | 0.633816 |
4f4b54754cf61f654d775bce346bcefeea43bb24 | 4,718 | py | Python | solutions/rank-5/predict_code/predict_model.py | mattmotoki/ashrae-great-energy-predictor-3-solution-analysis | 8a5260049d4537c57c37a78e77f2fba13c55177d | [
"MIT"
] | 48 | 2020-03-18T11:34:49.000Z | 2022-03-31T18:30:00.000Z | solutions/rank-5/predict_code/predict_model.py | mattmotoki/ashrae-great-energy-predictor-3-solution-analysis | 8a5260049d4537c57c37a78e77f2fba13c55177d | [
"MIT"
] | 40 | 2020-03-24T18:17:51.000Z | 2022-03-12T00:30:30.000Z | solutions/rank-5/predict_code/predict_model.py | mattmotoki/ashrae-great-energy-predictor-3-solution-analysis | 8a5260049d4537c57c37a78e77f2fba13c55177d | [
"MIT"
] | 24 | 2020-04-18T02:52:47.000Z | 2022-01-22T19:13:16.000Z | #!/usr/bin/env python
# coding: utf-8
import numpy as np
import pandas as pd
import _pickle as cPickle
import argparse
from copy import deepcopy
import japanize_matplotlib
import lightgbm as lgb
import matplotlib.pyplot as plt
import pickle
from sklearn.metrics import mean_squared_error
import time
from tqdm import ... | 37.444444 | 256 | 0.701357 |
4f4bdab7e7c433d49e00c470d188df5e8e4d786e | 357 | py | Python | app/api/v2/models/rsvp.py | jmusila/Questioner-v2 | 54110d8233311862ccfadb32b5ced557c33c4a0f | [
"MIT"
] | 1 | 2019-02-13T10:02:16.000Z | 2019-02-13T10:02:16.000Z | app/api/v2/models/rsvp.py | jmusila/Questioner-v2 | 54110d8233311862ccfadb32b5ced557c33c4a0f | [
"MIT"
] | 6 | 2019-01-21T19:18:14.000Z | 2019-01-24T19:46:40.000Z | app/api/v2/models/rsvp.py | jmusila/Questioner-v2 | 54110d8233311862ccfadb32b5ced557c33c4a0f | [
"MIT"
] | null | null | null | from datetime import datetime
class Responds:
""" Respond constructor """
def __init__(self, r_id, meetup_id, topic, status):
self.r_id = r_id
self.meetup_id = meetup_id
self.topic = topic
self.status = status
""" Method for getting single comment """
def get_single_... | 21 | 55 | 0.62465 |
4f4a004a9be01e0c89f6305d96270831fd4b2262 | 18,040 | py | Python | scf/uhf_symm.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | scf/uhf_symm.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | scf/uhf_symm.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
import time
from functools import reduce
import numpy
import scipy.linalg
from pyscf import lib
from pyscf import symm
from pyscf.lib import logger
from pyscf.scf import hf
from pyscf.scf import hf_symm
from pyscf.scf import uhf
from pyscf.scf impor... | 40.907029 | 113 | 0.542295 |
4f4a37537510da8d441ad30b15f70773fd2c8364 | 3,612 | py | Python | hatasmota/fan.py | emontnemery/hatasmota | c1d1629ee2e88d027741a474c9648de8d67ba817 | [
"MIT"
] | 19 | 2020-09-03T19:12:43.000Z | 2022-01-01T07:50:32.000Z | hatasmota/fan.py | emontnemery/hatasmota | c1d1629ee2e88d027741a474c9648de8d67ba817 | [
"MIT"
] | 41 | 2020-10-08T20:35:58.000Z | 2022-03-30T00:02:57.000Z | hatasmota/fan.py | emontnemery/hatasmota | c1d1629ee2e88d027741a474c9648de8d67ba817 | [
"MIT"
] | 11 | 2020-10-27T21:22:14.000Z | 2022-01-06T11:19:55.000Z | """Tasmota fan."""
from __future__ import annotations
import logging
from typing import Any
import attr
from .const import (
COMMAND_FANSPEED,
CONF_DEVICENAME,
CONF_MAC,
FAN_SPEED_HIGH,
FAN_SPEED_LOW,
FAN_SPEED_MEDIUM,
FAN_SPEED_OFF,
)
from .entity import (
TasmotaAvailability,
Ta... | 29.606557 | 87 | 0.637874 |
4f4b2b222baf4299a6b0082bb48f1904faeb627e | 181,816 | py | Python | NBA Project/venv/Lib/site-packages/plotly/graph_objs/scatter3d/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 1 | 2020-08-08T21:56:11.000Z | 2020-08-08T21:56:11.000Z | NBA Project/venv/Lib/site-packages/plotly/graph_objs/scatter3d/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 2 | 2021-03-31T19:54:17.000Z | 2021-06-02T02:33:56.000Z | NBA Project/venv/Lib/site-packages/plotly/graph_objs/scatter3d/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Textfont(_BaseTraceHierarchyType):
# color
# -----
@property
def color(self):
"""
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0... | 36.406888 | 87 | 0.556442 |
4f49d6efff3b5cee84e7ecd9219bb654ee2406ab | 1,202 | py | Python | src/visions/visualisation/plot_circular_packing.py | ieaves/tenzing | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | [
"MIT"
] | null | null | null | src/visions/visualisation/plot_circular_packing.py | ieaves/tenzing | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | [
"MIT"
] | null | null | null | src/visions/visualisation/plot_circular_packing.py | ieaves/tenzing | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | [
"MIT"
] | null | null | null | import json
import re
from pathlib import Path
import networkx as nx
from networkx.readwrite import json_graph
from visions.core.implementations.typesets import visions_complete_set
def update(data):
data["name"] = data.pop("id")
if "children" not in data:
data["size"] = 1
else:
data["ch... | 22.259259 | 73 | 0.648087 |
4f49c3d081e63f390fbd919d518203ec78ef6c39 | 142 | py | Python | src/world/world_listener.py | vt-sailbot/sailbot-19 | a9252e9415d3fef62e4baf813306bdc07fb69781 | [
"MIT"
] | 1 | 2019-05-29T19:32:48.000Z | 2019-05-29T19:32:48.000Z | src/world/world_listener.py | vt-sailbot/sailbot-20 | b5d75cb82e4bc3e9c4e428a288c6ac98a4aa2c52 | [
"MIT"
] | 5 | 2019-08-25T21:01:18.000Z | 2020-09-04T02:56:40.000Z | src/world/world_listener.py | vt-sailbot/sailbot-20 | b5d75cb82e4bc3e9c4e428a288c6ac98a4aa2c52 | [
"MIT"
] | null | null | null | from threading import Thread
"""Listens for asynchronous sensor data and creates new World states"""
class WorldListener(Thread):
pass
| 17.75 | 71 | 0.767606 |
4f4d2058ef6ed1b434831351c0c126a4fc18e829 | 2,923 | py | Python | tests/unit/testplan/testing/multitest/driver/test_http.py | armarti/testplan | 5dcfe5840c0c99e9535cc223230f400fa62802f2 | [
"Apache-2.0"
] | null | null | null | tests/unit/testplan/testing/multitest/driver/test_http.py | armarti/testplan | 5dcfe5840c0c99e9535cc223230f400fa62802f2 | [
"Apache-2.0"
] | 64 | 2019-04-15T20:56:40.000Z | 2021-03-23T01:00:30.000Z | tests/unit/testplan/testing/multitest/driver/test_http.py | armarti/testplan | 5dcfe5840c0c99e9535cc223230f400fa62802f2 | [
"Apache-2.0"
] | null | null | null | """Unit tests for the HTTPServer and HTTPClient drivers."""
import uuid
import time
import requests
import pytest
from testplan.testing.multitest.driver.http import HTTPServer, HTTPResponse, HTTPClient
def create_server(name, host, port):
server = HTTPServer(name=name,
host=host,
... | 27.838095 | 87 | 0.583989 |
4f49da3fda428bc7b5ff13ea5b9c08a4557abdf0 | 780 | py | Python | Chapter05/mobilenet_keras.py | Wenhan-Zhang-327/hands-on-deep-learning-code | 61ae6aea8618093c7abf44c2fe00b3d1e6e2d3c8 | [
"MIT"
] | 18 | 2019-05-19T03:18:39.000Z | 2022-01-30T16:40:20.000Z | Chapter05/mobilenet_keras.py | Wenhan-Zhang-327/hands-on-deep-learning-code | 61ae6aea8618093c7abf44c2fe00b3d1e6e2d3c8 | [
"MIT"
] | null | null | null | Chapter05/mobilenet_keras.py | Wenhan-Zhang-327/hands-on-deep-learning-code | 61ae6aea8618093c7abf44c2fe00b3d1e6e2d3c8 | [
"MIT"
] | 9 | 2019-08-10T06:49:33.000Z | 2022-02-19T13:21:55.000Z | # MobileNEt
import keras
from keras.preprocessing import image
from keras.applications import imagenet_utils
from keras.applications.mobilenet import preprocess_input
from keras.models import Model
import numpy as np
import argparse
import matplotlib.pyplot as plt
model = keras.applications.mobilenet.MobileNet(wei... | 23.636364 | 72 | 0.784615 |
4f4d742e55cbc44ec6a8cbd370757f185e7e22a5 | 19,503 | py | Python | tests/functional/coercers/test_coercer_list_with_default_non_null_int_field.py | davestone/tartiflette | 7aa91f77852455c214413de6b0384102dfbb9b47 | [
"MIT"
] | 530 | 2019-06-04T11:45:36.000Z | 2022-03-31T09:29:56.000Z | tests/functional/coercers/test_coercer_list_with_default_non_null_int_field.py | davestone/tartiflette | 7aa91f77852455c214413de6b0384102dfbb9b47 | [
"MIT"
] | 242 | 2019-06-04T11:53:08.000Z | 2022-03-28T07:06:27.000Z | tests/functional/coercers/test_coercer_list_with_default_non_null_int_field.py | mkniewallner/tartiflette | e292c28ed4fa279ecedb8980fc3741965bd28c87 | [
"MIT"
] | 36 | 2019-06-21T06:40:27.000Z | 2021-11-04T13:11:16.000Z | import pytest
from tests.functional.coercers.common import resolve_list_field
@pytest.mark.asyncio
@pytest.mark.ttftt_engine(
name="coercion",
resolvers={"Query.listWithDefaultNonNullIntField": resolve_list_field},
)
@pytest.mark.parametrize(
"query,variables,expected",
[
(
"""que... | 39.559838 | 155 | 0.409783 |
4f4cd28ef2e3c3f7a7abb5edebe11be92260b98e | 8,272 | py | Python | development/OCCUtils/types_lut.py | atomicsulfate/meshcnn-4-cadseg | c0d91ec593293cb58eec422556d1322a3b4f6183 | [
"MIT"
] | 7 | 2021-04-07T06:31:58.000Z | 2022-01-27T09:49:51.000Z | development/OCCUtils/types_lut.py | atomicsulfate/meshcnn-4-cadseg | c0d91ec593293cb58eec422556d1322a3b4f6183 | [
"MIT"
] | null | null | null | development/OCCUtils/types_lut.py | atomicsulfate/meshcnn-4-cadseg | c0d91ec593293cb58eec422556d1322a3b4f6183 | [
"MIT"
] | 2 | 2021-05-19T03:39:04.000Z | 2021-08-12T08:20:19.000Z | ##Copyright 2008-2015 Jelle Feringa (jelleferinga@gmail.com)
##
##This file is part of pythonOCC.
##
##pythonOCC is free software: you can redistribute it and/or modify
##it under the terms of the GNU Lesser General Public License as published by
##the Free Software Foundation, either version 3 of the License, or
##(at... | 39.961353 | 79 | 0.684478 |
4f4ab8bb262815afd6a15272a76699efa066e554 | 3,032 | py | Python | rescene/unrar.py | zordtk/pyReScene | fe20ee6c72dcbd62e92d53678016321705795871 | [
"MIT"
] | 18 | 2020-08-09T02:17:46.000Z | 2022-02-18T09:17:25.000Z | rescene/unrar.py | EchterAgo/pyrescene | 78e9c0c880b1ba89a85772765cdac78d0ce93f79 | [
"MIT"
] | 1 | 2021-11-23T21:13:37.000Z | 2021-11-23T21:13:37.000Z | rescene/unrar.py | EchterAgo/pyrescene | 78e9c0c880b1ba89a85772765cdac78d0ce93f79 | [
"MIT"
] | 9 | 2020-10-15T11:02:49.000Z | 2022-03-15T10:36:14.000Z | #!/usr/bin/env python
# encoding: utf-8
# Copyright (c) 2013 pyReScene
#
# 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... | 30.938776 | 67 | 0.689974 |
4f49eb70c4fc7e6fa544959c85d13254dabdc9a1 | 12,476 | py | Python | world/fashion/tests.py | PWBaboons/Ithir | 3a65ab1e866b10ffd568f6b15a66576e1853f47d | [
"MIT"
] | null | null | null | world/fashion/tests.py | PWBaboons/Ithir | 3a65ab1e866b10ffd568f6b15a66576e1853f47d | [
"MIT"
] | null | null | null | world/fashion/tests.py | PWBaboons/Ithir | 3a65ab1e866b10ffd568f6b15a66576e1853f47d | [
"MIT"
] | 1 | 2018-09-12T02:06:04.000Z | 2018-09-12T02:06:04.000Z | # -*- coding: utf-8 -*-
"""
Tests for fashion app
"""
from __future__ import unicode_literals
from server.utils.test_utils import ArxCommandTest, TestEquipmentMixins
from world.fashion import fashion_commands
from mock import patch, Mock
class FashionCommandTests(TestEquipmentMixins, ArxCommandTest):
@patch('wor... | 68.549451 | 116 | 0.591456 |
4f4b03b00235c92be3168128aa9908837705e19e | 246 | py | Python | uqcsbot/scripts/echo.py | BlueDragon23/uqcsbot | 3bfa23bfc331257ae3e12dd15e9c3dfb0ac56150 | [
"MIT"
] | 38 | 2017-04-13T01:15:05.000Z | 2021-07-25T08:22:20.000Z | uqcsbot/scripts/echo.py | BlueDragon23/uqcsbot | 3bfa23bfc331257ae3e12dd15e9c3dfb0ac56150 | [
"MIT"
] | 302 | 2017-04-13T01:20:26.000Z | 2021-04-06T07:08:29.000Z | uqcsbot/scripts/echo.py | BlueDragon23/uqcsbot | 3bfa23bfc331257ae3e12dd15e9c3dfb0ac56150 | [
"MIT"
] | 54 | 2017-05-04T23:18:29.000Z | 2021-04-07T17:57:16.000Z | from uqcsbot import bot, Command
@bot.on_command("echo")
def handle_echo(command: Command):
"""
`!echo [TEXT]` - Echos back the given text.
"""
bot.post_message(command.channel_id, command.arg if command.has_arg() else 'ECHO!')
| 24.6 | 87 | 0.678862 |
4f4b769b8e269d551181c0b9aa28e82feb33ec2f | 5,360 | py | Python | network_simulator/test/testUserNumber.py | brokenax3/network-simulator-py | 8ce238219010046aaf1063d546b4b7232a38d2fa | [
"MIT"
] | null | null | null | network_simulator/test/testUserNumber.py | brokenax3/network-simulator-py | 8ce238219010046aaf1063d546b4b7232a38d2fa | [
"MIT"
] | null | null | null | network_simulator/test/testUserNumber.py | brokenax3/network-simulator-py | 8ce238219010046aaf1063d546b4b7232a38d2fa | [
"MIT"
] | null | null | null | from bokeh.plotting import figure, show, output_file
from bokeh.palettes import Category20 as palette
import itertools
import tqdm
import numpy as np
from network_simulator.components import Location
from network_simulator.components import User
from network_simulator.components import simulator
from network_simulator.... | 31.715976 | 166 | 0.556903 |
4f4c189f90e64e08673a05ecca8a85e020e60b71 | 6,446 | py | Python | test/test_program_test.py | osarood/Testify | 9005a8866cbf099c26e6fbd74c3e2640a581a55b | [
"Apache-2.0"
] | 1 | 2020-08-11T09:52:12.000Z | 2020-08-11T09:52:12.000Z | test/test_program_test.py | osarood/Testify | 9005a8866cbf099c26e6fbd74c3e2640a581a55b | [
"Apache-2.0"
] | null | null | null | test/test_program_test.py | osarood/Testify | 9005a8866cbf099c26e6fbd74c3e2640a581a55b | [
"Apache-2.0"
] | null | null | null | import os
import subprocess
import mock
from testify import setup_teardown, TestCase, test_program
from testify.assertions import assert_equal, assert_raises, assert_in
from optparse import OptionParser
class OptionParserErrorException(Exception):
pass
class ParseTestRunnerCommandLineArgsTest(TestCase):
@s... | 41.057325 | 149 | 0.656997 |
4f4a8ab3e5659f4211afdeb605d1cb2dce9cc4e7 | 743 | py | Python | CHAPTER 14 (graph algorithm)/nested_edge_class.py | ahammadshawki8/Data-Structures-Algorithms-in-Python- | fc18b54128cd5bc7639a14999d8f990190b524eb | [
"MIT"
] | null | null | null | CHAPTER 14 (graph algorithm)/nested_edge_class.py | ahammadshawki8/Data-Structures-Algorithms-in-Python- | fc18b54128cd5bc7639a14999d8f990190b524eb | [
"MIT"
] | null | null | null | CHAPTER 14 (graph algorithm)/nested_edge_class.py | ahammadshawki8/Data-Structures-Algorithms-in-Python- | fc18b54128cd5bc7639a14999d8f990190b524eb | [
"MIT"
] | null | null | null | class Edge:
"""Lightweight edge structure for a graph."""
__slots__ = "_origin","_destination","_element"
def __init__(self, u, v, x):
"""Do not call constructor directly. Use Graph's insert_edge(u,v,x)."""
self._origin = u
self._destination = v
self._element = x
def endpoints(self):
"""Return (u,v) tup... | 29.72 | 73 | 0.701211 |
4f4d214f20c9e5a584a29f76674e2cbfdb2c54e7 | 1,267 | py | Python | backend/jupyterlab_commenting_service_server/service.py | kgryte/jupyterlab-commenting | cbf3b1eacb42fde54ef0b095f218de7172dcddca | [
"BSD-3-Clause"
] | 99 | 2019-01-11T02:49:52.000Z | 2022-03-19T02:42:44.000Z | backend/jupyterlab_commenting_service_server/service.py | kgryte/jupyterlab-commenting | cbf3b1eacb42fde54ef0b095f218de7172dcddca | [
"BSD-3-Clause"
] | 43 | 2019-01-04T01:56:07.000Z | 2021-03-01T11:03:08.000Z | backend/jupyterlab_commenting_service_server/service.py | kgryte/jupyterlab-commenting | cbf3b1eacb42fde54ef0b095f218de7172dcddca | [
"BSD-3-Clause"
] | 25 | 2019-01-09T22:02:43.000Z | 2021-09-25T04:26:27.000Z | # @license BSD-3-Clause
#
# Copyright (c) 2019 Project Jupyter Contributors.
# Distributed under the terms of the 3-Clause BSD License.
"""Jupyterlab Commenting Service Server"""
import os
def start():
"""
Start Jupyterlab Commenting Service Server Start
Returns:
dict -- A dictionary with the co... | 21.844828 | 84 | 0.50513 |
4f4bd465305098d4e546ba9a79f507fd64928cb2 | 7,834 | py | Python | tests/test_tagset.py | ericyd/inclusion-py | c891db8590dcf194b6e34c7055f9b19bb5a385ca | [
"MIT"
] | null | null | null | tests/test_tagset.py | ericyd/inclusion-py | c891db8590dcf194b6e34c7055f9b19bb5a385ca | [
"MIT"
] | null | null | null | tests/test_tagset.py | ericyd/inclusion-py | c891db8590dcf194b6e34c7055f9b19bb5a385ca | [
"MIT"
] | null | null | null | import unittest
from datatag import TagSet
from datatag.exceptions import TagNotUnique, ArgumentNotCallable, DataNotIterable, UndefinedTag, NonBooleanQueryValue
from datatag.tag_definition import TagDefinition
class TestDefineTag(unittest.TestCase):
def setUp(self):
self.ts = TagSet()
def test_duplica... | 41.015707 | 118 | 0.656114 |
4f4eb25eae7e35aeaee4f6f9eb65b79078a7c8fc | 57,046 | py | Python | IOHMM/linear_models.py | mbc96325/IOHMM-for-individual-mobility-prediction | b2d346a12b902581641a0afa8e694ee8ef158195 | [
"MIT"
] | 1 | 2021-09-02T14:16:14.000Z | 2021-09-02T14:16:14.000Z | IOHMM/linear_models.py | mbc96325/IOHMM-for-individual-mobility-prediction | b2d346a12b902581641a0afa8e694ee8ef158195 | [
"MIT"
] | null | null | null | IOHMM/linear_models.py | mbc96325/IOHMM-for-individual-mobility-prediction | b2d346a12b902581641a0afa8e694ee8ef158195 | [
"MIT"
] | 1 | 2021-09-20T02:59:47.000Z | 2021-09-20T02:59:47.000Z | '''
This is a unified interface/wrapper of general/generalized linear models from
sklearn/statsmodels packages.
Problems with sklearn:
1. No Generalized linear models available.
2. Does not estimate standard error of coefficients.
3. Logistic regression does not handle 1 class case.
4. For 2 class logistic regression,... | 40.834646 | 100 | 0.601444 |
4f4e9b4ac10a6f1a772ea5762913a17d91017f6b | 413 | py | Python | chatrooms/apps/chats/pagination.py | EliasCampos/chatrooms_py | 9e1abaf5887293e1df6f0b91eb0f9587e8d405fc | [
"MIT"
] | null | null | null | chatrooms/apps/chats/pagination.py | EliasCampos/chatrooms_py | 9e1abaf5887293e1df6f0b91eb0f9587e8d405fc | [
"MIT"
] | null | null | null | chatrooms/apps/chats/pagination.py | EliasCampos/chatrooms_py | 9e1abaf5887293e1df6f0b91eb0f9587e8d405fc | [
"MIT"
] | null | null | null | from typing import List
from chatrooms.apps.common.pagination import PageNumberPagination
from chatrooms.apps.chats.schemas import ChatDetail, ChatOwn, ChatMessageDetail
class ChatPagination(PageNumberPagination):
results: List[ChatDetail]
class ChatOwnPagination(PageNumberPagination):
results: List[ChatOw... | 24.294118 | 79 | 0.828087 |
4f4a818a9f5f9959ad78acf5db0f5b53259306ab | 1,052 | py | Python | Geometry/HGCalCommonData/test/python/dumpHGCalGeometryDD4Hep_cfg.py | AlexDroll/cmssw | ef485116d14d07f9c9e591c01b4597c1c9a967cb | [
"Apache-2.0"
] | 6 | 2017-09-08T14:12:56.000Z | 2022-03-09T23:57:01.000Z | Geometry/HGCalCommonData/test/python/dumpHGCalGeometryDD4Hep_cfg.py | AlexDroll/cmssw | ef485116d14d07f9c9e591c01b4597c1c9a967cb | [
"Apache-2.0"
] | 545 | 2017-09-19T17:10:19.000Z | 2022-03-07T16:55:27.000Z | Geometry/HGCalCommonData/test/python/dumpHGCalGeometryDD4Hep_cfg.py | AlexDroll/cmssw | ef485116d14d07f9c9e591c01b4597c1c9a967cb | [
"Apache-2.0"
] | 14 | 2017-10-04T09:47:21.000Z | 2019-10-23T18:04:45.000Z | import FWCore.ParameterSet.Config as cms
process = cms.Process("DDHGCalTBModuleXTest")
process.load('FWCore.MessageService.MessageLogger_cfi')
process.source = cms.Source("EmptySource")
process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(1)
)
process.MessageLogger.cerr.FwkReport.reportEvery =... | 40.461538 | 135 | 0.612167 |
4f4ec1f3ecca56f14724e079707b455f3d7340bf | 764 | py | Python | plugins/ok.py | ItzSjDude/PikaBotPlugins | 6b468a43caefbea5b8f3cd2c1ca83790380e1f5b | [
"Apache-2.0"
] | 1 | 2020-10-29T15:44:57.000Z | 2020-10-29T15:44:57.000Z | plugins/ok.py | ItzSjDude/PikaBotPlugins | 6b468a43caefbea5b8f3cd2c1ca83790380e1f5b | [
"Apache-2.0"
] | null | null | null | plugins/ok.py | ItzSjDude/PikaBotPlugins | 6b468a43caefbea5b8f3cd2c1ca83790380e1f5b | [
"Apache-2.0"
] | 4 | 2020-10-28T09:02:35.000Z | 2020-12-27T22:45:57.000Z | """Emoji
Available Commands:
.ok"""
import asyncio
from pikabot.utils import ItzSjDude
@ItzSjDude(outgoing=True, pattern="ok")
async def _(event):
if event.fwd_from:
return
animation_interval = 0.1
animation_ttl = range(0, 36)
await event.edit("ok")
animation_chars = [
"OK",
... | 16.977778 | 49 | 0.502618 |
4f4e5d2f6099d8086f63842cb745aa6b06478611 | 1,655 | py | Python | tflite/ReverseSequenceOptions.py | szha/tensorflow-onnx | 25f8b0c78074784fcc33c1d068911f8363581e6c | [
"MIT"
] | 193 | 2017-12-20T16:46:20.000Z | 2022-03-29T07:40:54.000Z | tflite/ReverseSequenceOptions.py | szha/tensorflow-onnx | 25f8b0c78074784fcc33c1d068911f8363581e6c | [
"MIT"
] | 141 | 2017-12-21T08:00:20.000Z | 2021-06-15T14:53:03.000Z | tflite/ReverseSequenceOptions.py | szha/tensorflow-onnx | 25f8b0c78074784fcc33c1d068911f8363581e6c | [
"MIT"
] | 55 | 2017-12-22T18:40:13.000Z | 2022-01-17T05:43:51.000Z | # automatically generated by the FlatBuffers compiler, do not modify
# namespace: tflite
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class ReverseSequenceOptions(object):
__slots__ = ['_tab']
@classmethod
def GetRootAsReverseSequenceOptions(cls, buf, offset):
... | 36.777778 | 114 | 0.726284 |
4f4cc3af6f1d5c626b3e2ea7939ecad0ee2d41f1 | 11,968 | py | Python | tensorflow/contrib/eager/python/examples/revnet/revnet_test.py | kyechou/tensorflow | 7a7ff1d40ff8a6bcac2d9c655b8cfb8500ee1d14 | [
"Apache-2.0"
] | 4 | 2021-06-15T17:26:07.000Z | 2021-11-17T10:58:08.000Z | tensorflow/contrib/eager/python/examples/revnet/revnet_test.py | swjwenjie/tensorflow | 690d9e3f465a55cbad43051574dde04189768a0c | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/eager/python/examples/revnet/revnet_test.py | swjwenjie/tensorflow | 690d9e3f465a55cbad43051574dde04189768a0c | [
"Apache-2.0"
] | 1 | 2019-12-20T01:12:47.000Z | 2019-12-20T01:12:47.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.096774 | 80 | 0.670538 |
4f4e7ab2d2522ddf52aebd6d4613c28b1ea42cb7 | 276 | py | Python | python/threadtest.py | KasperD/script-fun | 919c8cfca65ce2177213145e6c553c1f4fa33b63 | [
"MIT"
] | null | null | null | python/threadtest.py | KasperD/script-fun | 919c8cfca65ce2177213145e6c553c1f4fa33b63 | [
"MIT"
] | null | null | null | python/threadtest.py | KasperD/script-fun | 919c8cfca65ce2177213145e6c553c1f4fa33b63 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import time
from threading import Thread
def myFunc(i):
print "sleeping 5 sec from thread %d" % i
time.sleep(5)
print "finished sleeping from thread %d" % i
for i in range(10):
t = Thread(target=myFunc, args=(i,))
t.start
| 19.714286 | 49 | 0.623188 |
4f4e8ca4bad711b5bd38a6b91ba75ceb857a6473 | 46,972 | py | Python | putil/plot/panel.py | pmacosta/putil | 416cea52df8221981727e25d133e9b4e3f464798 | [
"MIT"
] | 6 | 2015-12-15T04:09:08.000Z | 2020-02-21T01:40:57.000Z | putil/plot/panel.py | pmacosta/putil | 416cea52df8221981727e25d133e9b4e3f464798 | [
"MIT"
] | null | null | null | putil/plot/panel.py | pmacosta/putil | 416cea52df8221981727e25d133e9b4e3f464798 | [
"MIT"
] | 2 | 2016-01-21T23:29:17.000Z | 2020-02-21T01:41:05.000Z | # panel.py
# Copyright (c) 2013-2016 Pablo Acosta-Serafini
# See LICENSE for details
# pylint: disable=C0111,C0302,R0912,R0913,R0914,R0915,W0105,W0212
# PyPI imports
import numpy
import matplotlib.pyplot as plt
# Putil imports
import putil.exh
import putil.pcontracts
from .series import Series
from .functions import _... | 36.412403 | 79 | 0.556949 |
4f4dccf42fc01d77e8cf31fdd6bd01a78c51b39c | 1,100 | py | Python | Python3/482.py | vindhya2g/LeetCode | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 854 | 2018-11-09T08:06:16.000Z | 2022-03-31T06:05:53.000Z | Python3/482.py | vindhya2g/LeetCode | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 29 | 2019-06-02T05:02:25.000Z | 2021-11-15T04:09:37.000Z | Python3/482.py | vindhya2g/LeetCode | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 347 | 2018-12-23T01:57:37.000Z | 2022-03-12T14:51:21.000Z | __________________________________________________________________________________________________
sample 28 ms submission
class Solution:
def licenseKeyFormatting(self, S: str, K: int) -> str:
S=''.join(S.split('-')).upper()
result=[]
s=len(S)%K
n=len(S)//K
if s>0:
... | 34.375 | 98 | 0.589091 |
4f4f873733988b1e0ac7edf8d79360e465be56e0 | 1,713 | py | Python | towers/__init__.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | towers/__init__.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | towers/__init__.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | from .alchemist import Alchemist
from .banana_farm import BananaFarm
from .bomb_shooter import BombShooter
from .boomerang_monkey import BoomerangMonkey
from .dart_monkey import DartMonkey
from .dartling_gunner import DartlingGunner
from .druid import Druid
from .engineer_monkey import EngineerMonkey
from .glue_gunner ... | 30.589286 | 110 | 0.76474 |
4f4f85c3de86b6e5b761a60240cb46f002265bc9 | 1,678 | py | Python | confessions/confessions.py | hazre/AnimeTwist-Cogs | 3335dd17f1e115f84eb4e722ea2a9c625bb25129 | [
"MIT"
] | null | null | null | confessions/confessions.py | hazre/AnimeTwist-Cogs | 3335dd17f1e115f84eb4e722ea2a9c625bb25129 | [
"MIT"
] | null | null | null | confessions/confessions.py | hazre/AnimeTwist-Cogs | 3335dd17f1e115f84eb4e722ea2a9c625bb25129 | [
"MIT"
] | null | null | null | import discord
from redbot.core import commands
from redbot.core.utils.chat_formatting import pagify, box
from redbot.core import checks
import names
BaseCog = getattr(commands, "Cog", object)
class Confessions(BaseCog):
"""My custom cog"""
def __init__(self, bot):
self.bot = bot
@commands.comman... | 38.136364 | 119 | 0.662098 |
4f4e7ef1c7294c6c0fcf1a04159596be9c92981c | 7,584 | py | Python | files/Utilities/AutoDMG.app/Contents/Resources/main.py | samdoran/ansible-role-macos-server | a401b8d10914fd6208e681b971204184e6fab7e2 | [
"MIT"
] | null | null | null | files/Utilities/AutoDMG.app/Contents/Resources/main.py | samdoran/ansible-role-macos-server | a401b8d10914fd6208e681b971204184e6fab7e2 | [
"MIT"
] | null | null | null | files/Utilities/AutoDMG.app/Contents/Resources/main.py | samdoran/ansible-role-macos-server | a401b8d10914fd6208e681b971204184e6fab7e2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# main.py
# AutoDMG
#
# Created by Per Olofsson on 2013-09-19.
# Copyright 2013-2014 Per Olofsson, University of Gothenburg. All rights reserved.
#
import os
import sys
import argparse
import traceback
import objc
import Foundation
objc.setVerbose(True)
from IEDLog import LogDebug, Log... | 36.637681 | 119 | 0.593882 |
4f503b83f4fed725c75cc786a7e342c759d21033 | 1,058 | py | Python | utils.py | ParadoxZW/CIFAR100-PRACTICE | 175d9a72fc8e7d79ec3ef8670028d1efe830e5b9 | [
"MIT"
] | 1 | 2020-04-15T11:01:28.000Z | 2020-04-15T11:01:28.000Z | utils.py | ParadoxZW/CIFAR10-PRACTICE | 175d9a72fc8e7d79ec3ef8670028d1efe830e5b9 | [
"MIT"
] | null | null | null | utils.py | ParadoxZW/CIFAR10-PRACTICE | 175d9a72fc8e7d79ec3ef8670028d1efe830e5b9 | [
"MIT"
] | null | null | null | '''Some helper functions for PyTorch, including:
- msr_init: net parameter initialization.
- time_stamp: generate timstamp
'''
import time
import torch
import torch.nn as nn
import torch.nn.init as init
def init_params(net):
'''Init layer parameters.'''
for m in net.modules():
if isinstance(m,... | 28.594595 | 65 | 0.604915 |
4f4a93615262811e7b554eca86dcd96b7ae3654e | 4,687 | py | Python | sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_operations.py | JayDoubleu/azure-sdk-for-python | f3760fc8d7ea1b46b0def0628579d36abe75976f | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_operations.py | JayDoubleu/azure-sdk-for-python | f3760fc8d7ea1b46b0def0628579d36abe75976f | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_operations.py | JayDoubleu/azure-sdk-for-python | f3760fc8d7ea1b46b0def0628579d36abe75976f | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.638095 | 133 | 0.662684 |
4f500613812351a6e4b04a8b97be3026237bdca8 | 463 | py | Python | scripts/python/ep_run_cdf_to_csv_dicast.py | OSADP/Pikalert-Vehicle-Data-Translator- | 295da604408f6f13af0301b55476a81311459386 | [
"Apache-2.0"
] | 2 | 2020-06-03T15:59:50.000Z | 2020-12-21T11:11:57.000Z | scripts/python/ep_run_cdf_to_csv_dicast.py | OSADP/Pikalert-Vehicle-Data-Translator- | 295da604408f6f13af0301b55476a81311459386 | [
"Apache-2.0"
] | null | null | null | scripts/python/ep_run_cdf_to_csv_dicast.py | OSADP/Pikalert-Vehicle-Data-Translator- | 295da604408f6f13af0301b55476a81311459386 | [
"Apache-2.0"
] | 2 | 2019-10-02T06:47:23.000Z | 2020-02-02T18:32:23.000Z | #!/usr/bin/env python
import sys
import os
import vii_paths
import time
proc_script = "run_cdf_to_csv_dicast.py"
log_base = "%s/%s" % (vii_paths.LOG_DIR, "run_cdf_to_csv_dicast")
config_file = "%s/%s" % (vii_paths.CONFIG_DIR, "cdf_to_csv_dicast.cfg")
output_dir = "%s/%s" % (vii_paths.PROCESSED_DIR, "cdf_to_csv_dica... | 22.047619 | 77 | 0.701944 |
4f4a3d7c1eeadd2469b0c54488e0ee1d05930dc9 | 443 | py | Python | lego/apps/users/migrations/0010_auto_20171021_2118.py | ion05/lego | 873f6898e35ed2d9a33bdfb8339eaf6c9a61470c | [
"MIT"
] | 45 | 2017-10-24T12:09:06.000Z | 2021-11-03T21:21:03.000Z | lego/apps/users/migrations/0010_auto_20171021_2118.py | ion05/lego | 873f6898e35ed2d9a33bdfb8339eaf6c9a61470c | [
"MIT"
] | 980 | 2017-10-24T12:29:07.000Z | 2022-03-31T04:04:31.000Z | lego/apps/users/migrations/0010_auto_20171021_2118.py | henrikhorluck/lego | 38c3fbe7f4e6793e69a88941e7650947c035d57e | [
"MIT"
] | 23 | 2018-04-11T16:34:22.000Z | 2021-11-23T12:28:30.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-10-21 21:18
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [("users", "0009_auto_20171021_1521")]
operations = [
migrations.RemoveField(model_name="abakusgrou... | 27.6875 | 88 | 0.722348 |
4f4d68892d330e6b6039f24e0f717c631088b42b | 899 | py | Python | SoftLayer/CLI/image/edit.py | briancline/softlayer-python | 679fb62ba2db095f0177f9d9488ff4a80c3b7387 | [
"MIT"
] | null | null | null | SoftLayer/CLI/image/edit.py | briancline/softlayer-python | 679fb62ba2db095f0177f9d9488ff4a80c3b7387 | [
"MIT"
] | null | null | null | SoftLayer/CLI/image/edit.py | briancline/softlayer-python | 679fb62ba2db095f0177f9d9488ff4a80c3b7387 | [
"MIT"
] | null | null | null | """Edit details of an image."""
# :license: MIT, see LICENSE for more details.
import SoftLayer
from SoftLayer.CLI import environment
from SoftLayer.CLI import exceptions
from SoftLayer.CLI import helpers
import click
@click.command()
@click.argument('identifier')
@click.option('--name', help="Name of the image")
@... | 28.09375 | 77 | 0.680756 |
4f4f5e9f93e52de10f50f435fc6c15c29d83c38a | 1,492 | py | Python | src/common/dtypes.py | mondrasovic/homography_ranking | c36a7b621d386f4a31d2926d4f5a9707e13d7847 | [
"MIT"
] | 1 | 2022-03-16T10:56:41.000Z | 2022-03-16T10:56:41.000Z | src/common/dtypes.py | mondrasovic/homography_ranking | c36a7b621d386f4a31d2926d4f5a9707e13d7847 | [
"MIT"
] | null | null | null | src/common/dtypes.py | mondrasovic/homography_ranking | c36a7b621d386f4a31d2926d4f5a9707e13d7847 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: Milan Ondrasovic <milan.ondrasovic@gmail.com>
#
# MIT License
#
# Copyright (c) 2021 Milan Ondrašovič
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"... | 39.263158 | 81 | 0.736595 |
4f4fa87207aaed61660858f7bc35f510a2ea7a43 | 22,028 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_inbound_nat_rules_operations.py | JayDoubleu/azure-sdk-for-python | f3760fc8d7ea1b46b0def0628579d36abe75976f | [
"MIT"
] | 2 | 2021-03-24T06:26:11.000Z | 2021-04-18T15:55:59.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_inbound_nat_rules_operations.py | JayDoubleu/azure-sdk-for-python | f3760fc8d7ea1b46b0def0628579d36abe75976f | [
"MIT"
] | 4 | 2019-04-17T17:57:49.000Z | 2020-04-24T21:11:22.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_inbound_nat_rules_operations.py | JayDoubleu/azure-sdk-for-python | f3760fc8d7ea1b46b0def0628579d36abe75976f | [
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 50.63908 | 232 | 0.676639 |
4f5124b1ec16b38460f5d227340db39cb5fb3894 | 15,013 | py | Python | ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/utils.py | alexryndin/ambari | 478eeb02ebecef1f7f0506885a041d2070d2bccb | [
"Apache-2.0"
] | null | null | null | ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/utils.py | alexryndin/ambari | 478eeb02ebecef1f7f0506885a041d2070d2bccb | [
"Apache-2.0"
] | null | null | null | ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/utils.py | alexryndin/ambari | 478eeb02ebecef1f7f0506885a041d2070d2bccb | [
"Apache-2.0"
] | null | null | null | """
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this ... | 36.796569 | 140 | 0.69986 |
4f4fd40113cc74c9a85f564ea5814c3fbb2bdc00 | 15,841 | py | Python | mars/services/storage/core.py | deka108/mars | 2cd39847c188bb690dd5e2d612a5cbe9f7b21eca | [
"Apache-2.0"
] | 1 | 2021-11-30T12:07:21.000Z | 2021-11-30T12:07:21.000Z | mars/services/storage/core.py | deka108/mars | 2cd39847c188bb690dd5e2d612a5cbe9f7b21eca | [
"Apache-2.0"
] | null | null | null | mars/services/storage/core.py | deka108/mars | 2cd39847c188bb690dd5e2d612a5cbe9f7b21eca | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2020 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 37.806683 | 89 | 0.600152 |
4f4a54d0b22b0f26ad55027c1aba0fff19f297f1 | 1,836 | py | Python | pbc/gto/basis/parse_cp2k.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | pbc/gto/basis/parse_cp2k.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | pbc/gto/basis/parse_cp2k.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8
# Author: Timothy Berkelbach <tim.berkelbach@gmail.com>
#
# parse CP2K format
#
MAXL = 8
def parse(string):
'''Parse the basis text which is in CP2K format, return an internal
basis format which can be assigned to :attr:`Mole.basis`
Lines started with # are ignore... | 31.655172 | 90 | 0.564815 |
4f4b55d9750bbd41486543f262d8e3f737247c3e | 525 | py | Python | abc/abc122/c/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/abc122/c/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/abc122/c/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import sys
import math
from collections import defaultdict, deque
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
INF = float('inf')
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
N, Q = na()
S = ns()
total = [0] * (N + 1)
for i in range(N - 1):
... | 19.444444 | 53 | 0.544762 |
4f4df7f28d54dd5a4319d8747c7ae2d5ce3effeb | 30,989 | py | Python | oscar/lib/python2.7/site-packages/IPython/core/tests/test_magic.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/IPython/core/tests/test_magic.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/IPython/core/tests/test_magic.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Tests for various magic functions.
Needs to be run by nose (to make ipython session available).
"""
from __future__ import absolute_import
import io
import os
import sys
import warnings
from unittest import TestCase
try:
from importlib import invalidate_caches # Require... | 30.621542 | 99 | 0.574075 |
4f50ffe7b136b5aaa1836fca29517c3d8cbb2b62 | 17,925 | py | Python | cp93pytools/process.py | caph1993/caph1993-pytools | e3efee627a266f3a1c7fdad51e095f56c60d5f12 | [
"MIT"
] | null | null | null | cp93pytools/process.py | caph1993/caph1993-pytools | e3efee627a266f3a1c7fdad51e095f56c60d5f12 | [
"MIT"
] | null | null | null | cp93pytools/process.py | caph1993/caph1993-pytools | e3efee627a266f3a1c7fdad51e095f56c60d5f12 | [
"MIT"
] | null | null | null | from typing import Any, Optional, TypedDict, Union
from ._dict import Dict
from subprocess import (Popen, PIPE, DEVNULL, TimeoutExpired,
CalledProcessError)
from tempfile import NamedTemporaryFile
from threading import Thread, Timer
from queue import Queue, Empty
import sys, time, io, asyncio, t... | 32.950368 | 133 | 0.51643 |
4f511f53bad6d3c7d9aac61bb757133b62f80e8e | 6,125 | py | Python | PaddleCV/image_classification/models/resnext101_wsl.py | yangapku/models | b50bc7b77288bcdaed676e70353310786c658d6e | [
"Apache-2.0"
] | 1 | 2020-03-25T11:32:22.000Z | 2020-03-25T11:32:22.000Z | PaddleCV/image_classification/models/resnext101_wsl.py | yangapku/models | b50bc7b77288bcdaed676e70353310786c658d6e | [
"Apache-2.0"
] | null | null | null | PaddleCV/image_classification/models/resnext101_wsl.py | yangapku/models | b50bc7b77288bcdaed676e70353310786c658d6e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 33.108108 | 138 | 0.565061 |
4f50c065f04f548e03900444a9ba5c555fb2ad70 | 16,784 | py | Python | openpnm/algorithms/ReactiveTransport.py | Eravalord/OpenPNM | 505bc37318a3ba40d8343f89cd347d0073dd9d14 | [
"MIT"
] | 1 | 2020-11-20T06:14:34.000Z | 2020-11-20T06:14:34.000Z | openpnm/algorithms/ReactiveTransport.py | Eravalord/OpenPNM | 505bc37318a3ba40d8343f89cd347d0073dd9d14 | [
"MIT"
] | null | null | null | openpnm/algorithms/ReactiveTransport.py | Eravalord/OpenPNM | 505bc37318a3ba40d8343f89cd347d0073dd9d14 | [
"MIT"
] | null | null | null | import numpy as np
from openpnm.algorithms import GenericTransport
# Uncomment this line when we stop supporting Python 3.6
# from dataclasses import dataclass, field
# from typing import List
from openpnm.utils import logging, Docorator, GenericSettings
docstr = Docorator()
logger = logging.getLogger(__name__)
# cla... | 39.584906 | 88 | 0.627026 |
4f4d1c23e14583210dc0a1435a65aa1ecb43e0bb | 5,648 | py | Python | ibis/pandas/execution/tests/test_temporal.py | vnlitvinov/ibis | fd6ecfcfbad43157fbdc934077b656774fc9a2e5 | [
"Apache-2.0"
] | 1 | 2021-06-15T07:28:59.000Z | 2021-06-15T07:28:59.000Z | ibis/pandas/execution/tests/test_temporal.py | vnlitvinov/ibis | fd6ecfcfbad43157fbdc934077b656774fc9a2e5 | [
"Apache-2.0"
] | 1 | 2020-10-02T23:51:48.000Z | 2020-10-03T00:54:29.000Z | ibis/pandas/execution/tests/test_temporal.py | vnlitvinov/ibis | fd6ecfcfbad43157fbdc934077b656774fc9a2e5 | [
"Apache-2.0"
] | 1 | 2020-04-12T19:51:50.000Z | 2020-04-12T19:51:50.000Z | import datetime
from operator import methodcaller
import numpy as np
import pandas as pd
import pandas.util.testing as tm # noqa: E402
import pytest
from pkg_resources import parse_version
from pytest import param
import ibis
from ibis import literal as L # noqa: E402
from ibis.expr import datatypes as dt
pytestma... | 31.909605 | 79 | 0.614554 |
4f4aa2f7cbaa00768a4e98251e58616d6ee72d6a | 757 | py | Python | jira/komand_jira/actions/find_users/action.py | TonyHamil/insightconnect-plugins | 63d985c798623a54b4be135d81197acea11f99ad | [
"MIT"
] | null | null | null | jira/komand_jira/actions/find_users/action.py | TonyHamil/insightconnect-plugins | 63d985c798623a54b4be135d81197acea11f99ad | [
"MIT"
] | null | null | null | jira/komand_jira/actions/find_users/action.py | TonyHamil/insightconnect-plugins | 63d985c798623a54b4be135d81197acea11f99ad | [
"MIT"
] | null | null | null | import komand
from .schema import FindUsersInput, FindUsersOutput
# Custom imports below
from ...util import *
class FindUsers(komand.Action):
def __init__(self):
super(self.__class__, self).__init__(
name='find_users',
description='Search for a set of users',
input=Fi... | 29.115385 | 89 | 0.634082 |
4f4af673a0348f4e948c4a87596355d888adc340 | 1,790 | py | Python | test/oscillator.py | cooperuser/rl_ctrnn | 5f05585dc6f017de60eec9929b8523a8d4da80f7 | [
"MIT"
] | 1 | 2021-10-05T13:30:00.000Z | 2021-10-05T13:30:00.000Z | test/oscillator.py | cooperuser/rl_ctrnn | 5f05585dc6f017de60eec9929b8523a8d4da80f7 | [
"MIT"
] | null | null | null | test/oscillator.py | cooperuser/rl_ctrnn | 5f05585dc6f017de60eec9929b8523a8d4da80f7 | [
"MIT"
] | null | null | null | from numpy import random
import wandb
from rl_ctrnn.ranges import CtrnnRanges
import unittest
from rl_ctrnn.ctrnn import Ctrnn
from evaluator.oscillator import Oscillator
def rand(n: float = 1):
return n * (random.random() * 2 - 1)
class Tests(unittest.TestCase):
def test_known(self):
for i in range(1... | 39.777778 | 75 | 0.52067 |
4f4d19f5c3b72e00bae70a5d8ae10e058e142aeb | 63,560 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/_resources_operations.py | JayDoubleu/azure-sdk-for-python | f3760fc8d7ea1b46b0def0628579d36abe75976f | [
"MIT"
] | 2 | 2021-03-24T06:26:11.000Z | 2021-04-18T15:55:59.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/_resources_operations.py | JayDoubleu/azure-sdk-for-python | f3760fc8d7ea1b46b0def0628579d36abe75976f | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/_resources_operations.py | JayDoubleu/azure-sdk-for-python | f3760fc8d7ea1b46b0def0628579d36abe75976f | [
"MIT"
] | 1 | 2021-12-18T20:01:22.000Z | 2021-12-18T20:01:22.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 49.772905 | 223 | 0.661045 |
4f51bc4558f1e8f01d9030a6624f24e749eb82bb | 533 | py | Python | client/verta/verta/_swagger/_public/modeldb/model/ModeldbDeleteJobResponse.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 835 | 2017-02-08T20:14:24.000Z | 2020-03-12T17:37:49.000Z | client/verta/verta/_swagger/_public/modeldb/model/ModeldbDeleteJobResponse.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 651 | 2019-04-18T12:55:07.000Z | 2022-03-31T23:45:09.000Z | client/verta/verta/_swagger/_public/modeldb/model/ModeldbDeleteJobResponse.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 170 | 2017-02-13T14:49:22.000Z | 2020-02-19T17:59:12.000Z | # THIS FILE IS AUTO-GENERATED. DO NOT EDIT
from verta._swagger.base_type import BaseType
class ModeldbDeleteJobResponse(BaseType):
def __init__(self, status=None):
required = {
"status": False,
}
self.status = status
for k, v in required.items():
if self[k] is None and v:
raise V... | 22.208333 | 62 | 0.645403 |
4f524c8b021b298f5cca35b42697a7e7dcafa25e | 20,308 | py | Python | espnet/bin/asr_train.py | creatorscan/espnet-asrtts | e516601bd550aeb5d75ee819749c743fc4777eee | [
"Apache-2.0"
] | 5 | 2021-04-17T13:12:20.000Z | 2022-02-22T09:36:45.000Z | espnet/bin/asr_train.py | creatorscan/espnet-asrtts | e516601bd550aeb5d75ee819749c743fc4777eee | [
"Apache-2.0"
] | null | null | null | espnet/bin/asr_train.py | creatorscan/espnet-asrtts | e516601bd550aeb5d75ee819749c743fc4777eee | [
"Apache-2.0"
] | 5 | 2020-02-24T08:13:54.000Z | 2022-02-22T09:03:09.000Z | #!/usr/bin/env python3
# encoding: utf-8
# Copyright 2017 Tomoki Hayashi (Nagoya University)
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
import configargparse
import logging
import os
import random
import subprocess
import sys
import numpy as np
from espnet.utils.cli_utils import strtobool
from espn... | 53.583113 | 116 | 0.578245 |
4f4fdaaa7c7a53d607515c5f23e18a5a8d1d53eb | 1,821 | py | Python | server/src/finote_api/admin.py | kentaiwami/KI_App0 | 4cc9dbc5cc34f7ca52b5d0487624f687696b3fb4 | [
"MIT"
] | null | null | null | server/src/finote_api/admin.py | kentaiwami/KI_App0 | 4cc9dbc5cc34f7ca52b5d0487624f687696b3fb4 | [
"MIT"
] | 24 | 2016-06-21T09:05:26.000Z | 2022-02-10T09:27:38.000Z | server/src/finote_api/admin.py | kentaiwami/FiNote | 4cc9dbc5cc34f7ca52b5d0487624f687696b3fb4 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import *
class GenreAdmin(admin.ModelAdmin):
list_display = ('genre_id',)
class MovieUserInline(admin.TabularInline):
model = Movie_User
extra = 1
class MovieOnomatopoeiaInline(admin.TabularInline):
model = Movie_Onomatopoeia
extra = 1
class Movie... | 27.179104 | 95 | 0.717188 |
4f529e4fb9836cfe54eaf4a9b57ae2cb5043c7cf | 2,069 | py | Python | codes/projects/test_discrete_parameter/utils_project/plot_bivariate_gaussian.py | hwangoh/uq-vae | 382548e6f6dd7f9d72feff0e0752beec871db348 | [
"MIT"
] | 2 | 2021-07-28T16:47:18.000Z | 2021-08-03T00:53:58.000Z | codes/projects/test_discrete_parameter/utils_project/plot_bivariate_gaussian.py | HwanGoh/uq-vae | 24a3d26987e2ec807d57601b14c68b22f3652a18 | [
"MIT"
] | null | null | null | codes/projects/test_discrete_parameter/utils_project/plot_bivariate_gaussian.py | HwanGoh/uq-vae | 24a3d26987e2ec807d57601b14c68b22f3652a18 | [
"MIT"
] | 2 | 2021-09-29T08:31:46.000Z | 2021-11-07T10:26:45.000Z | import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
plt.ioff() # Turn interactive plotting off
from mpl_toolkits.axes_grid1 import make_axes_locatable
from mpl_toolkits.axes_grid1.inset_locator import inset_axes
import pdb #Equivalent of keyboard in MATLAB, just add "pdb.set_trac... | 35.672414 | 78 | 0.649106 |
4f520305fad753c5af1e9e6038c3469122a64819 | 24 | py | Python | btd6_memory_info/generated/Assets/Scripts/Unity/UI_New/Main/DailyRewards/daily_rewards.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Unity/UI_New/Main/DailyRewards/daily_rewards.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Unity/UI_New/Main/DailyRewards/daily_rewards.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class DailyRewards: pass | 24 | 24 | 0.875 |
4f4f87883f682b1763453c16d87870c275fd1cf1 | 7,778 | py | Python | algorithms/scaling/cross_validation/cross_validate.py | ndevenish/dials-fork | e3970ffcd2870ccd0e340f5e94999efcc978fb2b | [
"BSD-3-Clause"
] | 2 | 2021-03-17T11:25:46.000Z | 2021-11-18T04:20:54.000Z | algorithms/scaling/cross_validation/cross_validate.py | ndevenish/dials-fork | e3970ffcd2870ccd0e340f5e94999efcc978fb2b | [
"BSD-3-Clause"
] | null | null | null | algorithms/scaling/cross_validation/cross_validate.py | ndevenish/dials-fork | e3970ffcd2870ccd0e340f5e94999efcc978fb2b | [
"BSD-3-Clause"
] | null | null | null | """
This module defines a general cross validation function that can be used
with any valid CrossValidator. To use in a command line program, the
phil_scope should be included. Provided here is a description of the options,
using the example of running cross_validation in dials.scale
General description:
cross_validat... | 43.943503 | 96 | 0.66611 |
4f508a54ae1955eb316830dff6958dd2b325e64f | 7,240 | py | Python | scorpio_bringup/launch/ver_1.py | applejenny66/goldpaint | cbb368d2d21cc1e26177314eb1e6fceb7c6e6c8d | [
"MIT"
] | null | null | null | scorpio_bringup/launch/ver_1.py | applejenny66/goldpaint | cbb368d2d21cc1e26177314eb1e6fceb7c6e6c8d | [
"MIT"
] | 1 | 2020-08-10T05:33:02.000Z | 2020-08-10T05:33:02.000Z | scorpio_bringup/launch/ver_1.py | applejenny66/goldpaint | cbb368d2d21cc1e26177314eb1e6fceb7c6e6c8d | [
"MIT"
] | 1 | 2021-05-20T09:08:05.000Z | 2021-05-20T09:08:05.000Z | #!/usr/bin/env python
import rospy
import moveit_commander
import moveit_msgs.msg
import geometry_msgs.msg
import actionlib
from control_msgs.msg import GripperCommandAction, GripperCommandGoal
from control_msgs.msg import GripperCommand
from math import pi
from std_msgs.msg import String
from moveit_commander.convers... | 51.714286 | 125 | 0.65884 |
4f528d35fea0e94ae6ee525d6f3496b1fb0a4d6e | 431 | py | Python | tests/predict/classification/py/run_server.py | janove51/ml-app | 0d66aa4c25648f2059eb645b7f8081f028fac703 | [
"MIT"
] | null | null | null | tests/predict/classification/py/run_server.py | janove51/ml-app | 0d66aa4c25648f2059eb645b7f8081f028fac703 | [
"MIT"
] | null | null | null | tests/predict/classification/py/run_server.py | janove51/ml-app | 0d66aa4c25648f2059eb645b7f8081f028fac703 | [
"MIT"
] | null | null | null | import requests
import json
import codecs
import pandas as pd
import sys, os
sys.path.append(os.path.abspath('../../../../ml-app'))
from interface.prediction_api import server
from sklearn.datasets import make_classification
## start the server and pass test model
model_file = '/Users/user/testing/ml-app/models/clas... | 28.733333 | 82 | 0.770302 |
4f4efc0baccade19baf1dbc438dedc89d25c7ef5 | 5,238 | py | Python | origami-ms/mainWindow.py | lukasz-migas/ORIGAMI-MS | 8709c11aba1dc981d76a5256039486f0709d283f | [
"Apache-2.0"
] | null | null | null | origami-ms/mainWindow.py | lukasz-migas/ORIGAMI-MS | 8709c11aba1dc981d76a5256039486f0709d283f | [
"Apache-2.0"
] | null | null | null | origami-ms/mainWindow.py | lukasz-migas/ORIGAMI-MS | 8709c11aba1dc981d76a5256039486f0709d283f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# -------------------------------------------------------------------------
# Copyright (C) 2017 Lukasz G. Migas <lukasz.migas@manchester.ac.uk>
# This program is free software. Feel free to redistribute it and/or
# modify it under the condition you cite and credit the authors whenever
... | 38.8 | 120 | 0.654066 |
4f517e04c1fde462c356fa8955e0742ceb5cbadd | 15,659 | py | Python | seymour/accounts/forms.py | lerouxb/seymour | 124a93da67b6d6757b738469673232739ff0a4dc | [
"MIT"
] | null | null | null | seymour/accounts/forms.py | lerouxb/seymour | 124a93da67b6d6757b738469673232739ff0a4dc | [
"MIT"
] | null | null | null | seymour/accounts/forms.py | lerouxb/seymour | 124a93da67b6d6757b738469673232739ff0a4dc | [
"MIT"
] | null | null | null | from django.conf import settings
from django import forms
from seymour.accounts.models import Account
__all__ = (
'LoginForm', 'SignupForm',
'ResetPasswordForm', 'ConfirmResetPasswordForm',
'EditOpenIDProfileForm', 'EditEmailProfileForm'
)
class LoginForm(forms.Form):
method = forms.ChoiceFiel... | 42.321622 | 181 | 0.577687 |
4f4a55391c8b98ccff4f8fa197a7774edbdb672f | 819 | py | Python | scripts/feature_gen.py | ratulesrar3/sotu-approval-analysis | 4e4575e81795d09ce951ae289eb30158392ef37d | [
"MIT"
] | null | null | null | scripts/feature_gen.py | ratulesrar3/sotu-approval-analysis | 4e4575e81795d09ce951ae289eb30158392ef37d | [
"MIT"
] | null | null | null | scripts/feature_gen.py | ratulesrar3/sotu-approval-analysis | 4e4575e81795d09ce951ae289eb30158392ef37d | [
"MIT"
] | null | null | null | ### helper functions to create features for the classification problem
from nltk.tokenize import word_tokenize, sent_tokenize
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import datetime as datetime
def binary_approval(rating):
if rating > 50:
return 1
... | 29.25 | 124 | 0.697192 |
4f5331d3c367c60ed6ec78c671db79d182b01e02 | 466 | py | Python | rbc/tests/test_utils.py | krunalkharat/rbc | f3a4665bde03d2cef6521dcea030f22236435f79 | [
"BSD-3-Clause"
] | null | null | null | rbc/tests/test_utils.py | krunalkharat/rbc | f3a4665bde03d2cef6521dcea030f22236435f79 | [
"BSD-3-Clause"
] | null | null | null | rbc/tests/test_utils.py | krunalkharat/rbc | f3a4665bde03d2cef6521dcea030f22236435f79 | [
"BSD-3-Clause"
] | null | null | null | from rbc.utils import is_localhost, get_local_ip, triple_matches
def test_is_localhost():
assert is_localhost(get_local_ip())
def test_triple_matches():
assert triple_matches('cuda', 'nvptx64-nvidia-cuda')
assert triple_matches('nvptx64-nvidia-cuda', 'cuda')
assert triple_matches('cuda32', 'nvptx-nv... | 33.285714 | 76 | 0.748927 |
4f52501b0d901a4a091b0594ba4c58c6b6648438 | 6,167 | py | Python | alipay/aop/api/domain/MybankPaymentTradeNormalpayOrderPayModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/MybankPaymentTradeNormalpayOrderPayModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/MybankPaymentTradeNormalpayOrderPayModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class MybankPaymentTradeNormalpayOrderPayModel(object):
def __init__(self):
self._amount = None
self._currency_value = None
self._ext_info = None
self._operate_scene_typ... | 32.287958 | 87 | 0.604021 |
4f4c95f74358defd6290b5df4ac0fc0d0ae3c8b4 | 867 | py | Python | src/pandas_profiling_study/report/structure/variables/__init__.py | lucasiscoviciMoon/pandas-profiling-study | 142d3b0f5e3139cdb531819f637a407682fa5684 | [
"MIT"
] | null | null | null | src/pandas_profiling_study/report/structure/variables/__init__.py | lucasiscoviciMoon/pandas-profiling-study | 142d3b0f5e3139cdb531819f637a407682fa5684 | [
"MIT"
] | null | null | null | src/pandas_profiling_study/report/structure/variables/__init__.py | lucasiscoviciMoon/pandas-profiling-study | 142d3b0f5e3139cdb531819f637a407682fa5684 | [
"MIT"
] | 1 | 2020-04-25T15:20:39.000Z | 2020-04-25T15:20:39.000Z | from ....report.structure.variables.render_boolean import render_boolean
from ....report.structure.variables.render_categorical import (
render_categorical,
)
from ....report.structure.variables.render_common import render_common
from ....report.structure.variables.render_complex import render_complex
from ....repo... | 54.1875 | 72 | 0.828143 |
4f4b8aeea732f909db8d476ccedc5225748394c6 | 3,105 | py | Python | indico/modules/events/models/roles.py | javfg/indico | 2634756ba1e9caf6dd8fc9afc3f47291fda5816d | [
"MIT"
] | 1 | 2021-12-27T17:51:27.000Z | 2021-12-27T17:51:27.000Z | indico/modules/events/models/roles.py | javfg/indico | 2634756ba1e9caf6dd8fc9afc3f47291fda5816d | [
"MIT"
] | null | null | null | indico/modules/events/models/roles.py | javfg/indico | 2634756ba1e9caf6dd8fc9afc3f47291fda5816d | [
"MIT"
] | null | null | null | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from indico.core.db import db
from indico.core.db.sqlalchemy.principals import PrincipalType
from indico.u... | 25.875 | 89 | 0.616747 |
4f506dd62871d6bfa71697dcb44e4d51541a56f9 | 17,574 | py | Python | tests/terraform/checks/resource/azure/test_NSGRuleUDPAccessRestricted.py | graybrandonpfg/checkov | 3081a8560f6369465314ee8f4ac8a8ec01649d68 | [
"Apache-2.0"
] | 4,013 | 2019-12-09T13:16:54.000Z | 2022-03-31T14:31:01.000Z | tests/terraform/checks/resource/azure/test_NSGRuleUDPAccessRestricted.py | graybrandonpfg/checkov | 3081a8560f6369465314ee8f4ac8a8ec01649d68 | [
"Apache-2.0"
] | 1,258 | 2019-12-17T09:55:51.000Z | 2022-03-31T19:17:17.000Z | tests/terraform/checks/resource/azure/test_NSGRuleUDPAccessRestricted.py | graybrandonpfg/checkov | 3081a8560f6369465314ee8f4ac8a8ec01649d68 | [
"Apache-2.0"
] | 638 | 2019-12-19T08:57:38.000Z | 2022-03-30T21:38:37.000Z | import unittest
import hcl2
from checkov.terraform.checks.resource.azure.NSGRuleUDPAccessRestricted import check
from checkov.common.models.enums import CheckResult
class TestNSGRuleUDPAccessRestricted(unittest.TestCase):
def test_failure1(self):
hcl_res = hcl2.loads("""
resource "azurerm_n... | 42.346988 | 91 | 0.491351 |
4f532ecc30c9ae2df2afc94717b747874b64a9fa | 2,764 | py | Python | webapp/flaskapp/views.py | bradysalz/SavingChristmas | 29bd36b33e414ffae88001b878eec041363cf766 | [
"MIT"
] | null | null | null | webapp/flaskapp/views.py | bradysalz/SavingChristmas | 29bd36b33e414ffae88001b878eec041363cf766 | [
"MIT"
] | 1 | 2017-01-16T21:52:41.000Z | 2017-01-16T21:52:41.000Z | webapp/flaskapp/views.py | bradysalz/SavingChristmas | 29bd36b33e414ffae88001b878eec041363cf766 | [
"MIT"
] | null | null | null | import requests
from flaskapp import app
from flaskapp.models import db, User, add_user_to_db
from flask import Flask, render_template, request, redirect, url_for
from .config import SECRET_KEY
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///lights.db'
app.secret... | 26.834951 | 79 | 0.642909 |
4f4edca9375fa7b12958902446d74c84464b8163 | 287,441 | py | Python | bom_manager/bom.py | waynegramlich/bom_manager | f59576aaa22b2925f3c57c913aab219b9fdc3a6b | [
"MIT"
] | 1 | 2018-03-15T23:30:01.000Z | 2018-03-15T23:30:01.000Z | bom_manager/bom.py | waynegramlich/bom_manager | f59576aaa22b2925f3c57c913aab219b9fdc3a6b | [
"MIT"
] | 1 | 2017-02-19T02:18:07.000Z | 2017-02-19T03:17:02.000Z | bom_manager/bom.py | waynegramlich/bom_manager | f59576aaa22b2925f3c57c913aab219b9fdc3a6b | [
"MIT"
] | null | null | null | # BOM Manager
#
# BOM Manager is a program for managing one or more Bill of Materials.
#
# ## License
#
# MIT License
#
# Copyright (c) 2019 Wayne C. Gramlich
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
... | 44.303483 | 100 | 0.603251 |
4f527facd937d103d758b8f480ff18f3d57f4beb | 137 | py | Python | tests/conftest.py | jmuddappa/DeepClassificationBot | 70aaa6787cf02e8a6b49a913af6496bc0f288b35 | [
"MIT"
] | 40 | 2020-09-15T16:39:35.000Z | 2022-03-20T12:49:45.000Z | tests/conftest.py | jmuddappa/DeepClassificationBot | 70aaa6787cf02e8a6b49a913af6496bc0f288b35 | [
"MIT"
] | 82 | 2020-06-17T08:22:51.000Z | 2021-10-02T15:22:20.000Z | tests/conftest.py | jmuddappa/DeepClassificationBot | 70aaa6787cf02e8a6b49a913af6496bc0f288b35 | [
"MIT"
] | 5 | 2021-09-29T22:15:04.000Z | 2022-03-31T20:32:57.000Z | import pytest
@pytest.fixture(autouse=True)
def no_requests(monkeypatch):
monkeypatch.delattr("requests.sessions.Session.request")
| 19.571429 | 60 | 0.79562 |
4f4ff9231554cbc25ebf152eaa61c41f361d9496 | 5,616 | py | Python | cupy/sorting/sort.py | andy6975/cupy | 34b388e4a4fe7c59092b4d4c9c96b2f307e49e46 | [
"MIT"
] | 2 | 2020-02-28T09:27:58.000Z | 2020-10-12T07:10:24.000Z | cupy/sorting/sort.py | andy6975/cupy | 34b388e4a4fe7c59092b4d4c9c96b2f307e49e46 | [
"MIT"
] | 1 | 2019-08-05T09:36:13.000Z | 2019-08-06T12:03:01.000Z | cupy/sorting/sort.py | andy6975/cupy | 34b388e4a4fe7c59092b4d4c9c96b2f307e49e46 | [
"MIT"
] | 1 | 2020-11-24T03:44:35.000Z | 2020-11-24T03:44:35.000Z | import cupy
import numpy
if cupy.cuda.thrust_enabled:
from cupy.cuda import thrust
def sort(a, axis=-1):
"""Returns a sorted copy of an array with a stable sorting algorithm.
Args:
a (cupy.ndarray): Array to be sorted.
axis (int or None): Axis along which to sort. Default is -1, which
... | 30.193548 | 79 | 0.615028 |
4f52d027679398864183f7311fcdffa8dd37c1ff | 2,135 | py | Python | classes/functions_involving_formula_class.py | watchduck/concertina_hypercubes | 4d51d4ebcb2ea13a237356bb238b066f6f3d9feb | [
"MIT"
] | 1 | 2018-10-28T08:58:54.000Z | 2018-10-28T08:58:54.000Z | classes/functions_involving_formula_class.py | watchduck/concertina_hypercubes | 4d51d4ebcb2ea13a237356bb238b066f6f3d9feb | [
"MIT"
] | null | null | null | classes/functions_involving_formula_class.py | watchduck/concertina_hypercubes | 4d51d4ebcb2ea13a237356bb238b066f6f3d9feb | [
"MIT"
] | 1 | 2021-06-19T21:35:11.000Z | 2021-06-19T21:35:11.000Z | from .formula import Formula
def old_to_new_formulas(n, old_formulas):
new_lower_formulas = set()
for old_vert, old_horz in old_formulas:
for i in range(n):
old_formula = Formula(old_vert, old_horz)
new_formula = old_formula.insert(i)
new_vert = new_formula.vert
... | 32.348485 | 81 | 0.650585 |
4f52dc547217b9ce3c1d38e8608a23de171a3cd3 | 29,905 | py | Python | tests/functional/test_download.py | ichard26/pip | a4cd22b277b9392e41ab0191fc416731f06a170d | [
"MIT"
] | null | null | null | tests/functional/test_download.py | ichard26/pip | a4cd22b277b9392e41ab0191fc416731f06a170d | [
"MIT"
] | null | null | null | tests/functional/test_download.py | ichard26/pip | a4cd22b277b9392e41ab0191fc416731f06a170d | [
"MIT"
] | null | null | null | import os.path
import shutil
import textwrap
from hashlib import sha256
from pathlib import Path
import pytest
from pip._internal.cli.status_codes import ERROR
from pip._internal.utils.urls import path_to_url
from tests.lib import create_really_basic_wheel
from tests.lib.server import file_response
def fake_wheel(d... | 26.844704 | 88 | 0.56529 |
4f53e230d35be88e424150139cb82087bdb426d5 | 568 | py | Python | deepchem/utils/typing.py | akihironitta/deepchem | ffad1a75997bb79360751b2a5fcf3b3405f3c44e | [
"MIT"
] | null | null | null | deepchem/utils/typing.py | akihironitta/deepchem | ffad1a75997bb79360751b2a5fcf3b3405f3c44e | [
"MIT"
] | null | null | null | deepchem/utils/typing.py | akihironitta/deepchem | ffad1a75997bb79360751b2a5fcf3b3405f3c44e | [
"MIT"
] | null | null | null | """Type annotations that are widely used in DeepChem"""
from typing import Callable, List, Sequence, Tuple, TypeVar, Union
T = TypeVar("T")
# An activation function for a Keras layer: either a TensorFlow function or the name of a standard activation
KerasActivationFn = Union[Callable, str]
# A loss function for use... | 31.555556 | 109 | 0.742958 |
4f54a5f6c3f2d09e721c001e88296a09fd1d8f55 | 6,748 | py | Python | kivy/tools/benchmark.py | Abestanis/kivy | a3dc9211830eb932421cdd2223e7cc7da3891211 | [
"MIT"
] | 1 | 2020-02-24T19:03:54.000Z | 2020-02-24T19:03:54.000Z | kivy/tools/benchmark.py | waderly/kivy | 1bfa50bcbe83350f42f002bc217d381e4878666d | [
"MIT"
] | null | null | null | kivy/tools/benchmark.py | waderly/kivy | 1bfa50bcbe83350f42f002bc217d381e4878666d | [
"MIT"
] | null | null | null | '''
Benchmark
=========
'''
from __future__ import print_function
benchmark_version = '1'
import os
import sys
import json
import kivy
import gc
from time import clock, time, ctime
from random import randint
from kivy.uix.label import Label
from kivy.uix.button import Button
from kivy.uix.widget import Widget
from... | 24.717949 | 80 | 0.555868 |
4f52a423af4d9be1f6bea1fd72840deb206d48e4 | 497 | py | Python | integration/airflow/tests/mocks/git_mock.py | skcc00000app08542/OpenLineage | e0dd3715e61b3d89f60ece0d7385e82ccd141ba4 | [
"Apache-2.0"
] | 1 | 2021-12-03T17:00:00.000Z | 2021-12-03T17:00:00.000Z | integration/airflow/tests/mocks/git_mock.py | skcc00000app08542/OpenLineage | e0dd3715e61b3d89f60ece0d7385e82ccd141ba4 | [
"Apache-2.0"
] | 1 | 2022-02-17T09:43:38.000Z | 2022-02-17T09:43:52.000Z | integration/airflow/tests/mocks/git_mock.py | skcc00000app08542/OpenLineage | e0dd3715e61b3d89f60ece0d7385e82ccd141ba4 | [
"Apache-2.0"
] | null | null | null | # SPDX-License-Identifier: Apache-2.0.
import logging
import subprocess
log = logging.getLogger(__name__)
def execute_git_mock(cwd, params):
# just mock the git revision
log.debug("execute_git_mock()")
if len(cwd) > 0 and params[0] == 'rev-list':
return 'abcd1234'
p = subprocess.Popen(['git... | 24.85 | 70 | 0.635815 |
4f4fcd1fae86d3edeaaf584bd3d6f8844adce8f6 | 2,687 | py | Python | mfutil/cli.py | moas/mfutil | 6c6deb0f4b70a6e8b34d666a4ee16e431d88265f | [
"BSD-3-Clause"
] | null | null | null | mfutil/cli.py | moas/mfutil | 6c6deb0f4b70a6e8b34d666a4ee16e431d88265f | [
"BSD-3-Clause"
] | null | null | null | mfutil/cli.py | moas/mfutil | 6c6deb0f4b70a6e8b34d666a4ee16e431d88265f | [
"BSD-3-Clause"
] | null | null | null | """Utility functions to build CLI."""
from __future__ import print_function
import six
import sys
import ctypes
MFUTIL_INSTANCE = None
def _get_mfutil():
global MFUTIL_INSTANCE
if MFUTIL_INSTANCE is None:
i = ctypes.cdll.LoadLibrary("libmfutil.so")
i.mfutil_echo_ok.restype = None
i.m... | 26.087379 | 76 | 0.663937 |
4f50129406e313b4040fbeee72210a940b04b0b7 | 440 | py | Python | tests/unit/libraries/falcon_/conftest.py | PaulStaggs/signalfx-python-tracing | 0f704f86d25824cb9fac306f5b2132fe913aaf87 | [
"Apache-2.0"
] | 21 | 2019-01-05T00:56:39.000Z | 2022-02-27T23:51:49.000Z | tests/unit/libraries/falcon_/conftest.py | PaulStaggs/signalfx-python-tracing | 0f704f86d25824cb9fac306f5b2132fe913aaf87 | [
"Apache-2.0"
] | 15 | 2019-01-09T20:43:23.000Z | 2021-04-23T08:56:50.000Z | tests/unit/libraries/falcon_/conftest.py | PaulStaggs/signalfx-python-tracing | 0f704f86d25824cb9fac306f5b2132fe913aaf87 | [
"Apache-2.0"
] | 9 | 2019-02-18T07:32:49.000Z | 2021-03-15T17:52:55.000Z | # Copyright (C) 2018 SignalFx. All rights reserved.
import pytest
from signalfx_tracing.libraries.falcon_.instrument import config, uninstrument
class FalconTestSuite(object):
@pytest.fixture(autouse=True)
def restored_falcon_config(self):
orig = dict(config.__dict__)
yield
config.__d... | 24.444444 | 78 | 0.709091 |
4f54484650e55ed504e7bd5891f623bac1fcaf75 | 1,550 | py | Python | mnsim_noc/Buffer/output_buffer.py | godfather991/MNSIM_NoC | 402680ad72c46c2a0b040b5fa52232807d554aec | [
"MIT"
] | null | null | null | mnsim_noc/Buffer/output_buffer.py | godfather991/MNSIM_NoC | 402680ad72c46c2a0b040b5fa52232807d554aec | [
"MIT"
] | 3 | 2021-11-01T15:43:20.000Z | 2021-11-09T03:49:06.000Z | mnsim_noc/Buffer/output_buffer.py | ILTShade/MNSIM_NoC | 8fa4580cce0ef113b473dd22662748846ec6b45a | [
"MIT"
] | null | null | null | #-*-coding:utf-8-*-
"""
@FileName:
output_buffer.py
@Description:
output behavior buffer of the Tile
@Authors:
Hanbo Sun(sun-hb17@mails.tsinghua.edu.cn)
@CreateTime:
2022/05/07 10:51
"""
from mnsim_noc.Buffer.base_buffer import BaseBuffer, get_data_size
class OutputBuffer(BaseBuffer):
"""
outpu... | 25.409836 | 72 | 0.593548 |
4f50cee1367628fbfa1d99eccb100691e537e0d3 | 1,028 | py | Python | 01 Basics/006 - Escape Sequences/006 - Escape Sequences.py | TheUnicum/CorsoPython | 06cb2b58d46b26fc6d1cf4a585ff2666ab4b5c19 | [
"Apache-2.0"
] | null | null | null | 01 Basics/006 - Escape Sequences/006 - Escape Sequences.py | TheUnicum/CorsoPython | 06cb2b58d46b26fc6d1cf4a585ff2666ab4b5c19 | [
"Apache-2.0"
] | null | null | null | 01 Basics/006 - Escape Sequences/006 - Escape Sequences.py | TheUnicum/CorsoPython | 06cb2b58d46b26fc6d1cf4a585ff2666ab4b5c19 | [
"Apache-2.0"
] | null | null | null | #!/usr/local/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2018 Mattia Benedetti
# All rights reserved.
#
# Author: Mattia Benedetti
"""
- Escape Sequences -
https://docs.python.org/2/reference/lexical_analysis.html
\newline Ignored
\\ Backslash (\)
\' Single quote (')
\" Double quote (")
\a ASCI... | 24.47619 | 70 | 0.667315 |
4f54e3df09102cb15baafe1ac39fc21f4b9fe37e | 775 | py | Python | devito/yask/grid.py | thast/devito | 7e7ca7c06319babddaa2d7a6481c81caa47e8f8b | [
"MIT"
] | 11 | 2019-07-18T11:15:12.000Z | 2021-09-14T02:20:52.000Z | devito/yask/grid.py | thast/devito | 7e7ca7c06319babddaa2d7a6481c81caa47e8f8b | [
"MIT"
] | null | null | null | devito/yask/grid.py | thast/devito | 7e7ca7c06319babddaa2d7a6481c81caa47e8f8b | [
"MIT"
] | 3 | 2020-02-15T14:23:29.000Z | 2021-02-04T01:51:02.000Z | import devito.grid as grid
from devito.yask.function import Constant
from devito.yask.wrappers import contexts
__all__ = ['Grid']
class Grid(grid.Grid):
def __init__(self, *args, **kwargs):
super(Grid, self).__init__(*args, **kwargs)
# Initialize a new YaskContext for this Grid
context... | 25.833333 | 79 | 0.670968 |
4f54382f6306ef3a9576db44ac81c5a527215de4 | 1,838 | py | Python | venv/Lib/site-packages/pyrogram/raw/base/dc_option.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 5 | 2021-09-11T22:01:15.000Z | 2022-03-16T21:33:42.000Z | backend/pyrogram/raw/base/dc_option.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | null | null | null | backend/pyrogram/raw/base/dc_option.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | 3 | 2022-01-18T11:06:22.000Z | 2022-02-26T13:39:28.000Z | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 36.76 | 87 | 0.634385 |
4f53b13e4722b7e72262dfa28f131e2c401f0653 | 4,079 | py | Python | napari/_qt/layer_controls/qt_layer_controls_base.py | pranathivemuri/napari | 7a7f824b686a276dc6cdc8013d8f437e3c3b03e1 | [
"BSD-3-Clause"
] | 1 | 2021-05-16T19:31:42.000Z | 2021-05-16T19:31:42.000Z | napari/_qt/layer_controls/qt_layer_controls_base.py | clbarnes/napari | 9b46dd5a92653a194b870e433debd672ff0457ad | [
"BSD-3-Clause"
] | null | null | null | napari/_qt/layer_controls/qt_layer_controls_base.py | clbarnes/napari | 9b46dd5a92653a194b870e433debd672ff0457ad | [
"BSD-3-Clause"
] | null | null | null | from qtpy.QtCore import Qt
from qtpy.QtWidgets import QComboBox, QFrame, QGridLayout, QSlider
from ...layers.base._base_constants import BLENDING_TRANSLATIONS
from ...utils.events import disconnect_events
class QtLayerControls(QFrame):
"""Superclass for all the other LayerControl classes.
This class is neve... | 33.434426 | 78 | 0.63643 |
4f4a0bc4f0b98705ff36b45d56ab1e2f7e9efa84 | 20,803 | py | Python | parlai/agents/rag/modules.py | askender/ParlAI | 054a0fff8183e357727dc7a91682496734badb7f | [
"MIT"
] | 1 | 2022-03-27T17:16:19.000Z | 2022-03-27T17:16:19.000Z | parlai/agents/rag/modules.py | askender/ParlAI | 054a0fff8183e357727dc7a91682496734badb7f | [
"MIT"
] | null | null | null | parlai/agents/rag/modules.py | askender/ParlAI | 054a0fff8183e357727dc7a91682496734badb7f | [
"MIT"
] | 1 | 2022-03-30T14:05:29.000Z | 2022-03-30T14:05:29.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Modules for RAG.
"""
import torch
import torch.cuda
import torch.nn
import torch.nn.functional as F
from typing import... | 35.621575 | 92 | 0.604384 |
4f528b0e40797effc44a2d7611330b26e1b0cac6 | 122 | py | Python | tests/ocd_backend/__init__.py | openstate/kamervragen | 0b9486dfe1521f3e88b144f9cc8ad2b32ff24834 | [
"CC-BY-4.0"
] | 2 | 2018-03-15T16:32:59.000Z | 2021-04-06T01:37:18.000Z | tests/ocd_backend/__init__.py | openstate/kamervragen | 0b9486dfe1521f3e88b144f9cc8ad2b32ff24834 | [
"CC-BY-4.0"
] | 7 | 2017-07-06T11:45:54.000Z | 2022-03-11T23:14:16.000Z | tests/ocd_backend/__init__.py | openstate/kamervragen | 0b9486dfe1521f3e88b144f9cc8ad2b32ff24834 | [
"CC-BY-4.0"
] | 2 | 2018-04-05T09:46:44.000Z | 2018-04-13T14:29:02.000Z | from .extractors import *
from .items import *
from .transformers import *
from .loaders import *
from .pipeline import *
| 20.333333 | 27 | 0.754098 |
4f545f4b8287dd9136045404a5322d9fc602e9b2 | 8,970 | py | Python | acl_version/src/reflection_based_transfer/nets.py | ahclab/reflection | d09fd500e9ff74211e1eb15711d479bb204c7a83 | [
"MIT"
] | 4 | 2020-07-14T10:36:30.000Z | 2021-04-22T04:20:42.000Z | acl_version/src/reflection_based_transfer/nets.py | ahclab/reflection | d09fd500e9ff74211e1eb15711d479bb204c7a83 | [
"MIT"
] | null | null | null | acl_version/src/reflection_based_transfer/nets.py | ahclab/reflection | d09fd500e9ff74211e1eb15711d479bb204c7a83 | [
"MIT"
] | 2 | 2021-02-25T09:19:13.000Z | 2021-08-18T09:16:29.000Z | import numpy as np
import chainer
from chainer import Chain, Variable
from chainer import functions as F
from chainer import links as L
def reflection_numpy(x, a, c):
'''
e.g.,
x = np.array([1,1])
a = np.array([1,1])
c = np.array([0,0])
return np.array([-1... | 27.6 | 81 | 0.504571 |
4f50e64f2180cf5176280cff5599ecfee27716f0 | 1,023 | py | Python | SympatheticScripts/SPMagTrapAbsImage.py | jstammers/EDMSuite | 2841c0edef32a496855ca41deaa0f710b017ae2f | [
"MIT"
] | null | null | null | SympatheticScripts/SPMagTrapAbsImage.py | jstammers/EDMSuite | 2841c0edef32a496855ca41deaa0f710b017ae2f | [
"MIT"
] | null | null | null | SympatheticScripts/SPMagTrapAbsImage.py | jstammers/EDMSuite | 2841c0edef32a496855ca41deaa0f710b017ae2f | [
"MIT"
] | null | null | null | # Import a whole load of stuff
from System.IO import *
from System.Drawing import *
from System.Runtime.Remoting import *
from System.Threading import *
from System.Windows.Forms import *
from System.Xml.Serialization import *
from System import *
from System.Collections.Generic import Dictionary
from DAQ.En... | 25.575 | 108 | 0.71652 |
4f53604ee0833985485bc751e6ab1c2c91e9b8de | 2,811 | py | Python | Core/Model/FirefoxModel/SQLite/permissions.py | UpBeatMan/Abschlussarbeit | e842df691bbfdf77cd1c41d9de00718166bb4e19 | [
"MIT"
] | null | null | null | Core/Model/FirefoxModel/SQLite/permissions.py | UpBeatMan/Abschlussarbeit | e842df691bbfdf77cd1c41d9de00718166bb4e19 | [
"MIT"
] | 28 | 2021-06-20T17:39:00.000Z | 2021-09-04T15:03:41.000Z | Core/Model/FirefoxModel/SQLite/permissions.py | UpBeatMan/Abschlussarbeit | e842df691bbfdf77cd1c41d9de00718166bb4e19 | [
"MIT"
] | null | null | null | from sqlalchemy import Column, Integer, String, orm
from Model.util import log_message
from Model.FirefoxModel.SQLite.base import *
ID = "ID"
ORIGIN = "Herkunft"
TYPE = "Erlaubnistyp"
EXPIRYAT = "Ungueltig ab"
LASTMODIFIED = "Zuletzt geaendert"
class Permission(BaseSession, BaseSQLiteClass):
__tablename__ = "moz... | 33.464286 | 88 | 0.566346 |
4f54ca5962b8fd5f883d8b6909430f739d2ef9c4 | 4,980 | py | Python | src/main/python/utils/transform.py | meowpunch/bobsim-research | 4411ac6eaf5b760611f689b0a9e290546e2f5435 | [
"MIT"
] | 2 | 2020-03-01T17:42:44.000Z | 2020-03-09T06:13:34.000Z | src/main/python/utils/transform.py | meowpunch/bobsim-research | 4411ac6eaf5b760611f689b0a9e290546e2f5435 | [
"MIT"
] | 2 | 2020-04-01T16:48:06.000Z | 2020-04-04T11:04:10.000Z | src/main/python/utils/transform.py | meowpunch/bobsim-research | 4411ac6eaf5b760611f689b0a9e290546e2f5435 | [
"MIT"
] | null | null | null | import sys
import tempfile
from functools import reduce
import numpy as np
import pandas as pd
from joblib import load, dump
from sklearn.base import BaseEstimator
from sklearn.compose import ColumnTransformer
from sklearn.preprocessing import OneHotEncoder, FunctionTransformer, StandardScaler
from utils.function imp... | 29.294118 | 101 | 0.602209 |
4f54eefc84b73d8defc56b6aaea68ba0b4b47981 | 590 | py | Python | sender/schc_utils.py | schc-over-sigfox/schc-over-sigfox | d03e26cf5524ebd6bd64b4ca33a83149eec5e59f | [
"MIT"
] | null | null | null | sender/schc_utils.py | schc-over-sigfox/schc-over-sigfox | d03e26cf5524ebd6bd64b4ca33a83149eec5e59f | [
"MIT"
] | null | null | null | sender/schc_utils.py | schc-over-sigfox/schc-over-sigfox | d03e26cf5524ebd6bd64b4ca33a83149eec5e59f | [
"MIT"
] | 1 | 2022-03-19T12:36:30.000Z | 2022-03-19T12:36:30.000Z | def zfill(string, width):
if len(string) < width:
return ("0" * (width - len(string))) + string
else:
return string
def insert_index(ls, pos, elmt):
while len(ls) < pos:
ls.append([])
ls.insert(pos, elmt)
def replace_bit(string, position, value):
return '%s%s%s' % (string... | 21.071429 | 71 | 0.608475 |
4f556f0c8656a9b09a50bf498bdcb77afceec723 | 28 | py | Python | taxstats/tests/__init__.py | raheem03/taxstats | 23537030d7fb84b72ad1d514f7fd7f4ba6cd3ca3 | [
"MIT"
] | null | null | null | taxstats/tests/__init__.py | raheem03/taxstats | 23537030d7fb84b72ad1d514f7fd7f4ba6cd3ca3 | [
"MIT"
] | null | null | null | taxstats/tests/__init__.py | raheem03/taxstats | 23537030d7fb84b72ad1d514f7fd7f4ba6cd3ca3 | [
"MIT"
] | null | null | null | from taxstats.tests import * | 28 | 28 | 0.821429 |
4f55c8c1e9f8873de824db417c3f4370887141b2 | 1,381 | py | Python | catkin_ws_indigo/build/catkin_generated/generate_cached_setup.py | allenwxf/ROS-TUTORIAL | 9dfee042ea90cf3d6a6ae7f7200aa0c8f1a6b000 | [
"MIT"
] | null | null | null | catkin_ws_indigo/build/catkin_generated/generate_cached_setup.py | allenwxf/ROS-TUTORIAL | 9dfee042ea90cf3d6a6ae7f7200aa0c8f1a6b000 | [
"MIT"
] | null | null | null | catkin_ws_indigo/build/catkin_generated/generate_cached_setup.py | allenwxf/ROS-TUTORIAL | 9dfee042ea90cf3d6a6ae7f7200aa0c8f1a6b000 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
import os
import stat
import sys
# find the import for catkin's python package - either from source space or from an installed underlay
if os.path.exists(os.path.join('/opt/ros/indigo/share/catkin/cmake', 'catkinConfig.cmake.in')):
sys.p... | 44.548387 | 108 | 0.744388 |
4f557813dc8fef713f719096e8a89ab0c9111248 | 3,212 | py | Python | docs/conf.py | ariebovenberg/quiz | 16c938ca644d6677482d673d4876d86e1a9f27ec | [
"Apache-2.0"
] | 71 | 2018-04-04T16:30:26.000Z | 2022-03-03T17:38:35.000Z | docs/conf.py | ariebovenberg/quiz | 16c938ca644d6677482d673d4876d86e1a9f27ec | [
"Apache-2.0"
] | 504 | 2018-08-19T19:07:19.000Z | 2022-01-19T12:34:47.000Z | docs/conf.py | ariebovenberg/quiz | 16c938ca644d6677482d673d4876d86e1a9f27ec | [
"Apache-2.0"
] | 6 | 2018-10-30T13:51:46.000Z | 2020-05-17T20:31:25.000Z | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
from collections import OrderedDict
# -- Project information --------------... | 29.46789 | 78 | 0.657534 |
4f55081eb562c8671a9c7018e6c9eea031bf9abb | 2,880 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/input_photo_file_location.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/input_photo_file_location.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/input_photo_file_location.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 33.103448 | 123 | 0.621181 |
4f523978933f3a46604b10f60c0ed8fd56aace04 | 48,375 | py | Python | dataprofiler/profilers/numerical_column_stats.py | az85252/DataProfiler | 1303abe04b48fa87c67d8d9b3a13f8cb88e79afb | [
"Apache-2.0"
] | null | null | null | dataprofiler/profilers/numerical_column_stats.py | az85252/DataProfiler | 1303abe04b48fa87c67d8d9b3a13f8cb88e79afb | [
"Apache-2.0"
] | null | null | null | dataprofiler/profilers/numerical_column_stats.py | az85252/DataProfiler | 1303abe04b48fa87c67d8d9b3a13f8cb88e79afb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
coding=utf-8
Build model for a dataset by identifying type of column along with its
respective parameters.
"""
from __future__ import print_function
from __future__ import division
from future.utils import with_metaclass
import copy
import abc
import warnings
import sys
import numpy as np
f... | 41.559278 | 97 | 0.61691 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.