hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f778b8173a493cb720f8c34eea19fe09676d0894
4,074
py
Python
travis_pypi_setup.py
jeff-99/hashdex
a29e2ff52111998f3dde558e5e4689ecd76d4e2a
[ "MIT" ]
3
2017-10-01T21:58:48.000Z
2017-10-11T17:05:21.000Z
travis_pypi_setup.py
jeff-99/hashdex
a29e2ff52111998f3dde558e5e4689ecd76d4e2a
[ "MIT" ]
278
2017-09-20T19:53:48.000Z
2020-11-18T08:25:14.000Z
travis_pypi_setup.py
jeff-99/hashdex
a29e2ff52111998f3dde558e5e4689ecd76d4e2a
[ "MIT" ]
2
2017-11-25T14:03:40.000Z
2019-05-31T23:13:09.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """Update encrypted deploy password in Travis config file.""" from __future__ import print_function import base64 import json import os from getpass import getpass import yaml from cryptography.hazmat.primitives.serialization import load_pem_public_key from cryptography.h...
31.828125
79
0.700295
from __future__ import print_function import base64 import json import os from getpass import getpass import yaml from cryptography.hazmat.primitives.serialization import load_pem_public_key from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.asymmetric.padding import PKCS1v15...
true
true
f778b8e39e72ce669336d4d145212a4ef7c9d314
4,780
py
Python
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/TestHWBreakMultiThread.py
medismailben/llvm-project
e334a839032fe500c3bba22bf976ab7af13ce1c1
[ "Apache-2.0" ]
34
2020-01-31T17:50:00.000Z
2022-02-16T20:19:29.000Z
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/TestHWBreakMultiThread.py
medismailben/llvm-project
e334a839032fe500c3bba22bf976ab7af13ce1c1
[ "Apache-2.0" ]
14
2020-02-03T23:39:51.000Z
2021-07-20T16:24:25.000Z
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/TestHWBreakMultiThread.py
medismailben/llvm-project
e334a839032fe500c3bba22bf976ab7af13ce1c1
[ "Apache-2.0" ]
6
2021-02-08T16:57:07.000Z
2022-01-13T11:32:34.000Z
""" Test hardware breakpoints for multiple threads. """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class HardwareBreakpointMultiThreadTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True mydir = TestBase.compute_mydir(__file__)...
35.93985
106
0.637029
import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class HardwareBreakpointMultiThreadTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True mydir = TestBase.compute_mydir(__file__) @skipUnlessPlatform(oslist=['linux']) ...
true
true
f778b93ce13033e61abf15147386840233270b27
32,302
py
Python
pysnmp-with-texts/CT-PIC-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/CT-PIC-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/CT-PIC-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module CT-PIC-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CT-PIC-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:29:05 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:...
163.969543
2,157
0.774844
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection, ValueRangeConstraint = mibBuilder.impo...
true
true
f778ba0e697c87b464c1cac7ba8675020c5a5527
2,707
py
Python
fedml_api/distributed/fedgkt/GKTClientManager.py
GabriJP/FedML
9ccf52baddc065bf9cf3ca8ae2eeaadbc338e988
[ "Apache-2.0" ]
null
null
null
fedml_api/distributed/fedgkt/GKTClientManager.py
GabriJP/FedML
9ccf52baddc065bf9cf3ca8ae2eeaadbc338e988
[ "Apache-2.0" ]
null
null
null
fedml_api/distributed/fedgkt/GKTClientManager.py
GabriJP/FedML
9ccf52baddc065bf9cf3ca8ae2eeaadbc338e988
[ "Apache-2.0" ]
null
null
null
import logging from fedml_api.distributed.fedgkt.message_def import MyMessage from fedml_core.distributed.client.client_manager import ClientManager from fedml_core.distributed.communication.message import Message class GKTClientMananger(ClientManager): def __init__(self, args, trainer, comm=None, rank=0, size=0...
49.218182
126
0.698929
import logging from fedml_api.distributed.fedgkt.message_def import MyMessage from fedml_core.distributed.client.client_manager import ClientManager from fedml_core.distributed.communication.message import Message class GKTClientMananger(ClientManager): def __init__(self, args, trainer, comm=None, rank=0, size=0...
true
true
f778ba71917a97e77e26e3327587ae173800e1db
903
py
Python
DS-Career-Resources-master/leetcode/search_insert_position.py
anushka-DS/DS-Interview-Prep
c331769f8f2d11e167d782b3b2e48ca4709d9b54
[ "CC-BY-4.0" ]
1
2022-01-01T07:18:42.000Z
2022-01-01T07:18:42.000Z
DS-Career-Resources-master/leetcode/search_insert_position.py
anushka-DS/DS-Interview-Prep
c331769f8f2d11e167d782b3b2e48ca4709d9b54
[ "CC-BY-4.0" ]
null
null
null
DS-Career-Resources-master/leetcode/search_insert_position.py
anushka-DS/DS-Interview-Prep
c331769f8f2d11e167d782b3b2e48ca4709d9b54
[ "CC-BY-4.0" ]
null
null
null
''' 35. Search Insert Position Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You may assume no duplicates in the array. Example 1: Input: [1,3,5,6], 5 Output: 2 Example 2: Input: [1,3,5,6], 2 Output: 1 Ex...
17.037736
90
0.640089
def searchInsert(self, nums, target): for i in range(len(nums)): if nums[i] == target: return i elif nums[i] > target: return i return len(nums) - 1 def searchInsert(self, nums, target): low, high = 0, len(nums) - 1 while low <= high: mid = (high + low) // 2 if nums[mid] == target: return mid ...
true
true
f778ba954cfaaf3774afa0420df9de5a2e0bfd71
1,978
py
Python
preprocessing/BreakoutDeterministic.py
dsinghnegi/attari_RL_agent
d94fef6246829e553514400d86d507c218a3a816
[ "Apache-2.0" ]
4
2020-06-14T14:28:53.000Z
2021-01-16T08:46:42.000Z
preprocessing/BreakoutDeterministic.py
dsinghnegi/attari_RL_agent
d94fef6246829e553514400d86d507c218a3a816
[ "Apache-2.0" ]
null
null
null
preprocessing/BreakoutDeterministic.py
dsinghnegi/attari_RL_agent
d94fef6246829e553514400d86d507c218a3a816
[ "Apache-2.0" ]
1
2022-01-08T08:08:55.000Z
2022-01-08T08:08:55.000Z
import cv2 import gym from gym.core import ObservationWrapper from gym.spaces import Box from preprocessing import atari_wrappers from preprocessing.framebuffer import FrameBuffer ENV_NAME = "BreakoutDeterministic-v4" class PreprocessAtariObs(ObservationWrapper): def __init__(self, env): """A gym wrappe...
32.42623
95
0.698686
import cv2 import gym from gym.core import ObservationWrapper from gym.spaces import Box from preprocessing import atari_wrappers from preprocessing.framebuffer import FrameBuffer ENV_NAME = "BreakoutDeterministic-v4" class PreprocessAtariObs(ObservationWrapper): def __init__(self, env): ObservationWrap...
true
true
f778bade0b1f5f5c5140c4299f7a9beb08e492b6
14,442
py
Python
airflow/gcp/example_dags/example_cloud_sql.py
penghou620/airflow
7b6045a479edca06732fd766ef8ceabf41c7e82a
[ "Apache-2.0" ]
1
2019-10-02T13:33:48.000Z
2019-10-02T13:33:48.000Z
airflow/gcp/example_dags/example_cloud_sql.py
penghou620/airflow
7b6045a479edca06732fd766ef8ceabf41c7e82a
[ "Apache-2.0" ]
1
2017-05-11T22:57:49.000Z
2017-05-11T22:57:49.000Z
airflow/gcp/example_dags/example_cloud_sql.py
penghou620/airflow
7b6045a479edca06732fd766ef8ceabf41c7e82a
[ "Apache-2.0" ]
1
2020-11-16T09:03:58.000Z
2020-11-16T09:03:58.000Z
# -*- 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 #...
34.550239
90
0.661473
import os from urllib.parse import urlsplit import airflow from airflow import models from airflow.gcp.operators.cloud_sql import CloudSqlInstanceCreateOperator, \ CloudSqlInstancePatchOperator, CloudSqlInstanceDeleteOperator, \ CloudSqlInstanceDatabaseCreateOperator, CloudSqlInstanceDatabasePatchOperator, \...
true
true
f778bb146a2130735d47f7efe89ee788fd06627d
720
py
Python
src/features/build_features.py
HninPwint/nba-career-prediction
ffce32507cad2c4dd020c62cee7f33cf97c886f7
[ "MIT" ]
1
2021-02-01T10:38:16.000Z
2021-02-01T10:38:16.000Z
src/features/build_features.py
HninPwint/nba-career-prediction
ffce32507cad2c4dd020c62cee7f33cf97c886f7
[ "MIT" ]
3
2021-02-02T11:06:16.000Z
2021-02-06T11:44:19.000Z
src/features/build_features.py
HninPwint/nba-career-prediction
ffce32507cad2c4dd020c62cee7f33cf97c886f7
[ "MIT" ]
4
2021-01-31T10:57:23.000Z
2021-02-02T06:16:35.000Z
import pandas as pd import numpy as np def replace_outliers(data, columns): ''' Quantile-based Flooring and Capping ''' df = data.copy() for column in columns: ten_percentile = (df[column].quantile(0.10)) ninety_percentile = (df[column].quantile(0.90)) ...
28.8
90
0.605556
import pandas as pd import numpy as np def replace_outliers(data, columns): df = data.copy() for column in columns: ten_percentile = (df[column].quantile(0.10)) ninety_percentile = (df[column].quantile(0.90)) df[column] = np.where(df[column] <ten_percentile, ten_perce...
true
true
f778bbf0c5f35177a1dad3d11b2c0d5ced66825d
8,608
py
Python
confirmation/models.py
Awawdi/zulip
f2e7b92b024cfec6a9babace8298de9537925347
[ "Apache-2.0" ]
3
2020-11-03T15:18:04.000Z
2021-02-16T11:49:51.000Z
confirmation/models.py
Awawdi/zulip
f2e7b92b024cfec6a9babace8298de9537925347
[ "Apache-2.0" ]
18
2021-08-14T01:12:30.000Z
2022-03-04T20:28:51.000Z
confirmation/models.py
Awawdi/zulip
f2e7b92b024cfec6a9babace8298de9537925347
[ "Apache-2.0" ]
1
2020-12-30T09:48:57.000Z
2020-12-30T09:48:57.000Z
# Copyright: (c) 2008, Jarek Zgoda <jarek.zgoda@gmail.com> __revision__ = "$Id: models.py 28 2009-10-22 15:03:02Z jarek.zgoda $" import datetime import secrets from base64 import b32encode from typing import List, Mapping, Optional, Union from urllib.parse import urljoin from django.conf import settings from django.c...
35.278689
100
0.73757
__revision__ = "$Id: models.py 28 2009-10-22 15:03:02Z jarek.zgoda $" import datetime import secrets from base64 import b32encode from typing import List, Mapping, Optional, Union from urllib.parse import urljoin from django.conf import settings from django.contrib.contenttypes.fields import GenericForeignKey from dj...
true
true
f778bc11adddf33d5b1da8f72e4a4b49726a2681
4,674
py
Python
venv/lib/python3.8/site-packages/azureml/_restclient/models/azure_postgre_sql.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/azureml/_restclient/models/azure_postgre_sql.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/azureml/_restclient/models/azure_postgre_sql.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "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 2.3.3...
46.74
356
0.641207
from msrest.serialization import Model class AzurePostgreSql(Model): _attribute_map = { 'enable_ssl': {'key': 'enableSSL', 'type': 'bool'}, 'server_name': {'key': 'serverName', 'type': 'str'}, 'database_name': {'key': 'databaseName', 'type': 'str'}, 'endpoint': {'key': ...
true
true
f778bd2f6e8dc6dd2ddee30baeb9f863280341ff
2,145
py
Python
tests/core/misc/test_helper.py
ademcan/QRL
8eed7305c8a055758343ea414d8183f21b2bf6aa
[ "MIT" ]
1
2020-07-11T15:32:52.000Z
2020-07-11T15:32:52.000Z
tests/core/misc/test_helper.py
ademcan/QRL
8eed7305c8a055758343ea414d8183f21b2bf6aa
[ "MIT" ]
null
null
null
tests/core/misc/test_helper.py
ademcan/QRL
8eed7305c8a055758343ea414d8183f21b2bf6aa
[ "MIT" ]
null
null
null
# coding=utf-8 # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. from ipaddress import AddressValueError from unittest import TestCase from qrl.core.misc import logger from qrl.core.misc.helper import parse_peer_addr logger.initial...
35.75
89
0.675058
from ipaddress import AddressValueError from unittest import TestCase from qrl.core.misc import logger from qrl.core.misc.helper import parse_peer_addr logger.initialize_default() class TestHelper(TestCase): def __init__(self, *args, **kwargs): super(TestHelper, self).__init__(*args, **kwargs) def ...
true
true
f778be2c9261b7b177ff110ca31cb1196799536a
806
py
Python
tests/tests/test_integration/test_train.py
adamltyson/cellfinder
a4cbdb0976a46deeb84105281e2a332f95fee1d7
[ "BSD-3-Clause" ]
1
2020-12-18T07:28:21.000Z
2020-12-18T07:28:21.000Z
tests/tests/test_integration/test_train.py
jbro885/cellfinder
b2e64220ee6f1659b8b3ac1ca9917edd95a28539
[ "BSD-3-Clause" ]
null
null
null
tests/tests/test_integration/test_train.py
jbro885/cellfinder
b2e64220ee6f1659b8b3ac1ca9917edd95a28539
[ "BSD-3-Clause" ]
1
2020-02-05T19:03:09.000Z
2020-02-05T19:03:09.000Z
import os import sys import pytest from cellfinder.train.train_yml import main as train_run data_dir = os.path.join( os.getcwd(), "tests", "data", "integration", "training" ) cell_cubes = os.path.join(data_dir, "cells") non_cell_cubes = os.path.join(data_dir, "non_cells") training_yml_file = os.path.join(data_dir...
20.666667
59
0.651365
import os import sys import pytest from cellfinder.train.train_yml import main as train_run data_dir = os.path.join( os.getcwd(), "tests", "data", "integration", "training" ) cell_cubes = os.path.join(data_dir, "cells") non_cell_cubes = os.path.join(data_dir, "non_cells") training_yml_file = os.path.join(data_dir...
true
true
f778bf596f4a5401d215e4fc2514404a4125b1b8
15,241
py
Python
tests/test_predicates.py
anki-code/python-hunter
2e0912c0e9f924122543de10280669380948b6f6
[ "BSD-2-Clause" ]
707
2015-03-19T23:07:52.000Z
2022-03-16T22:24:08.000Z
tests/test_predicates.py
anki-code/python-hunter
2e0912c0e9f924122543de10280669380948b6f6
[ "BSD-2-Clause" ]
100
2015-03-18T22:57:46.000Z
2022-02-02T20:03:56.000Z
tests/test_predicates.py
anki-code/python-hunter
2e0912c0e9f924122543de10280669380948b6f6
[ "BSD-2-Clause" ]
39
2015-03-28T17:36:52.000Z
2022-03-03T15:31:14.000Z
from __future__ import print_function import sys import pytest import hunter from hunter import And from hunter import Backlog from hunter import CallPrinter from hunter import CodePrinter from hunter import Debugger from hunter import From from hunter import Manhole from hunter import Not from hunter import Or from...
35.693208
129
0.633554
from __future__ import print_function import sys import pytest import hunter from hunter import And from hunter import Backlog from hunter import CallPrinter from hunter import CodePrinter from hunter import Debugger from hunter import From from hunter import Manhole from hunter import Not from hunter import Or from...
true
true
f778bfe4e46d841a74047308d854a49a75e7d303
21,119
py
Python
lib/galaxy/eggs/__init__.py
mysticmirages/GalaxyProject
6a47d2d3a7f27b659e5de5fb1b37c7c1f9d04302
[ "CC-BY-3.0" ]
null
null
null
lib/galaxy/eggs/__init__.py
mysticmirages/GalaxyProject
6a47d2d3a7f27b659e5de5fb1b37c7c1f9d04302
[ "CC-BY-3.0" ]
null
null
null
lib/galaxy/eggs/__init__.py
mysticmirages/GalaxyProject
6a47d2d3a7f27b659e5de5fb1b37c7c1f9d04302
[ "CC-BY-3.0" ]
null
null
null
""" Manage Galaxy eggs """ import ConfigParser import glob import HTMLParser import os import pkg_resources import shutil import sys import urllib import urllib2 import zipfile import zipimport import logging log = logging.getLogger( __name__ ) log.addHandler( logging.NullHandler() ) galaxy_dir = os.path.abspath( o...
39.181818
154
0.560159
""" Manage Galaxy eggs """ import ConfigParser import glob import HTMLParser import os import pkg_resources import shutil import sys import urllib import urllib2 import zipfile import zipimport import logging log = logging.getLogger( __name__ ) log.addHandler( logging.NullHandler() ) galaxy_dir = os.path.abspath( o...
false
true
f778c09db55464bf6f5e7e1af8ecf8c28687739a
1,082
py
Python
announcement/migrations/0001_initial.py
BUPT-XJBGroup/BOJ-V4
31078ab998d0a786c6742b8f7c65f2e4d9642844
[ "MIT" ]
null
null
null
announcement/migrations/0001_initial.py
BUPT-XJBGroup/BOJ-V4
31078ab998d0a786c6742b8f7c65f2e4d9642844
[ "MIT" ]
null
null
null
announcement/migrations/0001_initial.py
BUPT-XJBGroup/BOJ-V4
31078ab998d0a786c6742b8f7c65f2e4d9642844
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
37.310345
114
0.62939
from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name=...
true
true
f778c0fc2836fb21674c50c84bafa9ccce2734fc
924
py
Python
tests/command/test_command_bus.py
bbougon/crm-pilates
47de4bad3d48208f9b499139fcddb7f8955b2509
[ "MIT" ]
null
null
null
tests/command/test_command_bus.py
bbougon/crm-pilates
47de4bad3d48208f9b499139fcddb7f8955b2509
[ "MIT" ]
2
2021-05-26T20:47:29.000Z
2021-07-11T23:18:55.000Z
tests/command/test_command_bus.py
bbougon/crm-pilates
47de4bad3d48208f9b499139fcddb7f8955b2509
[ "MIT" ]
1
2021-06-30T15:20:54.000Z
2021-06-30T15:20:54.000Z
from dataclasses import dataclass from typing import Tuple from command.command_bus import CommandBus from command.command_handler import CommandHandler, Command, Status from event.event_store import Event @dataclass class SimpleCommand(Command): name: str @dataclass class SimpleCommandExecuted(Event): def...
24.972973
86
0.760823
from dataclasses import dataclass from typing import Tuple from command.command_bus import CommandBus from command.command_handler import CommandHandler, Command, Status from event.event_store import Event @dataclass class SimpleCommand(Command): name: str @dataclass class SimpleCommandExecuted(Event): def...
true
true
f778c244682039855074b034290c6caaa3484f74
2,486
py
Python
test/programytest/extensions/geocode/test_aiml.py
whackur/chatbot
bb4b4dace89f1f8aae2b6377bf7d2601e66af7a7
[ "MIT" ]
2
2018-06-16T09:32:22.000Z
2019-07-21T13:16:00.000Z
test/programytest/extensions/geocode/test_aiml.py
whackur/chatbot
bb4b4dace89f1f8aae2b6377bf7d2601e66af7a7
[ "MIT" ]
3
2020-07-16T04:00:42.000Z
2021-03-31T18:52:22.000Z
test/programytest/extensions/geocode/test_aiml.py
whackur/chatbot
bb4b4dace89f1f8aae2b6377bf7d2601e66af7a7
[ "MIT" ]
4
2018-06-29T23:50:44.000Z
2020-11-05T08:13:47.000Z
import unittest import os import json from programy.extensions.geocode.geocode import GeoCodeExtension from programy.utils.geo.google import GoogleMaps from programy.context import ClientContext from programytest.aiml_tests.client import TestClient class MockGoogleMaps(GoogleMaps): def __init__(self, data_file...
37.666667
135
0.74457
import unittest import os import json from programy.extensions.geocode.geocode import GeoCodeExtension from programy.utils.geo.google import GoogleMaps from programy.context import ClientContext from programytest.aiml_tests.client import TestClient class MockGoogleMaps(GoogleMaps): def __init__(self, data_file...
true
true
f778c3ee7a129c42dba056eb26632f097eb647f7
3,404
py
Python
DAMSBlog/SRC/settings.py
DarishkaAMS/Django_Projects-December_Blog
463cbfb2120e38541d3ee9b62aaf3564f3e2f306
[ "MIT" ]
null
null
null
DAMSBlog/SRC/settings.py
DarishkaAMS/Django_Projects-December_Blog
463cbfb2120e38541d3ee9b62aaf3564f3e2f306
[ "MIT" ]
null
null
null
DAMSBlog/SRC/settings.py
DarishkaAMS/Django_Projects-December_Blog
463cbfb2120e38541d3ee9b62aaf3564f3e2f306
[ "MIT" ]
null
null
null
""" Django settings for SRC project. Generated by 'django-admin startproject' using Django 2.2.14. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import os # Bu...
25.214815
91
0.691539
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'axpb=!_(f6@@+*8b@gw-v(2f%rqe1s(wo4v)wy!ex+g4^a9w*w' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes...
true
true
f778c4b2565ff942cbb9160b061ba62d0314fec3
1,290
py
Python
Basics/Regression.py
Fyy10/ML-DL_Practice
7b7c8a63d52fbf2c9192d913255852bbbe3de276
[ "MIT" ]
1
2020-04-21T09:04:35.000Z
2020-04-21T09:04:35.000Z
Basics/Regression.py
Fyy10/ML-DL_Practice
7b7c8a63d52fbf2c9192d913255852bbbe3de276
[ "MIT" ]
null
null
null
Basics/Regression.py
Fyy10/ML-DL_Practice
7b7c8a63d52fbf2c9192d913255852bbbe3de276
[ "MIT" ]
1
2020-04-21T09:04:40.000Z
2020-04-21T09:04:40.000Z
import torch import torch.nn.functional as F import numpy as np import matplotlib.pyplot as plt import torch.nn as nn import torch.optim as optim x = torch.unsqueeze(torch.linspace(-1, 1, 100), dim=1) y = x.pow(2) + 0.2 * torch.rand(x.size()) # plt.scatter(x.numpy(), y.numpy()) # plt.show() class Net(nn.Module): ...
22.631579
88
0.610078
import torch import torch.nn.functional as F import numpy as np import matplotlib.pyplot as plt import torch.nn as nn import torch.optim as optim x = torch.unsqueeze(torch.linspace(-1, 1, 100), dim=1) y = x.pow(2) + 0.2 * torch.rand(x.size()) class Net(nn.Module): def __init__(self, n_features, n_hidden, n_out...
true
true
f778c50e092daedbdfb3fbcb3e4ecd7067ffe1a8
4,760
py
Python
purity_fb/purity_fb_1dot8dot1/apis/version_api.py
tlewis-ps/purity_fb_python_client
652835cbd485c95a86da27f8b661679727ec6ea0
[ "Apache-2.0" ]
5
2017-09-08T20:47:22.000Z
2021-06-29T02:11:05.000Z
purity_fb/purity_fb_1dot8dot1/apis/version_api.py
tlewis-ps/purity_fb_python_client
652835cbd485c95a86da27f8b661679727ec6ea0
[ "Apache-2.0" ]
16
2017-11-27T20:57:48.000Z
2021-11-23T18:46:43.000Z
purity_fb/purity_fb_1dot8dot1/apis/version_api.py
tlewis-ps/purity_fb_python_client
652835cbd485c95a86da27f8b661679727ec6ea0
[ "Apache-2.0" ]
22
2017-10-13T15:33:05.000Z
2021-11-08T19:56:21.000Z
# coding: utf-8 """ Pure Storage FlashBlade REST 1.8.1 Python SDK Pure Storage FlashBlade REST 1.8.1 Python SDK, developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/). OpenAPI spec version: 1.8.1 Cont...
35.522388
206
0.57479
from __future__ import absolute_import import sys import os import re from six import iteritems from ..configuration import Configuration from ..api_client import ApiClient class VersionApi(object): def __init__(self, api_client=None): config = Configuration() if api_client: sel...
true
true
f778c567e64b0bc524efb298515073c7c8d82aab
2,119
py
Python
hack/generateChartOptions.py
ialidzhikov/cert-management
f2918e1f106398c5f6ddfdb1b2b00315d19bb897
[ "Apache-2.0" ]
null
null
null
hack/generateChartOptions.py
ialidzhikov/cert-management
f2918e1f106398c5f6ddfdb1b2b00315d19bb897
[ "Apache-2.0" ]
null
null
null
hack/generateChartOptions.py
ialidzhikov/cert-management
f2918e1f106398c5f6ddfdb1b2b00315d19bb897
[ "Apache-2.0" ]
null
null
null
#!/bin/python # helper script to regenerate helm chart file: partial of charts/cert-management/templates/deployment.yaml import re options = """ cert-class cert-target-class controllers cpuprofile default-issuer default-issuer-domain-ranges disable-namespace-restriction dns dns-namespace dns-owner-id dns.id help in...
22.305263
106
0.721567
import re options = """ cert-class cert-target-class controllers cpuprofile default-issuer default-issuer-domain-ranges disable-namespace-restriction dns dns-namespace dns-owner-id dns.id help ingress-cert.cert-class ingress-cert.cert-target-class ingress-cert.default.pool.resync-period ingress-cert.default.pool.si...
true
true
f778c64cc197e5c2a043fb4b16f309a69941597f
43,066
py
Python
hail/python/test/hail/expr/test_ndarrays.py
vrautela/hail
7db6189b5b1feafa88452b8470e497d9505d9a46
[ "MIT" ]
null
null
null
hail/python/test/hail/expr/test_ndarrays.py
vrautela/hail
7db6189b5b1feafa88452b8470e497d9505d9a46
[ "MIT" ]
null
null
null
hail/python/test/hail/expr/test_ndarrays.py
vrautela/hail
7db6189b5b1feafa88452b8470e497d9505d9a46
[ "MIT" ]
null
null
null
import numpy as np from ..helpers import * import pytest from hail.utils.java import FatalError, HailUserError setUpModule = startTestHailContext tearDownModule = stopTestHailContext def assert_ndarrays(asserter, exprs_and_expecteds): exprs, expecteds = zip(*exprs_and_expecteds) expr_tuple = hl.tuple(exprs)...
36.189916
138
0.580551
import numpy as np from ..helpers import * import pytest from hail.utils.java import FatalError, HailUserError setUpModule = startTestHailContext tearDownModule = stopTestHailContext def assert_ndarrays(asserter, exprs_and_expecteds): exprs, expecteds = zip(*exprs_and_expecteds) expr_tuple = hl.tuple(exprs)...
true
true
f778c6a11a52590c5de32f8226226a7e1cb3f945
1,044
py
Python
tests/test_path.py
bndr/django-graphql-jwt
0b9d7e07ce6d9e7835b1047d54690fd434a2649b
[ "MIT" ]
1
2019-06-19T12:05:08.000Z
2019-06-19T12:05:08.000Z
tests/test_path.py
CZZLEGEND/django-graphql-jwt
6e816445b72e7582d0595fda9e7e5d0486026045
[ "MIT" ]
null
null
null
tests/test_path.py
CZZLEGEND/django-graphql-jwt
6e816445b72e7582d0595fda9e7e5d0486026045
[ "MIT" ]
1
2021-03-10T17:53:41.000Z
2021-03-10T17:53:41.000Z
from django.test import TestCase from graphql_jwt.path import PathDict, filter_strings class FilterStringsTests(TestCase): def test_filter_strings(self): items = filter_strings(['0', '1', 0, '2']) self.assertIsInstance(items, tuple) self.assertNotIn(0, items) class PathDictTests(TestC...
26.769231
79
0.6341
from django.test import TestCase from graphql_jwt.path import PathDict, filter_strings class FilterStringsTests(TestCase): def test_filter_strings(self): items = filter_strings(['0', '1', 0, '2']) self.assertIsInstance(items, tuple) self.assertNotIn(0, items) class PathDictTests(TestC...
true
true
f778c6a88d38946e1e9e86c5eea421f153dcb505
1,901
py
Python
heatpy.py
marianna13/heatpy
a1010c87c592c81e61126f69842d010922c603fe
[ "MIT" ]
null
null
null
heatpy.py
marianna13/heatpy
a1010c87c592c81e61126f69842d010922c603fe
[ "MIT" ]
null
null
null
heatpy.py
marianna13/heatpy
a1010c87c592c81e61126f69842d010922c603fe
[ "MIT" ]
null
null
null
import numpy as np def plot(b,d,C,t,x1,y1,x2,y2,fn, show_solution=False): ''' This function finds solutions. b,d : boundary conditions, C : thermal diffusivity t : time x2-x1 : size of a square in X direction, y2-y1 : size of the square in Y direction, fn : initial condition ''' impo...
24.063291
221
0.531825
import numpy as np def plot(b,d,C,t,x1,y1,x2,y2,fn, show_solution=False): import plotly.graph_objects as go def solve(b,d,C,t,x1,y1,x2=None,y2=None,fn=None): a=0 c=0 def f1(x,y): return x-y-2 def f(x,y,m,n,fn): if fn!=None: return fn(x,y)*np.sin(m*np.pi/b*x)*np.sin(n*np.p...
true
true
f778c85a99b3baeb185bfb0178a44f42981fab47
1,223
py
Python
personal_portfolio/urls.py
haku-kiro/django-portfolio
fd907c9e80657e398ed4e88c83cc6b852246b908
[ "MIT" ]
null
null
null
personal_portfolio/urls.py
haku-kiro/django-portfolio
fd907c9e80657e398ed4e88c83cc6b852246b908
[ "MIT" ]
null
null
null
personal_portfolio/urls.py
haku-kiro/django-portfolio
fd907c9e80657e398ed4e88c83cc6b852246b908
[ "MIT" ]
null
null
null
"""personal_portfolio URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/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') ...
35.970588
77
0.724448
from django.contrib import admin from django.urls import path, include # that are uploaded with our portfolio app # note, we also added to the settings.py file from django.conf.urls.static import static from django.conf import settings from portfolio import views urlpatterns = [ path('admin/', admin.site.urls), ...
true
true
f778c85e156479bd2eb47365bac8f7f6fa2c661e
2,244
py
Python
src/robot/utils/robottypes2.py
bhirsz/robotframework
d62ee5091ed932aee8fc12ae5e340a5b19288f05
[ "ECL-2.0", "Apache-2.0" ]
2
2020-11-12T14:02:01.000Z
2021-01-06T03:54:44.000Z
src/robot/utils/robottypes2.py
bhirsz/robotframework
d62ee5091ed932aee8fc12ae5e340a5b19288f05
[ "ECL-2.0", "Apache-2.0" ]
40
2020-11-06T08:30:26.000Z
2022-03-02T10:06:51.000Z
src/robot/utils/robottypes2.py
bhirsz/robotframework
d62ee5091ed932aee8fc12ae5e340a5b19288f05
[ "ECL-2.0", "Apache-2.0" ]
1
2020-11-23T03:44:31.000Z
2020-11-23T03:44:31.000Z
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework Foundation # # 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 ...
28.769231
78
0.69697
from collections import Iterable, Mapping, MutableMapping, Sequence from UserDict import UserDict from UserString import UserString from types import ClassType, NoneType try: from java.lang import String except ImportError: String = () from .platform import RERAISED_EXCEPTIONS def is_integer(item): ret...
true
true
f778c8a1367d89e918d6ab1101dd087f562cdfae
119
py
Python
siem_integrations/clx_query_service/clxquery/urls.py
gbatmaz/clx
a06ec448daf2fb8f42103bec1dafec828b7708a6
[ "Apache-2.0" ]
null
null
null
siem_integrations/clx_query_service/clxquery/urls.py
gbatmaz/clx
a06ec448daf2fb8f42103bec1dafec828b7708a6
[ "Apache-2.0" ]
null
null
null
siem_integrations/clx_query_service/clxquery/urls.py
gbatmaz/clx
a06ec448daf2fb8f42103bec1dafec828b7708a6
[ "Apache-2.0" ]
null
null
null
from django.urls import path from clxquery import views urlpatterns = [path("clxquery/<str:query>", views.run_query)]
23.8
61
0.773109
from django.urls import path from clxquery import views urlpatterns = [path("clxquery/<str:query>", views.run_query)]
true
true
f778c9943cc7533c3989c9fbe42a3e145a712a70
1,620
py
Python
src/sentry/api/endpoints/team_groups_trending.py
arsh-co/sentry
7a83a7e8a13047a9471756d679e2deb596cc2ca1
[ "BSD-3-Clause" ]
null
null
null
src/sentry/api/endpoints/team_groups_trending.py
arsh-co/sentry
7a83a7e8a13047a9471756d679e2deb596cc2ca1
[ "BSD-3-Clause" ]
null
null
null
src/sentry/api/endpoints/team_groups_trending.py
arsh-co/sentry
7a83a7e8a13047a9471756d679e2deb596cc2ca1
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from datetime import timedelta from django.utils import timezone from rest_framework.response import Response from sentry.api.base import Endpoint from sentry.api.permissions import assert_perm from sentry.api.serializers import serialize from sentry.models import Group, GroupSt...
32.4
81
0.674074
from __future__ import absolute_import from datetime import timedelta from django.utils import timezone from rest_framework.response import Response from sentry.api.base import Endpoint from sentry.api.permissions import assert_perm from sentry.api.serializers import serialize from sentry.models import Group, GroupSt...
true
true
f778c9a7730d0c1e2b884317fbc9a78ccbe5ccd5
1,512
py
Python
tasks/task_44.py
AlexRogalskiy/Python
78a38746de51688dc118ba921da08b920fe4caf2
[ "MIT" ]
null
null
null
tasks/task_44.py
AlexRogalskiy/Python
78a38746de51688dc118ba921da08b920fe4caf2
[ "MIT" ]
null
null
null
tasks/task_44.py
AlexRogalskiy/Python
78a38746de51688dc118ba921da08b920fe4caf2
[ "MIT" ]
null
null
null
import random def max_sum_subarray(arr): max_found = None current_range_sum = 0 for val in arr: current_range_sum += val max_found = max(max_found, current_range_sum) # if a current_range has gotten to be negative, # we reset the current_range_sum to 0 because # the next contiguous subar...
36
94
0.652116
import random def max_sum_subarray(arr): max_found = None current_range_sum = 0 for val in arr: current_range_sum += val max_found = max(max_found, current_range_sum) current_range_sum = max(current_range_sum, 0) return max_found print "Max sum of a subarray in %s is %d" %...
false
true
f778ca5328e64c2bb405e17719d4d52c3c8cc45c
4,172
py
Python
src/attribution.py
1kc2/Long-Short-Stress-Test
1dd8cdb5f4949fd140c7c494f8315e0e24d001b9
[ "MIT" ]
2
2021-06-29T19:01:52.000Z
2022-02-04T06:42:58.000Z
src/attribution.py
1kc2/Long-Short-Stress-Test
1dd8cdb5f4949fd140c7c494f8315e0e24d001b9
[ "MIT" ]
null
null
null
src/attribution.py
1kc2/Long-Short-Stress-Test
1dd8cdb5f4949fd140c7c494f8315e0e24d001b9
[ "MIT" ]
null
null
null
from db_utils import read_select, get_temptable,\ insert_temp_ret_table, drop_temp_table from weights import get_portfolio_weights, get_single_ticker_weight from pandas import DataFrame import pandas as pd def load_constituent_prices(ticker, db): q = """ SELECT * FROM eq_prices...
32.341085
87
0.670901
from db_utils import read_select, get_temptable,\ insert_temp_ret_table, drop_temp_table from weights import get_portfolio_weights, get_single_ticker_weight from pandas import DataFrame import pandas as pd def load_constituent_prices(ticker, db): q = """ SELECT * FROM eq_prices...
true
true
f778ca6c437243f40cc397d698137ed61043c244
35
py
Python
src/mphrqe/data/generated/__init__.py
DimitrisAlivas/StarQE
c17676e5f1e3f19c0c4c117a50abe2ce22ffef28
[ "MIT" ]
11
2021-06-17T15:01:36.000Z
2022-02-04T16:48:27.000Z
src/mphrqe/data/generated/__init__.py
DimitrisAlivas/StarQE
c17676e5f1e3f19c0c4c117a50abe2ce22ffef28
[ "MIT" ]
null
null
null
src/mphrqe/data/generated/__init__.py
DimitrisAlivas/StarQE
c17676e5f1e3f19c0c4c117a50abe2ce22ffef28
[ "MIT" ]
1
2022-03-28T03:55:33.000Z
2022-03-28T03:55:33.000Z
"""Generated code. Do not edit."""
17.5
34
0.628571
true
true
f778cb886ea5a9e9ba755f1a9e0bc60fc7a581d2
400
py
Python
snippets/python/matplotlib/logistic.py
qeedquan/misc_utilities
94c6363388662ac8ebbf075b9c853ce6defbb5b3
[ "MIT" ]
8
2018-10-17T18:17:25.000Z
2022-03-18T09:02:53.000Z
snippets/python/matplotlib/logistic.py
qeedquan/misc_utilities
94c6363388662ac8ebbf075b9c853ce6defbb5b3
[ "MIT" ]
null
null
null
snippets/python/matplotlib/logistic.py
qeedquan/misc_utilities
94c6363388662ac8ebbf075b9c853ce6defbb5b3
[ "MIT" ]
3
2020-07-01T13:52:42.000Z
2022-03-18T09:10:59.000Z
#!/usr/bin/env python3 import numpy as np import matplotlib.pyplot as plt def logistic(r=2.0, N=100): xs = 0.5*np.ones(N) for i in np.arange(N-1): xs[i+1] = r*xs[i]*(1.0-xs[i]) return xs fig, axes = plt.subplots(2, 2) axes[0, 0].plot(logistic(2.7), 'bo') axes[1, 0].plot(logistic(3.1), 'ro') axes[...
22.222222
37
0.5975
import numpy as np import matplotlib.pyplot as plt def logistic(r=2.0, N=100): xs = 0.5*np.ones(N) for i in np.arange(N-1): xs[i+1] = r*xs[i]*(1.0-xs[i]) return xs fig, axes = plt.subplots(2, 2) axes[0, 0].plot(logistic(2.7), 'bo') axes[1, 0].plot(logistic(3.1), 'ro') axes[0, 1].plot(logistic(3.5...
true
true
f778cbe4deb5c127d03ced4d0673b72402c0a911
8,320
py
Python
rsts/conf.py
dolthub/flyte
eedfa3911e7b624dd889a86cf24cf0df65e79cd5
[ "Apache-2.0" ]
null
null
null
rsts/conf.py
dolthub/flyte
eedfa3911e7b624dd889a86cf24cf0df65e79cd5
[ "Apache-2.0" ]
null
null
null
rsts/conf.py
dolthub/flyte
eedfa3911e7b624dd889a86cf24cf0df65e79cd5
[ "Apache-2.0" ]
null
null
null
# -*- 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/stable/config # -- Path setup ------------------------------------------------------------...
33.821138
104
0.651563
import sphinx.application import sphinx.errors sphinx.application.ExtensionError = sphinx.errors.ExtensionError project = u'Flyte' copyright = u'2021, Flyte Authors' author = u'Flyte' version = u'' release = u'0.11.0' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosectionlabel', 'sphinx.ext.d...
true
true
f778cbf856b1003d5f6ba5dffca796f0308d3d7a
3,293
py
Python
scripts/common/logger.py
a-wakeel/Device-Registration-Subsystem
dd9fa387e2087a6ccea9676303debe640bd99422
[ "Unlicense" ]
6
2018-11-07T12:41:30.000Z
2020-04-12T18:07:03.000Z
scripts/common/logger.py
a-wakeel/Device-Registration-Subsystem
dd9fa387e2087a6ccea9676303debe640bd99422
[ "Unlicense" ]
1
2020-10-20T12:33:18.000Z
2020-10-20T12:33:18.000Z
scripts/common/logger.py
a-wakeel/Device-Registration-Subsystem
dd9fa387e2087a6ccea9676303debe640bd99422
[ "Unlicense" ]
10
2018-11-12T06:15:19.000Z
2021-11-18T05:45:12.000Z
""" Custom logging module for scripts Copyright (c) 2018-2020 Qualcomm Technologies, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met: Redistr...
63.326923
844
0.761919
import logging class ScriptLogger: def __init__(self, logger_name, logging_level=logging.INFO, logging_format=None): self.logger_name = logger_name self.logging_level = logging_level if logging_format is None: self.logging_format = '>> %(name)s: %(message)s' else: ...
true
true
f778cc297ed8c64edb698f044c93083b626ad833
1,182
py
Python
tests/v2/test_0119-numexpr-and-broadcast-arrays.py
douglasdavis/awkward-1.0
f00775803a5568efb0a8e2dae3b1a4f23228fa40
[ "BSD-3-Clause" ]
null
null
null
tests/v2/test_0119-numexpr-and-broadcast-arrays.py
douglasdavis/awkward-1.0
f00775803a5568efb0a8e2dae3b1a4f23228fa40
[ "BSD-3-Clause" ]
null
null
null
tests/v2/test_0119-numexpr-and-broadcast-arrays.py
douglasdavis/awkward-1.0
f00775803a5568efb0a8e2dae3b1a4f23228fa40
[ "BSD-3-Clause" ]
null
null
null
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE import pytest # noqa: F401 import numpy as np # noqa: F401 import awkward as ak # noqa: F401 to_list = ak._v2.operations.convert.to_list def test_broadcast_arrays(): a = ak._v2.Array([[1.1, 2.2, 3.3], [], [4.4, 5.5]], che...
33.771429
87
0.615059
import pytest import numpy as np import awkward as ak to_list = ak._v2.operations.convert.to_list def test_broadcast_arrays(): a = ak._v2.Array([[1.1, 2.2, 3.3], [], [4.4, 5.5]], check_valid=True) b = ak._v2.Array([100, 200, 300], check_valid=True) out = ak._v2.operations.structure.broadcast_arrays(...
true
true
f778ccfe7ef710d82d16847a1f0142d154bd7654
308
py
Python
activelearning/datareduction/diff_visualizer.py
plin1112/ANI-Tools
76280c918fc79fee8c266b8bc9ab57f86104ec99
[ "MIT" ]
8
2018-10-30T16:48:44.000Z
2021-03-08T01:44:41.000Z
activelearning/datareduction/diff_visualizer.py
plin1112/ANI-Tools
76280c918fc79fee8c266b8bc9ab57f86104ec99
[ "MIT" ]
null
null
null
activelearning/datareduction/diff_visualizer.py
plin1112/ANI-Tools
76280c918fc79fee8c266b8bc9ab57f86104ec99
[ "MIT" ]
5
2018-04-05T15:51:12.000Z
2019-05-23T21:38:31.000Z
import numpy as np import matplotlib.pyplot as plt dfile = '/home/jujuman/Research/SingleNetworkTest/train_05/diffs.dat' f = open(dfile, 'r') for l in f: diffs = np.array(l.split(','),dtype=np.float) plt.scatter(np.arange(diffs.size), diffs, color='black', label='DIFF', linewidth=1) plt.show()
30.8
87
0.698052
import numpy as np import matplotlib.pyplot as plt dfile = '/home/jujuman/Research/SingleNetworkTest/train_05/diffs.dat' f = open(dfile, 'r') for l in f: diffs = np.array(l.split(','),dtype=np.float) plt.scatter(np.arange(diffs.size), diffs, color='black', label='DIFF', linewidth=1) plt.show()
true
true
f778ce716520e617738a3af98d09014c71ba626d
878
py
Python
bots/randbot.py
jimmahoney/tron-engine
49d2e15a2fde6b838069045a4abd8857ab0507a0
[ "BSD-2-Clause" ]
1
2016-02-13T00:12:41.000Z
2016-02-13T00:12:41.000Z
bots/randbot.py
jimmahoney/tron-engine
49d2e15a2fde6b838069045a4abd8857ab0507a0
[ "BSD-2-Clause" ]
null
null
null
bots/randbot.py
jimmahoney/tron-engine
49d2e15a2fde6b838069045a4abd8857ab0507a0
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python """ randbot.py An example Tron bot which moves in a random direction. There's a lot of tricky stuff going on behind the scenes here which you can probably mostly ignore. On each turn, this program will read an entire board position from stdin (which is supplied by the engine that runs it), and t...
29.266667
72
0.747153
import random, tron def which_move(board): return random.choice(board.moves()) for board in tron.Board.generate(): tron.move(which_move(board))
true
true
f778ce9272f6f290ede771a32d80f6ed05f471f4
5,800
py
Python
container_sdk/model/container/service_spec_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
5
2019-07-31T04:11:05.000Z
2021-01-07T03:23:20.000Z
container_sdk/model/container/service_spec_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
container_sdk/model/container/service_spec_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: service_spec.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobu...
46.031746
646
0.761897
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _s...
true
true
f778cea422e807f5681df4b05fc3ed85c7ecd0d9
4,922
py
Python
upgrade_tests/compatibility_flag_test.py
mfleming/cassandra-dtest
75975071a5f13c49a626b2c23445c8e3f0122326
[ "Apache-2.0" ]
44
2017-07-13T14:20:42.000Z
2022-03-27T23:55:27.000Z
upgrade_tests/compatibility_flag_test.py
mfleming/cassandra-dtest
75975071a5f13c49a626b2c23445c8e3f0122326
[ "Apache-2.0" ]
64
2017-07-26T16:06:01.000Z
2022-03-17T22:57:03.000Z
upgrade_tests/compatibility_flag_test.py
mfleming/cassandra-dtest
75975071a5f13c49a626b2c23445c8e3f0122326
[ "Apache-2.0" ]
105
2017-07-13T14:28:14.000Z
2022-03-23T04:22:46.000Z
import pytest import logging from dtest import Tester from tools.assertions import assert_all since = pytest.mark.since logger = logging.getLogger(__name__) @pytest.mark.upgrade_test class TestCompatibilityFlag(Tester): """ Test 30 protocol compatibility flag @jira CASSANDRA-13004 """ def _com...
35.410072
133
0.689963
import pytest import logging from dtest import Tester from tools.assertions import assert_all since = pytest.mark.since logger = logging.getLogger(__name__) @pytest.mark.upgrade_test class TestCompatibilityFlag(Tester): def _compatibility_flag_off_with_30_node_test(self, from_version): cluster = self....
true
true
f778cee85587546bb937a902b7be98c57d71c937
3,080
py
Python
app/app/settings.py
tungdd36/recipe-app-api
cea5e1f818b27cfa57d09ac4b40f0e719aa45447
[ "MIT" ]
null
null
null
app/app/settings.py
tungdd36/recipe-app-api
cea5e1f818b27cfa57d09ac4b40f0e719aa45447
[ "MIT" ]
null
null
null
app/app/settings.py
tungdd36/recipe-app-api
cea5e1f818b27cfa57d09ac4b40f0e719aa45447
[ "MIT" ]
null
null
null
""" Django settings for app project. Generated by 'django-admin startproject' using Django 2.1.15. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ import os # Bu...
25.454545
91
0.693831
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'ziu@jb$_pel@=z3@=^^)+jc!ip9&6dhz9&7$e@wwsv-4t1idm3' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes...
true
true
f778cf5434b098aa433ddf91ffb459cfab90f024
4,595
py
Python
spokestack/asr/google/speech_recognizer.py
spokestack/spokestack-python
95e451f9ab6ab1af2370d3e1007ebf6739e4765f
[ "Apache-2.0" ]
139
2020-09-01T20:51:11.000Z
2022-01-23T09:17:17.000Z
spokestack/asr/google/speech_recognizer.py
spokestack/spokestack-python
95e451f9ab6ab1af2370d3e1007ebf6739e4765f
[ "Apache-2.0" ]
41
2020-08-05T13:48:03.000Z
2021-07-21T21:53:10.000Z
spokestack/asr/google/speech_recognizer.py
spokestack/spokestack-python
95e451f9ab6ab1af2370d3e1007ebf6739e4765f
[ "Apache-2.0" ]
14
2020-11-24T19:02:49.000Z
2022-03-21T07:59:51.000Z
""" This module contains the google asr speech recognizer """ import logging from queue import Queue from threading import Thread from typing import Any, Generator, Union import numpy as np from google.cloud import speech from google.oauth2 import service_account from spokestack.context import SpeechContext _LOG = l...
34.291045
88
0.560392
import logging from queue import Queue from threading import Thread from typing import Any, Generator, Union import numpy as np from google.cloud import speech from google.oauth2 import service_account from spokestack.context import SpeechContext _LOG = logging.getLogger(__name__) class GoogleSpeechRecognizer: ...
true
true
f778d2ac4af1eeb9ae493dc8712448ffb0cd2618
7,166
py
Python
bot.py
jraynolds/Glimmer-and-Gloom
a728fc3b72983271436f2d36ace47fb23586aea6
[ "MIT" ]
2
2022-01-22T20:26:45.000Z
2022-01-22T20:42:05.000Z
bot.py
jraynolds/Glimmer-and-Gloom
a728fc3b72983271436f2d36ace47fb23586aea6
[ "MIT" ]
3
2021-07-16T18:22:29.000Z
2022-03-31T23:32:23.000Z
bot.py
jraynolds/Glimmer-and-Gloom
a728fc3b72983271436f2d36ace47fb23586aea6
[ "MIT" ]
null
null
null
import pyautogui import time import math import random GLIMMER_FILE_LOC = "glimmer.png" # The local file location of the glimmer button image GLOOM_FILE_LOC = "gloom.png" # The local file location of the gloom button image TILE_REMOVE_LENIENCY = 5 # The maximum number of pixels different two buttons can be before the...
29.24898
155
0.637455
import pyautogui import time import math import random GLIMMER_FILE_LOC = "glimmer.png" GLOOM_FILE_LOC = "gloom.png" TILE_REMOVE_LENIENCY = 5 TILE_SORT_LENIENCY = 5 # The maximum number of pixels different the top left y coordinate can be for buttons before they're considered not in the same row. CLICK_DELAY = .1 B...
true
true
f778d3e55b7e17ae5d8e2d2d349f90fe379c8281
6,104
py
Python
qa/rpc-tests/proxy_test.py
needycoin/needycore
05c0ce57f27d66c37696a9c5eb3c067120fd68b8
[ "MIT" ]
1
2020-06-04T14:05:04.000Z
2020-06-04T14:05:04.000Z
qa/rpc-tests/proxy_test.py
needycoin/needycore
05c0ce57f27d66c37696a9c5eb3c067120fd68b8
[ "MIT" ]
null
null
null
qa/rpc-tests/proxy_test.py
needycoin/needycore
05c0ce57f27d66c37696a9c5eb3c067120fd68b8
[ "MIT" ]
1
2020-07-13T17:00:15.000Z
2020-07-13T17:00:15.000Z
#!/usr/bin/env python2 # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import socket import traceback, sys from binascii import hexlify import time, os from socks5 import Socks5Conf...
41.808219
145
0.653342
import socket import traceback, sys from binascii import hexlify import time, os from socks5 import Socks5Configuration, Socks5Command, Socks5Server, AddressType from test_framework import BitcoinTestFramework from util import * class ProxyTest(BitcoinTestFramework): def __init__(self): se...
true
true
f778d4d7cbb6766a3ac301866e0f0f41913a73f4
88,877
py
Python
numpy/core/tests/test_regression.py
gvvynplaine/numpy
0bd548e287b9e2fd0126f64d8be01a812e3c6a48
[ "BSD-3-Clause" ]
1
2021-07-06T23:34:38.000Z
2021-07-06T23:34:38.000Z
numpy/core/tests/test_regression.py
gvvynplaine/numpy
0bd548e287b9e2fd0126f64d8be01a812e3c6a48
[ "BSD-3-Clause" ]
23
2020-08-24T03:35:07.000Z
2020-11-23T03:41:36.000Z
numpy/core/tests/test_regression.py
gvvynplaine/numpy
0bd548e287b9e2fd0126f64d8be01a812e3c6a48
[ "BSD-3-Clause" ]
null
null
null
import copy import sys import gc import tempfile import pytest from os import path from io import BytesIO from itertools import chain import numpy as np from numpy.testing import ( assert_, assert_equal, IS_PYPY, assert_almost_equal, assert_array_equal, assert_array_almost_equal, assert_raises, ...
35.49401
93
0.546024
import copy import sys import gc import tempfile import pytest from os import path from io import BytesIO from itertools import chain import numpy as np from numpy.testing import ( assert_, assert_equal, IS_PYPY, assert_almost_equal, assert_array_equal, assert_array_almost_equal, assert_raises, ...
true
true
f778d4ed3877884bd30f73cbec928049ccf02e88
1,350
py
Python
plugins/ipc/__init__.py
Suffyx/Isaiah
ae68ca96ab478dbf74afd04b8cf2e5f81fe86cd2
[ "MIT" ]
null
null
null
plugins/ipc/__init__.py
Suffyx/Isaiah
ae68ca96ab478dbf74afd04b8cf2e5f81fe86cd2
[ "MIT" ]
null
null
null
plugins/ipc/__init__.py
Suffyx/Isaiah
ae68ca96ab478dbf74afd04b8cf2e5f81fe86cd2
[ "MIT" ]
null
null
null
""" MIT License Copyright (c) 2021 Suffyx Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distri...
36.486486
78
0.776296
from plugins.ipc.ipc_routes import IPCRoutes from core import Isaiah def setup(bot: Isaiah): bot.add_cog(IPCRoutes(bot))
true
true
f778d60e1c321b402633d50526602d9b4d8d387c
3,977
py
Python
08.ReinforcemetLearning/tf_rl/models.py
Finfra/KerasStudy
ccd9b0a9f78d70d63a500ba3c0bf9e6686bee11c
[ "MIT" ]
null
null
null
08.ReinforcemetLearning/tf_rl/models.py
Finfra/KerasStudy
ccd9b0a9f78d70d63a500ba3c0bf9e6686bee11c
[ "MIT" ]
null
null
null
08.ReinforcemetLearning/tf_rl/models.py
Finfra/KerasStudy
ccd9b0a9f78d70d63a500ba3c0bf9e6686bee11c
[ "MIT" ]
null
null
null
import math import tensorflow as tf from .utils import base_name class Layer(object): def __init__(self, input_sizes, output_size, scope): """Cretes a neural network layer.""" if type(input_sizes) != list: input_sizes = [input_sizes] self.input_sizes = input_sizes sel...
42.763441
153
0.594418
import math import tensorflow as tf from .utils import base_name class Layer(object): def __init__(self, input_sizes, output_size, scope): if type(input_sizes) != list: input_sizes = [input_sizes] self.input_sizes = input_sizes self.output_size = output_size self.scop...
true
true
f778d68fd33b1e3ea78a79f6e7741f3086e9cb91
339
py
Python
src/DbxSync/CodeTransformer/LineParser/ImportLineParser.py
DataSentics/dbx-sync
841b969d8c76db0fe4ec4b1588c1206f8a1e7492
[ "MIT" ]
null
null
null
src/DbxSync/CodeTransformer/LineParser/ImportLineParser.py
DataSentics/dbx-sync
841b969d8c76db0fe4ec4b1588c1206f8a1e7492
[ "MIT" ]
null
null
null
src/DbxSync/CodeTransformer/LineParser/ImportLineParser.py
DataSentics/dbx-sync
841b969d8c76db0fe4ec4b1588c1206f8a1e7492
[ "MIT" ]
null
null
null
import re from DbxSync.CodeTransformer.LineTransformer.ImportLine import ImportLine class ImportLineParser: def parse(self, line): matches = re.match('^from[ ]+([^ ]+) import ([^ ]+)$', line) if matches is None: return None else: return ImportLine(matches.group(1),...
26.076923
73
0.622419
import re from DbxSync.CodeTransformer.LineTransformer.ImportLine import ImportLine class ImportLineParser: def parse(self, line): matches = re.match('^from[ ]+([^ ]+) import ([^ ]+)$', line) if matches is None: return None else: return ImportLine(matches.group(1),...
true
true
f778d736ec539d1213d7671c9fe7c3d6b7274e41
3,928
py
Python
lldb/utils/lui/commandwin.py
bytesnake/Enzyme
247606c279920d476645d2e319e574bf8be10fc9
[ "Apache-2.0" ]
427
2018-05-29T14:21:02.000Z
2022-03-16T03:17:54.000Z
SymbolExtractorAndRenamer/lldb/utils/lui/commandwin.py
PolideaPlayground/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
[ "Apache-2.0" ]
25
2018-07-23T08:34:15.000Z
2021-11-05T07:13:36.000Z
SymbolExtractorAndRenamer/lldb/utils/lui/commandwin.py
PolideaPlayground/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
[ "Apache-2.0" ]
52
2018-07-19T19:57:32.000Z
2022-03-11T16:05:38.000Z
##===-- commandwin.py ----------------------------------------*- Python -*-===## ## # The LLVM Compiler Infrastructure ## # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. ## ##===----------------------------------------------------------------------===## i...
29.757576
80
0.51502
import cui import curses import lldb from itertools import islice class History(object): def __init__(self): self.data = {} self.pos = 0 self.tempEntry = '' def previous(self, curr): if self.pos == len(self.data): self.tempEntry = curr if self.pos < 0: ...
true
true
f778d7409b792a7ebb94486f27d095c7d0144d69
15,899
py
Python
setup.py
farziengineer/numpy
4ff3af387f93ff37f04f42458d4590c33f61fb9e
[ "BSD-3-Clause" ]
null
null
null
setup.py
farziengineer/numpy
4ff3af387f93ff37f04f42458d4590c33f61fb9e
[ "BSD-3-Clause" ]
null
null
null
setup.py
farziengineer/numpy
4ff3af387f93ff37f04f42458d4590c33f61fb9e
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """ NumPy is the fundamental package for array computing with Python. It provides: - a powerful N-dimensional array object - sophisticated (broadcasting) functions - tools for integrating C/C++ and Fortran code - useful linear algebra, Fourier transform, and random number capabilities - and much...
35.09713
84
0.606579
from __future__ import division, print_function DOCLINES = (__doc__ or '').split("\n") import os import sys import subprocess import textwrap if sys.version_info[:2] < (3, 5): raise RuntimeError("Python version >= 3.5 required.") import builtins CLASSIFIERS = """\ Development Status :: 5 - Production/Stable ...
true
true
f778d8bf499a5a2da1986294350f4f47f9c94fff
3,365
py
Python
server/processes/models/saas_token.py
CloudReactor/task_manager
464ca74371064fabb9a21b1f5bacba30360932ab
[ "Fair" ]
null
null
null
server/processes/models/saas_token.py
CloudReactor/task_manager
464ca74371064fabb9a21b1f5bacba30360932ab
[ "Fair" ]
6
2021-11-01T01:35:40.000Z
2022-02-11T03:33:06.000Z
server/processes/models/saas_token.py
CloudReactor/task_manager
464ca74371064fabb9a21b1f5bacba30360932ab
[ "Fair" ]
null
null
null
from typing import Type import logging import binascii import os from django.conf import settings from django.db import models from django.db.models.signals import pre_save from django.dispatch import receiver from django.utils.translation import gettext_lazy as _ from django.contrib.auth.models import G...
33.65
121
0.688262
from typing import Type import logging import binascii import os from django.conf import settings from django.db import models from django.db.models.signals import pre_save from django.dispatch import receiver from django.utils.translation import gettext_lazy as _ from django.contrib.auth.models import G...
true
true
f778d9b5c3fc6c62c3d4763ef886139e556b7c38
2,687
py
Python
source code/slicing and dicing files.py
starkworld/Python-Course-work
28715f079939129b442aedcd7edb2e0838886ba0
[ "Apache-2.0" ]
null
null
null
source code/slicing and dicing files.py
starkworld/Python-Course-work
28715f079939129b442aedcd7edb2e0838886ba0
[ "Apache-2.0" ]
null
null
null
source code/slicing and dicing files.py
starkworld/Python-Course-work
28715f079939129b442aedcd7edb2e0838886ba0
[ "Apache-2.0" ]
null
null
null
""" Created on 27 Friday feb 16:53:34 2020 @author: nkalyan🤠 Implementing Python scripts on slicing and dicing files""" def get_line(file_name): """This function opens the given file and reads it and yield each number of values at a time, or raise exception if there is no such f...
28.585106
119
0.582434
def get_line(file_name): try: fp = open(file_name, 'r') except FileNotFoundError: print(f"Cannot open {file_name} plz check.") else: """Perform the task for opening file and yields each values""" with fp: for each_line in fp: st...
true
true
f778da1398a7eff842ba52f0f1546b0dd50e17aa
493
py
Python
cushyPostIntegration/logger_decorator.py
Amedeo91/cushypost_integration
fc7ffc9daf535ed5bcfdee4933a7a57340a583b2
[ "MIT" ]
1
2021-10-06T06:23:40.000Z
2021-10-06T06:23:40.000Z
cushyPostIntegration/logger_decorator.py
Amedeo91/cushypost_integration
fc7ffc9daf535ed5bcfdee4933a7a57340a583b2
[ "MIT" ]
null
null
null
cushyPostIntegration/logger_decorator.py
Amedeo91/cushypost_integration
fc7ffc9daf535ed5bcfdee4933a7a57340a583b2
[ "MIT" ]
null
null
null
import logging import time from functools import wraps def logger(fn): @wraps(fn) def wrapper(*args, **kwargs): start_time = time.time() logging.debug('About to run %s' % fn.__name__) try: return fn(*args, **kwargs) except Exception as error: raise error...
25.947368
76
0.56998
import logging import time from functools import wraps def logger(fn): @wraps(fn) def wrapper(*args, **kwargs): start_time = time.time() logging.debug('About to run %s' % fn.__name__) try: return fn(*args, **kwargs) except Exception as error: raise error...
true
true
f778da971daa3d2a403a23012dc21d14a1731ffa
17,692
py
Python
qgis/interlis/interlisdialog.py
sourcepole/ogrtools
7d5824a4a7ee3687f2cfec45a69cf0d79423c879
[ "MIT" ]
13
2015-05-25T19:24:55.000Z
2020-01-17T06:25:46.000Z
qgis/interlis/interlisdialog.py
sourcepole/ogrtools
7d5824a4a7ee3687f2cfec45a69cf0d79423c879
[ "MIT" ]
8
2015-05-29T17:29:19.000Z
2018-01-22T14:15:31.000Z
qgis/interlis/interlisdialog.py
sourcepole/ogrtools
7d5824a4a7ee3687f2cfec45a69cf0d79423c879
[ "MIT" ]
5
2015-05-20T18:05:50.000Z
2021-09-23T18:53:21.000Z
# -*- coding: utf-8 -*- """ /*************************************************************************** InterlisDialog A QGIS plugin Interlis Import/Export ------------------- begin : 2014-01-18 copyright : (C) 20...
40.027149
342
0.598745
from PyQt4 import QtCore, QtGui from PyQt4.QtCore import pyqtSlot, Qt, QSettings, QEventLoop, QTimer, qDebug from PyQt4.QtGui import QFileDialog, QMessageBox, QDialog, QDockWidget from PyQt4.QtNetwork import QNetworkRequest, QNetworkReply from qgis.core import QGis, QgsMessageLog, QgsVectorLayer, QgsDataSourceURI, \ ...
true
true
f778dab9827348fef7700ee19fe81f858a8d3ec6
9,681
py
Python
AEANNtf/ANNtf2_operations.py
baxterai/AEANNtf
416e282c4ee3e0e8622bafd558363bacb27d4c15
[ "MIT" ]
null
null
null
AEANNtf/ANNtf2_operations.py
baxterai/AEANNtf
416e282c4ee3e0e8622bafd558363bacb27d4c15
[ "MIT" ]
null
null
null
AEANNtf/ANNtf2_operations.py
baxterai/AEANNtf
416e282c4ee3e0e8622bafd558363bacb27d4c15
[ "MIT" ]
null
null
null
"""ANNtf2_operations.py # Author: Richard Bruce Baxter - Copyright (c) 2020-2022 Baxter AI (baxterai.com) # License: MIT License # Installation: see ANNtf2.py # Usage: see ANNtf2.py # Description: ANNtf operations """ import tensorflow as tf import numpy as np import ANNtf2_globalDefs import math debugSingleLay...
36.258427
247
0.777606
import tensorflow as tf import numpy as np import ANNtf2_globalDefs import math debugSingleLayerNetwork = False def generateParameterName(l, arrayName): parameterName = "l" + str(l) + arrayName return parameterName def generateParameterNameSkipLayers(lprior, l, arrayName): parameterName = "lprior" + str(lprio...
true
true
f778db0e1deb64e267011b4af26fc7d6c5b25a33
446
py
Python
demo/python/sympy/sympy-integr1-01-indefinite-integral.py
ettoremessina/integral-calculus
60c7f20068039737d0c4031023201c2bde47783a
[ "MIT" ]
1
2021-12-19T02:21:00.000Z
2021-12-19T02:21:00.000Z
demo/python/sympy/sympy-integr1-01-indefinite-integral.py
ettoremessina/integral-calculus
60c7f20068039737d0c4031023201c2bde47783a
[ "MIT" ]
null
null
null
demo/python/sympy/sympy-integr1-01-indefinite-integral.py
ettoremessina/integral-calculus
60c7f20068039737d0c4031023201c2bde47783a
[ "MIT" ]
null
null
null
import sympy as sp print('Single integral computed by SymPy indefinite integral') print('Example 1-01 indefinite integral') print('Integral of 2xe^-x from x=1 to x=5') x = sp.Symbol('x') f = 2 * x * sp.exp(-x) integral = sp.Integral(f, x) primitive = integral.doit() print('Primitive is ', primitive) primitive_lambda...
24.777778
62
0.710762
import sympy as sp print('Single integral computed by SymPy indefinite integral') print('Example 1-01 indefinite integral') print('Integral of 2xe^-x from x=1 to x=5') x = sp.Symbol('x') f = 2 * x * sp.exp(-x) integral = sp.Integral(f, x) primitive = integral.doit() print('Primitive is ', primitive) primitive_lambda...
true
true
f778dd0e26646b8656df6e9a75762e93b36ec462
3,389
py
Python
examples/airflow_local/run.py
AdamVPro/zenml
6dfba8483b1549b888341aea726362a96e407a43
[ "Apache-2.0" ]
1
2022-01-04T15:12:38.000Z
2022-01-04T15:12:38.000Z
examples/airflow_local/run.py
AdamVPro/zenml
6dfba8483b1549b888341aea726362a96e407a43
[ "Apache-2.0" ]
null
null
null
examples/airflow_local/run.py
AdamVPro/zenml
6dfba8483b1549b888341aea726362a96e407a43
[ "Apache-2.0" ]
null
null
null
# Copyright (c) ZenML GmbH 2021. 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...
29.99115
80
0.714075
import numpy as np import pandas as pd import requests from sklearn.base import ClassifierMixin from sklearn.linear_model import LogisticRegression from zenml.pipelines import pipeline from zenml.steps import BaseStepConfig, Output, step class ImporterConfig(BaseStepConfig): n_days: int = 1 def get_X_y_from_a...
true
true
f778de34f0eeb7b8ff82da162c91ef7c90bcf3f0
22,608
py
Python
networkapi/plugins/F5/Generic.py
vinicius-marinho/GloboNetworkAPI
94651d3b4dd180769bc40ec966814f3427ccfb5b
[ "Apache-2.0" ]
73
2015-04-13T17:56:11.000Z
2022-03-24T06:13:07.000Z
networkapi/plugins/F5/Generic.py
leopoldomauricio/GloboNetworkAPI
3b5b2e336d9eb53b2c113977bfe466b23a50aa29
[ "Apache-2.0" ]
99
2015-04-03T01:04:46.000Z
2021-10-03T23:24:48.000Z
networkapi/plugins/F5/Generic.py
shildenbrand/GloboNetworkAPI
515d5e961456cee657c08c275faa1b69b7452719
[ "Apache-2.0" ]
64
2015-08-05T21:26:29.000Z
2022-03-22T01:06:28.000Z
# -*- coding: utf-8 -*- import itertools import logging import bigsuds from ..base import BasePlugin from networkapi.plugins import exceptions as base_exceptions from networkapi.plugins.F5 import monitor from networkapi.plugins.F5 import node from networkapi.plugins.F5 import pool from networkapi.plugins.F5 import po...
33.00438
132
0.544763
import itertools import logging import bigsuds from ..base import BasePlugin from networkapi.plugins import exceptions as base_exceptions from networkapi.plugins.F5 import monitor from networkapi.plugins.F5 import node from networkapi.plugins.F5 import pool from networkapi.plugins.F5 import poolmember from networkapi...
false
true
f778ded3e2c9a04c5b4ee4705b8c8ad230b1c9f3
2,680
py
Python
tests/verify-branches.py
BabisK/microk8s
c43ce5c961a3b577aca6f8cf76fada964c2334c9
[ "Apache-2.0" ]
6,286
2018-07-20T15:55:22.000Z
2022-02-22T06:59:26.000Z
tests/verify-branches.py
BabisK/microk8s
c43ce5c961a3b577aca6f8cf76fada964c2334c9
[ "Apache-2.0" ]
2,230
2018-07-20T14:14:33.000Z
2022-02-22T08:22:21.000Z
tests/verify-branches.py
thanhtung22-cloud/microk8s
d1d02633ca245af9724094447be2e3c144526b35
[ "Apache-2.0" ]
706
2018-07-22T16:35:32.000Z
2022-02-17T06:32:10.000Z
import requests from subprocess import check_output class TestMicrok8sBranches(object): def test_branches(self): """Ensures LP builders push to correct snap tracks. We need to make sure the LP builders pointing to the master github branch are only pushing to the latest and current k8s sta...
40.606061
100
0.620149
import requests from subprocess import check_output class TestMicrok8sBranches(object): def test_branches(self): upstream_version = self._upstream_release() assert upstream_version version_parts = upstream_version.split(".") major_minor_upstream_version = "{}.{}".format(version_par...
true
true
f778deda570c1b0ccaab50517fa851af788745a0
14,281
py
Python
networks/res3d_cgru_mobilenet.py
GuangmingZhu/ConvLSTMForGR
14d68f599214f3474819f73512c6faec42df61a2
[ "MIT" ]
10
2019-05-30T01:20:10.000Z
2022-03-24T07:43:15.000Z
networks/res3d_cgru_mobilenet.py
GuangmingZhu/ConvLSTMForGR
14d68f599214f3474819f73512c6faec42df61a2
[ "MIT" ]
1
2021-01-09T01:32:58.000Z
2021-01-09T01:49:41.000Z
networks/res3d_cgru_mobilenet.py
GuangmingZhu/ConvLSTMForGR
14d68f599214f3474819f73512c6faec42df61a2
[ "MIT" ]
3
2019-11-28T06:09:44.000Z
2020-12-01T08:48:09.000Z
import io import sys import numpy as np import tensorflow as tf keras=tf.contrib.keras l2=keras.regularizers.l2 SEPARABLE = 0 GROUP = 1 SHUFFLE = 2 GATED = 3 def res3d(inputs, weight_decay): # Res3D Block 1 conv3d_1 = keras.layers.Conv3D(64, (3,7,7), strides=(1,2,2), padding='same', dilation_...
62.362445
99
0.679364
import io import sys import numpy as np import tensorflow as tf keras=tf.contrib.keras l2=keras.regularizers.l2 SEPARABLE = 0 GROUP = 1 SHUFFLE = 2 GATED = 3 def res3d(inputs, weight_decay): conv3d_1 = keras.layers.Conv3D(64, (3,7,7), strides=(1,2,2), padding='same', dilation_rate=(1,1,1), ke...
true
true
f778df59906f26bb8cf81f83f372325fc0c0d8be
3,000
py
Python
analysis/prod_analysis.py
adrianogil/git-tools
aa943515841a792aa1e7c4bf07e234fc20fa7811
[ "MIT" ]
null
null
null
analysis/prod_analysis.py
adrianogil/git-tools
aa943515841a792aa1e7c4bf07e234fc20fa7811
[ "MIT" ]
null
null
null
analysis/prod_analysis.py
adrianogil/git-tools
aa943515841a792aa1e7c4bf07e234fc20fa7811
[ "MIT" ]
null
null
null
import sys, os import subprocess from git_tools import git_tools import matplotlib.pylab as pylab current_dir = os.getcwd() authors_data = {} def commit_analysis(commit_hash, initial_date): # print("commit: " + commit_hash) author_name_cmd = "git log -1 --pretty=format:'%an' " + commit_hash author_name_...
32.608696
172
0.675667
import sys, os import subprocess from git_tools import git_tools import matplotlib.pylab as pylab current_dir = os.getcwd() authors_data = {} def commit_analysis(commit_hash, initial_date): author_name_cmd = "git log -1 --pretty=format:'%an' " + commit_hash author_name_output = subprocess.check_output(a...
true
true
f778e0cb6d27b846a2148041faefb4c7e53b6854
2,552
py
Python
tests/util/test_graphics.py
sourya-deepsource/pdf-annotate
ae8ea6dcf76bcf50e9ecf5aa660a7fedb3f28f52
[ "MIT" ]
137
2019-06-28T22:31:58.000Z
2022-03-27T18:37:22.000Z
tests/util/test_graphics.py
sourya-deepsource/pdf-annotate
ae8ea6dcf76bcf50e9ecf5aa660a7fedb3f28f52
[ "MIT" ]
27
2019-06-12T20:38:14.000Z
2022-03-16T22:12:21.000Z
tests/util/test_graphics.py
sourya-deepsource/pdf-annotate
ae8ea6dcf76bcf50e9ecf5aa660a7fedb3f28f52
[ "MIT" ]
37
2019-07-09T01:46:06.000Z
2022-03-26T13:09:09.000Z
from unittest import TestCase from pdf_annotate.util.geometry import identity from pdf_annotate.util.geometry import matrix_multiply from pdf_annotate.util.geometry import matrix_inverse from pdf_annotate.util.geometry import rotate from pdf_annotate.util.geometry import scale from pdf_annotate.util.geometry import tr...
32.717949
77
0.635972
from unittest import TestCase from pdf_annotate.util.geometry import identity from pdf_annotate.util.geometry import matrix_multiply from pdf_annotate.util.geometry import matrix_inverse from pdf_annotate.util.geometry import rotate from pdf_annotate.util.geometry import scale from pdf_annotate.util.geometry import tr...
true
true
f778e0ea0c09f8662d84eb7f0ecab059fcafb414
512
py
Python
galaxy_histories.py
manabuishii/galaxy_scripts
4ed20594b3772c407a5fd97df8eb0c69d3c3560b
[ "MIT" ]
null
null
null
galaxy_histories.py
manabuishii/galaxy_scripts
4ed20594b3772c407a5fd97df8eb0c69d3c3560b
[ "MIT" ]
null
null
null
galaxy_histories.py
manabuishii/galaxy_scripts
4ed20594b3772c407a5fd97df8eb0c69d3c3560b
[ "MIT" ]
null
null
null
#!/usr/bin/env python import json import sys from bioblend import galaxy history_id=None if len(sys.argv) < 3: print "Usage: %s <host> <APIkey> [optional history_id]" % sys.argv[0] sys.exit(1) elif len(sys.argv) == 3: pass elif len(sys.argv) == 4: history_id=sys.argv[3] else: print "Usage: %s <host> <APIkey...
22.26087
71
0.697266
import json import sys from bioblend import galaxy history_id=None if len(sys.argv) < 3: print "Usage: %s <host> <APIkey> [optional history_id]" % sys.argv[0] sys.exit(1) elif len(sys.argv) == 3: pass elif len(sys.argv) == 4: history_id=sys.argv[3] else: print "Usage: %s <host> <APIkey> [optional history_id...
false
true
f778e22b2a6603571b055113dea761d70c09d05e
5,061
tac
Python
decaf_PA3/TestCases/S3/output/q5-array-test3-var.tac
joker452/Decaf-compiler
4f81dbd3d049245af8a8cb7234db7792ca57e61a
[ "MIT" ]
null
null
null
decaf_PA3/TestCases/S3/output/q5-array-test3-var.tac
joker452/Decaf-compiler
4f81dbd3d049245af8a8cb7234db7792ca57e61a
[ "MIT" ]
null
null
null
decaf_PA3/TestCases/S3/output/q5-array-test3-var.tac
joker452/Decaf-compiler
4f81dbd3d049245af8a8cb7234db7792ca57e61a
[ "MIT" ]
null
null
null
VTABLE(_Main) { <empty> Main } FUNCTION(_Main_New) { memo '' _Main_New: _T0 = 4 parm _T0 _T1 = call _Alloc _T2 = VTBL <_Main> *(_T1 + 0) = _T2 return _T1 } FUNCTION(main) { memo '' main: _T4 = 5 _T5 = 0 _T6 = (_T4 < _T5) if (_T6 == 0) branch _L10 _T7 = "Decaf runti...
19.692607
69
0.522229
VTABLE(_Main) { <empty> Main } FUNCTION(_Main_New) { memo '' _Main_New: _T0 = 4 parm _T0 _T1 = call _Alloc _T2 = VTBL <_Main> *(_T1 + 0) = _T2 return _T1 } FUNCTION(main) { memo '' main: _T4 = 5 _T5 = 0 _T6 = (_T4 < _T5) if (_T6 == 0) branch _L10 _T7 = "Decaf runti...
false
true
f778e2801eee70b18c255a5bb65837898795a2e7
1,088
py
Python
setup.py
danawr/robustbench
77d0d449185d3f2424f6e0a604c1dc51cdd6d4ec
[ "Apache-2.0" ]
null
null
null
setup.py
danawr/robustbench
77d0d449185d3f2424f6e0a604c1dc51cdd6d4ec
[ "Apache-2.0" ]
null
null
null
setup.py
danawr/robustbench
77d0d449185d3f2424f6e0a604c1dc51cdd6d4ec
[ "Apache-2.0" ]
null
null
null
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="robustbench", version="1.0", author="Francesco Croce, Maksym Andriushchenko, Vikash Sehwag, Edoardo Debenedetti", author_email="adversarial.benchmark@gmail.com", description="This package ...
34
123
0.655331
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="robustbench", version="1.0", author="Francesco Croce, Maksym Andriushchenko, Vikash Sehwag, Edoardo Debenedetti", author_email="adversarial.benchmark@gmail.com", description="This package ...
true
true
f778e46ee0e25c219d19610280cbdd85d0a2cbb0
6,765
py
Python
logic/__init__.py
spicefather/LADXR
4262b5e13d9caadfb713ed7a7a9a3af9b9f0a505
[ "MIT" ]
null
null
null
logic/__init__.py
spicefather/LADXR
4262b5e13d9caadfb713ed7a7a9a3af9b9f0a505
[ "MIT" ]
null
null
null
logic/__init__.py
spicefather/LADXR
4262b5e13d9caadfb713ed7a7a9a3af9b9f0a505
[ "MIT" ]
null
null
null
from . import overworld from . import dungeon1 from . import dungeon2 from . import dungeon3 from . import dungeon4 from . import dungeon5 from . import dungeon6 from . import dungeon7 from . import dungeon8 from . import dungeonColor from .requirements import AND, OR, COUNT, FOUND from .location import Loca...
42.28125
143
0.634442
from . import overworld from . import dungeon1 from . import dungeon2 from . import dungeon3 from . import dungeon4 from . import dungeon5 from . import dungeon6 from . import dungeon7 from . import dungeon8 from . import dungeonColor from .requirements import AND, OR, COUNT, FOUND from .location import Loca...
true
true
f778e6f342efa0175042b3078f5c2989eb5bc018
467
py
Python
hard-gists/2623926/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
21
2019-07-08T08:26:45.000Z
2022-01-24T23:53:25.000Z
hard-gists/2623926/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
5
2019-06-15T14:47:47.000Z
2022-02-26T05:02:56.000Z
hard-gists/2623926/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
17
2019-05-16T03:50:34.000Z
2021-01-14T14:35:12.000Z
from dns.resolver import Resolver # make a system resolver using /etc/resolv.conf sys_r = Resolver() dns = ['ns1.dreamhost.com', 'ns2.dreamhost.com', 'ns3.dreamhost.com'] dreamhost_dns = [ item.address for server in dns for item in sys_r.query(server) ] # a resolver using dreamhost dns server dreamhost_r = Resolver(...
25.944444
82
0.749465
from dns.resolver import Resolver sys_r = Resolver() dns = ['ns1.dreamhost.com', 'ns2.dreamhost.com', 'ns3.dreamhost.com'] dreamhost_dns = [ item.address for server in dns for item in sys_r.query(server) ] dreamhost_r = Resolver() dreamhost_r.nameservers = dreamhost_dns answer = dreamhost_r.query('slobodensoftver.o...
false
true
f778e74bee26bbbc618c404666f28032187aae79
2,327
py
Python
test/functional/feature_config_args.py
bblocks-dev/bblocks-source
63c0982354ea7f3f2897c14bfd5d02b5d43d693f
[ "MIT" ]
null
null
null
test/functional/feature_config_args.py
bblocks-dev/bblocks-source
63c0982354ea7f3f2897c14bfd5d02b5d43d693f
[ "MIT" ]
null
null
null
test/functional/feature_config_args.py
bblocks-dev/bblocks-source
63c0982354ea7f3f2897c14bfd5d02b5d43d693f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test various command line arguments and configuration file parameters.""" import os from test_framework.te...
46.54
169
0.694027
import os from test_framework.test_framework import BitcoinTestFramework from test_framework.util import get_datadir_path class ConfArgsTest(BitcoinTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 def run_test(self): self.stop_node(0) ...
true
true
f778e86e7c9a743d7b6e8dba410af8829349ffec
8,673
py
Python
notebooks/Gentle-Intro-To-HARK-Buffer-Stock-Model.py
JackShiqiLi/DemARK
2cd3de40574e0eb9a9da795307b2b5c97d6e22bd
[ "Apache-2.0" ]
null
null
null
notebooks/Gentle-Intro-To-HARK-Buffer-Stock-Model.py
JackShiqiLi/DemARK
2cd3de40574e0eb9a9da795307b2b5c97d6e22bd
[ "Apache-2.0" ]
null
null
null
notebooks/Gentle-Intro-To-HARK-Buffer-Stock-Model.py
JackShiqiLi/DemARK
2cd3de40574e0eb9a9da795307b2b5c97d6e22bd
[ "Apache-2.0" ]
null
null
null
# --- # jupyter: # jupytext: # formats: ipynb,py:percent # text_representation: # extension: .py # format_name: percent # format_version: '1.2' # jupytext_version: 1.2.1 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # %% [markdown] # # A...
58.208054
574
0.71394
import matplotlib.pyplot as plt import sys import os sys.path.insert(0, os.path.abspath('../lib')) from util import log_progress import numpy as np import HARK from time import clock from copy import deepcopy mystr = lambda number : "{:.4f}".format(number) from HARK.utilities import plotFuncs IndShockDictiona...
true
true
f778e872bfb3bdcded361f43175e182cb88ffc91
5,951
py
Python
autotest/test_random_tiff.py
Esri/gdal
8d9af5086ddb96f707ed281786a1cd278066a7f2
[ "MIT" ]
9
2019-05-30T17:01:56.000Z
2021-01-30T01:06:41.000Z
autotest/test_random_tiff.py
Esri/gdal
8d9af5086ddb96f707ed281786a1cd278066a7f2
[ "MIT" ]
4
2018-10-23T18:43:35.000Z
2019-07-01T19:29:49.000Z
autotest/test_random_tiff.py
Esri/gdal
8d9af5086ddb96f707ed281786a1cd278066a7f2
[ "MIT" ]
6
2019-02-03T14:19:32.000Z
2021-12-19T06:36:49.000Z
#!/usr/bin/env python ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Test "random" TIFF files # Author: Even Rouault, <even dot rouault at mines dash paris dot org> # #################################################################...
39.939597
144
0.638044
from osgeo import gdal import random COMPRESSION_NONE = 1 PHOTOMETRIC_MINISBLACK = 1 PLANARCONFIG_CONTIG = 1 PLANARCONFIG_SEPARATE = 2 SAMPLEFORMAT_UINT = 1 TIFFTAG_IMAGEWIDTH = 256 TIFFTAG_IMAGELENGTH = 257 TIFFTAG_BITSPERSAMPLE = 258 TIFFTAG_COMPRESSION = 259 TIFFTAG_PHOTOMETRIC = 262 TIFFTAG_STRIPOFFSETS = 273 TI...
true
true
f778e97da1b42248b6ddcefd2526b276ca655288
3,274
py
Python
model/utils/creator_tool.py
MeepoAII/faster-rcnn
d8a0e760c1d5f320bc0eea072b575b3098bda0f1
[ "Apache-2.0" ]
null
null
null
model/utils/creator_tool.py
MeepoAII/faster-rcnn
d8a0e760c1d5f320bc0eea072b575b3098bda0f1
[ "Apache-2.0" ]
null
null
null
model/utils/creator_tool.py
MeepoAII/faster-rcnn
d8a0e760c1d5f320bc0eea072b575b3098bda0f1
[ "Apache-2.0" ]
null
null
null
import numpy as np import torch from torchvision.ops import nms from model.utils.bbox_tools import loc2bbox def _get_inside_index(anchor, H, W): index_inside = np.where( (anchor[:, 0] >= 0) & (anchor[:, 1] >= 0) & (anchor[:, 2] <= H) & (anchor[:, 3] <= W) )[0] re...
23.385714
64
0.524435
import numpy as np import torch from torchvision.ops import nms from model.utils.bbox_tools import loc2bbox def _get_inside_index(anchor, H, W): index_inside = np.where( (anchor[:, 0] >= 0) & (anchor[:, 1] >= 0) & (anchor[:, 2] <= H) & (anchor[:, 3] <= W) )[0] re...
true
true
f778eb14c153012477dd8b3df7d812a95206de94
19,003
py
Python
src/wodby/api/application_api.py
wodby/wodby-sdk-python
1db6eb039ba8ef7b94ec01e9e50130161f0bded3
[ "MIT" ]
null
null
null
src/wodby/api/application_api.py
wodby/wodby-sdk-python
1db6eb039ba8ef7b94ec01e9e50130161f0bded3
[ "MIT" ]
1
2019-05-02T05:54:33.000Z
2019-05-02T05:54:33.000Z
src/wodby/api/application_api.py
wodby/wodby-sdk-python
1db6eb039ba8ef7b94ec01e9e50130161f0bded3
[ "MIT" ]
2
2019-05-02T04:50:06.000Z
2020-12-29T02:47:44.000Z
# coding: utf-8 """ Wodby API Client Wodby Developer Documentation https://wodby.com/docs/dev # noqa: E501 OpenAPI spec version: 3.0.14 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3...
35.854717
118
0.59117
from __future__ import absolute_import import re import six from wodby.api_client import ApiClient class ApplicationApi(object): def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def create_app(self, data, **k...
true
true
f778ecab72b450f85bb1cdeca1f865358c92204a
6,833
py
Python
reegis/entsoe.py
jnettels/reegis
fe50c124aa041b9faa494611cba6b833675115e4
[ "MIT" ]
null
null
null
reegis/entsoe.py
jnettels/reegis
fe50c124aa041b9faa494611cba6b833675115e4
[ "MIT" ]
null
null
null
reegis/entsoe.py
jnettels/reegis
fe50c124aa041b9faa494611cba6b833675115e4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*- """ Download and prepare entsoe load profile from opsd data portal. SPDX-FileCopyrightText: 2016-2019 Uwe Krien <krien@uni-bremen.de> SPDX-License-Identifier: MIT """ __copyright__ = "Uwe Krien <krien@uni-bremen.de>" __license__ = "MIT" # Python libraries import os ...
30.368889
78
0.625933
__copyright__ = "Uwe Krien <krien@uni-bremen.de>" __license__ = "MIT" import os import logging import datetime from collections import namedtuple from reegis import config as cfg import pandas as pd import requests import pytz import dateutil def read_original_timeseries_file(orig_csv_file=None, overwrite=False...
true
true
f778ecc9ab2d65ac8451a91a442bb83df9dbb6de
3,811
py
Python
mmseg/models/utils/dupsample_block.py
shuaizzZ/mmsegmentation
a6c6b348dbf8c4a0a39ffbdb832a1e82309c533c
[ "Apache-2.0" ]
null
null
null
mmseg/models/utils/dupsample_block.py
shuaizzZ/mmsegmentation
a6c6b348dbf8c4a0a39ffbdb832a1e82309c533c
[ "Apache-2.0" ]
null
null
null
mmseg/models/utils/dupsample_block.py
shuaizzZ/mmsegmentation
a6c6b348dbf8c4a0a39ffbdb832a1e82309c533c
[ "Apache-2.0" ]
null
null
null
import torch from torch import nn as nn from .custom_blocks import int_size from ..builder import build_loss from mmcv.runner import auto_fp16, force_fp32 class DUpsamplingBlock(nn.Module): def __init__(self, inplanes, scale, num_class=21, pad=0): super(DUpsamplingBlock, self).__init__() self.inp...
34.333333
96
0.6127
import torch from torch import nn as nn from .custom_blocks import int_size from ..builder import build_loss from mmcv.runner import auto_fp16, force_fp32 class DUpsamplingBlock(nn.Module): def __init__(self, inplanes, scale, num_class=21, pad=0): super(DUpsamplingBlock, self).__init__() self.inp...
true
true
f778ed72f879ac51f16b360ba0fffe74a91574ba
3,584
py
Python
JobkoreaCrawling/JobKoreaCrawler.py
Kimnaram/Jobcruit
c306459a5949f0378e58363cd795b327730d130e
[ "MIT" ]
1
2020-01-14T10:04:30.000Z
2020-01-14T10:04:30.000Z
JobkoreaCrawling/JobKoreaCrawler.py
Kimnaram/Jobcruit
c306459a5949f0378e58363cd795b327730d130e
[ "MIT" ]
7
2020-01-05T09:43:45.000Z
2020-01-08T06:49:04.000Z
JobkoreaCrawling/JobKoreaCrawler.py
Kimnaram/Jobcruit-Project
c306459a5949f0378e58363cd795b327730d130e
[ "MIT" ]
null
null
null
import requests import re import lxml.html #import datetime import MySQLdb conn = MySQLdb.connect(db='Crawler', user='cloud', passwd='1111', charset='utf8mb4') c=conn.cursor() delete_sql = 'DELETE from re_info where site_name = "잡코리아"' c.execute(delete_sql) def crawling(page_count): front_url="http://www.jobk...
36.20202
219
0.518136
import requests import re import lxml.html import MySQLdb conn = MySQLdb.connect(db='Crawler', user='cloud', passwd='1111', charset='utf8mb4') c=conn.cursor() delete_sql = 'DELETE from re_info where site_name = "잡코리아"' c.execute(delete_sql) def crawling(page_count): front_url="http://www.jobkorea.co.kr/Starte...
true
true
f778eda8dfd8beb1fe0f486e56d7ea3168ddac9d
3,505
py
Python
web/tests/utils/test_pq.py
salathegroup/crowdbreaks-streamer
3019b0f8d48bd6b4419bdaa02d0463ea6617b496
[ "MIT" ]
6
2019-03-25T17:44:42.000Z
2020-10-28T18:45:27.000Z
web/tests/utils/test_pq.py
salathegroup/crowdbreaks-streamer
3019b0f8d48bd6b4419bdaa02d0463ea6617b496
[ "MIT" ]
null
null
null
web/tests/utils/test_pq.py
salathegroup/crowdbreaks-streamer
3019b0f8d48bd6b4419bdaa02d0463ea6617b496
[ "MIT" ]
null
null
null
import pytest import sys import pdb class TestPriorityQueue: def test_add(self, pq): test_val = '123456' pq.add(test_val) val = pq.pop() pq.add(test_val) assert val == test_val def test_max_length(self, pq): test_vals = range(pq.MAX_QUEUE_LENGTH + 1) fo...
29.957265
96
0.534665
import pytest import sys import pdb class TestPriorityQueue: def test_add(self, pq): test_val = '123456' pq.add(test_val) val = pq.pop() pq.add(test_val) assert val == test_val def test_max_length(self, pq): test_vals = range(pq.MAX_QUEUE_LENGTH + 1) fo...
true
true
f778eddd62a1ea0b0fc34cba31137f5df1f9cbe0
3,566
py
Python
libs/python/qumranica/models/interpretation_roi_dto_list.py
Scripta-Qumranica-Electronica/SQE_API_Connectors
aaa9b9eb8709d4257c32ea57321a179c6b1e041a
[ "MIT" ]
null
null
null
libs/python/qumranica/models/interpretation_roi_dto_list.py
Scripta-Qumranica-Electronica/SQE_API_Connectors
aaa9b9eb8709d4257c32ea57321a179c6b1e041a
[ "MIT" ]
null
null
null
libs/python/qumranica/models/interpretation_roi_dto_list.py
Scripta-Qumranica-Electronica/SQE_API_Connectors
aaa9b9eb8709d4257c32ea57321a179c6b1e041a
[ "MIT" ]
null
null
null
# coding: utf-8 """ SQE API No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from qumra...
29.229508
124
0.591699
import pprint import re import six from qumranica.configuration import Configuration class InterpretationRoiDTOList(object): openapi_types = { 'rois': 'list[InterpretationRoiDTO]' } attribute_map = { 'rois': 'rois' } def __init__(self, rois=None, local_vars_configuration=N...
true
true
f778ee7dee16a4d0d63f42ab638b2486793ce6d9
41
py
Python
foliant/preprocessors/templateparser/__init__.py
foliant-docs/foliantcontrib.templateparser
327559bc8a894636d078b1e3aa19ccbb1ab272b3
[ "MIT" ]
null
null
null
foliant/preprocessors/templateparser/__init__.py
foliant-docs/foliantcontrib.templateparser
327559bc8a894636d078b1e3aa19ccbb1ab272b3
[ "MIT" ]
null
null
null
foliant/preprocessors/templateparser/__init__.py
foliant-docs/foliantcontrib.templateparser
327559bc8a894636d078b1e3aa19ccbb1ab272b3
[ "MIT" ]
null
null
null
from .templateparser import Preprocessor
20.5
40
0.878049
from .templateparser import Preprocessor
true
true
f778ef9a01b67f8efc3b0d8368028d3546ff55f8
1,121
py
Python
common/data_refinery_common/models/test_jobs.py
cgreene/refinebio
fe75e42f2963d60c4307806cba11520754547190
[ "BSD-3-Clause" ]
null
null
null
common/data_refinery_common/models/test_jobs.py
cgreene/refinebio
fe75e42f2963d60c4307806cba11520754547190
[ "BSD-3-Clause" ]
null
null
null
common/data_refinery_common/models/test_jobs.py
cgreene/refinebio
fe75e42f2963d60c4307806cba11520754547190
[ "BSD-3-Clause" ]
null
null
null
from django.test import TestCase from django.utils import timezone from data_refinery_common.models import ( SurveyJob, DownloaderJob, ProcessorJob, ) class SanityTestJobsTestCase(TestCase): def test_jobs_sanity(self): """Just makes sure creating Jobs doesn't fail""" s_job = SurveyJob...
30.297297
72
0.67529
from django.test import TestCase from django.utils import timezone from data_refinery_common.models import ( SurveyJob, DownloaderJob, ProcessorJob, ) class SanityTestJobsTestCase(TestCase): def test_jobs_sanity(self): s_job = SurveyJob() s_job.save() processor_job = Processo...
true
true
f778f0b88d100f23323978bacb30bc93371791f3
13,361
py
Python
examples/python/spear_qcp/target_algorithm/scripts/SATCSSCWrapper.py
TheVinhLuong102/AutoML-SMAC3
d4cb7ed76e0fbdd9edf6ab5360ff75de67ac2195
[ "BSD-3-Clause" ]
711
2016-08-22T14:23:29.000Z
2022-03-29T21:56:12.000Z
examples/python/spear_qcp/target_algorithm/scripts/SATCSSCWrapper.py
TheVinhLuong102/AutoML-SMAC3
d4cb7ed76e0fbdd9edf6ab5360ff75de67ac2195
[ "BSD-3-Clause" ]
770
2016-08-17T14:39:07.000Z
2022-03-31T11:35:58.000Z
examples/python/spear_qcp/target_algorithm/scripts/SATCSSCWrapper.py
TheVinhLuong102/AutoML-SMAC3
d4cb7ed76e0fbdd9edf6ab5360ff75de67ac2195
[ "BSD-3-Clause" ]
210
2016-08-20T15:14:29.000Z
2022-03-30T08:04:34.000Z
#!/usr/bin/env python3 # encoding: utf-8 ''' spearWrapper -- AClib target algorithm warpper for SAT solver spear @author: Marius Lindauer, Chris Fawcett, Alex Fréchette, Frank Hutter @copyright: 2014 AClib. All rights reserved. @license: GPL @contact: lindauer@informatik.uni-freiburg.de, fawcettc@...
42.415873
120
0.571739
import sys import re import os import imp from subprocess import Popen, PIPE from genericWrapper import AbstractWrapper class SatCSSCWrapper(AbstractWrapper): def __init__(self): AbstractWrapper.__init__(self) self.parser.add_argument("--script", dest="cssc_script", ...
true
true
f778f0d56b15f8abb2c0d170fd33e66ffd2b91a9
661
py
Python
website/drawquest/apps/ios_logging/api.py
bopopescu/drawquest-web
8d8f9149b6efeb65202809a5f8916386f58a1b3b
[ "BSD-3-Clause" ]
19
2015-11-10T17:36:20.000Z
2021-04-12T07:36:00.000Z
website/drawquest/apps/ios_logging/api.py
bopopescu/drawquest-web
8d8f9149b6efeb65202809a5f8916386f58a1b3b
[ "BSD-3-Clause" ]
1
2021-06-09T03:45:34.000Z
2021-06-09T03:45:34.000Z
website/drawquest/apps/ios_logging/api.py
bopopescu/drawquest-web
8d8f9149b6efeb65202809a5f8916386f58a1b3b
[ "BSD-3-Clause" ]
6
2015-11-11T00:38:38.000Z
2020-07-25T20:10:08.000Z
import datetime import logging from django.shortcuts import get_object_or_404 from drawquest.api_decorators import api_decorator from canvas.templatetags.jinja_base import render_jinja_to_string from canvas.view_guards import require_staff, require_user from services import Services urlpatterns = [] api = api_decor...
27.541667
86
0.783661
import datetime import logging from django.shortcuts import get_object_or_404 from drawquest.api_decorators import api_decorator from canvas.templatetags.jinja_base import render_jinja_to_string from canvas.view_guards import require_staff, require_user from services import Services urlpatterns = [] api = api_decor...
true
true
f778f10e93bf018dd49f0660b87bfdf783a7b867
49,540
py
Python
pymc3/tests/test_distributions.py
canyon289/pymc
3a9c147a0680e569b24b3959fded55e2876dae9a
[ "Apache-2.0" ]
1
2018-06-11T03:13:00.000Z
2018-06-11T03:13:00.000Z
pymc3/tests/test_distributions.py
MaximeJumelle/pymc3
4e695f635b2ead24e2e647651eadd2505ab1fa63
[ "Apache-2.0" ]
null
null
null
pymc3/tests/test_distributions.py
MaximeJumelle/pymc3
4e695f635b2ead24e2e647651eadd2505ab1fa63
[ "Apache-2.0" ]
null
null
null
from __future__ import division import itertools import sys from .helpers import SeededTest, select_by_precision from ..vartypes import continuous_types from ..model import Model, Point, Potential, Deterministic from ..blocking import DictToVarBijection, DictToArrayBijection, ArrayOrdering from ..distributions import...
39.75923
121
0.56411
from __future__ import division import itertools import sys from .helpers import SeededTest, select_by_precision from ..vartypes import continuous_types from ..model import Model, Point, Potential, Deterministic from ..blocking import DictToVarBijection, DictToArrayBijection, ArrayOrdering from ..distributions import...
true
true
f778f13369b2ffc65c2a3446b31a0dcbba11bf69
5,908
py
Python
src/mailroom.py
morganelle/mailroom-madness
e73400d9a1e19e883d225d7f75e19621ce9851c5
[ "MIT" ]
1
2017-05-18T01:38:00.000Z
2017-05-18T01:38:00.000Z
src/mailroom.py
morganelle/mailroom-madness
e73400d9a1e19e883d225d7f75e19621ce9851c5
[ "MIT" ]
2
2017-05-21T01:29:50.000Z
2017-05-21T01:31:26.000Z
src/mailroom.py
morganelle/mailroom-madness
e73400d9a1e19e883d225d7f75e19621ce9851c5
[ "MIT" ]
null
null
null
"""Mailroom Madness module lets a user track and thank donors and donations.""" DONORS = { # pragma no cover 'ANNA SHELBY': [300, 10, 15], 'MORGAN NOMURA': [10, 200, 50], 'EDGAR POE': [1000] } WELCOME = ''' \n Welcome to Mailroom Madness!\n Mailroom Madness is a state-of-the-art text-based interface des...
34.549708
256
0.651659
DONORS = { 'ANNA SHELBY': [300, 10, 15], 'MORGAN NOMURA': [10, 200, 50], 'EDGAR POE': [1000] } WELCOME = ''' \n Welcome to Mailroom Madness!\n Mailroom Madness is a state-of-the-art text-based interface designed to help charitable organizations track, list, and thank their donors.\n Would you like to wr...
true
true
f778f1aa0bd22bba8ecc179539e30cfa64b6fad9
1,130
py
Python
downstream/semseg/models/wrapper.py
ut-amrl/ContrastiveSceneContexts
622b9cd32ea2dcf8307d25eb2e7ee1c09d220134
[ "MIT" ]
135
2021-05-25T00:07:04.000Z
2022-03-24T02:52:22.000Z
downstream/semseg/models/wrapper.py
ut-amrl/ContrastiveSceneContexts
622b9cd32ea2dcf8307d25eb2e7ee1c09d220134
[ "MIT" ]
25
2021-06-17T03:45:44.000Z
2022-03-04T16:04:42.000Z
downstream/semseg/models/wrapper.py
ut-amrl/ContrastiveSceneContexts
622b9cd32ea2dcf8307d25eb2e7ee1c09d220134
[ "MIT" ]
21
2021-05-25T07:52:36.000Z
2022-02-18T06:10:45.000Z
# 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. import random from torch.nn import Module from MinkowskiEngine import SparseTensor class Wrapper(Module): """ Wrapper for the segment...
30.540541
80
0.736283
import random from torch.nn import Module from MinkowskiEngine import SparseTensor class Wrapper(Module): OUT_PIXEL_DIST = -1 def __init__(self, NetClass, in_nchannel, out_nchannel, config): super(Wrapper, self).__init__() self.initialize_filter(NetClass, in_nchannel, out_nchannel, config) def init...
true
true
f778f1c3fcf34cfc08776e12052662282ed4a499
2,346
py
Python
app.py
bonny1992/deluge-list-backend
80a16bb9839993495de6d374b859b8d30a004e6a
[ "MIT" ]
1
2020-06-27T00:02:41.000Z
2020-06-27T00:02:41.000Z
app.py
bonny1992/deluge-list-backend
80a16bb9839993495de6d374b859b8d30a004e6a
[ "MIT" ]
null
null
null
app.py
bonny1992/deluge-list-backend
80a16bb9839993495de6d374b859b8d30a004e6a
[ "MIT" ]
null
null
null
import os, time from deluge_client import DelugeRPCClient, FailedToReconnectException from bottle import Bottle, run, route, request, abort from truckpad.bottle.cors import CorsPlugin, enable_cors DELUGE_ADDR = os.getenv('DELUGE_ADDR', '127.0.0.1') DELUGE_PORT = os.getenv('DELUGE_PORT', 58846) DELUGE_USER = os.getenv(...
30.076923
92
0.627451
import os, time from deluge_client import DelugeRPCClient, FailedToReconnectException from bottle import Bottle, run, route, request, abort from truckpad.bottle.cors import CorsPlugin, enable_cors DELUGE_ADDR = os.getenv('DELUGE_ADDR', '127.0.0.1') DELUGE_PORT = os.getenv('DELUGE_PORT', 58846) DELUGE_USER = os.getenv(...
true
true
f778f27b7b9b40c968e2fd480dd1a62df31c8b19
3,128
py
Python
angr/code_location.py
Pamplemousse/angr
0783af9afb379fd22940505ac031d8c0ab18ae23
[ "BSD-2-Clause" ]
1
2021-12-08T17:36:57.000Z
2021-12-08T17:36:57.000Z
angr/code_location.py
Pamplemousse/angr
0783af9afb379fd22940505ac031d8c0ab18ae23
[ "BSD-2-Clause" ]
null
null
null
angr/code_location.py
Pamplemousse/angr
0783af9afb379fd22940505ac031d8c0ab18ae23
[ "BSD-2-Clause" ]
null
null
null
from typing import Optional, Dict, Tuple class CodeLocation: """ Stands for a specific program point by specifying basic block address and statement ID (for IRSBs), or SimProcedure name (for SimProcedures). """ __slots__ = ('block_addr', 'stmt_idx', 'sim_procedure', 'ins_addr', 'context', 'info',...
33.276596
119
0.535486
from typing import Optional, Dict, Tuple class CodeLocation: __slots__ = ('block_addr', 'stmt_idx', 'sim_procedure', 'ins_addr', 'context', 'info', ) def __init__(self, block_addr: int, stmt_idx: int, sim_procedure=None, ins_addr: Optional[int]=None, context: Optional[Tuple[int]]=None, **kw...
true
true
f778f390a8856dc37331826922c643ad8dd9c4d0
1,411
py
Python
blueprints/cisco/sync.py
hciudad/cloudbolt-forge
d1109c90dcd189defa70876906d394e0c91feab5
[ "Apache-2.0" ]
34
2015-08-30T09:26:41.000Z
2022-03-03T13:18:14.000Z
blueprints/cisco/sync.py
hciudad/cloudbolt-forge
d1109c90dcd189defa70876906d394e0c91feab5
[ "Apache-2.0" ]
22
2015-11-23T21:24:17.000Z
2022-01-31T04:24:24.000Z
blueprints/cisco/sync.py
hciudad/cloudbolt-forge
d1109c90dcd189defa70876906d394e0c91feab5
[ "Apache-2.0" ]
43
2015-11-18T16:26:22.000Z
2021-10-18T13:19:39.000Z
from utilities.models import ConnectionInfo from ucscsdk.ucschandle import UcscHandle from ucsmsdk.ucshandle import UcsHandle conn, _ = ConnectionInfo.objects.get_or_create(name='Cisco UCS') try: handle = UcscHandle(conn.ip, conn.username, conn.password, conn.port) except Exception: # not a UCS central serve...
32.068182
80
0.711552
from utilities.models import ConnectionInfo from ucscsdk.ucschandle import UcscHandle from ucsmsdk.ucshandle import UcsHandle conn, _ = ConnectionInfo.objects.get_or_create(name='Cisco UCS') try: handle = UcscHandle(conn.ip, conn.username, conn.password, conn.port) except Exception: handle = UcsHandle(co...
true
true
f778f51839081f4ef1dbf18fcfe7009c1f2e389b
4,831
py
Python
chesstab/gui/enginedbedit.py
RogerMarsh/chesstab
01d375dc6bf025b621612a84513e55c4640a78ad
[ "BSD-3-Clause" ]
null
null
null
chesstab/gui/enginedbedit.py
RogerMarsh/chesstab
01d375dc6bf025b621612a84513e55c4640a78ad
[ "BSD-3-Clause" ]
null
null
null
chesstab/gui/enginedbedit.py
RogerMarsh/chesstab
01d375dc6bf025b621612a84513e55c4640a78ad
[ "BSD-3-Clause" ]
null
null
null
# enginedbedit.py # Copyright 2015 Roger Marsh # Licence: See LICENCE (BSD licence) """Customise edit toplevel to edit or insert chess engine definition record. """ import tkinter.messagebox from solentware_grid.gui.dataedit import DataEdit from solentware_misc.gui.exceptionhandler import ExceptionHandler from .eng...
31.782895
80
0.592424
import tkinter.messagebox from solentware_grid.gui.dataedit import DataEdit from solentware_misc.gui.exceptionhandler import ExceptionHandler from .enginetoplevel import EngineToplevel, EngineToplevelEdit from .topleveltext import EditText class EngineDbEdit(ExceptionHandler, EditText, DataEdit): text_name =...
true
true
f778f5317b16f506ad727cda693fc57d92ac872e
21,867
py
Python
libraries/adaptic.py
riedelx/adaptic-pyproc
cfc14fbaadbc90f01db90440e9bd0d20950cdc77
[ "MIT" ]
2
2021-05-12T13:25:02.000Z
2021-05-12T16:26:03.000Z
libraries/adaptic.py
riedelx/adaptic-pyproc
cfc14fbaadbc90f01db90440e9bd0d20950cdc77
[ "MIT" ]
null
null
null
libraries/adaptic.py
riedelx/adaptic-pyproc
cfc14fbaadbc90f01db90440e9bd0d20950cdc77
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt # ============================================================================= # ADAPTIC classes # ============================================================================= class adap0: # base class with funtions to read num files def __init__(self,name): ...
37.252129
108
0.60804
import numpy as np import matplotlib.pyplot as plt class adap0: def __init__(self,name): self.name = name def readFile(cls, title, cutoff = None,folderPath="",numPath=""): wordsNum=[] ...
true
true
f778f5c1dde0add1c889b93d711a5275fc2e0fee
7,136
py
Python
src/vardb/util/vcfiterator.py
Dabble-of-DevOps-Bio/ella
e38631d302611a143c9baaa684bcbd014d9734e4
[ "MIT" ]
null
null
null
src/vardb/util/vcfiterator.py
Dabble-of-DevOps-Bio/ella
e38631d302611a143c9baaa684bcbd014d9734e4
[ "MIT" ]
null
null
null
src/vardb/util/vcfiterator.py
Dabble-of-DevOps-Bio/ella
e38631d302611a143c9baaa684bcbd014d9734e4
[ "MIT" ]
null
null
null
from typing import Any, Dict, IO, Mapping, Optional, Sequence, Tuple, Union import cyvcf2 import logging import numpy as np log = logging.getLogger(__name__) # have to re-declare here since only exist in cyvcf2 stub and fails on execution Text = Union[str, bytes] Primitives = Union[int, float, bool, Text] def _nump...
35.152709
161
0.5831
from typing import Any, Dict, IO, Mapping, Optional, Sequence, Tuple, Union import cyvcf2 import logging import numpy as np log = logging.getLogger(__name__) Text = Union[str, bytes] Primitives = Union[int, float, bool, Text] def _numpy_unknown_to_none(a: np.ndarray) -> list: b = a.tolist() n = max(a.shape)...
true
true
f778f656cee365795f418a88e320c24f6f74778b
3,767
py
Python
tests/apps/tomb_cli_testapps/__init__.py
tomborine/tomb_cli
b09a3c1cc26c82a152dfaa523d21cd2960491204
[ "MIT" ]
null
null
null
tests/apps/tomb_cli_testapps/__init__.py
tomborine/tomb_cli
b09a3c1cc26c82a152dfaa523d21cd2960491204
[ "MIT" ]
null
null
null
tests/apps/tomb_cli_testapps/__init__.py
tomborine/tomb_cli
b09a3c1cc26c82a152dfaa523d21cd2960491204
[ "MIT" ]
1
2018-06-04T22:50:17.000Z
2018-06-04T22:50:17.000Z
from pyramid.config import Configurator from pyramid.security import Authenticated from pyramid.security import Allow from pyramid.config import not_ class RootContext(object): def __init__(self, request): self.request = request @property def __acl__(self): return [(Allow, Authenticated, ...
25.281879
75
0.651447
from pyramid.config import Configurator from pyramid.security import Authenticated from pyramid.security import Allow from pyramid.config import not_ class RootContext(object): def __init__(self, request): self.request = request @property def __acl__(self): return [(Allow, Authenticated, ...
true
true
f778f659a14ac5cfc15e23c3d31c3551aac07524
1,063
py
Python
day_7/day7.py
mickeelm/aoc2019
7fd532d2237e1cf0686c9b331a2b97515ee94c03
[ "Unlicense" ]
1
2021-02-02T08:32:36.000Z
2021-02-02T08:32:36.000Z
day_7/day7.py
mickeelm/aoc2019
7fd532d2237e1cf0686c9b331a2b97515ee94c03
[ "Unlicense" ]
null
null
null
day_7/day7.py
mickeelm/aoc2019
7fd532d2237e1cf0686c9b331a2b97515ee94c03
[ "Unlicense" ]
null
null
null
from itertools import cycle from common.intcode import IntCode, ProgramTerminatedError def max_thruster_single_mode(program, phase_settings): output = 0 for phase in phase_settings: computer = IntCode(program) computer.queue_input(phase) computer.queue_input(output) output = c...
32.212121
80
0.703669
from itertools import cycle from common.intcode import IntCode, ProgramTerminatedError def max_thruster_single_mode(program, phase_settings): output = 0 for phase in phase_settings: computer = IntCode(program) computer.queue_input(phase) computer.queue_input(output) output = c...
true
true
f778f6de23bc2fa447403b87f2162f2309ec0a9b
6,344
py
Python
openfe/tests/utils/test_visualization.py
mikemhenry/openfe
d4c78af62a7ae05b99eb95d173661ac134b7e7b9
[ "MIT" ]
null
null
null
openfe/tests/utils/test_visualization.py
mikemhenry/openfe
d4c78af62a7ae05b99eb95d173661ac134b7e7b9
[ "MIT" ]
null
null
null
openfe/tests/utils/test_visualization.py
mikemhenry/openfe
d4c78af62a7ae05b99eb95d173661ac134b7e7b9
[ "MIT" ]
null
null
null
import pytest from unittest import mock import inspect from rdkit import Chem from openfe.utils.visualization import ( _match_elements, _get_unique_bonds_and_atoms, draw_mapping, draw_one_molecule_mapping, draw_unhighlighted_molecule ) # default colors currently used _HIGHLIGHT_COLOR = (220/255, 50/255, 32/2...
33.744681
76
0.655895
import pytest from unittest import mock import inspect from rdkit import Chem from openfe.utils.visualization import ( _match_elements, _get_unique_bonds_and_atoms, draw_mapping, draw_one_molecule_mapping, draw_unhighlighted_molecule ) _HIGHLIGHT_COLOR = (220/255, 50/255, 32/255, 1) _CHANGED_ELEMENTS_COLOR =...
true
true
f778f6ef931cce115a00efd7adf05a77b96c1880
1,227
py
Python
run/sensor.py
ayanc/learncfa
e3584b51cace5f1feabe22d0ae8102b21df8d60e
[ "CNRI-Python", "Xnet", "X11" ]
15
2016-11-11T06:10:17.000Z
2021-12-25T18:23:43.000Z
run/sensor.py
ayanc/learncfa
e3584b51cace5f1feabe22d0ae8102b21df8d60e
[ "CNRI-Python", "Xnet", "X11" ]
null
null
null
run/sensor.py
ayanc/learncfa
e3584b51cace5f1feabe22d0ae8102b21df8d60e
[ "CNRI-Python", "Xnet", "X11" ]
3
2017-10-27T03:48:29.000Z
2021-09-17T04:28:57.000Z
# Copyright (C) 2016 Ayan Chakrabarti <ayanc@ttic.edu> import numpy as np def trunc(img): w = img.shape[0]; h = img.shape[1] w = (w//8)*8 h = (h//8)*8 return img[0:w,0:h,...].copy() def _clip(img): return np.maximum(0.,np.minimum(1.,img)) def bayer(img,nstd): v = np.zeros((img.shape[0],i...
25.040816
63
0.513447
import numpy as np def trunc(img): w = img.shape[0]; h = img.shape[1] w = (w//8)*8 h = (h//8)*8 return img[0:w,0:h,...].copy() def _clip(img): return np.maximum(0.,np.minimum(1.,img)) def bayer(img,nstd): v = np.zeros((img.shape[0],img.shape[1]),dtype=np.float32) v[0::2,0::2] = img[0...
true
true
f778f72d1f708bf6170945172299cea7911bc8ec
6,132
py
Python
visualization/svm.py
mexxexx/ionsrcopt
889db53f84ea5dd2199b882a5a1b36c256aa5128
[ "MIT" ]
null
null
null
visualization/svm.py
mexxexx/ionsrcopt
889db53f84ea5dd2199b882a5a1b36c256aa5128
[ "MIT" ]
null
null
null
visualization/svm.py
mexxexx/ionsrcopt
889db53f84ea5dd2199b882a5a1b36c256aa5128
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import matplotlib.pyplot as plt import warnings from sklearn import svm from sklearn import metrics from sklearn import model_selection from sklearn import preprocessing def main(): files = { "./Results/JanNov2016.csv": {"label": 0, "color": "#880000"}, "./...
31.126904
86
0.63454
import pandas as pd import numpy as np import matplotlib.pyplot as plt import warnings from sklearn import svm from sklearn import metrics from sklearn import model_selection from sklearn import preprocessing def main(): files = { "./Results/JanNov2016.csv": {"label": 0, "color": "#880000"}, "./...
true
true
f778f7588edb0ac1e3691d905ccce9f06fc7fab4
1,793
py
Python
test/test_linesegments.py
tessact/pdftables
89b0c0f7215fa50651b37e5b1505229c329cc0ab
[ "BSD-2-Clause" ]
73
2015-01-07T01:42:45.000Z
2021-01-20T01:19:04.000Z
test/test_linesegments.py
MartinThoma/pdftables
bd34a86cba8b70d1af2267cf8a30f387f7e5a43e
[ "BSD-2-Clause" ]
1
2020-08-02T18:31:16.000Z
2020-08-02T18:31:16.000Z
test/test_linesegments.py
MartinThoma/pdftables
bd34a86cba8b70d1af2267cf8a30f387f7e5a43e
[ "BSD-2-Clause" ]
40
2015-03-10T05:24:37.000Z
2019-08-30T06:11:02.000Z
import pdftables.line_segments as line_segments from nose.tools import assert_equals, raises from pdftables.line_segments import LineSegment def segments(segments): return [line_segments.LineSegment.make(a, b) for a, b in segments] def test_segments_generator(): seg1, seg2 = segs = segments([(1, 4), (2, 3...
28.015625
70
0.604573
import pdftables.line_segments as line_segments from nose.tools import assert_equals, raises from pdftables.line_segments import LineSegment def segments(segments): return [line_segments.LineSegment.make(a, b) for a, b in segments] def test_segments_generator(): seg1, seg2 = segs = segments([(1, 4), (2, 3...
true
true
f778f7fd312e532f54a2ac3f6dda33ef4e41214f
1,368
py
Python
mayan/apps/document_comments/urls.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
0e4e919fd2e1ded6711354a0330135283e87f8c7
[ "Apache-2.0" ]
2
2021-09-12T19:41:19.000Z
2021-09-12T19:41:20.000Z
mayan/apps/document_comments/urls.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
0e4e919fd2e1ded6711354a0330135283e87f8c7
[ "Apache-2.0" ]
37
2021-09-13T01:00:12.000Z
2021-10-02T03:54:30.000Z
mayan/apps/document_comments/urls.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
0e4e919fd2e1ded6711354a0330135283e87f8c7
[ "Apache-2.0" ]
1
2021-09-22T13:17:30.000Z
2021-09-22T13:17:30.000Z
from django.conf.urls import url from .api_views import APICommentListView, APICommentView from .views import ( DocumentCommentCreateView, DocumentCommentDeleteView, DocumentCommentDetailView, DocumentCommentEditView, DocumentCommentListView ) urlpatterns = [ url( regex=r'^documents...
31.813953
87
0.627924
from django.conf.urls import url from .api_views import APICommentListView, APICommentView from .views import ( DocumentCommentCreateView, DocumentCommentDeleteView, DocumentCommentDetailView, DocumentCommentEditView, DocumentCommentListView ) urlpatterns = [ url( regex=r'^documents...
true
true
f778f807f7e1f033702399cb7cbeac6b7fbda8fe
922
py
Python
src/atcoder/abc016/d/sol_1.py
kagemeka/competitive-programming
c70fe481bcd518f507b885fc9234691d8ce63171
[ "MIT" ]
1
2021-07-11T03:20:10.000Z
2021-07-11T03:20:10.000Z
src/atcoder/abc016/d/sol_1.py
kagemeka/competitive-programming
c70fe481bcd518f507b885fc9234691d8ce63171
[ "MIT" ]
39
2021-07-10T05:21:09.000Z
2021-12-15T06:10:12.000Z
src/atcoder/abc016/d/sol_1.py
kagemeka/competitive-programming
c70fe481bcd518f507b885fc9234691d8ce63171
[ "MIT" ]
null
null
null
import typing import sys import numpy as np import numba as nb @nb.njit def cross(x0: int, y0: int, x1: int, y1: int) -> int: return x0 * y1 - x1 * y0 @nb.njit((nb.i8, ) * 4 + (nb.i8[:, :], ), cache=True) def solve( x0: int, y0: int, x1: int, y1: int, xy: np.ndarray, ) -> typing.NoReturn: n = len...
20.488889
54
0.509761
import typing import sys import numpy as np import numba as nb @nb.njit def cross(x0: int, y0: int, x1: int, y1: int) -> int: return x0 * y1 - x1 * y0 @nb.njit((nb.i8, ) * 4 + (nb.i8[:, :], ), cache=True) def solve( x0: int, y0: int, x1: int, y1: int, xy: np.ndarray, ) -> typing.NoReturn: n = len...
true
true
f778f8ff003c5a1e7cdcb964de9c2baedc6501ed
414
py
Python
tests/functional/roots/test-ext-autosummary/conf.py
lipro/publishing-withsphinx
80d1f5d190e7123b73f1e1917f72ee80ad45221b
[ "MIT" ]
null
null
null
tests/functional/roots/test-ext-autosummary/conf.py
lipro/publishing-withsphinx
80d1f5d190e7123b73f1e1917f72ee80ad45221b
[ "MIT" ]
28
2016-11-13T10:40:37.000Z
2019-02-28T17:24:15.000Z
tests/functional/roots/test-ext-autosummary/conf.py
lipro/publishing-withsphinx
80d1f5d190e7123b73f1e1917f72ee80ad45221b
[ "MIT" ]
1
2016-11-15T19:34:56.000Z
2016-11-15T19:34:56.000Z
# -*- coding: utf-8 -*- import os import sys sys.path.insert(0, os.path.abspath('../../samples')) sys.path.insert(0, os.path.abspath('../../samples/an_example_pypi_project')) needs_sphinx = '1.3' needs_extensions = {'sphinx.ext.autosummary': '1.3'} extensions = ['publishing.withsphinx'] master_doc = 'index' latex_do...
27.6
76
0.690821
import os import sys sys.path.insert(0, os.path.abspath('../../samples')) sys.path.insert(0, os.path.abspath('../../samples/an_example_pypi_project')) needs_sphinx = '1.3' needs_extensions = {'sphinx.ext.autosummary': '1.3'} extensions = ['publishing.withsphinx'] master_doc = 'index' latex_documents = [(master_doc, ...
true
true
f778f98d8c53c2d1ab94a3796bf663319bfe8839
14,778
py
Python
sdk/python/pulumi_azure_nextgen/network/v20181001/network_interface.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/network/v20181001/network_interface.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/network/v20181001/network_interface.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
53.158273
2,639
0.689877
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._enums import * from ._inputs import * __all__ = ['NetworkInterface'] class NetworkInterface(pulumi.CustomResource): def __init__(__self_...
true
true
f778fb9300060d0b8eebdba241dacede8a942834
1,422
py
Python
config/settings/test.py
acesphere-cloud/solar-dryer-app
8f6cb27ad873f43d8cb02f76bc757042c6c72538
[ "MIT" ]
null
null
null
config/settings/test.py
acesphere-cloud/solar-dryer-app
8f6cb27ad873f43d8cb02f76bc757042c6c72538
[ "MIT" ]
1
2022-03-01T12:17:59.000Z
2022-03-01T12:17:59.000Z
config/settings/test.py
acesphere-cloud/solar-dryer-app
8f6cb27ad873f43d8cb02f76bc757042c6c72538
[ "MIT" ]
null
null
null
""" With these settings, tests run faster. """ from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env( "DJANGO_SECRET_KEY", default="Nentp4983...
33.857143
80
0.510549
from .base import * from .base import env SECRET_KEY = env( "DJANGO_SECRET_KEY", default="Nentp4983o2m52ncz4INhJaKhNk7DGwur6KkMCua8lXT5YTCMmzhHbg2dmOhEzic", ) TEST_RUNNER = "django.test.runner.DiscoverRunner" PASSWORD_HASHERS = ["django.contrib.auth.hashers.MD5PasswordHasher"] TEMPLATES[-1]["OPTIONS"]["loa...
true
true