hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
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
972
max_issues_repo_name
stringlengths
6
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
972
max_forks_repo_name
stringlengths
6
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
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
911e663c8579fecb5416b73246b3ba204717afce
757
py
Python
nixborg/default_settings.py
domenkozar/nixbot
34afb72922b67619676c539f3e2c1239233a8f63
[ "Apache-2.0" ]
11
2016-10-07T15:30:45.000Z
2017-05-03T13:51:00.000Z
nixborg/default_settings.py
globin/nixbot
34afb72922b67619676c539f3e2c1239233a8f63
[ "Apache-2.0" ]
7
2016-10-08T18:44:25.000Z
2017-03-29T16:50:11.000Z
nixborg/default_settings.py
mayflower/nixborg
34afb72922b67619676c539f3e2c1239233a8f63
[ "Apache-2.0" ]
1
2017-02-19T20:53:12.000Z
2017-02-19T20:53:12.000Z
NIXBORG_BOT_NAME = 'nixborg' NIXBORG_MAIL = 'nixborg@nixos.community' NIXBORG_REPO = 'nixos/nixpkgs' NIXBORG_PR_REPO = 'mayflower/nixpkgs-pr' NIXBORG_PUBLIC_URL = 'https://nixborg.nixos.community' NIXBORG_REPO_DIR = '/var/lib/nixborg/repositories' NIXBORG_HYDRA_PROJECT = 'nixos' NIXBORG_NIXEXPR_PATH = 'nixos/release-sm...
44.529412
88
0.800528
80fd6973922c8cb180ff3dba456e6aeb21fa5c64
52,448
py
Python
libcloud/test/storage/test_cloudfiles.py
dupontz/libcloud
419c69441ea10e7bbf37319e5e8d02e82e7e6b40
[ "Apache-2.0" ]
null
null
null
libcloud/test/storage/test_cloudfiles.py
dupontz/libcloud
419c69441ea10e7bbf37319e5e8d02e82e7e6b40
[ "Apache-2.0" ]
null
null
null
libcloud/test/storage/test_cloudfiles.py
dupontz/libcloud
419c69441ea10e7bbf37319e5e8d02e82e7e6b40
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # 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 "Lic...
42.19469
104
0.625782
6ba297bc12de36efcf8bee92ef68407e49397282
566
py
Python
server/utils.py
ankush/intellisense
97324e6366a829f09b1a0ecb89a92ee7a572fe31
[ "MIT" ]
20
2020-12-01T07:40:21.000Z
2022-03-22T05:20:01.000Z
server/utils.py
ankush/intellisense
97324e6366a829f09b1a0ecb89a92ee7a572fe31
[ "MIT" ]
4
2021-04-16T07:56:06.000Z
2022-03-14T11:21:15.000Z
server/utils.py
ankush/intellisense
97324e6366a829f09b1a0ecb89a92ee7a572fe31
[ "MIT" ]
9
2021-04-09T13:53:42.000Z
2022-03-15T07:17:50.000Z
import os def guess_doctype(document): from .server import get_config py_path = document.path if not py_path.endswith(".py"): return config = get_config() doctypes = config.get("doctypes") doctype_paths = doctypes.values() document_folder = os.path.abspath(os.path.join(py_path, "..")) if document_folder ...
25.727273
82
0.731449
f16e94af59a23f20b5a6af55c3b25b162db38956
1,753
py
Python
csa_new/csa_new/doctype/tournament_owner/tournament_owner.py
Jishnu70055/user_management
82d3d2c85a62c7f1162633c164cb7d50e229d2fd
[ "MIT" ]
null
null
null
csa_new/csa_new/doctype/tournament_owner/tournament_owner.py
Jishnu70055/user_management
82d3d2c85a62c7f1162633c164cb7d50e229d2fd
[ "MIT" ]
null
null
null
csa_new/csa_new/doctype/tournament_owner/tournament_owner.py
Jishnu70055/user_management
82d3d2c85a62c7f1162633c164cb7d50e229d2fd
[ "MIT" ]
null
null
null
# Copyright (c) 2021, sd and contributors # For license information, please see license.txt # import frappe # from frappe.model.document import Document from datetime import date from datetime import datetime import frappe from frappe.model.document import Document import random class TournamentOwner(Document): def...
28.274194
85
0.729036
f0c45873269bbac98acd881746e1f4fdd9b8e975
839
py
Python
simple_blog/urls.py
shinn-lancelot/simple_blog
6176458bbf98b69c62c71bbc7bf8d27b1b5c9825
[ "MIT" ]
1
2018-07-17T03:13:43.000Z
2018-07-17T03:13:43.000Z
simple_blog/urls.py
shinn-lancelot/simple_blog
6176458bbf98b69c62c71bbc7bf8d27b1b5c9825
[ "MIT" ]
null
null
null
simple_blog/urls.py
shinn-lancelot/simple_blog
6176458bbf98b69c62c71bbc7bf8d27b1b5c9825
[ "MIT" ]
null
null
null
"""simple_blog URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-b...
34.958333
77
0.696067
029a9e6e0fc7f4a320a445277acaaf8afcede33a
7,596
py
Python
lldb/test/API/tools/lldb-vscode/breakpoint/TestVSCode_setFunctionBreakpoints.py
RLovelett/llvm-project
7137df554b840467d2509337813801b51a645579
[ "Apache-2.0" ]
27
2020-02-18T20:48:54.000Z
2022-02-14T01:30:00.000Z
lldb/test/API/tools/lldb-vscode/breakpoint/TestVSCode_setFunctionBreakpoints.py
WYK15/swift-Ollvm10
ea68224ab23470963b68dfcc28b5ac769a070ea3
[ "Apache-2.0" ]
3
2020-02-14T10:43:01.000Z
2022-02-05T22:55:07.000Z
lldb/test/API/tools/lldb-vscode/breakpoint/TestVSCode_setFunctionBreakpoints.py
WYK15/swift-Ollvm10
ea68224ab23470963b68dfcc28b5ac769a070ea3
[ "Apache-2.0" ]
7
2020-04-14T09:12:18.000Z
2021-09-20T10:31:12.000Z
""" Test lldb-vscode setBreakpoints request """ import unittest2 import vscode from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil import lldbvscode_testcase class TestVSCode_setFunctionBreakpoints( lldbvscode_testcase.VSCodeTestCaseBase): m...
46.888889
79
0.615587
880ecffb2ed304f2b16b758f4ab9a8146f00f58f
2,122
py
Python
sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/error_response_error.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/error_response_error.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/error_response_error.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.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 ...
37.892857
78
0.630537
80ed58aee7445674749412a7450b37f45c9e257d
1,899
py
Python
Core Concepts/Dimensionality Reduction/PCA_pipeline.py
WyckliffeAluga/data-chronicles
5219fe9cdbafb9fd7be88727483952c4c13f2790
[ "MIT" ]
null
null
null
Core Concepts/Dimensionality Reduction/PCA_pipeline.py
WyckliffeAluga/data-chronicles
5219fe9cdbafb9fd7be88727483952c4c13f2790
[ "MIT" ]
null
null
null
Core Concepts/Dimensionality Reduction/PCA_pipeline.py
WyckliffeAluga/data-chronicles
5219fe9cdbafb9fd7be88727483952c4c13f2790
[ "MIT" ]
1
2021-02-09T12:22:55.000Z
2021-02-09T12:22:55.000Z
from sklearn.preprocessing import StandardScaler from sklearn.decomposition import PCA from sklearn.pipeline import Pipeline import pandas as pd df = pd.read_csv("datasets\pokemon.csv") # Build the pipeline pipe = Pipeline([('scaler', StandardScaler()), ('reducer', PCA(n_components=2))]) # Fit it to the...
27.521739
65
0.69247
78b60f91b88dad0d13877bf09cac2a74ec333e88
132,553
py
Python
hl7apy/v2_5_2/segments.py
ryoung29/hl7apy
e83029ca68f31581b95f85f280c7b4cc81c0f6b2
[ "MIT" ]
null
null
null
hl7apy/v2_5_2/segments.py
ryoung29/hl7apy
e83029ca68f31581b95f85f280c7b4cc81c0f6b2
[ "MIT" ]
null
null
null
hl7apy/v2_5_2/segments.py
ryoung29/hl7apy
e83029ca68f31581b95f85f280c7b4cc81c0f6b2
[ "MIT" ]
null
null
null
from .fields import FIELDS SEGMENTS = { 'ABS': ('sequence', (('ABS_1', FIELDS['ABS_1'], (0, 1), 'FIE'), ('ABS_2', FIELDS['ABS_2'], (0, 1), 'FIE'), ('ABS_3', FIELDS['ABS_3'], (0, 1), 'FIE'), ('ABS_4', FIELDS['ABS_4'], (0, 1), 'FIE'), ('ABS_5', FIELDS['...
55.024076
61
0.375284
ab2921d85818df2eda0f23a6682e14ead62291a9
1,470
py
Python
topicnet/viewers/initial_doc_to_topic_viewer.py
DmitriyValetov/TopicNet
b450606ce6cdf2b1f75280112627666f325b1b2c
[ "MIT" ]
123
2019-09-11T15:35:47.000Z
2022-03-03T02:00:45.000Z
topicnet/viewers/initial_doc_to_topic_viewer.py
DmitriyValetov/TopicNet
b450606ce6cdf2b1f75280112627666f325b1b2c
[ "MIT" ]
65
2019-10-14T13:24:31.000Z
2022-03-27T18:45:00.000Z
topicnet/viewers/initial_doc_to_topic_viewer.py
DmitriyValetov/TopicNet
b450606ce6cdf2b1f75280112627666f325b1b2c
[ "MIT" ]
15
2019-10-16T20:17:55.000Z
2022-03-30T21:46:54.000Z
from .base_viewer import BaseViewer class TopTopicsFeatures(BaseViewer): """ """ def __init__(self, dataset_id, model): super(TopTopicsFeatures, self).__init__(model=model) self._dataset = model.experiment.datasets[dataset_id] def view(self, document_id, topic_name=None, batch_vectorizer=...
30.625
72
0.538095
73c46f3e63832be4b202137144071208c5deaba6
40
py
Python
graphql_schema_parse/__init__.py
zy7y/graphql-schema-parse
05fa8062ff059ab92bba46cfa9ff50d9937bea37
[ "MIT" ]
null
null
null
graphql_schema_parse/__init__.py
zy7y/graphql-schema-parse
05fa8062ff059ab92bba46cfa9ff50d9937bea37
[ "MIT" ]
2
2022-02-14T11:23:20.000Z
2022-02-15T12:25:35.000Z
graphql_schema_parse/__init__.py
zy7y/graphql-schema-parse
05fa8062ff059ab92bba46cfa9ff50d9937bea37
[ "MIT" ]
null
null
null
__version__ = "0.2.2" __author__ = "柒意"
13.333333
21
0.65
d7ed7f66715334cc5c5f78d656acc0e04c8129be
5,954
py
Python
Data-Structures-master/Data-Structures-master/stack/stack.py
RCTom168/Data-Structures
8e38a82c38ef3689a173e8ad2f56c36ccabbdc51
[ "MIT" ]
null
null
null
Data-Structures-master/Data-Structures-master/stack/stack.py
RCTom168/Data-Structures
8e38a82c38ef3689a173e8ad2f56c36ccabbdc51
[ "MIT" ]
null
null
null
Data-Structures-master/Data-Structures-master/stack/stack.py
RCTom168/Data-Structures
8e38a82c38ef3689a173e8ad2f56c36ccabbdc51
[ "MIT" ]
null
null
null
""" A stack is a data structure whose primary purpose is to store and return elements in Last In First Out order. 1. Implement the Stack class using an array as the underlying storage structure. Make sure the Stack tests pass. 2. Re-implement the Stack class, this time using the linked list implementation as th...
32.010753
161
0.60178
724fbffa592a713ad061c885424145ffece0f8b9
4,590
py
Python
gradius/PPO/src/env.py
econnolly27/ReinforcementLearningNES
45464fbf193b5c7249013f7ece06afec27a60d5a
[ "MIT", "BSD-3-Clause" ]
2
2022-01-29T10:38:05.000Z
2022-01-29T10:38:12.000Z
gradius/PPO/src/env.py
econnolly27/ReinforcementLearningNES
45464fbf193b5c7249013f7ece06afec27a60d5a
[ "MIT", "BSD-3-Clause" ]
null
null
null
gradius/PPO/src/env.py
econnolly27/ReinforcementLearningNES
45464fbf193b5c7249013f7ece06afec27a60d5a
[ "MIT", "BSD-3-Clause" ]
null
null
null
""" @author: Viet Nguyen <nhviet1009@gmail.com> From: https://github.com/uvipen/Super-mario-bros-PPO-pytorch Re-implemented to use gym-retro by Gerardo Aragon-Camarasa Modified for Benchmarking Reinforcement Learning Algorithms in NES Games by Erin-Louise Connolly """ import os import gym import retro from gym.space...
33.50365
128
0.634858
627c336572aa8c774254d9464dcfd3bd6f72207b
26,827
py
Python
scripts/automation/trex_control_plane/client/trex_stateless_client.py
git-root/trex-core
82280f7c87fabed60d83643bd9ec2c79cac34668
[ "Apache-2.0" ]
null
null
null
scripts/automation/trex_control_plane/client/trex_stateless_client.py
git-root/trex-core
82280f7c87fabed60d83643bd9ec2c79cac34668
[ "Apache-2.0" ]
null
null
null
scripts/automation/trex_control_plane/client/trex_stateless_client.py
git-root/trex-core
82280f7c87fabed60d83643bd9ec2c79cac34668
[ "Apache-2.0" ]
null
null
null
#!/router/bin/python try: # support import for Python 2 import outer_packages except ImportError: # support import for Python 3 import client.outer_packages from client_utils.jsonrpc_client import JsonRpcClient, BatchMessage from client_utils.packet_builder import CTRexPktBuilder import json from commo...
42.515055
116
0.579528
fbc2d06a13a69463711dda9256ba62b30e874aec
233
py
Python
dashboard/dashboard/doctype/dashboard_detail_view/test_dashboard_detail_view.py
TridotsTech/FrappeDashboardBuilder
2f8ff177694d13bd5941c3bcba4056f2bb5d19ac
[ "MIT" ]
1
2019-08-18T08:16:00.000Z
2019-08-18T08:16:00.000Z
dashboard/dashboard/doctype/dashboard_detail_view/test_dashboard_detail_view.py
TridotsTech/FrappeDashboardBuilder
2f8ff177694d13bd5941c3bcba4056f2bb5d19ac
[ "MIT" ]
null
null
null
dashboard/dashboard/doctype/dashboard_detail_view/test_dashboard_detail_view.py
TridotsTech/FrappeDashboardBuilder
2f8ff177694d13bd5941c3bcba4056f2bb5d19ac
[ "MIT" ]
1
2020-10-11T13:22:51.000Z
2020-10-11T13:22:51.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2018, info@valiantsystems.com and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest class TestDashboardDetailView(unittest.TestCase): pass
21.181818
62
0.785408
f4d857b954af7f0751c3de2390d6adce191c514f
834
py
Python
src/onconnect/app.py
kensh/websocket-apigateway
4a2f3296d8c706e48d12bdcf243ef828423ab194
[ "MIT" ]
null
null
null
src/onconnect/app.py
kensh/websocket-apigateway
4a2f3296d8c706e48d12bdcf243ef828423ab194
[ "MIT" ]
null
null
null
src/onconnect/app.py
kensh/websocket-apigateway
4a2f3296d8c706e48d12bdcf243ef828423ab194
[ "MIT" ]
null
null
null
import json import boto3 import os dynamodb = boto3.resource('dynamodb') TABLE_NAME = os.environ['TABLE_NAME'] table = dynamodb.Table(TABLE_NAME) def lambda_handler(event, context): print(json.dumps(event)) try: # raise Exception('this is dummy error!') connectionId = event['r...
21.947368
86
0.553957
fa952f0f71cc2dd544e75ed0c561973ffaa7378d
4,100
py
Python
experiments/eval_methods.py
pgruening/fp_nets_as_novel_deep_networks_inspired_by_vision
41a0fb236cba9d4af259329d1ccbcb35a1981f3d
[ "MIT" ]
null
null
null
experiments/eval_methods.py
pgruening/fp_nets_as_novel_deep_networks_inspired_by_vision
41a0fb236cba9d4af259329d1ccbcb35a1981f3d
[ "MIT" ]
null
null
null
experiments/eval_methods.py
pgruening/fp_nets_as_novel_deep_networks_inspired_by_vision
41a0fb236cba9d4af259329d1ccbcb35a1981f3d
[ "MIT" ]
null
null
null
from os.path import isfile, join import helpers import matplotlib.pyplot as plt from datasets.data_getter import get_data_loaders from DLBio import pt_training from DLBio.helpers import check_mkdir, load_json, set_plt_font_size from DLBio.kwargs_translator import get_kwargs from DLBio.pytorch_helpers import Activation...
30.37037
147
0.621951
d4bdf0f48465134453074094fe00731a6d29c324
9,669
py
Python
client.py
aburston/board_game_concept
b128cc4e4c4c3cbcce1a47eecd8124b0fb8c1744
[ "MIT" ]
null
null
null
client.py
aburston/board_game_concept
b128cc4e4c4c3cbcce1a47eecd8124b0fb8c1744
[ "MIT" ]
1
2020-10-11T18:29:26.000Z
2020-10-11T18:29:26.000Z
client.py
aburston/board_game_concept
b128cc4e4c4c3cbcce1a47eecd8124b0fb8c1744
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import sys import yaml import os import time from getpass import getpass from BoardGameConcept import UnitType from BoardGameConcept import Board from BoardGameConcept import Player from BoardGameConcept import Empty from GameData import GameData DEBUG = False def usage(): print("client.py <ga...
39.145749
213
0.475127
43d00b3aee035cea8caee46799f826ed4990f2d6
191,996
py
Python
dota2/protobufs/dota_gcmessages_client_guild_pb2.py
Ananto30/dota2
67dad92310e2f990eb6ab897823f96803e012172
[ "MIT" ]
172
2015-10-16T15:36:40.000Z
2022-01-28T15:23:59.000Z
dota2/protobufs/dota_gcmessages_client_guild_pb2.py
Ananto30/dota2
67dad92310e2f990eb6ab897823f96803e012172
[ "MIT" ]
81
2016-03-27T22:23:25.000Z
2022-01-21T11:40:54.000Z
dota2/protobufs/dota_gcmessages_client_guild_pb2.py
Ananto30/dota2
67dad92310e2f990eb6ab897823f96803e012172
[ "MIT" ]
41
2016-06-05T15:42:41.000Z
2022-02-04T08:44:10.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: dota_gcmessages_client_guild.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descrip...
42.030648
21,367
0.775027
d50adaa21266d82aee66d91351a1df5e1fdaf437
15,135
py
Python
research/umn-pr-analysis.py
zooniverse/CameraTraps
4daec9cbd571304c1258c2c38dba50f6715bbb61
[ "MIT" ]
1
2022-01-05T22:31:58.000Z
2022-01-05T22:31:58.000Z
research/umn-pr-analysis.py
zooniverse/CameraTraps
4daec9cbd571304c1258c2c38dba50f6715bbb61
[ "MIT" ]
null
null
null
research/umn-pr-analysis.py
zooniverse/CameraTraps
4daec9cbd571304c1258c2c38dba50f6715bbb61
[ "MIT" ]
null
null
null
# # umn-pr-analysis.py # # Precision/recall analysis for UMN data # #%% Imports and constants import os import json import pandas as pd import shutil from tqdm import tqdm from pathlib import Path from sklearn.metrics import precision_recall_curve, confusion_matrix from IPython.core.display import display import vi...
36.121718
137
0.685101
6d69aae4068caebcdc533ff80bb4016a6463e07c
3,285
py
Python
lib/jnpr/healthbot/swagger/models/license_raw_key_schema.py
Juniper/healthbot-py-client
49f0884b5d01ac8430aa7ed4c9acb4e7a2b717a6
[ "Apache-2.0" ]
10
2019-10-23T12:54:37.000Z
2022-02-07T19:24:30.000Z
docs/jnpr_healthbot_swagger/swagger_client/models/license_raw_key_schema.py
Juniper/healthbot-py-client
49f0884b5d01ac8430aa7ed4c9acb4e7a2b717a6
[ "Apache-2.0" ]
5
2019-09-30T04:29:25.000Z
2022-02-16T12:21:06.000Z
docs/jnpr_healthbot_swagger/swagger_client/models/license_raw_key_schema.py
Juniper/healthbot-py-client
49f0884b5d01ac8430aa7ed4c9acb4e7a2b717a6
[ "Apache-2.0" ]
4
2019-09-30T01:17:48.000Z
2020-08-25T07:27:54.000Z
# coding: utf-8 """ Paragon Insights APIs API interface for PI application # noqa: E501 OpenAPI spec version: 4.0.0 Contact: healthbot-feedback@juniper.net Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class LicenseRawK...
27.605042
93
0.56347
8bdd2f1e23ecd652f5d030dc614bc5df48cb8a62
1,395
py
Python
welkin/api_resources/abstract/updateable_api_resource.py
sonugspericorn/welkin-python
a96491a4bb96af697f965263f6bcc12c30397fa7
[ "MIT" ]
null
null
null
welkin/api_resources/abstract/updateable_api_resource.py
sonugspericorn/welkin-python
a96491a4bb96af697f965263f6bcc12c30397fa7
[ "MIT" ]
null
null
null
welkin/api_resources/abstract/updateable_api_resource.py
sonugspericorn/welkin-python
a96491a4bb96af697f965263f6bcc12c30397fa7
[ "MIT" ]
null
null
null
from welkin.api_resources.abstract.api_resource import APIResource from welkin.auth import Auth import welkin.util as wu import requests update_data = { "phase": "intake", "is_active": "true", "primary_worker_id": "1ecacc1f-1a4c-4bcb-9790-528642cba054", "timezone": "US/Pacific", "first_...
30.326087
78
0.591398
99508158f918c4fd0b3a8c0e21d1f3d2f480781d
263
py
Python
setup.py
birlrobotics/parameters_combinator
6f4f1ed838867c3d6b692b57d5895c18320394e9
[ "BSD-3-Clause" ]
null
null
null
setup.py
birlrobotics/parameters_combinator
6f4f1ed838867c3d6b692b57d5895c18320394e9
[ "BSD-3-Clause" ]
null
null
null
setup.py
birlrobotics/parameters_combinator
6f4f1ed838867c3d6b692b57d5895c18320394e9
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python from distutils.core import setup from catkin_pkg.python_setup import generate_distutils_setup setup_args = generate_distutils_setup( packages=[ 'parameters_combinator', ], package_dir={'': 'src'} ) setup(**setup_args)
18.785714
60
0.726236
d81dc5fba12abd64f4d7f8c545ef0e70bde35624
854
py
Python
riotwatcher-1.2.5/setup.py
dannycliang/gamestodiamond
6466a2a07682701954bd2a9b120194beeb1c06f0
[ "BSD-3-Clause" ]
null
null
null
riotwatcher-1.2.5/setup.py
dannycliang/gamestodiamond
6466a2a07682701954bd2a9b120194beeb1c06f0
[ "BSD-3-Clause" ]
null
null
null
riotwatcher-1.2.5/setup.py
dannycliang/gamestodiamond
6466a2a07682701954bd2a9b120194beeb1c06f0
[ "BSD-3-Clause" ]
null
null
null
from setuptools import setup import os.path __version__ = '1.2.5' descr_file = os.path.join(os.path.dirname(__file__), 'README.rst') setup( name='riotwatcher', version=__version__, packages=['riotwatcher'], description='RiotWatcher is a thin wrapper on top of the Riot Games API for...
29.448276
101
0.625293
dd1e8ab0f88e5a548123025f3a8828204adcc89b
730
py
Python
matches/migrations/0002_lastmatchesplugin.py
Zundrium/djangocms-gamegroup
7e7b7c4f7a2c8027583cab91c53a649bb0c3fcb7
[ "MIT" ]
1
2015-02-10T22:29:38.000Z
2015-02-10T22:29:38.000Z
matches/migrations/0002_lastmatchesplugin.py
Zundrium/djangocms-gamegroup
7e7b7c4f7a2c8027583cab91c53a649bb0c3fcb7
[ "MIT" ]
null
null
null
matches/migrations/0002_lastmatchesplugin.py
Zundrium/djangocms-gamegroup
7e7b7c4f7a2c8027583cab91c53a649bb0c3fcb7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('cms', '0003_auto_20140926_2347'), ('matches', '0001_initial'), ] operations = [ migrations.CreateModel( ...
27.037037
148
0.565753
5a0f69615749a2bab07f4149c78024e691bc4c1c
1,500
py
Python
consume.py
liveldp/consensus
d1d6c3b7f98eb36194c4af093d913a9a34c8c670
[ "Apache-2.0" ]
null
null
null
consume.py
liveldp/consensus
d1d6c3b7f98eb36194c4af093d913a9a34c8c670
[ "Apache-2.0" ]
null
null
null
consume.py
liveldp/consensus
d1d6c3b7f98eb36194c4af093d913a9a34c8c670
[ "Apache-2.0" ]
null
null
null
from threading import Thread import pika import config def __setup_channel(exchange, routing_key, queue, callback): connection = pika.BlockingConnection(pika.ConnectionParameters( host=config.AMQP_HOST, port=config.AMQP_PORT, credentials=pika.credentials.PlainCredentials(config.AMQP_USER, config....
35.714286
91
0.706
f903eeb4ac3a22d1239c0548772d048d3bdd931a
3,671
py
Python
it_test/sdk.py
heartsucker/securedrop-api-integration-tests
584c0a77502d7a05ce00d4a209703e42a7a57c75
[ "Apache-2.0", "MIT" ]
null
null
null
it_test/sdk.py
heartsucker/securedrop-api-integration-tests
584c0a77502d7a05ce00d4a209703e42a7a57c75
[ "Apache-2.0", "MIT" ]
null
null
null
it_test/sdk.py
heartsucker/securedrop-api-integration-tests
584c0a77502d7a05ce00d4a209703e42a7a57c75
[ "Apache-2.0", "MIT" ]
null
null
null
import attr import requests import subprocess import time from os import path from typing import List from requests.exceptions import ConnectionError from .utils import info """ Tests are done as a subset of the cross product of: - SDK name - SDK version - Language version - SecureDrop version For e...
26.410072
91
0.523018
0d03964008889a89ee6252552f09e51d477cdddc
9,443
py
Python
lib/ColormapperSettings.py
bearpelican/colormapper
fff20d5908aae9be9d7b2c4869fe4df8c0e17efe
[ "MIT" ]
null
null
null
lib/ColormapperSettings.py
bearpelican/colormapper
fff20d5908aae9be9d7b2c4869fe4df8c0e17efe
[ "MIT" ]
null
null
null
lib/ColormapperSettings.py
bearpelican/colormapper
fff20d5908aae9be9d7b2c4869fe4df8c0e17efe
[ "MIT" ]
null
null
null
import numpy as np class ColormapperSettings: """ This class stores settings for the colormapper app, as well as Get and Set methods to adjust the settings. """ # Defaults # For Unmixing: unmix = { "backgroundColor": (244, 205, 100), "backgroundSpectrum": (113, 95, 46), ...
38.386179
77
0.639839
4ece4e0149620d1d64f0e02a2703ce2c671da328
2,204
py
Python
robopose/lib3d/mesh_ops.py
lesteve/robopose
536e5317c891bf6bb2b8cbdda294533b3f111e09
[ "MIT" ]
43
2021-04-19T13:57:00.000Z
2022-03-30T02:43:29.000Z
robopose/lib3d/mesh_ops.py
lesteve/robopose
536e5317c891bf6bb2b8cbdda294533b3f111e09
[ "MIT" ]
1
2021-07-07T04:46:57.000Z
2021-07-09T04:48:34.000Z
robopose/lib3d/mesh_ops.py
lesteve/robopose
536e5317c891bf6bb2b8cbdda294533b3f111e09
[ "MIT" ]
6
2021-05-10T16:14:08.000Z
2022-01-13T23:01:34.000Z
import torch import numpy as np def get_meshes_center(pts): bsz = pts.shape[0] limits = get_meshes_bounding_boxes(pts) t_offset = limits[..., :3].mean(dim=1) T_offset = torch.eye(4, 4, dtype=pts.dtype, device=pts.device) T_offset = T_offset.unsqueeze(0).repeat(bsz, 1, 1) T_offset[:, :3, -1] = ...
45.916667
107
0.635662
ef095f84336a53ec08b39e709100eddd907e2d18
767
py
Python
examples/how_to/workitem/get_workitem.py
casabre/rtcclient
896a70fdde5846c580382e568c898633e32b20e6
[ "Apache-2.0" ]
null
null
null
examples/how_to/workitem/get_workitem.py
casabre/rtcclient
896a70fdde5846c580382e568c898633e32b20e6
[ "Apache-2.0" ]
null
null
null
examples/how_to/workitem/get_workitem.py
casabre/rtcclient
896a70fdde5846c580382e568c898633e32b20e6
[ "Apache-2.0" ]
null
null
null
from rtcclient.client import RTCClient from rtcclient.utils import setup_basic_logging if __name__ == "__main__": # you can remove this if you don't need logging # default logging for console output setup_basic_logging() url = "https://your_domain:9443/jazz" username = "your_username" password...
33.347826
77
0.696219
12f62797d2aa7362c13bfd8d098077eb2a1d709e
2,004
py
Python
profile_api/models.py
RajivBiswal/myprofile-rest-api
47b6b597000df13dbbac709a17d09f85892881b6
[ "MIT" ]
null
null
null
profile_api/models.py
RajivBiswal/myprofile-rest-api
47b6b597000df13dbbac709a17d09f85892881b6
[ "MIT" ]
4
2021-03-19T11:53:47.000Z
2022-02-10T09:41:38.000Z
profile_api/models.py
RajivBiswal/myprofile-rest-api
47b6b597000df13dbbac709a17d09f85892881b6
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractBaseUser,PermissionsMixin from django.contrib.auth.models import BaseUserManager from django.conf import settings class UserProfileManager(BaseUserManager): """Manager for user profile""" def create_user(self,email,name,password=None)...
29.910448
72
0.684631
f1af38a5da1cc39e679b73e135ded1bad074741a
1,771
py
Python
rl_agent/src/rl_agent/env_wrapper/youbot/ros_env_cont_youbot.py
sudo-Boris/drl_local_planner_ros_stable_baselines
121523071d01b0880d4d255d78bc592e861a523b
[ "BSD-3-Clause" ]
null
null
null
rl_agent/src/rl_agent/env_wrapper/youbot/ros_env_cont_youbot.py
sudo-Boris/drl_local_planner_ros_stable_baselines
121523071d01b0880d4d255d78bc592e861a523b
[ "BSD-3-Clause" ]
null
null
null
rl_agent/src/rl_agent/env_wrapper/youbot/ros_env_cont_youbot.py
sudo-Boris/drl_local_planner_ros_stable_baselines
121523071d01b0880d4d255d78bc592e861a523b
[ "BSD-3-Clause" ]
null
null
null
''' @name: ros_env_cont_raw_data.py @brief: This class is a simulation environment wrapper for the Raw Representation with continuous action space. @author: Ronja Gueldenring @version: 3.5 @date: 2019/04/05 ''' import rospy # python relevant impor...
33.415094
220
0.681536
6e9fcf23c0af0f8fba7e5e66fe240d8bb233eb9c
8,059
py
Python
tests/conftest.py
MahmoudHussien/pre-commit
3fadbefab9089e84a7cc049de3c5321a659f9d1d
[ "MIT" ]
null
null
null
tests/conftest.py
MahmoudHussien/pre-commit
3fadbefab9089e84a7cc049de3c5321a659f9d1d
[ "MIT" ]
null
null
null
tests/conftest.py
MahmoudHussien/pre-commit
3fadbefab9089e84a7cc049de3c5321a659f9d1d
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import unicode_literals import functools import io import logging import os.path import mock import pytest import six from pre_commit import output from pre_commit.envcontext import envcontext from pre_commit.logging_handler import logging_handler from pre_commi...
28.477032
77
0.642884
3d2c19c0f50efa424a1a6111e217b9bf13ee09c6
14,586
py
Python
hear/session_block_stores.py
otosense/hear
4951cb5e7b2e834deb0c1e2f42313ce761a8457f
[ "Apache-2.0" ]
1
2021-06-29T19:45:58.000Z
2021-06-29T19:45:58.000Z
hear/session_block_stores.py
otosense/hear
4951cb5e7b2e834deb0c1e2f42313ce761a8457f
[ "Apache-2.0" ]
2
2021-01-25T20:36:03.000Z
2021-06-18T18:57:34.000Z
hear/session_block_stores.py
otosense/hear
4951cb5e7b2e834deb0c1e2f42313ce761a8457f
[ "Apache-2.0" ]
null
null
null
""" Stores that specialize in block storage; That is, where continuous signal is stored over multiple blocks of data. """ from sortedcontainers import SortedList from collections.abc import Iterable, Mapping from functools import lru_cache, cached_property import soundfile as sf from io import BytesIO import json impor...
37.984375
117
0.636227
bc936696ea2187043a10ac8957d45898d56ce7d3
7,708
py
Python
venv/Lib/site-packages/django/utils/jslex.py
RiccardoCherchi/Barcode-Stock
699b977fa70ea14a7ac4d33bb7bb2f107aa2ca20
[ "MIT" ]
null
null
null
venv/Lib/site-packages/django/utils/jslex.py
RiccardoCherchi/Barcode-Stock
699b977fa70ea14a7ac4d33bb7bb2f107aa2ca20
[ "MIT" ]
null
null
null
venv/Lib/site-packages/django/utils/jslex.py
RiccardoCherchi/Barcode-Stock
699b977fa70ea14a7ac4d33bb7bb2f107aa2ca20
[ "MIT" ]
null
null
null
"""JsLex: a lexer for Javascript""" # Originally from https://bitbucket.org/ned/jslex import re class Tok: """ A specification for a token class. """ num = 0 def __init__(self, name, regex, next=None): self.id = Tok.num Tok.num += 1 self.name = name self.regex = re...
34.720721
88
0.42657
d77ceb1fbb65b76d059165743c9afbd06ee23173
2,550
py
Python
tests/provider/test_iiif.py
gnott/elife-bot
584c315d15d1289e0d2c27c28aaaae31174812e4
[ "MIT" ]
null
null
null
tests/provider/test_iiif.py
gnott/elife-bot
584c315d15d1289e0d2c27c28aaaae31174812e4
[ "MIT" ]
null
null
null
tests/provider/test_iiif.py
gnott/elife-bot
584c315d15d1289e0d2c27c28aaaae31174812e4
[ "MIT" ]
null
null
null
import unittest from mock import mock, patch from provider.iiif import ShortRetryException import provider.iiif as iiif class ObjectView(object): def __init__(self, d): self.__dict__ = d class FakeLogger: def __init__(self): self.logdebug = "First logger debug" self.loginfo = "First lo...
36.956522
95
0.700392
7646e40edc1568ac7272f358212c3db32d878b45
2,870
py
Python
configs/SETR/SETR_MLA_DeiT_768x768_80k_cityscapes_bs_8_MS.py
zbwxp/SETR
b921cb115610e5651c63e8993965fd3bb009159d
[ "MIT" ]
789
2020-12-30T10:20:37.000Z
2022-03-30T15:09:13.000Z
configs/SETR/SETR_MLA_DeiT_768x768_80k_cityscapes_bs_8_MS.py
zbwxp/SETR
b921cb115610e5651c63e8993965fd3bb009159d
[ "MIT" ]
51
2021-01-01T11:21:13.000Z
2022-03-31T01:16:26.000Z
configs/SETR/SETR_MLA_DeiT_768x768_80k_cityscapes_bs_8_MS.py
zbwxp/SETR
b921cb115610e5651c63e8993965fd3bb009159d
[ "MIT" ]
119
2021-01-02T14:27:41.000Z
2022-03-30T06:07:29.000Z
_base_ = [ '../_base_/models/setr_mla.py', '../_base_/datasets/cityscapes_768x768.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py' ] model = dict( backbone=dict(img_size=768, pos_embed_interp=True, drop_rate=0., mla_channels=256, model_name='deit_base_distill...
34.578313
127
0.566551
eb11794f97821e56e2a802eed36fe5dd5c86d055
4,036
gyp
Python
ui/events/events.gyp
nagineni/chromium-crosswalk
5725642f1c67d0f97e8613ec1c3e8107ab53fdf8
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
ui/events/events.gyp
nagineni/chromium-crosswalk
5725642f1c67d0f97e8613ec1c3e8107ab53fdf8
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
ui/events/events.gyp
nagineni/chromium-crosswalk
5725642f1c67d0f97e8613ec1c3e8107ab53fdf8
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'variables': { 'chromium_code': 1, }, 'targets': [ { 'target_name': 'events', 'type': '<(component)', 'dependencies': [ ...
32.031746
100
0.573835
38031ba8cb549d049c0805419203281989a7987b
415
py
Python
Problem 039.py
Junipyr/Project-Euler
dcc97636d27e9f16a6f80b361689c6bfbd943751
[ "FSFAP" ]
null
null
null
Problem 039.py
Junipyr/Project-Euler
dcc97636d27e9f16a6f80b361689c6bfbd943751
[ "FSFAP" ]
null
null
null
Problem 039.py
Junipyr/Project-Euler
dcc97636d27e9f16a6f80b361689c6bfbd943751
[ "FSFAP" ]
null
null
null
import math p_max = 1000 c_sq_set = set(c * c for c in range(p_max)) ps = [0] * p_max for a in range(1, p_max // 2): for b in range(a, p_max // 2): c_sq = a*a + b*b if c_sq in c_sq_set: p = int(a + b + math.sqrt(c_sq)) if p < p_max: ps[p] += 1 ans = ps.index(max(...
18.863636
44
0.537349
405be86c488df5d8d0cc25527c7f5bba8313ac3a
3,639
py
Python
configs/gfocal/gfocal_r101_fpn_ms2x.py
jms0923/gfl2_mmdet29
a0d20df44516b6b344e25c745e07f77d34a46ae3
[ "Apache-2.0" ]
426
2020-10-16T08:09:27.000Z
2022-03-30T03:36:04.000Z
configs/gfocal/gfocal_r101_fpn_ms2x.py
chisyliu/GFocalV2
2a55a572d25ced5de8b74651e73d2fb2a0feef0d
[ "Apache-2.0" ]
35
2020-11-26T14:33:57.000Z
2022-03-29T01:40:15.000Z
configs/gfocal/gfocal_r101_fpn_ms2x.py
chisyliu/GFocalV2
2a55a572d25ced5de8b74651e73d2fb2a0feef0d
[ "Apache-2.0" ]
47
2020-11-26T02:48:03.000Z
2022-03-06T09:28:54.000Z
_base_ = [ '../_base_/datasets/coco_detection.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' ] model = dict( type='GFL', pretrained='torchvision://resnet101', backbone=dict( type='ResNet', depth=101, num_stages=4, out_indices=(0, 1, 2, 3), ...
29.827869
77
0.604836
92017896da5ca80c0f41852ab1a734a46484c1d9
669
py
Python
python/job_stream/test/lib/config_in_python1.py
wwoods/job_stream
7bed3d9d42b8a08bcc92dfbc632f389d6ecc9b7d
[ "MIT" ]
32
2015-01-02T03:52:45.000Z
2022-03-26T01:51:30.000Z
python/job_stream/test/lib/config_in_python1.py
wwoods/job_stream
7bed3d9d42b8a08bcc92dfbc632f389d6ecc9b7d
[ "MIT" ]
1
2018-08-16T10:42:33.000Z
2018-08-29T17:54:36.000Z
python/job_stream/test/lib/config_in_python1.py
wwoods/job_stream
7bed3d9d42b8a08bcc92dfbc632f389d6ecc9b7d
[ "MIT" ]
5
2015-04-26T17:51:12.000Z
2020-03-12T18:26:14.000Z
import job_stream.common as common class addTwo(common.Job): def handleWork(self, w): self.emit(w + 2) class multiply(common.Reducer): def handleInit(self, stash): stash.value = 1 def handleAdd(self, stash, work): stash.value *= work def handleJoin(self, stash, other): ...
21.580645
56
0.556054
a08b21e8e42a7ebc9e0e1c36bdfd7da4de6d2cfb
480
py
Python
solutions/0633-Sum-of-Square-Numbers/0633.py
leetcode-notebook/wonz
9ffd2ce9b5f3a544ee958f5a0673215afd176c2b
[ "MIT" ]
12
2020-04-21T01:09:14.000Z
2022-01-13T08:42:03.000Z
solutions/0633-Sum-of-Square-Numbers/0633.py
leetcode-notebook/wonz
9ffd2ce9b5f3a544ee958f5a0673215afd176c2b
[ "MIT" ]
null
null
null
solutions/0633-Sum-of-Square-Numbers/0633.py
leetcode-notebook/wonz
9ffd2ce9b5f3a544ee958f5a0673215afd176c2b
[ "MIT" ]
4
2020-03-31T03:06:16.000Z
2021-07-06T07:27:44.000Z
class Solution(object): def judgeSquareSum(self, c): """ :type c: int :rtype: bool """ a = 0 b = int(c**0.5)+1 while a <= b: # 假如 c = 2, 发现不加 = , 输出 False, 应该输出 True if a*a + b*b == c: return True elif a*a + b*b < c: ...
24
63
0.397917
764b4d44bb2148cb0b61020dc77c41f1aad75fd3
6,761
py
Python
src/data_collection/youtube_scraper.py
ilrd/Viral_Headlines
25ad894bf3d9c17b727c73bf0ec3db2cb9f93f78
[ "Apache-2.0" ]
null
null
null
src/data_collection/youtube_scraper.py
ilrd/Viral_Headlines
25ad894bf3d9c17b727c73bf0ec3db2cb9f93f78
[ "Apache-2.0" ]
null
null
null
src/data_collection/youtube_scraper.py
ilrd/Viral_Headlines
25ad894bf3d9c17b727c73bf0ec3db2cb9f93f78
[ "Apache-2.0" ]
null
null
null
import requests from bs4 import BeautifulSoup import re from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.common.exceptions import ( TimeoutException, ElementClickInterceptedException, ElementNotInteractableException, NoSuchElementException, ) from selenium.webdr...
36.545946
140
0.6184
40878033fd1451852b33f777a17ead450b618cea
1,086
py
Python
tests/questionnaire_entity_tests/test_process_questionnaire.py
jesseinit/feather-insure
69222d9302662cbcd85b402c27b7f6951d2f18a0
[ "MIT" ]
null
null
null
tests/questionnaire_entity_tests/test_process_questionnaire.py
jesseinit/feather-insure
69222d9302662cbcd85b402c27b7f6951d2f18a0
[ "MIT" ]
null
null
null
tests/questionnaire_entity_tests/test_process_questionnaire.py
jesseinit/feather-insure
69222d9302662cbcd85b402c27b7f6951d2f18a0
[ "MIT" ]
null
null
null
import json class TestQuestionnaireResourceEndpoints: def test_valid_questionnaire_submision( self, client, logged_in_user_token, setup_plans ): """ Test for questionnaira submission with valid data """ response = client.post( "/api/v1/questionnaire/process", da...
36.2
77
0.550645
d46c89d06ac3c0d488e57c9b419ca42aab733b80
3,824
py
Python
benchmarks/batched_reduction/MakePlotsFull.py
chrismile/cuMat
8bfe48393cc93aa4555c7b81b5b4f44c142b4ebb
[ "MIT" ]
16
2020-03-08T18:28:27.000Z
2022-02-13T20:32:56.000Z
benchmarks/batched_reduction/MakePlotsFull.py
chrismile/cuMat
8bfe48393cc93aa4555c7b81b5b4f44c142b4ebb
[ "MIT" ]
null
null
null
benchmarks/batched_reduction/MakePlotsFull.py
chrismile/cuMat
8bfe48393cc93aa4555c7b81b5b4f44c142b4ebb
[ "MIT" ]
3
2020-03-26T01:54:31.000Z
2020-11-18T13:32:46.000Z
import sys import os import json import matplotlib as mpl import matplotlib.pyplot as plt import math import numpy as np import seaborn as sns if len(sys.argv)>2: setPath = sys.argv[1] title = sys.argv[2] else: setPath = "../batched_reductions_full_row" title = "Row" setName = setPath[setPath.rfind('/...
31.866667
122
0.679916
d78ce0de0410e26f9583c972a30f225c29e52e00
1,415
py
Python
intake_esgf/tests/test_datasource.py
jasonb5/intake-esgf
d38486989d7d19fec7248eec9db0aa72ac374516
[ "BSD-2-Clause" ]
null
null
null
intake_esgf/tests/test_datasource.py
jasonb5/intake-esgf
d38486989d7d19fec7248eec9db0aa72ac374516
[ "BSD-2-Clause" ]
null
null
null
intake_esgf/tests/test_datasource.py
jasonb5/intake-esgf
d38486989d7d19fec7248eec9db0aa72ac374516
[ "BSD-2-Clause" ]
null
null
null
import json import hashlib import numpy as np import pandas as pd from intake_esgf import core def test_fix_col(): df = pd.DataFrame.from_dict([ {"id": "test1", "single": ["item1",], "double": ["item1", "item2"]}, ]) df = df.apply(core.fix_col) assert df.single.to_list() == ["item1"] as...
25.267857
148
0.619788
b0c1c3e7f89820f630fd38ec17ac51af48cacb6d
954
py
Python
kubernetes_asyncio/test/test_v1_namespace.py
hubo1016/kubernetes_asyncio
d57e9e9be11f6789e1ce8d5b161acb64d29acf35
[ "Apache-2.0" ]
1
2021-01-13T09:28:57.000Z
2021-01-13T09:28:57.000Z
kubernetes_asyncio/test/test_v1_namespace.py
hubo1016/kubernetes_asyncio
d57e9e9be11f6789e1ce8d5b161acb64d29acf35
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/test/test_v1_namespace.py
hubo1016/kubernetes_asyncio
d57e9e9be11f6789e1ce8d5b161acb64d29acf35
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v1.12.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import u...
23.268293
119
0.71174
6596a45d5ce68eefeb71a3683c9d028208986ac8
608
py
Python
pgo/management/commands/calculate_pokemon_move_score.py
zenofewords/pokestuff
5d9d4475ee746e89088e6e2134ede98326175438
[ "MIT" ]
2
2020-11-29T12:15:12.000Z
2021-04-08T05:34:15.000Z
pgo/management/commands/calculate_pokemon_move_score.py
zenofewords/pgo
c9404ea1e98f1d2b865e0f7ce92c0c6e9cf11989
[ "MIT" ]
18
2020-06-28T09:30:58.000Z
2022-03-12T13:33:53.000Z
pgo/management/commands/calculate_pokemon_move_score.py
zenofewords/pokestuff
5d9d4475ee746e89088e6e2134ede98326175438
[ "MIT" ]
1
2020-10-01T01:58:53.000Z
2020-10-01T01:58:53.000Z
from django.core.management.base import BaseCommand from pgo.models import ( PokemonMove, Moveset, ) from pgo.utils import calculate_pokemon_move_score class Command(BaseCommand): help = ''' Iterate through pokemon movesets and create the PokemonMove objects, then connect them to the Move...
26.434783
97
0.690789
3e9eb365aa6df0ce273604f285616275fc45928b
11,877
py
Python
test/core/run_tests.py
saikonen/metaflow
48e37bea3ea4e83ddab8227869bbe56b52d9957d
[ "Apache-2.0" ]
5,821
2019-12-03T17:57:52.000Z
2022-03-31T22:55:12.000Z
test/core/run_tests.py
saikonen/metaflow
48e37bea3ea4e83ddab8227869bbe56b52d9957d
[ "Apache-2.0" ]
605
2019-12-03T23:09:32.000Z
2022-03-31T16:15:05.000Z
test/core/run_tests.py
isabella232/metaflow
bc13048d00241e80b959f71f33e4e6b8a2748b3f
[ "Apache-2.0" ]
539
2019-12-03T18:25:53.000Z
2022-03-29T18:22:33.000Z
import sys import os import json import uuid import glob import importlib import tempfile import shutil import subprocess from multiprocessing import Pool import click from metaflow_test import MetaflowTest from metaflow_test.formatter import FlowFormatter def iter_graphs(): root = os.path.join(os.path.dirname(_...
35.453731
99
0.520502
36f5c25df914e1c4677773bb14a7bfb96318e3aa
1,652
py
Python
HostASkier/skier/migrations/0001_initial.py
RyanMower/HostASkier
20553965da43979f69fb71a23654809c549bd259
[ "MIT" ]
null
null
null
HostASkier/skier/migrations/0001_initial.py
RyanMower/HostASkier
20553965da43979f69fb71a23654809c549bd259
[ "MIT" ]
2
2021-06-22T01:34:18.000Z
2021-06-22T01:40:28.000Z
HostASkier/skier/migrations/0001_initial.py
RyanMower/HostASkier
20553965da43979f69fb71a23654809c549bd259
[ "MIT" ]
null
null
null
# Generated by Django 3.2.4 on 2021-06-20 21:21 from django.db import migrations, models import localflavor.us.models import multiselectfield.db.fields import phonenumber_field.modelfields class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Cr...
47.2
161
0.639831
b59050fe2c12463dae217190201a477101e07524
347
py
Python
week_08/scripts/ex_9.py
vlasenckov/MIPT_py_3_term
ffe30371221017d61a22e18300f059d9f7086740
[ "MIT" ]
5
2020-10-05T15:21:11.000Z
2020-12-17T19:19:32.000Z
week_08/scripts/ex_9.py
vlasenckov/MIPT_py_3_term
ffe30371221017d61a22e18300f059d9f7086740
[ "MIT" ]
8
2020-09-24T10:36:15.000Z
2020-11-30T10:54:56.000Z
week_08/scripts/ex_9.py
vlasenckov/MIPT_py_3_term
ffe30371221017d61a22e18300f059d9f7086740
[ "MIT" ]
2
2020-10-11T13:08:35.000Z
2020-12-04T19:54:21.000Z
from itertools import accumulate def maximize(lists, m): list_of_max_squared = [max(lst) ** 2 for lst in lists] maxim = list(accumulate(list_of_max_squared))[-1] return maxim % m lists = [ [5, 4], [7, 8, 9], [5, 7, 8, 9, 10] ] if __name__ == "__main__": print("OK" if maximize(lists, m=1...
19.277778
63
0.602305
ab41e173c4f7c108e9b4c932b2dad094393507aa
2,592
py
Python
6. sorting_algorithms/count_inversions.py
sourcery-ai-bot/udacity-datastructures-algorithms
c3dfdb8db744540c03a69f4abf833a0fa1f0a345
[ "MIT" ]
null
null
null
6. sorting_algorithms/count_inversions.py
sourcery-ai-bot/udacity-datastructures-algorithms
c3dfdb8db744540c03a69f4abf833a0fa1f0a345
[ "MIT" ]
null
null
null
6. sorting_algorithms/count_inversions.py
sourcery-ai-bot/udacity-datastructures-algorithms
c3dfdb8db744540c03a69f4abf833a0fa1f0a345
[ "MIT" ]
null
null
null
""" The number of inversions in a disordered list is the number of pairs of elements that are inverted (out of order) in the list. [0,1] has 0 inversions [2,1] has 1 inversion (2,1) [3, 1, 2, 4] has 2 inversions (3, 2), (3, 1) [7, 5, 3, 1] has 6 inversions (7, 5), (3, 1), (5, 1), (7, 1), (5, 3), (7, 3) Given an array...
29.793103
126
0.611883
37d557dc9c25d892ed06c53c8c12ea8820221ea1
1,571
py
Python
voc_annotation.py
ShanJuQiuMing-S/faster_rcnn
ceccca36dc850cb43b184da4a026b4f2e3f08dfe
[ "MIT" ]
null
null
null
voc_annotation.py
ShanJuQiuMing-S/faster_rcnn
ceccca36dc850cb43b184da4a026b4f2e3f08dfe
[ "MIT" ]
null
null
null
voc_annotation.py
ShanJuQiuMing-S/faster_rcnn
ceccca36dc850cb43b184da4a026b4f2e3f08dfe
[ "MIT" ]
null
null
null
import xml.etree.ElementTree as ET from os import getcwd sets=[('2007', 'train'), ('2007', 'val'), ('2007', 'test')] wd = getcwd() ## ****************************************** #**********************#**********************#********************** classes = ["aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "c...
43.638889
205
0.572884
7e1313bba9c8f9d11cea0e6595a7c2cdd4a73b08
451
py
Python
user/models.py
anehx/anonboard-backend
564a1af702054980bb1bb6e6864fe205c4396388
[ "MIT" ]
null
null
null
user/models.py
anehx/anonboard-backend
564a1af702054980bb1bb6e6864fe205c4396388
[ "MIT" ]
null
null
null
user/models.py
anehx/anonboard-backend
564a1af702054980bb1bb6e6864fe205c4396388
[ "MIT" ]
null
null
null
import hashlib from django.db import models class User(models.Model): ip = models.GenericIPAddressField() user_agent = models.TextField(blank=True, null=True) @property def identifier(self): key = '%s;%s' % (self.ip, self.user_agent) return hashlib.sha256(key.encode('utf-8'))....
23.736842
62
0.640798
a53a292e18caf7b3c463c9f226a9ec684f3938fc
396
py
Python
myGallery/wsgi.py
Codex-Mayrie/Gallery-app
68e2097939c7179def8d53d1cf12a57140cccb74
[ "MIT" ]
null
null
null
myGallery/wsgi.py
Codex-Mayrie/Gallery-app
68e2097939c7179def8d53d1cf12a57140cccb74
[ "MIT" ]
1
2021-06-10T22:24:24.000Z
2021-06-10T22:24:24.000Z
myGallery/wsgi.py
Codex-Mayrie/Gallery-app
68e2097939c7179def8d53d1cf12a57140cccb74
[ "MIT" ]
null
null
null
""" WSGI config for myGallery project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SE...
23.294118
78
0.787879
b434b8deab62119de97b7b5e4c3a4ad36f8473ba
325
py
Python
mechroutines/pf/thermo/tryitout.py
sjklipp/mechdriver
17c3d9bc82116954b331955e87a60e9adc5e1de9
[ "Apache-2.0" ]
null
null
null
mechroutines/pf/thermo/tryitout.py
sjklipp/mechdriver
17c3d9bc82116954b331955e87a60e9adc5e1de9
[ "Apache-2.0" ]
null
null
null
mechroutines/pf/thermo/tryitout.py
sjklipp/mechdriver
17c3d9bc82116954b331955e87a60e9adc5e1de9
[ "Apache-2.0" ]
null
null
null
import routines.pf.thermo as thermo from autofile import io_ as io from automol import geom geostr = io.read_file('geom.xyz') geo = geom.from_string(geostr) zma = geom.zmatrix(geo, [[1,5],[5,6]]) frm_key = [5, 6] brk_key = [1, 5] rxnclass = 'h_abstraction' thermo.heatform.get_cbhzed_ts(zma, rxnclass, frm_key, brk_ke...
21.666667
63
0.726154
444d134c6fc165c677662dd921ddf497bd3604a8
29,331
py
Python
allennlp/commands/train.py
12seetharaman/allennlp
212035f23c4642b3f3bc850316fe0119f2053ab1
[ "Apache-2.0" ]
null
null
null
allennlp/commands/train.py
12seetharaman/allennlp
212035f23c4642b3f3bc850316fe0119f2053ab1
[ "Apache-2.0" ]
null
null
null
allennlp/commands/train.py
12seetharaman/allennlp
212035f23c4642b3f3bc850316fe0119f2053ab1
[ "Apache-2.0" ]
null
null
null
""" The `train` subcommand can be used to train a model. It requires a configuration file and a directory in which to write the results. """ import argparse import logging import os from typing import Any, Dict, List, Optional import torch import torch.distributed as dist import torch.multiprocessing as mp from overr...
42.75656
105
0.661109
e7fe9d34b542b2a46ad43fb30cdc1edfabb10094
7,184
py
Python
file-py/modify_copyright_date.py
Cplz95/SVN
11e7a22139dbacb70b73142110ce5dd0fc28ac83
[ "MIT" ]
null
null
null
file-py/modify_copyright_date.py
Cplz95/SVN
11e7a22139dbacb70b73142110ce5dd0fc28ac83
[ "MIT" ]
null
null
null
file-py/modify_copyright_date.py
Cplz95/SVN
11e7a22139dbacb70b73142110ce5dd0fc28ac83
[ "MIT" ]
null
null
null
#! /usr/bin/python3 """Modify the Artistic Style copyright date in the astyle source. """ # to disable the print statement and use the print() function (version 3 format) from __future__ import print_function import glob import os import platform import re import sys # local libraries import libastyle # global varia...
43.539394
90
0.576837
5752a8affbeae58187c517b0369e5ffbc371fb46
4,376
py
Python
mindinsight/backend/application.py
zengchen1024/mindinsight
228a448b46707e889efc1fb23502158e27ab56ca
[ "Apache-2.0" ]
null
null
null
mindinsight/backend/application.py
zengchen1024/mindinsight
228a448b46707e889efc1fb23502158e27ab56ca
[ "Apache-2.0" ]
null
null
null
mindinsight/backend/application.py
zengchen1024/mindinsight
228a448b46707e889efc1fb23502158e27ab56ca
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
33.40458
117
0.686472
3db10460de291f312c4ec5cac23bc86109a6fde6
10,507
py
Python
data/datasets.py
ws-choi/Conditioned-U-Net-pytorch
1335d2b858565bc15eb795f3cc132409ecc96561
[ "MIT" ]
7
2020-08-11T01:06:43.000Z
2021-11-22T12:36:04.000Z
data/datasets.py
ws-choi/Conditioned-U-Net-pytorch
1335d2b858565bc15eb795f3cc132409ecc96561
[ "MIT" ]
null
null
null
data/datasets.py
ws-choi/Conditioned-U-Net-pytorch
1335d2b858565bc15eb795f3cc132409ecc96561
[ "MIT" ]
1
2021-05-26T01:41:51.000Z
2021-05-26T01:41:51.000Z
import torch from torch.utils.data import Dataset import numpy as np import musdb from tqdm import tqdm class MusdbLoader(object): def __init__(self, musdb_root='data/musdb18_wav/', is_wav=True): self.musdb_train = musdb.DB(root=musdb_root, subsets="train", split='train', is_wav=is_wav) self.musd...
38.914815
118
0.639478
77add7feda898448f9f0173b7a0c17c41e7fa134
4,532
py
Python
optimum/graphcore/modeling_utils.py
jimypbr/optimum-graphcore
05de934c9acd34722614fc03337918471d2dc9f0
[ "Apache-2.0" ]
null
null
null
optimum/graphcore/modeling_utils.py
jimypbr/optimum-graphcore
05de934c9acd34722614fc03337918471d2dc9f0
[ "Apache-2.0" ]
null
null
null
optimum/graphcore/modeling_utils.py
jimypbr/optimum-graphcore
05de934c9acd34722614fc03337918471d2dc9f0
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The HuggingFace Team. 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...
37.454545
128
0.662401
b2a643d4bebeb57f08f622e952db1b9d4f5b83bb
8,632
py
Python
nova/api/openstack/compute/plugins/v3/quota_sets.py
TMaddox/nova
e5c169d15528a8e2eadb8eca668ea0d183cf8648
[ "Apache-2.0" ]
null
null
null
nova/api/openstack/compute/plugins/v3/quota_sets.py
TMaddox/nova
e5c169d15528a8e2eadb8eca668ea0d183cf8648
[ "Apache-2.0" ]
null
null
null
nova/api/openstack/compute/plugins/v3/quota_sets.py
TMaddox/nova
e5c169d15528a8e2eadb8eca668ea0d183cf8648
[ "Apache-2.0" ]
null
null
null
# Copyright 2011 OpenStack Foundation # 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 requ...
40.525822
79
0.586886
ddd2bbfd25d52199cadb8e416e781c34be1aa058
202
py
Python
April/Week1/MajorityElement.py
nimishbongale/leetcode-30days-solutions-scratchpad
56aa989907e5c9bb2657292434ef2174b525aeb2
[ "MIT" ]
null
null
null
April/Week1/MajorityElement.py
nimishbongale/leetcode-30days-solutions-scratchpad
56aa989907e5c9bb2657292434ef2174b525aeb2
[ "MIT" ]
null
null
null
April/Week1/MajorityElement.py
nimishbongale/leetcode-30days-solutions-scratchpad
56aa989907e5c9bb2657292434ef2174b525aeb2
[ "MIT" ]
null
null
null
class Solution: def majorityElement(self, nums: List[int]) -> int: d=Counter(nums) n=len(nums) for i in d.keys(): if d[i]> n//2: return i
25.25
54
0.460396
7ccb9ef42f5b0447e5860009a0250ebf8a52c11c
4,636
py
Python
txmongo/database.py
evert2410/txmongo
152e5361ae5785a356e72ef4850609368f5e99b8
[ "Apache-2.0" ]
null
null
null
txmongo/database.py
evert2410/txmongo
152e5361ae5785a356e72ef4850609368f5e99b8
[ "Apache-2.0" ]
null
null
null
txmongo/database.py
evert2410/txmongo
152e5361ae5785a356e72ef4850609368f5e99b8
[ "Apache-2.0" ]
null
null
null
# Copyright 2009-2015 The TxMongo Developers. All rights reserved. # Use of this source code is governed by the Apache License that can be # found in the LICENSE file. from bson.son import SON from bson.codec_options import DEFAULT_CODEC_OPTIONS from pymongo.helpers import _check_command_response from twisted.python....
35.937984
111
0.6456
0a66ce48dc9aed3d7ca43d39dcf5d67af33e339c
398
py
Python
src/algebra/algebra.py
numpydb/NumPyDB
470d32b9226dab8c864309f33e12b252f1fae95b
[ "MIT" ]
null
null
null
src/algebra/algebra.py
numpydb/NumPyDB
470d32b9226dab8c864309f33e12b252f1fae95b
[ "MIT" ]
1
2020-09-01T06:14:48.000Z
2020-09-01T06:14:48.000Z
src/algebra/algebra.py
vecdb/vecdb
470d32b9226dab8c864309f33e12b252f1fae95b
[ "MIT" ]
null
null
null
from numpy.linalg import norm class Algebra: @staticmethod def sum(vector_a, vector_b): return vector_a + vector_b @staticmethod def dist(vector_a, vector_b): return norm(vector_a - vector_b, ord=1) @staticmethod def mult(vector_a, vector_b=None, k=1): if vector_b is...
20.947368
47
0.640704
a6d21c2267662cad497d0724e10fb58b47cd2943
11,009
py
Python
matscholar/collect.py
LeighWeston86/matscholar
d77145a105deb6d6e065a0ec50bc94b426aa26f7
[ "MIT" ]
null
null
null
matscholar/collect.py
LeighWeston86/matscholar
d77145a105deb6d6e065a0ec50bc94b426aa26f7
[ "MIT" ]
null
null
null
matscholar/collect.py
LeighWeston86/matscholar
d77145a105deb6d6e065a0ec50bc94b426aa26f7
[ "MIT" ]
null
null
null
import requests import datetime from pybliometrics.scopus import ScopusSearch, AbstractRetrieval from matscholar import SETTINGS import warnings import re from pymongo import MongoClient from tqdm import tqdm import time def clean_text(text): """ Cleans abstract text from scopus documents. Args: text ...
44.212851
120
0.549369
5ed3c7012d1ceb131c894069db10d3227fac257d
834
py
Python
mayan/apps/rest_api/urls.py
Syunkolee9891/Mayan-EDMS
3759a9503a264a180b74cc8518388f15ca66ac1a
[ "Apache-2.0" ]
1
2021-06-17T18:24:25.000Z
2021-06-17T18:24:25.000Z
mayan/apps/rest_api/urls.py
Syunkolee9891/Mayan-EDMS
3759a9503a264a180b74cc8518388f15ca66ac1a
[ "Apache-2.0" ]
7
2020-06-06T00:01:04.000Z
2022-01-13T01:47:17.000Z
mayan/apps/rest_api/urls.py
Syunkolee9891/Mayan-EDMS
3759a9503a264a180b74cc8518388f15ca66ac1a
[ "Apache-2.0" ]
1
2020-07-29T21:03:27.000Z
2020-07-29T21:03:27.000Z
from __future__ import unicode_literals from django.conf.urls import include, url from .api_views import APIRoot, BrowseableObtainAuthToken, schema_view api_urls = [ url(regex=r'^$', view=APIRoot.as_view(), name='api_root'), url( regex=r'^auth/token/obtain/$', view=BrowseableObtainAuthToken.as_view(...
26.903226
80
0.647482
b52447625d456b3d694e55025a859b44be1b2ac9
653
py
Python
synaps-api/synaps/openstack/common/__init__.py
gochist/synaps
a5d7f0428aa30e4d1e96cc29fd80f42c32aed1e8
[ "Apache-2.0" ]
2
2015-04-30T22:24:12.000Z
2015-06-02T04:01:56.000Z
synaps/openstack/common/__init__.py
spcs/synaps
d72618ec7a7920ffdd490e53b82a6f4b9201e1df
[ "Apache-2.0" ]
null
null
null
synaps/openstack/common/__init__.py
spcs/synaps
d72618ec7a7920ffdd490e53b82a6f4b9201e1df
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 Red Hat, Inc. # # 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...
43.533333
78
0.724349
1c0e2919a6a4b936e8a38a4a6ce22b324fd0d050
9,315
py
Python
freetests.py
wsandbox/CMPUT404-assignment-web-client
48798d5a0536211a38282ded14f61f45b4732156
[ "Apache-2.0" ]
null
null
null
freetests.py
wsandbox/CMPUT404-assignment-web-client
48798d5a0536211a38282ded14f61f45b4732156
[ "Apache-2.0" ]
null
null
null
freetests.py
wsandbox/CMPUT404-assignment-web-client
48798d5a0536211a38282ded14f61f45b4732156
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # coding: utf-8 # Copyright 2013 Abram Hindle # # 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 ...
33.628159
86
0.593344
85c680888773b2aced9ad86aa3c005e2d5fe394a
3,751
py
Python
selfdrive/car/subaru/carcontroller.py
StingrayCharles/openpilot
6a48212422ef05792dde058e36c5c3099f17f619
[ "MIT" ]
23
2018-08-17T11:02:00.000Z
2020-12-23T01:46:44.000Z
selfdrive/car/subaru/carcontroller.py
StingrayCharles/openpilot
6a48212422ef05792dde058e36c5c3099f17f619
[ "MIT" ]
2
2020-04-14T22:39:11.000Z
2020-05-03T19:17:40.000Z
selfdrive/car/subaru/carcontroller.py
StingrayCharles/openpilot
6a48212422ef05792dde058e36c5c3099f17f619
[ "MIT" ]
44
2018-07-31T04:26:19.000Z
2021-01-08T22:46:30.000Z
from selfdrive.car import apply_std_steer_torque_limits from selfdrive.car.subaru import subarucan from selfdrive.car.subaru.values import CAR, DBC from opendbc.can.packer import CANPacker class CarControllerParams(): def __init__(self, car_fingerprint): self.STEER_MAX = 2047 # max_steer 2047 ...
36.77451
126
0.692082
4d78acfd6ae37a0cb34b0cb67136b2121a12fe76
2,574
py
Python
flexget/plugins/modify/sort_by.py
Jeremiad/Flexget
73e6e062eeb126eaec8737a6d6c94ccf3d250b03
[ "MIT" ]
1,322
2015-01-01T22:00:25.000Z
2022-03-30T05:37:46.000Z
flexget/plugins/modify/sort_by.py
Jeremiad/Flexget
73e6e062eeb126eaec8737a6d6c94ccf3d250b03
[ "MIT" ]
2,384
2015-01-01T04:23:15.000Z
2022-03-31T01:06:43.000Z
flexget/plugins/modify/sort_by.py
Jeremiad/Flexget
73e6e062eeb126eaec8737a6d6c94ccf3d250b03
[ "MIT" ]
617
2015-01-02T15:15:07.000Z
2022-03-15T12:29:31.000Z
import re from loguru import logger from flexget import plugin from flexget.config_schema import one_or_more from flexget.event import event from flexget.utils.template import evaluate_expression logger = logger.bind(name='sort_by') RE_ARTICLES = r'^(the|a|an)\s' class PluginSortBy: """ Sort task entries ...
28.285714
97
0.525253
f1c4fe7321a8c747d2212444cc61fa0027c4ddfe
4,145
py
Python
src/molecule/test/unit/test_logger.py
Shaps/molecule
5f1f36bb2b2a4ebdb01ae8890192d70d695d5974
[ "MIT" ]
1,599
2015-11-18T01:40:26.000Z
2018-10-29T16:42:52.000Z
src/molecule/test/unit/test_logger.py
Shaps/molecule
5f1f36bb2b2a4ebdb01ae8890192d70d695d5974
[ "MIT" ]
1,232
2015-11-18T16:56:02.000Z
2018-10-27T03:51:50.000Z
src/molecule/test/unit/test_logger.py
mafalb/molecule
9e5a32f6d816630512ff8771e581fff3e07f56aa
[ "MIT" ]
290
2015-11-19T18:16:41.000Z
2018-10-29T18:09:13.000Z
# Copyright (c) 2015-2018 Cisco Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge...
31.641221
85
0.735103
3d5cd84f1b325c78dcf70a43497fcb8e321e1b97
5,000
py
Python
common/fuzzer_utils.py
sjmluo/myfuzzbench
d953a65feab096aa958a338dadbeb746602684da
[ "Apache-2.0" ]
null
null
null
common/fuzzer_utils.py
sjmluo/myfuzzbench
d953a65feab096aa958a338dadbeb746602684da
[ "Apache-2.0" ]
null
null
null
common/fuzzer_utils.py
sjmluo/myfuzzbench
d953a65feab096aa958a338dadbeb746602684da
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
33.557047
79
0.6692
1f76516882b24b497df2963035dd26ebb831db25
2,654
py
Python
sdk/python/pulumi_aws/dax/subnet_group.py
lemonade-hq/pulumi-aws
9ee22c65c7bad42d38b16879ccd56526d856a01a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/dax/subnet_group.py
lemonade-hq/pulumi-aws
9ee22c65c7bad42d38b16879ccd56526d856a01a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/dax/subnet_group.py
lemonade-hq/pulumi-aws
9ee22c65c7bad42d38b16879ccd56526d856a01a
[ "ECL-2.0", "Apache-2.0" ]
1
2021-03-08T15:05:29.000Z
2021-03-08T15:05:29.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from .. import utilities, tables class SubnetGroup(pulumi.CustomResour...
34.921053
129
0.656368
8757ff6cb75eb644712fd758a16c0aac5df59d87
3,772
py
Python
contrib/macdeploy/custom_dsstore.py
basexcoin/basex
6ebefc1aff0f90cb98075b24d110bc0481ce5f7d
[ "MIT" ]
null
null
null
contrib/macdeploy/custom_dsstore.py
basexcoin/basex
6ebefc1aff0f90cb98075b24d110bc0481ce5f7d
[ "MIT" ]
null
null
null
contrib/macdeploy/custom_dsstore.py
basexcoin/basex
6ebefc1aff0f90cb98075b24d110bc0481ce5f7d
[ "MIT" ]
1
2019-02-28T21:10:31.000Z
2019-02-28T21:10:31.000Z
#!/usr/bin/env python # Copyright (c) 2013-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from __future__ import division,print_function,unicode_literals import biplist from ds_store import DSStore...
61.836066
1,817
0.7272
9a5c276ba6f47c26d5653c79060aafa9d9f21436
472
py
Python
scripts/runRhinoError.py
EPFL-LGG/MeshPattern
2762270f5f8c42797815d4a4620f43b4618eb51e
[ "MIT" ]
2
2019-05-14T01:04:06.000Z
2019-12-20T08:07:02.000Z
scripts/runRhinoError.py
EPFL-LGG/MeshPattern
2762270f5f8c42797815d4a4620f43b4618eb51e
[ "MIT" ]
null
null
null
scripts/runRhinoError.py
EPFL-LGG/MeshPattern
2762270f5f8c42797815d4a4620f43b4618eb51e
[ "MIT" ]
1
2021-08-23T09:31:23.000Z
2021-08-23T09:31:23.000Z
from compas.datastructures import Mesh from compas_rhino.artists import MeshArtist from compas.rpc import Proxy #================================================# from mesh_pattern import hex_tessagon [vertices, faces] = hex_tessagon.create2DPattern() mesh = Mesh.from_vertices_and_faces(vertices, faces) #==============...
31.466667
52
0.631356
6007198093e0421bc025c9b65089d51486842e64
4,102
py
Python
ucscsdk/mometa/compute/ComputePortDiscPolicy.py
parag-may4/ucscsdk
2ea762fa070330e3a4e2c21b46b157469555405b
[ "Apache-2.0" ]
9
2016-12-22T08:39:25.000Z
2019-09-10T15:36:19.000Z
ucscsdk/mometa/compute/ComputePortDiscPolicy.py
parag-may4/ucscsdk
2ea762fa070330e3a4e2c21b46b157469555405b
[ "Apache-2.0" ]
10
2017-01-31T06:59:56.000Z
2021-11-09T09:14:37.000Z
ucscsdk/mometa/compute/ComputePortDiscPolicy.py
parag-may4/ucscsdk
2ea762fa070330e3a4e2c21b46b157469555405b
[ "Apache-2.0" ]
13
2016-11-14T07:42:58.000Z
2022-02-10T17:32:05.000Z
"""This module contains the general information for ComputePortDiscPolicy ManagedObject.""" from ...ucscmo import ManagedObject from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta from ...ucscmeta import VersionMeta class ComputePortDiscPolicyConsts(): INT_ID_NONE = "none" POLICY_OWNER_LOCAL = "l...
59.449275
254
0.661385
b1c4833d69845b69829ec2173cf663d79e8cdc73
15,852
py
Python
xlwings/cli.py
jolange/xlwings
f97b80f68209ef68326bb5b4edcbb31a506fd36e
[ "BSD-3-Clause" ]
null
null
null
xlwings/cli.py
jolange/xlwings
f97b80f68209ef68326bb5b4edcbb31a506fd36e
[ "BSD-3-Clause" ]
null
null
null
xlwings/cli.py
jolange/xlwings
f97b80f68209ef68326bb5b4edcbb31a506fd36e
[ "BSD-3-Clause" ]
null
null
null
import os import sys import shutil import argparse from pathlib import Path import xlwings as xw # Directories/paths this_dir = os.path.dirname(os.path.realpath(__file__)) def get_addin_path(): # The call to startup_path creates the XLSTART folder if it doesn't exist yet if xw.apps: return os.path.j...
45.034091
152
0.616894
b661d74f09510a42c0b4aaf3629482f0ba8f4d7a
1,166
py
Python
steampipe_alchemy/models/aws_guardduty_detector.py
RyanJarv/steampipe_alchemy
c8a31303252c1bd8d83d0f9c429d7d0ef7e1690f
[ "BSD-3-Clause" ]
9
2021-04-21T04:21:01.000Z
2021-06-19T19:33:36.000Z
steampipe_alchemy/models/aws_guardduty_detector.py
RyanJarv/steampipe_alchemy
c8a31303252c1bd8d83d0f9c429d7d0ef7e1690f
[ "BSD-3-Clause" ]
null
null
null
steampipe_alchemy/models/aws_guardduty_detector.py
RyanJarv/steampipe_alchemy
c8a31303252c1bd8d83d0f9c429d7d0ef7e1690f
[ "BSD-3-Clause" ]
1
2021-04-26T21:08:20.000Z
2021-04-26T21:08:20.000Z
from sqlalchemy import Column from sqlalchemy.types import JSON, Text, Boolean, TIMESTAMP, BigInteger from sqlalchemy.dialects import postgresql as psql from steampipe_alchemy.mixins import FormatMixins from steampipe_alchemy import Base class AwsGuarddutyDetector(Base, FormatMixins): __tablename__ = 'aws_guarddu...
50.695652
94
0.749571
2e66f867b1aa867220e66a1b979613579216a225
1,424
py
Python
symengine/__init__.py
alanlh/symengine.py
979dcd40219d69167d952363e832e4bd2edcc427
[ "MIT" ]
null
null
null
symengine/__init__.py
alanlh/symengine.py
979dcd40219d69167d952363e832e4bd2edcc427
[ "MIT" ]
null
null
null
symengine/__init__.py
alanlh/symengine.py
979dcd40219d69167d952363e832e4bd2edcc427
[ "MIT" ]
null
null
null
from .lib.symengine_wrapper import (Symbol, S, sympify, SympifyError, Add, Mul, Pow, function_symbol, I, E, pi, oo, zoo, nan, have_mpfr, have_mpc, have_flint, have_piranha, have_llvm, Integer, Rational, Float, Number, RealNumber, RealDouble, ComplexDouble, Max, Min, DenseMatrix, Matrix, ...
36.512821
72
0.702247
d88b33b7eb892c11dfe63d1e880c3c247bd8a24f
464
py
Python
Python/Profit_or_Loss_Calculator.py
not4YU5H/hacktoberfest2021-2
ae3d17f8bef81aa79231ee07db46a79841b4b06b
[ "CC0-1.0" ]
81
2021-10-01T13:19:13.000Z
2021-10-06T08:43:35.000Z
Python/Profit_or_Loss_Calculator.py
not4YU5H/hacktoberfest2021-2
ae3d17f8bef81aa79231ee07db46a79841b4b06b
[ "CC0-1.0" ]
67
2021-10-01T13:43:46.000Z
2021-10-06T13:55:49.000Z
Python/Profit_or_Loss_Calculator.py
not4YU5H/hacktoberfest2021-2
ae3d17f8bef81aa79231ee07db46a79841b4b06b
[ "CC0-1.0" ]
394
2021-10-01T11:55:24.000Z
2021-10-06T13:45:57.000Z
# Python Program to Calculate Profit or Loss actual_cost = float(input(" Please Enter the Actual Product Price: ")) sale_amount = float(input(" Please Enter the Sales Amount: ")) if(actual_cost > sale_amount): amount = actual_cost - sale_amount print("Total Loss Amount = {0}".format(amount)) elif(sale_amoun...
33.142857
70
0.702586
fbf52d17a371aadce1e4ba3d3cf7ff8c4a666578
257
py
Python
tests/test_devices_humidifier.py
nielse63/PiPlanter
94ed5265fd4d9b4183edd4a67047d976ee5cdd72
[ "MIT" ]
null
null
null
tests/test_devices_humidifier.py
nielse63/PiPlanter
94ed5265fd4d9b4183edd4a67047d976ee5cdd72
[ "MIT" ]
118
2021-03-08T11:04:41.000Z
2022-03-31T11:07:05.000Z
tests/test_devices_humidifier.py
nielse63/PiPlanter
94ed5265fd4d9b4183edd4a67047d976ee5cdd72
[ "MIT" ]
null
null
null
from typing import Callable from pyplanter.devices.humidifier import Humidifier def test_humidifier(): humidifier = Humidifier() assert humidifier assert isinstance(humidifier.toggle, Callable) assert isinstance(humidifier.off, Callable)
23.363636
51
0.782101
b8ad687bd71d20458f5a3dee47babec29c94fd6d
3,292
py
Python
singlecell/UMI_BC_error_correct.py
csf-ngs/cDNA_Cupcake
9b6fc355776902419d5e3178591a4c7621d48b5a
[ "BSD-3-Clause-Clear" ]
2
2019-09-11T21:27:00.000Z
2019-10-29T08:57:01.000Z
singlecell/UMI_BC_error_correct.py
csf-ngs/cDNA_Cupcake
9b6fc355776902419d5e3178591a4c7621d48b5a
[ "BSD-3-Clause-Clear" ]
null
null
null
singlecell/UMI_BC_error_correct.py
csf-ngs/cDNA_Cupcake
9b6fc355776902419d5e3178591a4c7621d48b5a
[ "BSD-3-Clause-Clear" ]
1
2022-03-17T03:12:28.000Z
2022-03-17T03:12:28.000Z
import os, sys from csv import DictReader, DictWriter from collections import Counter, defaultdict from Bio.Seq import Seq def edit_distance(seq1, seq2): assert len(seq1)==len(seq2) diff = 0 for i in xrange(len(seq1)): diff += seq1[i]!=seq2[i] return diff def error_correct_BC_or_UMI(records, ...
32.594059
104
0.591434
417b3cbeaf52295562e2fc45b9b4d4f321e5676b
1,848
py
Python
fetch/fetch.py
uppagus/word-cloud
bfbfe78982c27750ba9869597c059cd8ba5821d4
[ "MIT" ]
null
null
null
fetch/fetch.py
uppagus/word-cloud
bfbfe78982c27750ba9869597c059cd8ba5821d4
[ "MIT" ]
null
null
null
fetch/fetch.py
uppagus/word-cloud
bfbfe78982c27750ba9869597c059cd8ba5821d4
[ "MIT" ]
null
null
null
import urllib.request import re from bs4 import BeautifulSoup import string # URL Templates poemURLTemplate = "http://uppagus.com/poems/" flashFictionTemplate = "http://uppagus.com/flash-fiction/" def getHTML(url): page = urllib.request.urlopen(url).read() soup = BeautifulSoup(page, 'lxml') return...
26.782609
167
0.67803
4a91a82bb9dcf7cccf009d8f987f98163f862cc3
267
py
Python
pandas_ext/__init__.py
zbarge/pandas-ext
f51879caee1cff162b293323eec1c6ec43fcda26
[ "MIT" ]
null
null
null
pandas_ext/__init__.py
zbarge/pandas-ext
f51879caee1cff162b293323eec1c6ec43fcda26
[ "MIT" ]
null
null
null
pandas_ext/__init__.py
zbarge/pandas-ext
f51879caee1cff162b293323eec1c6ec43fcda26
[ "MIT" ]
null
null
null
from pandas_ext.ios import read_csv, read_text, read_file import os if __name__ == '__main__': counter = 1 def count(): global counter t = (1,2,3) for i, v in enumerate(t): counter += i + v count() print(counter)
19.071429
57
0.565543
99a747c5285f45d0f37f9185cbeb2867926ccf8d
3,388
py
Python
src/database/init/DbInitializerByMultiUsers.py
ytyaru0/GitHub.Uploader.Pi3.Https.201802280700
0d31c37f42f1b2dde8185563b085bd7997d171cd
[ "CC0-1.0" ]
null
null
null
src/database/init/DbInitializerByMultiUsers.py
ytyaru0/GitHub.Uploader.Pi3.Https.201802280700
0d31c37f42f1b2dde8185563b085bd7997d171cd
[ "CC0-1.0" ]
null
null
null
src/database/init/DbInitializerByMultiUsers.py
ytyaru0/GitHub.Uploader.Pi3.Https.201802280700
0d31c37f42f1b2dde8185563b085bd7997d171cd
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from database.init.DbInitializer import DbInitializer import os.path from setting.Config import Config #import setting.Setting import dataset # ユーザ単位DB(※AccountsDBの初期化後であること(DatabaseMetaの呼出順に注意)) # DbInitializerとの違いは、ユーザ単位のDBをdictで持つこと。 # * DbFileName = {f'{user}': f'GitH...
41.317073
111
0.656139
e6fd404a1aacdd737edba3f343da099c3aa02e9c
4,571
py
Python
pyresponse/pyscf/ao2mo.py
berquist/pyresponse
3267b0ca1e5b2e638cd2388532897f2749af8397
[ "BSD-3-Clause" ]
9
2017-09-26T07:02:42.000Z
2021-12-15T15:01:16.000Z
pyresponse/pyscf/ao2mo.py
berquist/pyresponse
3267b0ca1e5b2e638cd2388532897f2749af8397
[ "BSD-3-Clause" ]
12
2018-02-17T22:32:41.000Z
2021-09-19T03:25:13.000Z
pyresponse/pyscf/ao2mo.py
berquist/pyresponse
3267b0ca1e5b2e638cd2388532897f2749af8397
[ "BSD-3-Clause" ]
4
2018-03-25T01:16:16.000Z
2022-02-28T07:55:52.000Z
"""Tools for performing AO-to-MO transformations of two-electron integrals using pyscf. """ from typing import Any, Optional import numpy as np from pyscf.ao2mo import full, general from pyresponse.ao2mo import AO2MO from pyresponse.pyscf.utils import occupations_from_pyscf_mol class AO2MOpyscf(AO2MO): """Per...
42.719626
96
0.636622
13f213c197fb44bef22574fdf557d0b9e420d003
9,558
py
Python
tensorflow/contrib/learn/python/learn/datasets/mnist.py
xincao79/tensorflow
7fa0cf39f854d5fdaaa19ad6425dfed02f5fea64
[ "Apache-2.0" ]
13
2017-02-22T02:20:06.000Z
2018-06-06T04:18:03.000Z
tensorflow/contrib/learn/python/learn/datasets/mnist.py
xincao79/tensorflow
7fa0cf39f854d5fdaaa19ad6425dfed02f5fea64
[ "Apache-2.0" ]
10
2017-07-13T00:24:03.000Z
2017-07-17T07:39:03.000Z
tensorflow/contrib/learn/python/learn/datasets/mnist.py
xincao79/tensorflow
7fa0cf39f854d5fdaaa19ad6425dfed02f5fea64
[ "Apache-2.0" ]
7
2017-08-01T04:02:07.000Z
2018-10-06T21:07:20.000Z
# Copyright 2016 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...
34.135714
140
0.663842
54fdb16416be385583054a310696faa164f741c4
6,462
py
Python
tensor2tensor/models/video/basic_deterministic.py
koz4k/tensor2tensor
859306bb577ec1119e6d9fbdea4ac0743a7fe927
[ "Apache-2.0" ]
2
2019-04-08T05:06:38.000Z
2022-01-31T18:25:48.000Z
tensor2tensor/models/video/basic_deterministic.py
koz4k/tensor2tensor
859306bb577ec1119e6d9fbdea4ac0743a7fe927
[ "Apache-2.0" ]
null
null
null
tensor2tensor/models/video/basic_deterministic.py
koz4k/tensor2tensor
859306bb577ec1119e6d9fbdea4ac0743a7fe927
[ "Apache-2.0" ]
3
2019-02-10T11:12:30.000Z
2022-02-23T20:43:48.000Z
# coding=utf-8 # Copyright 2018 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
38.011765
98
0.687713
d7046fbed76682aef8695f4a526cb86c2a23efdb
805
py
Python
shapes/circle.py
daniilzelekson/programming-2021-19fpl
79e35be77ccb911b0d928f186be8bf0066229718
[ "MIT" ]
null
null
null
shapes/circle.py
daniilzelekson/programming-2021-19fpl
79e35be77ccb911b0d928f186be8bf0066229718
[ "MIT" ]
null
null
null
shapes/circle.py
daniilzelekson/programming-2021-19fpl
79e35be77ccb911b0d928f186be8bf0066229718
[ "MIT" ]
null
null
null
""" Programming for linguists Implementation of the class Circle """ from math import pi from shapes.shape import Shape class Circle(Shape): """ A class for circles """ def __init__(self, uid: int, radius: int): super().__init__(uid) self.radius = radius def get_area(self): ...
21.184211
46
0.571429
fa9bc6ac53fa435158dfea1469103ed74f507a4f
17,598
py
Python
zounds/spectral/test_tfrepresentation.py
FelixAbrahamsson/zounds
197c358acf3bea4252cfc2561da70cbe799e2c75
[ "MIT" ]
20
2016-06-04T05:44:28.000Z
2021-05-26T02:26:08.000Z
zounds/spectral/test_tfrepresentation.py
FelixAbrahamsson/zounds
197c358acf3bea4252cfc2561da70cbe799e2c75
[ "MIT" ]
53
2016-08-07T15:11:38.000Z
2019-05-21T15:56:40.000Z
zounds/spectral/test_tfrepresentation.py
FelixAbrahamsson/zounds
197c358acf3bea4252cfc2561da70cbe799e2c75
[ "MIT" ]
7
2016-08-14T15:50:33.000Z
2020-12-22T13:34:23.000Z
import numpy as np import unittest2 from .frequencyscale import LinearScale, FrequencyBand, Hertz from .weighting import AWeighting from zounds.timeseries import Seconds, TimeDimension, TimeSlice, SR11025 from zounds.spectral import FrequencyDimension, GeometricScale from zounds.core import ArrayWithUnits, IdentityDim...
42.507246
77
0.641323
c6aac9e645e63593de99879d9f7e3fd79e044af3
3,677
py
Python
icarus/tools/tests/test_cacheperf.py
oascigil/icarus_edge_comp
b7bb9f9b8d0f27b4b01469dcba9cfc0c4949d64b
[ "MIT" ]
5
2021-03-20T09:22:55.000Z
2021-12-20T17:01:33.000Z
icarus/tools/tests/test_cacheperf.py
oascigil/icarus_edge_comp
b7bb9f9b8d0f27b4b01469dcba9cfc0c4949d64b
[ "MIT" ]
1
2021-12-13T07:40:46.000Z
2021-12-20T16:59:08.000Z
icarus/tools/tests/test_cacheperf.py
oascigil/icarus_edge_comp
b7bb9f9b8d0f27b4b01469dcba9cfc0c4949d64b
[ "MIT" ]
1
2021-11-25T05:42:20.000Z
2021-11-25T05:42:20.000Z
import unittest import numpy as np import icarus.tools.cacheperf as cacheperf import icarus.models as cache import icarus.tools.stats as stats class TestNumericCacheHitRatio(unittest.TestCase): @classmethod def setUpClass(cls): cls.n = 500 cls.pdf = np.ones(cls.n) / cls.n @classmethod ...
31.42735
92
0.677998
2dfe5e9c58ed3c013ab26b850a8a20eede60a8fc
497
py
Python
unit 6/exc. 6.1.2.py
AviKalPython/self.py
44f8de33797a9ea28bbd1e01006920ba7c818b97
[ "MIT" ]
null
null
null
unit 6/exc. 6.1.2.py
AviKalPython/self.py
44f8de33797a9ea28bbd1e01006920ba7c818b97
[ "MIT" ]
null
null
null
unit 6/exc. 6.1.2.py
AviKalPython/self.py
44f8de33797a9ea28bbd1e01006920ba7c818b97
[ "MIT" ]
null
null
null
# exc. 6.1.2 def shift_left(my_list): """ the function "shift_left()" gets a list and return a new list that is shift left/ :param my_list: the list that the func get :type my_list: list :return new_list: the shift left list :rtype: list """ new_list = [my_list[...
23.666667
53
0.579477
4ad52e2c4dbceaa439405aeb560638b53e73169e
1,125
py
Python
apps/stats/helpers.py
acidburn0zzz/olympia
7f766a5fdff255b827333d4fb01aa77546ed8c70
[ "BSD-3-Clause" ]
1
2015-12-01T03:53:51.000Z
2015-12-01T03:53:51.000Z
apps/stats/helpers.py
Acidburn0zzz/olympia
7f766a5fdff255b827333d4fb01aa77546ed8c70
[ "BSD-3-Clause" ]
5
2021-02-02T23:09:35.000Z
2021-09-08T02:47:20.000Z
apps/stats/helpers.py
Acidburn0zzz/olympia
7f766a5fdff255b827333d4fb01aa77546ed8c70
[ "BSD-3-Clause" ]
null
null
null
import jinja2 from jingo import env, register from access import acl from addons.models import Addon from bandwagon.models import Collection @register.function @jinja2.contextfunction def report_menu(context, request, report, obj=None): """Reports Menu. navigation for the various statistic reports.""" if obj...
32.142857
69
0.591111
c59b0af6cf2f9ed37f549427e7e70360bb630938
42,008
py
Python
laplace/baselaplace.py
georgezefko/Laplace
c488f7bf739297bab5d771f65635352a07716ca0
[ "MIT" ]
null
null
null
laplace/baselaplace.py
georgezefko/Laplace
c488f7bf739297bab5d771f65635352a07716ca0
[ "MIT" ]
null
null
null
laplace/baselaplace.py
georgezefko/Laplace
c488f7bf739297bab5d771f65635352a07716ca0
[ "MIT" ]
null
null
null
from math import sqrt, pi, log import numpy as np import torch from torch.nn.utils import parameters_to_vector, vector_to_parameters from torch.distributions import MultivariateNormal, Dirichlet, Normal from laplace.utils import (parameters_per_layer, invsqrt_precision, get_nll, validate, K...
40.314779
100
0.616359
5818e7e883ba1885ecbf4c5e885b1bb24dc45121
9,219
py
Python
by_topic/graphs_sets.py
jamesvuc/Back-Pocket-Algorithms
f626d80ecab61997feaf270f5614f7a8396ab3d6
[ "MIT" ]
null
null
null
by_topic/graphs_sets.py
jamesvuc/Back-Pocket-Algorithms
f626d80ecab61997feaf270f5614f7a8396ab3d6
[ "MIT" ]
null
null
null
by_topic/graphs_sets.py
jamesvuc/Back-Pocket-Algorithms
f626d80ecab61997feaf270f5614f7a8396ab3d6
[ "MIT" ]
null
null
null
#=======Graphs & Sets========== from copy import copy, deepcopy class Graph: def __init__(self, vertices, edges, weights = None, is_directed=False): """ vertices is an iterable of hashable vertices edges is an iterable of pairs of hashable vertices [u,v] weights (if not None) is an iterable of tuples (u,v,w) ...
27.851964
80
0.642369
89098d5cec9b3ecfc10f9fa041ed939ddb506f7f
20,912
py
Python
tests/unit/test_spatial_methods/test_finite_volume/test_finite_volume.py
dion-w/PyBaMM
aeb9bcc82bb5dc3fba4fa045c4cad9d2d41b6359
[ "BSD-3-Clause" ]
1
2022-03-24T01:23:16.000Z
2022-03-24T01:23:16.000Z
tests/unit/test_spatial_methods/test_finite_volume/test_finite_volume.py
sxwangxiang/PyBaMM
23157aebce218444edc83b525dfb2c7fc8637598
[ "BSD-3-Clause" ]
null
null
null
tests/unit/test_spatial_methods/test_finite_volume/test_finite_volume.py
sxwangxiang/PyBaMM
23157aebce218444edc83b525dfb2c7fc8637598
[ "BSD-3-Clause" ]
null
null
null
# # Tests for the Finite Volume Method # import pybamm from tests import ( get_mesh_for_testing, get_p2d_mesh_for_testing, get_1p1d_mesh_for_testing, ) import numpy as np from scipy.sparse import kron, eye import unittest class TestFiniteVolume(unittest.TestCase): def test_node_to_edge_to_node(self): ...
38.441176
88
0.592483
1124e324f77b80419feef083447f7d6240a73445
881
py
Python
cel_tasks.py
airwoot/timeline-hack-core
fd2cd31e19de4e170c670d9a42e3de20ff871784
[ "MIT" ]
null
null
null
cel_tasks.py
airwoot/timeline-hack-core
fd2cd31e19de4e170c670d9a42e3de20ff871784
[ "MIT" ]
null
null
null
cel_tasks.py
airwoot/timeline-hack-core
fd2cd31e19de4e170c670d9a42e3de20ff871784
[ "MIT" ]
null
null
null
from celery import Celery from app.twitter_helpers import TwitterUser import twitter from twitter import TwitterError from random import randint import traceback cel = Celery(broker = 'redis://localhost', backend = 'redis://localhost') CONSUMER_KEY = 'bgEZ37ZUH2HeZ3aAyeh9VEsyb' CONSUMER_SECRET = '9OQqbx5elvBb7eDwfHq4B...
41.952381
150
0.770715
a59ce84095a2e497ea3ef95c3e0a3d7b908ae3b6
433
py
Python
mixed/binary_gap.py
RaoulMa/NeuralNets
f49072ac88686f753f9b5815d6cc5e71d536c3d2
[ "MIT" ]
1
2018-06-30T08:41:49.000Z
2018-06-30T08:41:49.000Z
mixed/binary_gap.py
RaoulMa/BasicNeuralNets
f49072ac88686f753f9b5815d6cc5e71d536c3d2
[ "MIT" ]
null
null
null
mixed/binary_gap.py
RaoulMa/BasicNeuralNets
f49072ac88686f753f9b5815d6cc5e71d536c3d2
[ "MIT" ]
null
null
null
def binary_gap(N): if N < 5: return 0 start = 0 gap_length = 0 max_gap_length = 0 for n in range(32): if N & 1 == 1: start = True max_gap_length = max(max_gap_length, gap_length) gap_length = 0 elif start: gap_length += 1 ...
15.464286
60
0.528868
a588d359ed8c2c64d38d3c196a40326c7d14514e
1,510
py
Python
readthedocs/vcs_support/utils.py
ojii/readthedocs.org
679c9afdbe25563da6171739bca1417897386949
[ "MIT" ]
1
2015-11-08T11:31:21.000Z
2015-11-08T11:31:21.000Z
readthedocs/vcs_support/utils.py
ojii/readthedocs.org
679c9afdbe25563da6171739bca1417897386949
[ "MIT" ]
null
null
null
readthedocs/vcs_support/utils.py
ojii/readthedocs.org
679c9afdbe25563da6171739bca1417897386949
[ "MIT" ]
null
null
null
import logging import os import time log = logging.getLogger(__name__) class Lock(object): """ A simple file based lock with timeout On entering the context, it will try to aquire the lock. If timeout passes, it just gets the lock anyway. If we're in the same thread as the one holding this lock,...
34.318182
93
0.59404