hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0f182c576cc09ff7d57729eef629a81eedac3359 | 4,705 | py | Python | nova/openstack/common/db/sqlalchemy/test_base.py | bopopescu/nova-master | 58809056f3a219c6ea3667003f906eeaf581fa95 | [
"Apache-2.0"
] | 7 | 2017-06-19T19:37:00.000Z | 2019-06-16T02:06:14.000Z | nova/openstack/common/db/sqlalchemy/test_base.py | bopopescu/nova-master | 58809056f3a219c6ea3667003f906eeaf581fa95 | [
"Apache-2.0"
] | null | null | null | nova/openstack/common/db/sqlalchemy/test_base.py | bopopescu/nova-master | 58809056f3a219c6ea3667003f906eeaf581fa95 | [
"Apache-2.0"
] | 6 | 2015-06-20T16:07:28.000Z | 2020-08-19T14:57:59.000Z | # Copyright (c) 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 31.366667 | 77 | 0.676514 |
00d701011d1e0db246add88f5e83bfa3743170b5 | 333 | py | Python | Turtle Going Home with Food.py | HelloYeew/helloyeew-lab-computer-programming-i | 60b05072f32f23bab4a336b506ba7f66e52c045d | [
"MIT"
] | null | null | null | Turtle Going Home with Food.py | HelloYeew/helloyeew-lab-computer-programming-i | 60b05072f32f23bab4a336b506ba7f66e52c045d | [
"MIT"
] | null | null | null | Turtle Going Home with Food.py | HelloYeew/helloyeew-lab-computer-programming-i | 60b05072f32f23bab4a336b506ba7f66e52c045d | [
"MIT"
] | null | null | null | LAB = "turtlelab2x.py"
import urllib.request
urllib.request.urlretrieve(f"http://elab.cpe.ku.ac.th/turtlelab/{LAB}",LAB)
from turtlelab2x import turtle,home,shop,check
turtle.forward(shop.x)
turtle.left(90)
turtle.forward(shop.y)
turtle.right(90)
turtle.forward(home.x-shop.x)
turtle.left(90)
turtle.forward(home.y-sho... | 22.2 | 75 | 0.768769 |
cf2780ded17e7bf4398dc8c8f8a882b8f0bed72b | 2,839 | py | Python | buildscripts/resmokelib/testing/fixtures/yesfixture.py | benety/mongo | 203430ac9559f82ca01e3cbb3b0e09149fec0835 | [
"Apache-2.0"
] | null | null | null | buildscripts/resmokelib/testing/fixtures/yesfixture.py | benety/mongo | 203430ac9559f82ca01e3cbb3b0e09149fec0835 | [
"Apache-2.0"
] | null | null | null | buildscripts/resmokelib/testing/fixtures/yesfixture.py | benety/mongo | 203430ac9559f82ca01e3cbb3b0e09149fec0835 | [
"Apache-2.0"
] | null | null | null | """Fixture for generating lots of log messages."""
import signal
import buildscripts.resmokelib.testing.fixtures.interface as interface
from buildscripts.resmokelib.testing.fixtures.fixturelib import FixtureLib
class YesFixture(interface.Fixture): # pylint: disable=abstract-method
"""Fixture which spawns sever... | 39.985915 | 127 | 0.62205 |
0008f946af51ea7215ba39b8db7da189a61ec234 | 24,420 | py | Python | electrum_ltc/plugins/coldcard/coldcard.py | jakesum/electrum-ltc | 8bc205e086210e6ec40dbc0b8f46c9fc74c47121 | [
"MIT"
] | 1 | 2021-03-19T11:58:38.000Z | 2021-03-19T11:58:38.000Z | electrum_ltc/plugins/coldcard/coldcard.py | jakesum/electrum-ltc | 8bc205e086210e6ec40dbc0b8f46c9fc74c47121 | [
"MIT"
] | null | null | null | electrum_ltc/plugins/coldcard/coldcard.py | jakesum/electrum-ltc | 8bc205e086210e6ec40dbc0b8f46c9fc74c47121 | [
"MIT"
] | 1 | 2021-03-19T11:58:39.000Z | 2021-03-19T11:58:39.000Z | #
# Coldcard Electrum plugin main code.
#
#
import os, time, io
import traceback
from typing import TYPE_CHECKING
import struct
from electrum_ltc import bip32
from electrum_ltc.bip32 import BIP32Node, InvalidMasterKeyVersionBytes
from electrum_ltc.i18n import _
from electrum_ltc.plugin import Device, hook
from electru... | 37.978227 | 133 | 0.618673 |
3efb9e01f3242fed402ef49c1d50b9065852b526 | 449 | py | Python | website/migrations/0034_task_publication_time.py | pomo-mondreganto/CTForces-old | 86758192f800108ff109f07fe155d5a98b4a3e14 | [
"MIT"
] | null | null | null | website/migrations/0034_task_publication_time.py | pomo-mondreganto/CTForces-old | 86758192f800108ff109f07fe155d5a98b4a3e14 | [
"MIT"
] | 6 | 2021-10-01T14:18:34.000Z | 2021-10-01T14:19:17.000Z | website/migrations/0034_task_publication_time.py | pomo-mondreganto/CTForces-old | 86758192f800108ff109f07fe155d5a98b4a3e14 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.5 on 2018-06-22 08:30
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('website', '0033_contest_is_running'),
]
operations = [
migrations.AddField(
model_name='task',
name=... | 22.45 | 91 | 0.621381 |
eae98d690bd975003a6782de801c0595592061c6 | 54,503 | py | Python | Lib/test/test_concurrent_futures.py | kashishmish/cpython | 32ff88af346c6fedfecbfb4abd8681d84283dda7 | [
"0BSD"
] | 3 | 2019-12-13T21:02:10.000Z | 2020-04-17T15:02:31.000Z | Lib/test/test_concurrent_futures.py | kashishmish/cpython | 32ff88af346c6fedfecbfb4abd8681d84283dda7 | [
"0BSD"
] | 13 | 2020-12-01T05:38:43.000Z | 2022-03-01T16:01:00.000Z | Lib/test/test_concurrent_futures.py | arjuncr/cpython | 92bf8691fb78f3484bf2daba836c416efedb1d8d | [
"0BSD"
] | 1 | 2020-04-19T08:55:21.000Z | 2020-04-19T08:55:21.000Z | from test import support
from test.support import import_helper
from test.support import threading_helper
# Skip tests if _multiprocessing wasn't built.
import_helper.import_module('_multiprocessing')
from test.support import hashlib_helper
from test.support.script_helper import assert_python_ok
import contextlib
im... | 35.576371 | 89 | 0.617783 |
b13979e561e2067db3831bbb823e7bb68d26289c | 2,220 | py | Python | Software/Python/grove_switch_relay.py | benmcclelland/GrovePi | 1e48137b6007ffd4ce430e821d2aa744349e362a | [
"MIT"
] | 482 | 2015-01-09T03:06:14.000Z | 2022-03-24T10:05:07.000Z | Software/Python/grove_switch_relay.py | benmcclelland/GrovePi | 1e48137b6007ffd4ce430e821d2aa744349e362a | [
"MIT"
] | 257 | 2015-01-13T14:08:17.000Z | 2022-01-20T08:43:50.000Z | Software/Python/grove_switch_relay.py | benmcclelland/GrovePi | 1e48137b6007ffd4ce430e821d2aa744349e362a | [
"MIT"
] | 510 | 2015-01-27T17:15:44.000Z | 2022-03-29T01:27:13.000Z | #!/usr/bin/env python
#
# GrovePi Example for using the Grove Switch and the Grove Relay
#
# Modules:
# http://www.seeedstudio.com/wiki/Grove_-_Switch(P)
# http://www.seeedstudio.com/wiki/Grove_-_Relay
#
# The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dex... | 32.173913 | 139 | 0.75 |
63091c21a697268f67d3e89e8c21d013500f9b27 | 4,167 | py | Python | nuage_neutron/plugins/nuage_ml2/securitygroup.py | nuagenetworks/nuage-openstack-neutron | 80c23bcdb7edd5549f33a09b52d934da901658f1 | [
"Apache-2.0"
] | 14 | 2015-06-24T18:35:25.000Z | 2020-09-21T07:14:06.000Z | nuage_neutron/plugins/nuage_ml2/securitygroup.py | nuagenetworks/nuage-openstack-neutron | 80c23bcdb7edd5549f33a09b52d934da901658f1 | [
"Apache-2.0"
] | 7 | 2016-01-20T18:20:28.000Z | 2020-11-18T16:04:14.000Z | nuage_neutron/plugins/nuage_ml2/securitygroup.py | nuagenetworks/nuage-openstack-neutron | 80c23bcdb7edd5549f33a09b52d934da901658f1 | [
"Apache-2.0"
] | 43 | 2015-04-07T09:02:35.000Z | 2021-02-12T07:50:19.000Z | # Copyright 2018 NOKIA
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 42.958763 | 78 | 0.681785 |
39d3bec2eaa27b83c709ac6e1e3b162f19f62ad1 | 10,725 | py | Python | pacu/models/awsapi/sts.py | RyanJarv/Pacu2 | 27df4bcf296fc8f467d3dc671a47bf9519ce7a24 | [
"MIT"
] | 1 | 2022-03-09T14:51:54.000Z | 2022-03-09T14:51:54.000Z | pacu/models/awsapi/sts.py | RyanJarv/Pacu2 | 27df4bcf296fc8f467d3dc671a47bf9519ce7a24 | [
"MIT"
] | null | null | null | pacu/models/awsapi/sts.py | RyanJarv/Pacu2 | 27df4bcf296fc8f467d3dc671a47bf9519ce7a24 | [
"MIT"
] | null | null | null | # generated by datamodel-codegen:
# filename: openapi.yaml
# timestamp: 2021-12-31T02:59:02+00:00
from __future__ import annotations
from datetime import datetime
from typing import Annotated, Any, List, Optional
from pydantic import BaseModel, Field
class TagKeyType(BaseModel):
__root__: Annotated[
... | 27.151899 | 350 | 0.735198 |
6d786eac7af2d3d4af2f56b599e5af25e3449a2b | 287 | py | Python | etl/etl.better.py | always-waiting/exercism-python | 31f0faa3f35dd0b264a161c862fbdc3808dc5aee | [
"MIT"
] | null | null | null | etl/etl.better.py | always-waiting/exercism-python | 31f0faa3f35dd0b264a161c862fbdc3808dc5aee | [
"MIT"
] | null | null | null | etl/etl.better.py | always-waiting/exercism-python | 31f0faa3f35dd0b264a161c862fbdc3808dc5aee | [
"MIT"
] | null | null | null | def transform(d):
'''Just reverse the dictionary'''
return {l.lower(): p for p, letters in d.items() for l in letters}
def transform(strs):
result = {}
for k,v in strs.items():
for i in v:
result.update({i.lower():k})
return dict(result.items())
| 26.090909 | 70 | 0.581882 |
d2a27ffaf73559e9f295a24ae1137a37d1194790 | 8,594 | py | Python | api/base/settings/defaults.py | erinspace/osf.io | 5cf968a191541195621b59d6457d104174c84778 | [
"Apache-2.0"
] | null | null | null | api/base/settings/defaults.py | erinspace/osf.io | 5cf968a191541195621b59d6457d104174c84778 | [
"Apache-2.0"
] | 5 | 2017-02-13T19:38:59.000Z | 2018-10-17T20:38:08.000Z | api/base/settings/defaults.py | erinspace/osf.io | 5cf968a191541195621b59d6457d104174c84778 | [
"Apache-2.0"
] | null | null | null | """
Django settings for api project.
Generated by 'django-admin startproject' using Django 1.8.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
import os
from url... | 30.048951 | 123 | 0.705841 |
424a04dde0a35fa1f8afc9ca0872fc51078da5cb | 1,977 | py | Python | tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_dfn_half_cell.py | emptylkj/PyBaMM | 9280577deef09507452beafb56d1231fbfaaf110 | [
"BSD-3-Clause"
] | 1 | 2021-12-19T14:30:15.000Z | 2021-12-19T14:30:15.000Z | tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_dfn_half_cell.py | emptylkj/PyBaMM | 9280577deef09507452beafb56d1231fbfaaf110 | [
"BSD-3-Clause"
] | null | null | null | tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_dfn_half_cell.py | emptylkj/PyBaMM | 9280577deef09507452beafb56d1231fbfaaf110 | [
"BSD-3-Clause"
] | null | null | null | #
# Tests for the lithium-ion half-cell DFN model
# This is achieved by using the {"working electrode": "positive"} option
#
import pybamm
import unittest
class TestDFNHalfCell(unittest.TestCase):
def test_well_posed(self):
options = {"working electrode": "positive"}
model = pybamm.lithium_ion.DFN... | 33.508475 | 88 | 0.679818 |
fc377d4f5407abdc4e373680af93cac111632885 | 7,922 | py | Python | tensorflow_datasets/scripts/cli/build_test.py | Rishabh-Choudhry/datasets | 2bad427bba6cdcab717698a70c96339733c5d42c | [
"Apache-2.0"
] | 2 | 2022-02-14T09:51:39.000Z | 2022-02-14T13:27:49.000Z | tensorflow_datasets/scripts/cli/build_test.py | Rishabh-Choudhry/datasets | 2bad427bba6cdcab717698a70c96339733c5d42c | [
"Apache-2.0"
] | null | null | null | tensorflow_datasets/scripts/cli/build_test.py | Rishabh-Choudhry/datasets | 2bad427bba6cdcab717698a70c96339733c5d42c | [
"Apache-2.0"
] | 1 | 2020-12-13T22:11:33.000Z | 2020-12-13T22:11:33.000Z | # coding=utf-8
# Copyright 2022 The TensorFlow Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 32.735537 | 111 | 0.723933 |
83b205854576643edffcfe40da4abacb208aa383 | 3,194 | py | Python | opti_w_bey2/run_bey.py | andyvanb/MLoptLVDS180 | 80e737f29d715a939ef252fbcb470a5aeb7564e0 | [
"MIT"
] | null | null | null | opti_w_bey2/run_bey.py | andyvanb/MLoptLVDS180 | 80e737f29d715a939ef252fbcb470a5aeb7564e0 | [
"MIT"
] | null | null | null | opti_w_bey2/run_bey.py | andyvanb/MLoptLVDS180 | 80e737f29d715a939ef252fbcb470a5aeb7564e0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from time import time
import os
import filecmp
from shutil import copyfile
import sys
import logging
import pandas as pd
import re
def run_ltspice_meas_out(simname, **kwargs):
start_time = time()
dircmd = ""
working_dir = ""
params = kwargs.get("params", {})
print('First de... | 39.432099 | 114 | 0.612398 |
ea399494173331a66a599d14806ae1c95d021ee2 | 4,110 | py | Python | openpype/hosts/unreal/plugins/publish/extract_look.py | jonclothcat/OpenPype | d1208cbebc0a7f378de0062ccd653295c6399195 | [
"MIT"
] | 1 | 2022-02-08T15:40:41.000Z | 2022-02-08T15:40:41.000Z | openpype/hosts/unreal/plugins/publish/extract_look.py | zafrs/OpenPype | 4b8e7e1ed002fc55b31307efdea70b0feaed474f | [
"MIT"
] | 2 | 2022-03-18T01:46:03.000Z | 2022-03-18T01:46:16.000Z | openpype/hosts/unreal/plugins/publish/extract_look.py | zafrs/OpenPype | 4b8e7e1ed002fc55b31307efdea70b0feaed474f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import os
import unreal
from unreal import MaterialEditingLibrary as mat_lib
import openpype.api
class ExtractLook(openpype.api.Extractor):
"""Extract look."""
label = "Extract Look"
hosts = ["unreal"]
families = ["look"]
optional = True
def process(self... | 33.688525 | 78 | 0.614112 |
5168e3fa11963985444f9f1ab1e58e0404fc43b6 | 3,954 | py | Python | eval_lrw1000/models/resnet.py | sailordiary/deep-face-vsr | a708cd31ba09ccb2618faf110a45d87f4dc4165e | [
"Xnet",
"X11"
] | 4 | 2021-06-10T03:08:20.000Z | 2022-02-25T13:43:26.000Z | eval_lrw1000/models/resnet.py | VIPL-Audio-Visual-Speech-Understanding/deep-face-vsr | a708cd31ba09ccb2618faf110a45d87f4dc4165e | [
"Xnet",
"X11"
] | 1 | 2021-09-28T03:46:47.000Z | 2021-09-28T03:46:47.000Z | eval_lrw1000/models/resnet.py | VIPL-Audio-Visual-Speech-Understanding/deep-face-vsr | a708cd31ba09ccb2618faf110a45d87f4dc4165e | [
"Xnet",
"X11"
] | 2 | 2021-06-06T02:56:35.000Z | 2022-02-25T13:43:27.000Z | import torch
import torch.nn as nn
from .cbam import CBAM
def conv3x3(in_planes, out_planes, stride=1):
"""3x3 convolution with padding"""
return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride,
padding=1, bias=False)
def conv1x1(in_planes, out_planes, stride=1):
"""1... | 33.226891 | 106 | 0.599393 |
ef7c83565fd26372087f07805c8abc862cc9cbc4 | 1,070 | py | Python | bombbring.py | r1d3x0r/BOMBBRING | 499ebddd3ac1fd8c0b4599a7496ef341f127cee5 | [
"MIT"
] | null | null | null | bombbring.py | r1d3x0r/BOMBBRING | 499ebddd3ac1fd8c0b4599a7496ef341f127cee5 | [
"MIT"
] | null | null | null | bombbring.py | r1d3x0r/BOMBBRING | 499ebddd3ac1fd8c0b4599a7496ef341f127cee5 | [
"MIT"
] | null | null | null | from time import sleep
import pyautogui
banner = """
\033[0;36m
██████╗ ██████╗ ███╗ ███╗██████╗ ██████╗ ██████╗ ██╗███╗ ██╗ ██████╗
██╔══██╗██╔═══██╗████╗ ████║██╔══██╗██╔══██╗██╔══██╗██║████╗ ██║██╔════╝
██████╔╝██║ ██║██╔████╔██║██████╔╝██████╔╝██████╔╝██║██╔██╗ ██║██║ ███╗
██╔══██╗██║ ██║██║╚██╔╝██║██╔... | 29.722222 | 74 | 0.349533 |
14de87a840f31e5eeb9683321f80faeccf2b9ac8 | 1,424 | py | Python | app/tests/model_tests/relationship_tests/test_surveyversion_question_relationship.py | DIS-SIN/Survista | 853a6e921dce2ca94521eaa8a202a571d9ea8940 | [
"CC0-1.0"
] | 3 | 2019-02-21T20:11:11.000Z | 2019-07-14T19:48:25.000Z | app/tests/model_tests/relationship_tests/test_surveyversion_question_relationship.py | DIS-SIN/Survista | 853a6e921dce2ca94521eaa8a202a571d9ea8940 | [
"CC0-1.0"
] | 8 | 2019-03-21T18:04:41.000Z | 2019-03-21T23:56:51.000Z | app/tests/model_tests/relationship_tests/test_surveyversion_question_relationship.py | DIS-SIN/Survista | 853a6e921dce2ca94521eaa8a202a571d9ea8940 | [
"CC0-1.0"
] | 1 | 2019-01-23T07:13:24.000Z | 2019-01-23T07:13:24.000Z | import pytest
from src import create_app
from datetime import datetime
class Test_SurveyVersion_Question_Relationship:
app = create_app(
mode="development",
static_path='../static',
templates_path='../templates',
instance_path='../instance'
)
def test_create_relationship(sel... | 34.731707 | 67 | 0.57514 |
6e6a47b16544a4d545e307793da55a0c808b99c8 | 6,819 | py | Python | rrd/model/user.py | Xuexiang825/dashboard | fbecab2986e4e97ef9b7016aa7bec72b4b27b67f | [
"Apache-2.0"
] | 1 | 2019-01-08T01:46:51.000Z | 2019-01-08T01:46:51.000Z | rrd/model/user.py | Xuexiang825/dashboard | fbecab2986e4e97ef9b7016aa7bec72b4b27b67f | [
"Apache-2.0"
] | null | null | null | rrd/model/user.py | Xuexiang825/dashboard | fbecab2986e4e97ef9b7016aa7bec72b4b27b67f | [
"Apache-2.0"
] | null | null | null | #-*- coding:utf-8 -*-
import json
from rrd import corelib
from rrd import config
from rrd.utils.logger import logging
log = logging.getLogger(__file__)
class UserToken(object):
def __init__(self, name, sig):
self.name = name
self.sig = sig
def __repr__(self):
return "<UserToken na... | 33.426471 | 117 | 0.533363 |
0ae52a34a07322cec09f3d9870932344bf23967e | 751 | py | Python | futaba/cogs/auth/__init__.py | Hoffs/futaba | 4d07c421c4229c81ddd42da1a49594b8cf11832d | [
"MIT"
] | 23 | 2018-09-17T09:06:27.000Z | 2021-05-27T15:21:37.000Z | futaba/cogs/auth/__init__.py | Hoffs/futaba | 4d07c421c4229c81ddd42da1a49594b8cf11832d | [
"MIT"
] | 257 | 2018-08-18T21:27:54.000Z | 2020-12-29T23:27:10.000Z | futaba/cogs/auth/__init__.py | Hoffs/futaba | 4d07c421c4229c81ddd42da1a49594b8cf11832d | [
"MIT"
] | 22 | 2018-09-09T09:03:13.000Z | 2021-11-09T03:34:34.000Z | #
# cogs/auth/__init__.py
#
# futaba - A Discord Mod bot for the Programming server
# Copyright (c) 2017-2020 Jake Richardson, Ammon Smith, jackylam5
#
# futaba is available free of charge under the terms of the MIT
# License. You are free to redistribute and/or modify it under those
# terms. It is distributed in the h... | 23.46875 | 68 | 0.741678 |
2728b59002b12decf10dfc4f552de8daf96685f9 | 15,548 | py | Python | cvxpy/atoms/atom.py | jasondark/cvxpy | 56aaa01b0e9d98ae5a91a923708129a7b37a6f18 | [
"ECL-2.0",
"Apache-2.0"
] | 7 | 2015-06-03T01:33:46.000Z | 2021-11-15T01:48:49.000Z | cvxpy/atoms/atom.py | Toby-Gao/cvxpy | bd6f5142effa8cf883d1a0d7fd46c0d906b2fb93 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2022-03-09T13:13:44.000Z | 2022-03-09T13:13:44.000Z | cvxpy/atoms/atom.py | Toby-Gao/cvxpy | bd6f5142effa8cf883d1a0d7fd46c0d906b2fb93 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2020-10-22T01:35:58.000Z | 2022-01-19T10:48:51.000Z | """
Copyright 2013 Steven Diamond
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | 33.436559 | 82 | 0.57107 |
43998cceb7543aab16ca413da98ee7953f11f4be | 4,717 | py | Python | supcon/models.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 23,901 | 2018-10-04T19:48:53.000Z | 2022-03-31T21:27:42.000Z | supcon/models.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 891 | 2018-11-10T06:16:13.000Z | 2022-03-31T10:42:34.000Z | supcon/models.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 6,047 | 2018-10-12T06:31:02.000Z | 2022-03-31T13:59:28.000Z | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 42.881818 | 80 | 0.751537 |
d3db639f50290f511184df3bd42c22fcddf7e4f4 | 1,143 | py | Python | 2 -> Supervised Learning/25 - Quiz: Polynomial Regression/Polynomial_Regression.py | Diego-Luna/Intro-to-ML-with-Tensor-Flow | 1a55066f269e1d3bece4da58eba632e1a9e3c87b | [
"MIT"
] | null | null | null | 2 -> Supervised Learning/25 - Quiz: Polynomial Regression/Polynomial_Regression.py | Diego-Luna/Intro-to-ML-with-Tensor-Flow | 1a55066f269e1d3bece4da58eba632e1a9e3c87b | [
"MIT"
] | null | null | null | 2 -> Supervised Learning/25 - Quiz: Polynomial Regression/Polynomial_Regression.py | Diego-Luna/Intro-to-ML-with-Tensor-Flow | 1a55066f269e1d3bece4da58eba632e1a9e3c87b | [
"MIT"
] | null | null | null | # TODO: Add import statements
## Diego -> step 1
import numpy as np
import pandas as pd
from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import PolynomialFeatures
# Assign the data to predictor and outcome variables
# TODO: Load the data
#train_data = None
#X = None
#y = None
## Diego -> st... | 30.078947 | 79 | 0.761155 |
10712d9c853249088300557fefabb9b68c38a047 | 2,434 | py | Python | virtual/lib/python3.8/site-packages/flask_wtf/recaptcha/validators.py | Lenus254/personal_blog | aac38e4b5372c86efa8e24db2e051fef8e5feef8 | [
"Unlicense"
] | 97 | 2021-05-27T13:24:09.000Z | 2022-03-29T08:08:23.000Z | virtual/lib/python3.8/site-packages/flask_wtf/recaptcha/validators.py | Lenus254/personal_blog | aac38e4b5372c86efa8e24db2e051fef8e5feef8 | [
"Unlicense"
] | 39 | 2021-05-25T16:25:47.000Z | 2022-03-31T18:40:24.000Z | virtual/lib/python3.8/site-packages/flask_wtf/recaptcha/validators.py | Lenus254/personal_blog | aac38e4b5372c86efa8e24db2e051fef8e5feef8 | [
"Unlicense"
] | 30 | 2021-05-31T16:46:31.000Z | 2022-03-30T23:51:10.000Z | import json
from urllib import request as http
from flask import current_app
from flask import request
from werkzeug.urls import url_encode
from wtforms import ValidationError
RECAPTCHA_VERIFY_SERVER_DEFAULT = "https://www.google.com/recaptcha/api/siteverify"
RECAPTCHA_ERROR_CODES = {
"missing-input-secret": "The... | 32.026316 | 83 | 0.663106 |
12aa33a745326ba954ad9a0ed57bc20c17889014 | 2,194 | py | Python | src/record_video_ros.py | felixchenfy/record_images_from_usbcam | ca3103c07994ec678e67929cd4bf5c6ebb16c2d8 | [
"MIT"
] | 10 | 2019-11-25T07:40:20.000Z | 2022-01-23T07:24:42.000Z | src/record_video_ros.py | felixchenfy/record_images_from_usbcam | ca3103c07994ec678e67929cd4bf5c6ebb16c2d8 | [
"MIT"
] | 1 | 2020-10-01T16:20:11.000Z | 2020-10-01T16:20:11.000Z | src/record_video_ros.py | felixchenfy/record_images_from_usbcam | ca3103c07994ec678e67929cd4bf5c6ebb16c2d8 | [
"MIT"
] | 3 | 2020-03-13T07:27:27.000Z | 2020-08-27T02:01:22.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import sys, os
import cv2
import datetime
from my_lib import *
import rospy
from sensor_msgs.msg import CameraInfo
from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
VIDEO_TOPIC = "usb_cam/image_raw"
# A virtual class for ... | 25.811765 | 67 | 0.65907 |
ec4679d16930279c652ab72524eaadd1d6f940db | 2,636 | py | Python | scream/commands/install.py | r-kells/scream | 3f5d325cd05a0f3eccc4b579b4929be49029ab09 | [
"MIT"
] | 26 | 2018-11-29T13:33:25.000Z | 2021-11-22T18:45:19.000Z | scream/commands/install.py | r-kells/scream | 3f5d325cd05a0f3eccc4b579b4929be49029ab09 | [
"MIT"
] | 14 | 2019-01-20T00:07:13.000Z | 2020-07-15T13:19:29.000Z | scream/commands/install.py | r-kells/scream | 3f5d325cd05a0f3eccc4b579b4929be49029ab09 | [
"MIT"
] | 2 | 2019-02-25T17:31:47.000Z | 2020-01-22T22:10:41.000Z | import logging
import subprocess
from ..package import Package
class NoMatchingDistributionException(Exception):
pass
class PackageInstallationException(Exception):
pass
def install(package, test=False):
"""
Installs individual packages and their dependents.
Args:
package (str): A lo... | 26.626263 | 79 | 0.688543 |
94df35643611c504828f3161f0ee145172a54990 | 6,240 | py | Python | src/helpers/plot_results.py | tatigabru/transforms | 889734c224727004c9118a36c117d5eee9e2b9dc | [
"MIT"
] | 1 | 2020-07-29T18:18:48.000Z | 2020-07-29T18:18:48.000Z | src/helpers/plot_results.py | tatigabru/transforms | 889734c224727004c9118a36c117d5eee9e2b9dc | [
"MIT"
] | null | null | null | src/helpers/plot_results.py | tatigabru/transforms | 889734c224727004c9118a36c117d5eee9e2b9dc | [
"MIT"
] | 1 | 2021-03-25T14:10:47.000Z | 2021-03-25T14:10:47.000Z | """
read outcomes of training/ models tunings
@author: Tanya
"""
#usual imports
import numpy as np
import pandas as pd
import scipy.io as sio
from sklearn.utils import shuffle
from sklearn import metrics
from sklearn.metrics import roc_auc_score
from sklearn.preprocessing import StandardScaler, RobustScaler
import o... | 35.254237 | 107 | 0.601923 |
150b1778925f3a36ba05148e2d7fe8d16c333167 | 603 | py | Python | setup.py | faurehu/sample_data_work | 4dc56f5a0d70d707e5276266c3ac2174e90d8831 | [
"MIT"
] | null | null | null | setup.py | faurehu/sample_data_work | 4dc56f5a0d70d707e5276266c3ac2174e90d8831 | [
"MIT"
] | null | null | null | setup.py | faurehu/sample_data_work | 4dc56f5a0d70d707e5276266c3ac2174e90d8831 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Setup file for sample_data_work.
Use setup.cfg to configure your project.
This file was generated with PyScaffold 3.2.3.
PyScaffold helps you to put up the scaffold of your new Python project.
Learn more under: https://pyscaffold.org/
"""
import sys
from pkg_... | 25.125 | 76 | 0.679934 |
4b5462950167cc29470765240a2d0ae47c3048f6 | 1,496 | py | Python | setup.py | hrishikeshrt/vyoma_download | 978499ba654d81fc9968565709987b7cbede53cf | [
"MIT"
] | null | null | null | setup.py | hrishikeshrt/vyoma_download | 978499ba654d81fc9968565709987b7cbede53cf | [
"MIT"
] | null | null | null | setup.py | hrishikeshrt/vyoma_download | 978499ba654d81fc9968565709987b7cbede53cf | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = ["requests", "requests-downloader", "beautifulsoup4"]
setup_r... | 28.769231 | 75 | 0.661096 |
3ae2fcd1ebf4ad1bd7e8eb26a0ff945ca44a11b6 | 1,954 | py | Python | app.py | MiaLinlinLu/flasktest2 | a382ae77cf36b141fb213fd75f8779dc26585cb4 | [
"MIT"
] | null | null | null | app.py | MiaLinlinLu/flasktest2 | a382ae77cf36b141fb213fd75f8779dc26585cb4 | [
"MIT"
] | null | null | null | app.py | MiaLinlinLu/flasktest2 | a382ae77cf36b141fb213fd75f8779dc26585cb4 | [
"MIT"
] | null | null | null | import os
import sys
from flask import Flask,render_template
from flask_sqlalchemy import SQLAlchemy
WIN = sys.platform.startswith('win')
if WIN: # 如果是 Windows 系统,使用三个斜线
prefix = 'sqlite:///'
else: # 否则使用四个斜线
prefix = 'sqlite:////'
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = prefix + os.p... | 27.521127 | 87 | 0.602354 |
f5effbdb090e9c08939bfc203091e960741700c6 | 6,194 | py | Python | official/nlp/nhnet/decoder_test.py | gujralsanyam22/models | d96f8f043dbe2b5ca8ea1785f57df8faf68d8875 | [
"Apache-2.0"
] | 2 | 2020-12-11T04:07:55.000Z | 2020-12-11T04:08:11.000Z | official/nlp/nhnet/decoder_test.py | gujralsanyam22/models | d96f8f043dbe2b5ca8ea1785f57df8faf68d8875 | [
"Apache-2.0"
] | 1 | 2020-07-24T10:47:58.000Z | 2020-07-24T10:47:58.000Z | official/nlp/nhnet/decoder_test.py | gujralsanyam22/models | d96f8f043dbe2b5ca8ea1785f57df8faf68d8875 | [
"Apache-2.0"
] | 8 | 2020-09-17T13:09:11.000Z | 2021-12-17T09:58:43.000Z | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.75 | 80 | 0.708589 |
813c5a3e8ce672fc2b131b10c5d487596a44205f | 12,035 | py | Python | Packs/FeedCyrenThreatInDepth/Scripts/CyrenThreatInDepthRenderRelated/CyrenThreatInDepthRenderRelated_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/FeedCyrenThreatInDepth/Scripts/CyrenThreatInDepthRenderRelated/CyrenThreatInDepthRenderRelated_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/FeedCyrenThreatInDepth/Scripts/CyrenThreatInDepthRenderRelated/CyrenThreatInDepthRenderRelated_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import pytest
import demistomock as demisto
from CommonServerPython import Common
import json
FILE_INDICATOR = {
"CustomFields": {
"cyrenfeedrelationships": [
{
"indicatortype": "SHA-256", "timestamp": "2020-10-28T14:45:24.921Z", "entitycategory": "malware",
"de... | 49.526749 | 123 | 0.621521 |
3da09b572cf76f26ad2d9382831213e1224fc4b5 | 1,370 | py | Python | Python/construct-binary-tree-from-preorder-and-inorder-traversal.py | xiaohalo/LeetCode | 68211ba081934b21bb1968046b7e3c1459b3da2d | [
"MIT"
] | 9 | 2019-06-30T07:15:18.000Z | 2022-02-10T20:13:40.000Z | Python/construct-binary-tree-from-preorder-and-inorder-traversal.py | xiaohalo/LeetCode | 68211ba081934b21bb1968046b7e3c1459b3da2d | [
"MIT"
] | null | null | null | Python/construct-binary-tree-from-preorder-and-inorder-traversal.py | xiaohalo/LeetCode | 68211ba081934b21bb1968046b7e3c1459b3da2d | [
"MIT"
] | 9 | 2019-01-16T22:16:49.000Z | 2022-02-06T17:33:41.000Z | from __future__ import print_function
# Time: O(n)
# Space: O(n)
#
# Given preorder and inorder traversal of a tree, construct the binary tree.
#
# Note:
# You may assume that duplicates do not exist in the tree.
#
# Definition for a binary tree node
class TreeNode:
def __init__(self, x):
self.val = x
... | 31.136364 | 111 | 0.640876 |
9c0a5fa0fdf3c82b165dc70032e51458517c2270 | 13,891 | py | Python | smallprotein_analysis.py | YinchaoHe/Smallproteins_Analysis | db8c6b9abe02d4a6c557dd5f47c49e4527afd7ca | [
"MIT"
] | null | null | null | smallprotein_analysis.py | YinchaoHe/Smallproteins_Analysis | db8c6b9abe02d4a6c557dd5f47c49e4527afd7ca | [
"MIT"
] | null | null | null | smallprotein_analysis.py | YinchaoHe/Smallproteins_Analysis | db8c6b9abe02d4a6c557dd5f47c49e4527afd7ca | [
"MIT"
] | null | null | null | import argparse
import os
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
import time
import threading
def combination_signalp_info(signalp_result, reference, direction_path):
signalp_result = signalp_result + '_summary.signalp5'
with open(signalp_result, 'r') as file:
... | 47.9 | 239 | 0.624433 |
5896ecfea6e0b493dd024d5a0743d4a8acbf1817 | 275 | py | Python | oo/bola.py | jfklima/pythonbirds | e59269418783b3e5eeb70014625c1066bb64fabd | [
"MIT"
] | null | null | null | oo/bola.py | jfklima/pythonbirds | e59269418783b3e5eeb70014625c1066bb64fabd | [
"MIT"
] | null | null | null | oo/bola.py | jfklima/pythonbirds | e59269418783b3e5eeb70014625c1066bb64fabd | [
"MIT"
] | null | null | null | import math as pi
class Bola:
def __init__(self, cor, material):
self.cor = cor
self.material = material
def circuferencia(self, r):
return 2 * pi * r
def troca_cor(self, cor):
self.cor = cor
def mostra_cor(self):
return self.cor
| 14.473684 | 38 | 0.614545 |
8f24c557cf9c1d5804d3ca05ca47dd613ec8e9a8 | 110 | py | Python | src/265A.py | viing937/codeforces | d694eb6967cd56af02963c3a662066048cb78d07 | [
"MIT"
] | 2 | 2016-08-19T09:47:03.000Z | 2016-10-01T10:15:03.000Z | src/265A.py | viing937/codeforces | d694eb6967cd56af02963c3a662066048cb78d07 | [
"MIT"
] | null | null | null | src/265A.py | viing937/codeforces | d694eb6967cd56af02963c3a662066048cb78d07 | [
"MIT"
] | 1 | 2015-07-01T23:57:32.000Z | 2015-07-01T23:57:32.000Z | # coding: utf-8
s = input()
t = input()
pos = 0
for i in t:
if i == s[pos]:
pos += 1
print(pos+1)
| 12.222222 | 19 | 0.481818 |
097493e1735bf2ead985e5c35c26abce6523b985 | 5,286 | py | Python | day7/EIntMachine.py | liamwarfield/advent-of-code2019 | 936abf002901b5f0f4d4eb1d5bcb465aeaffe2ef | [
"Apache-2.0"
] | null | null | null | day7/EIntMachine.py | liamwarfield/advent-of-code2019 | 936abf002901b5f0f4d4eb1d5bcb465aeaffe2ef | [
"Apache-2.0"
] | null | null | null | day7/EIntMachine.py | liamwarfield/advent-of-code2019 | 936abf002901b5f0f4d4eb1d5bcb465aeaffe2ef | [
"Apache-2.0"
] | null | null | null | from collections import defaultdict
from enum import Enum
import logging
logging.basicConfig(level=logging.INFO)
import sys
'''
This is an IntMachine that has had it io redisigned to be easily
used by programs.
'''
class EIntMachine:
class IO(Enum):
HUMAN = 0
COMPUTER = 1
def __init__(self, inp... | 31.094118 | 96 | 0.522134 |
d17ed323714e007650d53bed19ca3e1b6d64ac2d | 4,059 | py | Python | backend/medicar/tests/test_views_doctor.py | WesGtoX/medicar | 1fd5df8b2aea77316e1de5d00f676bc376eafd2a | [
"MIT"
] | 2 | 2020-12-23T10:05:46.000Z | 2022-03-09T15:46:13.000Z | backend/medicar/tests/test_views_doctor.py | WesGtoX/medicar | 1fd5df8b2aea77316e1de5d00f676bc376eafd2a | [
"MIT"
] | null | null | null | backend/medicar/tests/test_views_doctor.py | WesGtoX/medicar | 1fd5df8b2aea77316e1de5d00f676bc376eafd2a | [
"MIT"
] | 4 | 2020-12-06T04:55:06.000Z | 2022-03-09T15:46:20.000Z | from django.urls import reverse
from django.contrib.auth import get_user_model
from rest_framework import status
from rest_framework.authtoken.models import Token
from rest_framework.test import APITestCase, APIClient
from .fixture import DoctorFactory
User = get_user_model()
class DoctorViewSetTests(APITestCase):... | 40.188119 | 90 | 0.685883 |
f8705540e865e216eb8bf0ceb87f0854ab430a87 | 87,457 | py | Python | caffevis/app_original.py | MEscuderoVinolo/MobiNet-Video-CNN-Visualization | a9cf171af8a700ca6e5c9f1b19f3090e78402be8 | [
"MIT"
] | null | null | null | caffevis/app_original.py | MEscuderoVinolo/MobiNet-Video-CNN-Visualization | a9cf171af8a700ca6e5c9f1b19f3090e78402be8 | [
"MIT"
] | null | null | null | caffevis/app_original.py | MEscuderoVinolo/MobiNet-Video-CNN-Visualization | a9cf171af8a700ca6e5c9f1b19f3090e78402be8 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8
# add parent folder to search path, to enable import of core modules like settings
import os,sys,inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0,parentdir)
import cv2
im... | 53.100789 | 196 | 0.633614 |
4f4ee8810de194fe15c981a235cea60a3678e709 | 2,065 | py | Python | tests/test_simplify.py | jayvdb/sre-tools | 975bd5d421214fd325feab0ce32782dac3df93bc | [
"Apache-2.0"
] | 2 | 2020-09-23T19:58:46.000Z | 2022-01-06T14:02:49.000Z | tests/test_simplify.py | jayvdb/sre-tools | 975bd5d421214fd325feab0ce32782dac3df93bc | [
"Apache-2.0"
] | 2 | 2020-09-23T16:08:11.000Z | 2020-09-23T23:07:57.000Z | tests/test_simplify.py | jayvdb/sre-tools | 975bd5d421214fd325feab0ce32782dac3df93bc | [
"Apache-2.0"
] | 1 | 2022-01-06T14:02:52.000Z | 2022-01-06T14:02:52.000Z | from __future__ import unicode_literals
import sre_compile
import sre_parse
import unittest
from sre_tools._simplify import _val_eq
from sre_tools.simplify import simplify_regex
class TestSimplifyRegex(unittest.TestCase):
def _assert_equal(self, a, b):
rv = simplify_regex(a)
self.assertIsInstanc... | 31.287879 | 82 | 0.603874 |
6204f59c9ab4c2f49c2e04b87321bbdf7135e405 | 5,240 | py | Python | environment/cogment_verse_environment/procgen_env.py | kharyal/cogment-verse | 12bcb855bc742e3ec4ed11c40a1b475e95a32515 | [
"Apache-2.0"
] | null | null | null | environment/cogment_verse_environment/procgen_env.py | kharyal/cogment-verse | 12bcb855bc742e3ec4ed11c40a1b475e95a32515 | [
"Apache-2.0"
] | null | null | null | environment/cogment_verse_environment/procgen_env.py | kharyal/cogment-verse | 12bcb855bc742e3ec4ed11c40a1b475e95a32515 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 AI Redefined Inc. <dev+cogment@ai-r.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 28.791209 | 113 | 0.608015 |
cf402d3fc78c4d0afd0344a684df5843506571d0 | 13,766 | py | Python | v6.0.6/wireless_controller/fortios_wireless_controller_timers.py | fortinet-solutions-cse/ansible_fgt_modules | c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719 | [
"Apache-2.0"
] | 14 | 2018-09-25T20:35:25.000Z | 2021-07-14T04:30:54.000Z | v6.0.6/wireless_controller/fortios_wireless_controller_timers.py | fortinet-solutions-cse/ansible_fgt_modules | c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719 | [
"Apache-2.0"
] | 32 | 2018-10-09T04:13:42.000Z | 2020-05-11T07:20:28.000Z | v6.0.6/wireless_controller/fortios_wireless_controller_timers.py | fortinet-solutions-cse/ansible_fgt_modules | c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719 | [
"Apache-2.0"
] | 11 | 2018-10-09T00:14:53.000Z | 2021-11-03T10:54:09.000Z | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... | 34.415 | 139 | 0.58521 |
5486554493e08023d5c30cb7dd5de0296e181d36 | 1,557 | py | Python | sudoku.py | Faizansayeed28/Hactober-fest-2021 | d7b6df2b65436d19c68abc6a65a684e681f95331 | [
"MIT"
] | 11 | 2021-10-02T18:24:04.000Z | 2021-10-20T21:55:37.000Z | sudoku.py | Faizansayeed28/Hactober-fest-2021 | d7b6df2b65436d19c68abc6a65a684e681f95331 | [
"MIT"
] | 44 | 2021-10-02T16:36:46.000Z | 2021-11-12T03:42:45.000Z | sudoku.py | Faizansayeed28/Hactober-fest-2021 | d7b6df2b65436d19c68abc6a65a684e681f95331 | [
"MIT"
] | 29 | 2021-10-02T16:34:14.000Z | 2021-10-21T16:00:04.000Z | board = [[9,0,8,0,0,0,2,0,3],
[0,4,0,0,9,0,0,6,0],
[7,0,0,8,0,1,0,0,4],
[6,0,0,4,0,9,0,0,0],
[8,0,0,5,0,6,0,0,1],
[0,0,0,3,0,2,0,0,0],
[3,0,0,2,0,8,0,0,9],
[0,8,0,0,6,0,0,4,0],
[1,0,2,0,0,0,5,0,6]]
def print_board(bo):
for i in range(9):
if i % 3 == 0 and i != 0:
... | 18.987805 | 50 | 0.418754 |
be87fb20094fb6fba9eb6e9ce3e9289f2ec3397f | 1,732 | py | Python | eth/beacon/state_machines/forks/serenity/configs.py | jvmaia/py-evm | d82b10ae361cde6abbac62f171fcea7809c4e3cf | [
"MIT"
] | null | null | null | eth/beacon/state_machines/forks/serenity/configs.py | jvmaia/py-evm | d82b10ae361cde6abbac62f171fcea7809c4e3cf | [
"MIT"
] | null | null | null | eth/beacon/state_machines/forks/serenity/configs.py | jvmaia/py-evm | d82b10ae361cde6abbac62f171fcea7809c4e3cf | [
"MIT"
] | 2 | 2019-09-05T01:31:56.000Z | 2019-09-17T09:09:16.000Z | from eth.constants import (
ZERO_ADDRESS,
)
from eth.beacon.state_machines.configs import BeaconConfig
SERENITY_CONFIG = BeaconConfig(
# Misc
SHARD_COUNT=2**10, # (= 1,024) shards
TARGET_COMMITTEE_SIZE=2**8, # (= 256) validators
EJECTION_BALANCE=2**4, # (= 16) ETH
MAX_BALANCE_CHURN_QUOTIENT... | 37.652174 | 72 | 0.658199 |
b13a1d46d6816bbd8c1b45295ca5f6fb18522ce9 | 459 | py | Python | hexia_pages/models.py | HenryMehta/hexia-pages | c08f1c19d2c73d1ad7e44a1636ebc7ee5ffd8b0c | [
"MIT"
] | null | null | null | hexia_pages/models.py | HenryMehta/hexia-pages | c08f1c19d2c73d1ad7e44a1636ebc7ee5ffd8b0c | [
"MIT"
] | null | null | null | hexia_pages/models.py | HenryMehta/hexia-pages | c08f1c19d2c73d1ad7e44a1636ebc7ee5ffd8b0c | [
"MIT"
] | null | null | null | from django.db import models
from ckeditor_uploader.fields import RichTextUploadingField
# Create your models here.
class Page (models.Model):
''' Defines a Page shown through a template '''
name = models.CharField(
max_length=20
)
slug = models.SlugField(
unique = True,
)
con... | 21.857143 | 59 | 0.636166 |
ac904002776f2220d6290bd5213299c2a4e709e4 | 6,014 | py | Python | test/data_client/controller/value_descriptor_client_test.py | trcox/py-core-data-client | a6d35a792c99ccf5196d5618d5dc9df6413e16f7 | [
"Apache-2.0"
] | null | null | null | test/data_client/controller/value_descriptor_client_test.py | trcox/py-core-data-client | a6d35a792c99ccf5196d5618d5dc9df6413e16f7 | [
"Apache-2.0"
] | null | null | null | test/data_client/controller/value_descriptor_client_test.py | trcox/py-core-data-client | a6d35a792c99ccf5196d5618d5dc9df6413e16f7 | [
"Apache-2.0"
] | null | null | null | # *******************************************************************************
# Copyright 2017 Dell Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/L... | 40.635135 | 105 | 0.725973 |
47f793b3dd4c0904f3b8d9625a0f372e50a1014c | 8,252 | py | Python | bin/dump_lpcnet.py | nkari82/LPCNet | f0f2e943bbb049b21ce91016726aab0b71960e5e | [
"BSD-3-Clause"
] | null | null | null | bin/dump_lpcnet.py | nkari82/LPCNet | f0f2e943bbb049b21ce91016726aab0b71960e5e | [
"BSD-3-Clause"
] | null | null | null | bin/dump_lpcnet.py | nkari82/LPCNet | f0f2e943bbb049b21ce91016726aab0b71960e5e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python3
'''Copyright (c) 2017-2018 Mozilla
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the f... | 39.673077 | 120 | 0.688924 |
3b8b03e6ca4af79d6f9e8fb65dae232d13ce33ca | 89 | py | Python | vsstats/apps.py | alirzaev/vyatsu-schedule-stats | 3a8cfdd4a859a531945a492a01a41abba7d7469f | [
"MIT"
] | null | null | null | vsstats/apps.py | alirzaev/vyatsu-schedule-stats | 3a8cfdd4a859a531945a492a01a41abba7d7469f | [
"MIT"
] | 2 | 2019-12-05T00:11:27.000Z | 2020-04-08T06:59:24.000Z | vsstats/apps.py | alirzaev/vyatsu-schedule-stats | 3a8cfdd4a859a531945a492a01a41abba7d7469f | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class VsstatsConfig(AppConfig):
name = 'vsstats'
| 14.833333 | 33 | 0.752809 |
98d93633a62280c910a436ed1fc5c7d357035249 | 3,391 | py | Python | src/cfehome/old-settings/settings.py | codingforentrepreneurs/ChatXChannels | e48504ce55223db45123f26c9c84ab66d631b114 | [
"MIT"
] | 58 | 2018-05-13T16:53:35.000Z | 2021-11-08T13:01:44.000Z | src/cfehome/old-settings/settings.py | InderdeepSync/ChatXChannels | e48504ce55223db45123f26c9c84ab66d631b114 | [
"MIT"
] | 2 | 2019-03-26T16:44:19.000Z | 2020-11-26T14:03:45.000Z | src/cfehome/old-settings/settings.py | InderdeepSync/ChatXChannels | e48504ce55223db45123f26c9c84ab66d631b114 | [
"MIT"
] | 33 | 2018-05-13T06:11:54.000Z | 2021-08-24T11:54:04.000Z | """
Django settings for cfehome project.
Generated by 'django-admin startproject' using Django 2.0.5.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import os
#... | 24.751825 | 91 | 0.684164 |
f94bfb7a26f338f1a10aabfbd8a67c7cc14738ed | 783 | py | Python | gmid2/tests/test_submodel_tree_jensen_limid.py | junkyul/gmid2-public | 363472b8b69212dd6a9dac61d3e5d23936a5a6d2 | [
"MIT"
] | null | null | null | gmid2/tests/test_submodel_tree_jensen_limid.py | junkyul/gmid2-public | 363472b8b69212dd6a9dac61d3e5d23936a5a6d2 | [
"MIT"
] | null | null | null | gmid2/tests/test_submodel_tree_jensen_limid.py | junkyul/gmid2-public | 363472b8b69212dd6a9dac61d3e5d23936a5a6d2 | [
"MIT"
] | 1 | 2020-12-28T20:06:37.000Z | 2020-12-28T20:06:37.000Z | import unittest
import os
from pprint import PrettyPrinter
pp = PrettyPrinter(indent=4)
from gmid2.global_constants import *
from gmid2.basics.uai_files import read_limid
from gmid2.basics.helper import filter_subsets
from gmid2.basics.directed_network import *
from gmid2.inference.submodel import *
class SubmodelT... | 29 | 116 | 0.743295 |
e61e9f529f7c7c5af658accfb50f033b380f809d | 2,398 | py | Python | setup.py | frankhood/django-admin-access-log | d662fa0c1b17d53fd8e16503fb11ae8b0283145e | [
"MIT"
] | 1 | 2021-09-23T15:43:41.000Z | 2021-09-23T15:43:41.000Z | setup.py | frankhood/django-admin-access-log | d662fa0c1b17d53fd8e16503fb11ae8b0283145e | [
"MIT"
] | null | null | null | setup.py | frankhood/django-admin-access-log | d662fa0c1b17d53fd8e16503fb11ae8b0283145e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
def get_version(*file_paths):
"""Retrieves the version from admin_access_log/__init__.py"""
filename = os.path.join(os.path.dirname(__fil... | 31.142857 | 112 | 0.631776 |
b05eb5197a59fc548841774f11360978bdd16cf8 | 522 | py | Python | fault/file.py | makaimann/fault | 8c805415f398e64971d18fbd3014bc0b59fb38b8 | [
"BSD-3-Clause"
] | 31 | 2018-07-16T15:03:14.000Z | 2022-03-10T08:36:09.000Z | fault/file.py | makaimann/fault | 8c805415f398e64971d18fbd3014bc0b59fb38b8 | [
"BSD-3-Clause"
] | 216 | 2018-07-18T20:00:34.000Z | 2021-10-05T17:40:47.000Z | fault/file.py | makaimann/fault | 8c805415f398e64971d18fbd3014bc0b59fb38b8 | [
"BSD-3-Clause"
] | 10 | 2019-02-17T00:56:58.000Z | 2021-11-05T13:31:37.000Z | import fault.actions as actions
import os
class File:
def __init__(self, name, tester, mode, chunk_size, endianness):
self.name = name
self.tester = tester
self.mode = mode
self.chunk_size = chunk_size
basename = os.path.basename(self.name)
filename = os.path.splite... | 27.473684 | 67 | 0.626437 |
6b49804bb0e24c0ffc5ef04971845a0ce1c6cb10 | 1,810 | py | Python | machinelearning-benchmark/ml/kmeans/kmeans.py | YyongXin/tf-mets | dacd9398170f5135feb7135b635d4cc3f6869369 | [
"Apache-2.0"
] | null | null | null | machinelearning-benchmark/ml/kmeans/kmeans.py | YyongXin/tf-mets | dacd9398170f5135feb7135b635d4cc3f6869369 | [
"Apache-2.0"
] | null | null | null | machinelearning-benchmark/ml/kmeans/kmeans.py | YyongXin/tf-mets | dacd9398170f5135feb7135b635d4cc3f6869369 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import tensorflow as tf
from datetime import datetime
import time
img_h, img_w, channel = 300, 300, 3
num_points = 1024
dimensions = img_h*img_w*channel
points = np.random.uniform(0, 255, [num_points, dimensions])
print('==============> shape: {}'.format(points.shape))
def input_fn():
#return t... | 31.754386 | 132 | 0.744199 |
367f50e8b41cd3bb7dd9b7a2b246563283ea95d8 | 7,817 | py | Python | mailchimp_marketing_asyncio/models/campaign_report_summary1.py | john-parton/mailchimp-asyncio | 3865ca0867bec8f537dc1e3256aa3a160c00f8a2 | [
"Apache-2.0"
] | null | null | null | mailchimp_marketing_asyncio/models/campaign_report_summary1.py | john-parton/mailchimp-asyncio | 3865ca0867bec8f537dc1e3256aa3a160c00f8a2 | [
"Apache-2.0"
] | null | null | null | mailchimp_marketing_asyncio/models/campaign_report_summary1.py | john-parton/mailchimp-asyncio | 3865ca0867bec8f537dc1e3256aa3a160c00f8a2 | [
"Apache-2.0"
] | 1 | 2022-03-09T14:52:22.000Z | 2022-03-09T14:52:22.000Z | # coding: utf-8
"""
Mailchimp Marketing API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 3.0.74
Contact: apihelp@mailchimp.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import... | 30.29845 | 138 | 0.608034 |
b953bbcee690d71bcc37d9cad16b3b0694305d40 | 1,738 | py | Python | test.py | akshatsh49/Mountain-Car-Problem | 42b9e6077eb3434eab1a24a868d778b521a76e17 | [
"MIT"
] | null | null | null | test.py | akshatsh49/Mountain-Car-Problem | 42b9e6077eb3434eab1a24a868d778b521a76e17 | [
"MIT"
] | null | null | null | test.py | akshatsh49/Mountain-Car-Problem | 42b9e6077eb3434eab1a24a868d778b521a76e17 | [
"MIT"
] | null | null | null | from agent import *
# load agent
ag=Agent()
f='agent.sav'
file=open(f,'rb')
ag=pickle.load(file)
file.close()
w=World(0,0)
max_len=1000
ep_list=[]
x_list=[]
vel_list=[]
crosses_over_origin = -2 # to ignore first 2 values
for step in range(5*max_len):
ep_list.append([w.pos,w.vel])
x_list.append(w.pos)
vel_list.... | 23.173333 | 108 | 0.671461 |
62c0f515591222c8c642ae4ee4538d447453907e | 2,045 | py | Python | customize/csv2database.py | longliveh/vnpy | db207705cccb369db5bc5d619fd949656a36a0da | [
"MIT"
] | null | null | null | customize/csv2database.py | longliveh/vnpy | db207705cccb369db5bc5d619fd949656a36a0da | [
"MIT"
] | null | null | null | customize/csv2database.py | longliveh/vnpy | db207705cccb369db5bc5d619fd949656a36a0da | [
"MIT"
] | null | null | null | import os
import csv
from datetime import datetime, time
from vnpy.trader.constant import Exchange
from vnpy.trader.database import database_manager
from vnpy.database.mongodb.mongodb_database import TickData
def run_load_csv():
"""
遍历同一文件夹内所有csv文件,并且载入到数据库中
"""
for file in os.listdir("."):
i... | 27.266667 | 102 | 0.535452 |
4ec7958894ca60e316135ae6c022bd69556f19d5 | 1,109 | py | Python | day8.py | harpolea/advent_of_code_2016 | 0303b2bf0045e1fb030be8af08b54c8ef642c55d | [
"MIT"
] | null | null | null | day8.py | harpolea/advent_of_code_2016 | 0303b2bf0045e1fb030be8af08b54c8ef642c55d | [
"MIT"
] | null | null | null | day8.py | harpolea/advent_of_code_2016 | 0303b2bf0045e1fb030be8af08b54c8ef642c55d | [
"MIT"
] | null | null | null | import numpy as np
import re
def pixels(in_file):
screen = np.zeros((6, 50), dtype=bool)
def rect(a,b):
screen[:b,:a] = True
def rot_row(a, b):
row = screen[a, :].copy()
screen[a, b:] = row[:-b]
screen[a, :b] = row[-b:]
def rot_col(a, b):
col = screen[:, a... | 26.404762 | 62 | 0.491434 |
b6e68f960babf21fb1001b04f394800da247aebe | 4,115 | py | Python | test/functional/rpc_net.py | pandagrows/seed2need-farm-coin | d6ccc27c724049665946fed4649ce4902b2b88d8 | [
"MIT"
] | 3 | 2020-06-09T16:29:25.000Z | 2021-01-01T22:48:58.000Z | test/functional/rpc_net.py | Huynhhung0/seed2need-farm-coin | 0f13811a59673170115395878d2416d1948eab46 | [
"MIT"
] | null | null | null | test/functional/rpc_net.py | Huynhhung0/seed2need-farm-coin | 0f13811a59673170115395878d2416d1948eab46 | [
"MIT"
] | 4 | 2019-11-21T21:51:05.000Z | 2020-06-13T00:25:32.000Z | #!/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 RPC calls related to net.
Tests correspond to code in rpc/net.cpp.
"""
from test_framework.test_frame... | 43.315789 | 134 | 0.69356 |
065559e35adde1b33e25185e2a540ca4825d3151 | 5,438 | py | Python | factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_cascades/models.py | michellechena/azure-intelligent-edge-patterns | b1260b962b208880532391e7ef2148d240f489f8 | [
"MIT"
] | null | null | null | factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_cascades/models.py | michellechena/azure-intelligent-edge-patterns | b1260b962b208880532391e7ef2148d240f489f8 | [
"MIT"
] | null | null | null | factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_cascades/models.py | michellechena/azure-intelligent-edge-patterns | b1260b962b208880532391e7ef2148d240f489f8 | [
"MIT"
] | null | null | null | import logging
import requests
import json
from django.db import models
from django.db.models.signals import post_save
from ..azure_iot.utils import model_manager_module_url
logger = logging.getLogger(__name__)
# Create your models here.
class Cascade(models.Model):
name = models.CharField(max_length=200, null=T... | 75.527778 | 2,978 | 0.601876 |
0a2242389faa136fe3cfc392e3d639cb15d8124f | 793 | py | Python | Data/Packages/SublimeLinter/linter-plugin-template/linter.py | koery/win-sublime | 1b16cbe9858eced52567971286109250df787d36 | [
"MIT"
] | 16 | 2017-01-01T09:16:13.000Z | 2021-08-30T08:34:35.000Z | Sublime Text 3/Packages/SublimeLinter/linter-plugin-template/linter.py | dusunboy/MySublimeText3Backup | ab1eeeb42fdb6c3552fa5830a74c55ea261c2eb8 | [
"Unlicense",
"MIT"
] | 1 | 2021-09-08T11:18:17.000Z | 2021-09-08T11:18:17.000Z | Packages/SublimeLinter/linter-plugin-template/linter.py | prisis/sublime-text-packages | 99ae8a5496613e27a75e5bd91723549b21476e60 | [
"MIT"
] | 8 | 2017-03-31T14:42:49.000Z | 2019-07-04T03:34:39.000Z | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by __user__
# Copyright (c) __year__ __user__
#
# License: MIT
#
"""This module exports the __class__ plugin class."""
from SublimeLinter.lint import __superclass__, util
class __class__(__superclass__):
"""Provi... | 22.027778 | 73 | 0.662043 |
4fa7d4b28e7f39d1f8a317a7a5730c088879d7be | 2,610 | py | Python | proptools/tank_structure_test.py | mvernacc/proptools | 1a1b041ee1dd7b0d425419bc00a5cb19bfa516b9 | [
"MIT"
] | 22 | 2019-03-23T19:29:16.000Z | 2022-03-07T01:19:18.000Z | proptools/tank_structure_test.py | Sarhan-Zerouali/proptools | 1a1b041ee1dd7b0d425419bc00a5cb19bfa516b9 | [
"MIT"
] | 2 | 2019-09-10T22:38:00.000Z | 2019-09-22T15:15:04.000Z | proptools/tank_structure_test.py | Sarhan-Zerouali/proptools | 1a1b041ee1dd7b0d425419bc00a5cb19bfa516b9 | [
"MIT"
] | 11 | 2019-02-14T06:41:05.000Z | 2022-02-17T20:11:01.000Z | import unittest
from proptools import tank_structure as ts
from proptools.units import inch2meter, psi2pascal, lbf2newton, lbm2kilogram
class TestStringMethods(unittest.TestCase):
def test_sample_8_3(self):
# Do sample problem 8-3 from Huzel and Huang.
stress = psi2pascal(38e3)
a = inch2m... | 38.382353 | 84 | 0.630651 |
e6f0edfaff3ea6e8d70e64201de95fdf92bf6163 | 2,052 | py | Python | transitleastsquares/tests/test_uncertainties.py | keatonb/tls | 6dad20b717c0b2e855861914c78fdde8dd8057b6 | [
"MIT"
] | null | null | null | transitleastsquares/tests/test_uncertainties.py | keatonb/tls | 6dad20b717c0b2e855861914c78fdde8dd8057b6 | [
"MIT"
] | null | null | null | transitleastsquares/tests/test_uncertainties.py | keatonb/tls | 6dad20b717c0b2e855861914c78fdde8dd8057b6 | [
"MIT"
] | null | null | null | from __future__ import division, print_function
import numpy
import batman
from transitleastsquares import transitleastsquares
if __name__ == "__main__":
print("Starting test: uncertainties...", end="")
numpy.random.seed(seed=0) # reproducibility
# Create test data
start = 48
days = ... | 34.779661 | 81 | 0.637914 |
d7cd6e33c8298a10226932100117d058b2c4ec1c | 2,013 | py | Python | awacs/ssm_contacts.py | michael-k/awacs | ed3dc822d268f10b0cd83feb90fd279277e54ed4 | [
"BSD-2-Clause"
] | 358 | 2015-01-01T05:11:05.000Z | 2022-03-20T14:11:39.000Z | awacs/ssm_contacts.py | cloudtools/awacs | f66550a812073f4e3ebd545279a5a1e6856cf39d | [
"BSD-2-Clause"
] | 171 | 2015-01-17T00:32:48.000Z | 2022-03-28T02:02:57.000Z | awacs/ssm_contacts.py | michael-k/awacs | ed3dc822d268f10b0cd83feb90fd279277e54ed4 | [
"BSD-2-Clause"
] | 100 | 2015-01-04T16:34:34.000Z | 2022-02-21T06:17:17.000Z | # Copyright (c) 2012-2021, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from .aws import Action as BaseAction
from .aws import BaseARN
service_name = "AWS Systems Manager Incident Manager Contacts"
prefix = "ssm-contacts"
class Action(BaseAction):
def __init__(self, ac... | 36.6 | 88 | 0.77993 |
16ebb4c7d4cc4b7704dc6bf369da05b56dcf9c68 | 848 | py | Python | voter_location/voter_location/urls.py | johnshiver/vote_location | 95330bec5060f83fe2f2fe582f8ec63f740b035b | [
"MIT"
] | null | null | null | voter_location/voter_location/urls.py | johnshiver/vote_location | 95330bec5060f83fe2f2fe582f8ec63f740b035b | [
"MIT"
] | null | null | null | voter_location/voter_location/urls.py | johnshiver/vote_location | 95330bec5060f83fe2f2fe582f8ec63f740b035b | [
"MIT"
] | null | null | null | """voter_location URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Cl... | 33.92 | 79 | 0.695755 |
2b91ed9a2d533210bab394fab3a5ec4dc1c7af1f | 3,871 | py | Python | src/python/pants/core/goals/package.py | betaboon/pants | 05ec375c8bfcaa0396c673847bb139326883cc08 | [
"Apache-2.0"
] | null | null | null | src/python/pants/core/goals/package.py | betaboon/pants | 05ec375c8bfcaa0396c673847bb139326883cc08 | [
"Apache-2.0"
] | 1 | 2022-02-22T18:15:03.000Z | 2022-02-22T18:15:03.000Z | src/python/pants/core/goals/package.py | ryanking/pants | e45b00d2eb467b599966bca262405a5d74d27bdd | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
import logging
import os
from abc import ABCMeta
from dataclasses import dataclass
from pants.core.util_rules.distdir import DistDir
from pants.engine.... | 32.258333 | 99 | 0.693103 |
02b4cf99eb3f740454ae7180bcfaa9ab821603a4 | 3,858 | py | Python | benchmark/startQiskit2076.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit2076.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit2076.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=28
import cirq
import qiskit
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2
import numpy as np
import networkx as nx
def bitwise_... | 34.141593 | 140 | 0.650337 |
7cc23bfe9af082298c7e9de7685946f80c1fc112 | 11,831 | py | Python | src/oci/identity/models/tag_default_summary.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 249 | 2017-09-11T22:06:05.000Z | 2022-03-04T17:09:29.000Z | src/oci/identity/models/tag_default_summary.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 228 | 2017-09-11T23:07:26.000Z | 2022-03-23T10:58:50.000Z | src/oci/identity/models/tag_default_summary.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 224 | 2017-09-27T07:32:43.000Z | 2022-03-25T16:55:42.000Z | # coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 33.899713 | 245 | 0.652185 |
a0c080e70c15fbbd01533d6db67a9dbb5ca85158 | 9,493 | py | Python | src/oci/data_integration/models/update_function_library_details.py | ezequielramos/oci-python-sdk | cc4235cf217beaf9feed75760e9ce82610222762 | [
"Apache-2.0",
"BSD-3-Clause"
] | 249 | 2017-09-11T22:06:05.000Z | 2022-03-04T17:09:29.000Z | src/oci/data_integration/models/update_function_library_details.py | ezequielramos/oci-python-sdk | cc4235cf217beaf9feed75760e9ce82610222762 | [
"Apache-2.0",
"BSD-3-Clause"
] | 228 | 2017-09-11T23:07:26.000Z | 2022-03-23T10:58:50.000Z | src/oci/data_integration/models/update_function_library_details.py | ezequielramos/oci-python-sdk | cc4235cf217beaf9feed75760e9ce82610222762 | [
"Apache-2.0",
"BSD-3-Clause"
] | 224 | 2017-09-27T07:32:43.000Z | 2022-03-25T16:55:42.000Z | # coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 33.426056 | 245 | 0.667334 |
1ec52bc17ed29db058b411f58af749add2b490d1 | 266 | py | Python | tktoolbox/examples/slider.py | modal/tktoolbox | bfb1c5166818bf0f0776a10598515b6ec00fc450 | [
"Apache-2.0"
] | null | null | null | tktoolbox/examples/slider.py | modal/tktoolbox | bfb1c5166818bf0f0776a10598515b6ec00fc450 | [
"Apache-2.0"
] | null | null | null | tktoolbox/examples/slider.py | modal/tktoolbox | bfb1c5166818bf0f0776a10598515b6ec00fc450 | [
"Apache-2.0"
] | null | null | null | from tkinter import *
def show_values():
print (w1.get(), w2.get())
master = Tk()
w1 = Scale(master, from_=0, to=42)
w1.pack()
w2 = Scale(master, from_=0, to=200, orient=HORIZONTAL)
w2.pack()
Button(master, text='Show', command=show_values).pack()
mainloop()
| 19 | 55 | 0.672932 |
03115f10a5a494424c6f8310c544c569be818e5b | 1,790 | py | Python | python/paddle/v2/framework/tests/test_variable.py | shenchaohua/Paddle | 9c5942db13308d53cc115708058c1e885f4b57a3 | [
"Apache-2.0"
] | null | null | null | python/paddle/v2/framework/tests/test_variable.py | shenchaohua/Paddle | 9c5942db13308d53cc115708058c1e885f4b57a3 | [
"Apache-2.0"
] | null | null | null | python/paddle/v2/framework/tests/test_variable.py | shenchaohua/Paddle | 9c5942db13308d53cc115708058c1e885f4b57a3 | [
"Apache-2.0"
] | null | null | null | import unittest
from paddle.v2.framework.framework import Variable, g_main_program, Program
import paddle.v2.framework.core as core
import numpy as np
class TestVariable(unittest.TestCase):
def test_np_dtype_convert(self):
DT = core.DataType
convert = Variable._convert_np_dtype_to_dtype_
s... | 36.530612 | 77 | 0.644134 |
7dc79c94fbe0aa338da6382dd2bbcbbac8b3e50c | 38,080 | py | Python | numba/targets/base.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | numba/targets/base.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | numba/targets/base.py | EnjoyLifeFund/py36pkgs | 0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function
from collections import namedtuple, defaultdict
import copy
import os
import sys
from itertools import permutations, takewhile
import numpy as np
from llvmlite import ir as llvmir
import llvmlite.llvmpy.core as lc
from llvmlite.llvmpy.core import Type, Constant, LLVMException
im... | 36.129032 | 92 | 0.615441 |
a5bcd72122baadd1122cbcfd145e7414d0af93b4 | 83 | py | Python | Python Programs/creating_message_box_using_python.py | Chibi-Shem/Hacktoberfest2020-Expert | 324843464aec039e130e85a16e74b76d310f1497 | [
"MIT"
] | 77 | 2020-10-01T10:06:59.000Z | 2021-11-08T08:57:18.000Z | Python Programs/creating_message_box_using_python.py | Chibi-Shem/Hacktoberfest2020-Expert | 324843464aec039e130e85a16e74b76d310f1497 | [
"MIT"
] | 46 | 2020-09-27T04:55:36.000Z | 2021-05-14T18:49:06.000Z | Python Programs/creating_message_box_using_python.py | Chibi-Shem/Hacktoberfest2020-Expert | 324843464aec039e130e85a16e74b76d310f1497 | [
"MIT"
] | 327 | 2020-09-26T17:06:03.000Z | 2021-10-09T06:04:39.000Z | import ctypes
ctypes.windll.user32.MessageBoxW(0, "hello user", "from python ",1)
| 20.75 | 67 | 0.746988 |
3ecd4c905dea2afe2248a739b7d8368dee30b8e3 | 2,372 | py | Python | autogluon/scheduler/resource/manager.py | zhanghang1989/autogluon | 8bfe6b0da8915020eeb9895fd18d7688c0d604c1 | [
"Apache-2.0"
] | 10 | 2020-04-24T08:48:38.000Z | 2021-09-20T16:40:24.000Z | autogluon/scheduler/resource/manager.py | zhanghang1989/autogluon | 8bfe6b0da8915020eeb9895fd18d7688c0d604c1 | [
"Apache-2.0"
] | null | null | null | autogluon/scheduler/resource/manager.py | zhanghang1989/autogluon | 8bfe6b0da8915020eeb9895fd18d7688c0d604c1 | [
"Apache-2.0"
] | 2 | 2020-12-13T16:40:04.000Z | 2021-03-08T09:14:16.000Z | import logging
import multiprocessing as mp
from .resource import *
from ...utils import Queue
__all__ = ['ResourceManager']
logger = logging.getLogger(__name__)
class ResourceManager(object):
"""Resource Manager to keep track of the cpu and gpu usage
"""
LOCK = mp.Lock()
CPU_QUEUE = Queue()
GPU_... | 32.944444 | 100 | 0.625211 |
e8c53cdfb13923e5434110ef9c953aa47aad147b | 1,646 | py | Python | src/models/good_AI_PM.py | antikytheraton/trading-bot | d364bbc24c7d374962cfc2eebed8d3b88ef57bcf | [
"MIT"
] | null | null | null | src/models/good_AI_PM.py | antikytheraton/trading-bot | d364bbc24c7d374962cfc2eebed8d3b88ef57bcf | [
"MIT"
] | null | null | null | src/models/good_AI_PM.py | antikytheraton/trading-bot | d364bbc24c7d374962cfc2eebed8d3b88ef57bcf | [
"MIT"
] | null | null | null | from keras.models import Sequential
from keras.layers import Dense
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.metrics import classification_report
class AIPMDevelopment:
def __init__(self):
# Read your data in and split the dependent and indep... | 29.927273 | 67 | 0.631835 |
775036c07fc7fedef651e3f96b03f41a0a42c304 | 838 | py | Python | examples/pre_processing.py | alexcapstick/minder_utils | 3bb9380b7796b5dd5b995ce1839ea6a94321021d | [
"MIT"
] | null | null | null | examples/pre_processing.py | alexcapstick/minder_utils | 3bb9380b7796b5dd5b995ce1839ea6a94321021d | [
"MIT"
] | null | null | null | examples/pre_processing.py | alexcapstick/minder_utils | 3bb9380b7796b5dd5b995ce1839ea6a94321021d | [
"MIT"
] | 1 | 2022-03-16T11:10:43.000Z | 2022-03-16T11:10:43.000Z | import os
os.chdir('..')
from minder_utils.formatting import Formatting
from minder_utils.dataloader import Dataloader
formater = Formatting()
# First time
Dataloader(formater.activity_data, formater.physiological_data,
formater.environmental_data,
max_days=7, label_data=True)
# load the saved... | 23.277778 | 63 | 0.702864 |
bf00021cd6f724423fb250e353167cbb8d990935 | 7,976 | py | Python | p1_navigation/Agent.py | florenciopaucar/deep-reinforcement-learning | 56ee4a73245616d237767de55533d90f1d05f2c5 | [
"MIT"
] | null | null | null | p1_navigation/Agent.py | florenciopaucar/deep-reinforcement-learning | 56ee4a73245616d237767de55533d90f1d05f2c5 | [
"MIT"
] | null | null | null | p1_navigation/Agent.py | florenciopaucar/deep-reinforcement-learning | 56ee4a73245616d237767de55533d90f1d05f2c5 | [
"MIT"
] | null | null | null | import numpy as np
import random
from collections import namedtuple, deque
from Model import QNetwork
import torch
import torch.nn.functional as F
import torch.optim as optim
BUFFER_SIZE = int(1e5) # replay buffer size
BATCH_SIZE = 128 # minibatch size
GAMMA = 0.99 # discount factor
TAU = 1e-3 ... | 41.326425 | 127 | 0.626003 |
15fcf17a952645372234d3ba905d992a7f470a2a | 460 | py | Python | 18-Tecnologie_Web-MongoDb/esempio02.py | matteocerullo/TW6 | 0219418576960ff8163fbe90f866c15f1fb1ad27 | [
"CC0-1.0"
] | 5 | 2021-05-07T08:56:46.000Z | 2022-02-08T20:58:56.000Z | 18-Tecnologie_Web-MongoDb/esempio02.py | matteocerullo/TW6 | 0219418576960ff8163fbe90f866c15f1fb1ad27 | [
"CC0-1.0"
] | 1 | 2021-05-14T09:11:51.000Z | 2021-05-14T09:11:51.000Z | 18-Tecnologie_Web-MongoDb/esempio02.py | matteocerullo/TW6 | 0219418576960ff8163fbe90f866c15f1fb1ad27 | [
"CC0-1.0"
] | 64 | 2021-05-07T08:53:30.000Z | 2022-02-10T17:02:41.000Z | # Importo il namespace
from pymongo import MongoClient
from datetime import datetime
# Crea un’istanza del client
client = MongoClient("mongodb://localhost:27017/")
# Accede ad un database (se non presente, allora è creato)
db = client["microblog"]
# Accedo ad una collezione (se non presente, allora è creata)
post... | 20.909091 | 61 | 0.743478 |
cfc8dd73cdf79582bb016b29796bdb8982f2072e | 714 | py | Python | nominations/migrations/0073_application_primary_election_type.py | JoshZero87/site | c8024b805ff5ff0e16f54dce7bf05097fd2f08e0 | [
"MIT"
] | 4 | 2017-01-29T00:38:41.000Z | 2019-09-04T14:30:24.000Z | nominations/migrations/0073_application_primary_election_type.py | JoshZero87/site | c8024b805ff5ff0e16f54dce7bf05097fd2f08e0 | [
"MIT"
] | 74 | 2017-10-02T04:42:54.000Z | 2022-01-13T00:44:16.000Z | nominations/migrations/0073_application_primary_election_type.py | JoshZero87/site | c8024b805ff5ff0e16f54dce7bf05097fd2f08e0 | [
"MIT"
] | 3 | 2017-03-24T23:26:46.000Z | 2019-10-21T01:16:03.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2018-02-27 20:37
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('nominations', '0072_auto_20180227_0103'),
]
operations = [
migrations.AddFi... | 34 | 291 | 0.641457 |
11d30dfe550c2a8f488fbd11bd55df7fa0892f3d | 1,702 | py | Python | cs_gan/tests/gan_test.py | kangyongxin/deepmind-research | c360cb1035f805004116759b1f0928b55fd4ad1a | [
"Apache-2.0"
] | 2 | 2020-03-18T04:24:08.000Z | 2020-08-06T16:13:08.000Z | cs_gan/tests/gan_test.py | etarakci-hvl/deepmind-research | 5b22f165327a263a31b2a467b9446fd1bf74d7db | [
"Apache-2.0"
] | 45 | 2020-01-28T23:12:31.000Z | 2022-03-12T00:09:45.000Z | cs_gan/tests/gan_test.py | etarakci-hvl/deepmind-research | 5b22f165327a263a31b2a467b9446fd1bf74d7db | [
"Apache-2.0"
] | 1 | 2020-01-20T00:45:17.000Z | 2020-01-20T00:45:17.000Z | # Copyright 2019 DeepMind Technologies Limited and Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 29.344828 | 80 | 0.722679 |
b3a10607c4e68fe118c24edbae354a57e7f1222e | 1,141 | py | Python | tree/112_path_sum.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | tree/112_path_sum.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | tree/112_path_sum.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | 2 | 2020-02-07T20:49:02.000Z | 2020-02-11T06:01:55.000Z | from tree import Tree
treeVals = [5, 4, 8, 11, None, 13, 4, 7, 2, None, None, None, None, None, 1]
tree = Tree(treeVals)
root = tree.root
class Solution(object):
# 112_Path_Sum_I
def hasPathSum(self, root, sum):
"""
:type root: TreeNode
:type sum: int
:rtype: bool
"""
... | 27.166667 | 105 | 0.516214 |
879a9466d18468c6aa649f9c6cc8eb16968fb15f | 339 | py | Python | examples/spot/gift_card/gift_card_redeem_code.py | Banging12/binance-connector-python | dc6fbbd0bb64fb08d73ad8b31e0b81d776efa30b | [
"MIT"
] | null | null | null | examples/spot/gift_card/gift_card_redeem_code.py | Banging12/binance-connector-python | dc6fbbd0bb64fb08d73ad8b31e0b81d776efa30b | [
"MIT"
] | null | null | null | examples/spot/gift_card/gift_card_redeem_code.py | Banging12/binance-connector-python | dc6fbbd0bb64fb08d73ad8b31e0b81d776efa30b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import logging
from binance.spot import Spot as Client
from binance.lib.utils import config_logging
config_logging(logging, logging.DEBUG)
key = ""
secret = ""
client = Client(key, secret)
logger = logging.getLogger(__name__)
response = client.gift_card_redeem_code("<the_code_to_redeem>")
log... | 19.941176 | 63 | 0.778761 |
65318343bbb760a8e01f8f5ecc49f967da3f0bcc | 3,552 | py | Python | setup.py | NeonGeckoCom/neon_speech | 8a6c9881967191d24d5d61ca76c16f1a8ddba1de | [
"BSD-3-Clause"
] | null | null | null | setup.py | NeonGeckoCom/neon_speech | 8a6c9881967191d24d5d61ca76c16f1a8ddba1de | [
"BSD-3-Clause"
] | 13 | 2021-09-02T22:49:46.000Z | 2022-03-31T01:21:19.000Z | setup.py | NeonGeckoCom/neon_speech | 8a6c9881967191d24d5d61ca76c16f1a8ddba1de | [
"BSD-3-Clause"
] | 3 | 2021-06-03T06:47:33.000Z | 2021-07-21T16:43:38.000Z | # NEON AI (TM) SOFTWARE, Software Development Kit & Application Development System
# All trademark and other rights reserved by their respective owners
# Copyright 2008-2021 Neongecko.com Inc.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# followin... | 47.36 | 116 | 0.704955 |
a220af81af6c1a910236f307b2da7e7c20a6adae | 1,609 | py | Python | lib/newman_conway.py | nguyenmichelleh/dynamic-programming | e90affd20614f198349ba61c097413c2217d09c4 | [
"MIT"
] | null | null | null | lib/newman_conway.py | nguyenmichelleh/dynamic-programming | e90affd20614f198349ba61c097413c2217d09c4 | [
"MIT"
] | null | null | null | lib/newman_conway.py | nguyenmichelleh/dynamic-programming | e90affd20614f198349ba61c097413c2217d09c4 | [
"MIT"
] | null | null | null | # Please note that I referenced the GeeksforGeeks solution in order to solve this problem
# I was having trouble figuring out how to use a loop to append to a list given
# the recursive nature of the problem
# Time complexity: ?
# Space Complexity: ?
def newman_conway(num):
""" Returns a list of the Newmanum Conwa... | 27.741379 | 127 | 0.616532 |
96b0127aed8eb540f5bb2acd33953e141a10ec7d | 3,605 | py | Python | SkylifterDevOp/CollectDevOp.py | silvique-ms/SkyLifter | 72299cd0275958061b46de9fcf8856a7e5d3f11c | [
"Unlicense"
] | 1 | 2019-12-09T12:12:32.000Z | 2019-12-09T12:12:32.000Z | SkylifterDevOp/CollectDevOp.py | silvique-ms/SkyLifter | 72299cd0275958061b46de9fcf8856a7e5d3f11c | [
"Unlicense"
] | null | null | null | SkylifterDevOp/CollectDevOp.py | silvique-ms/SkyLifter | 72299cd0275958061b46de9fcf8856a7e5d3f11c | [
"Unlicense"
] | null | null | null | #! /Library/Frameworks/Python.framework/Versions/2.7/bin/python
"""A library to connect to vMX and collect DevOp - RPC and Table&views information"""
# Copyright (c) 2017 Silvia Murgescu
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation fi... | 45.0625 | 123 | 0.64466 |
ccd206c994626e0e077d446492b4400bd9398fd8 | 2,757 | py | Python | funcx/executors/high_throughput/container_sched.py | NickolausDS/funcX | 94420221453aa2be65d259244968a94a12104a4a | [
"Apache-2.0"
] | null | null | null | funcx/executors/high_throughput/container_sched.py | NickolausDS/funcX | 94420221453aa2be65d259244968a94a12104a4a | [
"Apache-2.0"
] | null | null | null | funcx/executors/high_throughput/container_sched.py | NickolausDS/funcX | 94420221453aa2be65d259244968a94a12104a4a | [
"Apache-2.0"
] | null | null | null |
import math
import random
def naive_scheduler(task_qs, max_workers, old_worker_map, to_die_list, logger):
""" Return two items (as one tuple) dict kill_list :: KILL [(worker_type, num_kill), ...]
dict create_list :: CREATE [(worker_type, num_create), ...]
In this ... | 34.4625 | 154 | 0.60428 |
34a0b2ec8eca249f82b90be79dd0d0f7841833e2 | 5,635 | py | Python | httpclient.py | nasif92/CMPUT404-assignment-web-client | 5584f55a79d9294a1f8f9470151b13fed906f35f | [
"Apache-2.0"
] | null | null | null | httpclient.py | nasif92/CMPUT404-assignment-web-client | 5584f55a79d9294a1f8f9470151b13fed906f35f | [
"Apache-2.0"
] | null | null | null | httpclient.py | nasif92/CMPUT404-assignment-web-client | 5584f55a79d9294a1f8f9470151b13fed906f35f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
# Copyright 2016 Abram Hindle, https://github.com/tywtyw2002, and https://github.com/treedust
# Copyright 2022 Nasif Hossain
#
# 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 co... | 31.480447 | 93 | 0.592724 |
5835de93b46ee0ded84072d8194bedb9179f356f | 3,788 | py | Python | Flask/app.py | jeffhoffmanmba/sqlalchemy-challenge | 505abc793825a02ba0790be79a28117b587c1048 | [
"ADSL"
] | null | null | null | Flask/app.py | jeffhoffmanmba/sqlalchemy-challenge | 505abc793825a02ba0790be79a28117b587c1048 | [
"ADSL"
] | null | null | null | Flask/app.py | jeffhoffmanmba/sqlalchemy-challenge | 505abc793825a02ba0790be79a28117b587c1048 | [
"ADSL"
] | null | null | null | # 1. Import Flask
import numpy as np
import os
import sqlalchemy
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import Session
from sqlalchemy import create_engine, func
import pandas as pd
import datetime as dt
from flask import Flask, jsonify
os.chdir(os.path.dirname(os.path.abspath(__file__... | 29.826772 | 167 | 0.627244 |
f81aee5372d05710b87e69985b15d6c98861ec3c | 1,583 | py | Python | resource/__init__.py | jicarretero/lcp | a1acb1c88da28502f92c23deea687616577b76fa | [
"MIT"
] | null | null | null | resource/__init__.py | jicarretero/lcp | a1acb1c88da28502f92c23deea687616577b76fa | [
"MIT"
] | null | null | null | resource/__init__.py | jicarretero/lcp | a1acb1c88da28502f92c23deea687616577b76fa | [
"MIT"
] | null | null | null | from resource.code import Code_Resource
from resource.config import Config_Resource
from resource.status import Status_Resource
from resource.software_definition import SoftwareDefinition, SoftwareDefinitionById, ContainerDefinition
from resource.lcp_resources import SonRequestIdentificationById, SonLCPIdentification, ... | 42.783784 | 120 | 0.804801 |
323d3c0a01f37bd5cbf4e28844e66549aa4b9a57 | 6,074 | py | Python | fink_science/snn/processor.py | emilleishida/fink-science | 42fe5d4624fc9aadd85b8ab9078307cb6c455cfe | [
"Apache-2.0"
] | null | null | null | fink_science/snn/processor.py | emilleishida/fink-science | 42fe5d4624fc9aadd85b8ab9078307cb6c455cfe | [
"Apache-2.0"
] | null | null | null | fink_science/snn/processor.py | emilleishida/fink-science | 42fe5d4624fc9aadd85b8ab9078307cb6c455cfe | [
"Apache-2.0"
] | null | null | null | # Copyright 2020-2022 AstroLab Software
# Author: Julien Peloton
#
# 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 appl... | 33.191257 | 117 | 0.652453 |
d7f04295e31326fb3ac2594e788aa3d38875080b | 1,342 | py | Python | compas_fofin/examples/rhino_irpc.py | BlockResearchGroup/WS_cluster | 8ed9c2f4dde0cfddbc1a088ca740518489ff1e9e | [
"MIT"
] | null | null | null | compas_fofin/examples/rhino_irpc.py | BlockResearchGroup/WS_cluster | 8ed9c2f4dde0cfddbc1a088ca740518489ff1e9e | [
"MIT"
] | 3 | 2019-03-04T22:56:47.000Z | 2019-03-06T18:48:29.000Z | compas_fofin/examples/rhino_irpc.py | BlockResearchGroup/WS_cluster | 8ed9c2f4dde0cfddbc1a088ca740518489ff1e9e | [
"MIT"
] | 1 | 2021-12-05T21:56:21.000Z | 2021-12-05T21:56:21.000Z | import os
from compas_fofin.datastructures import Cablenet
from compas_fofin.rhino import CablenetArtist
from compas_fofin.rhino import CablenetHelper
from compas.rpc import Proxy
HERE = os.path.dirname(__file__)
DATA = os.path.join(HERE, '..', '..', 'data')
FILE = os.path.join(DATA, 'saddle.obj')
proxy = Proxy('comp... | 25.320755 | 102 | 0.726528 |
c9799ee61b5de321d85abda6e68e7695737deed7 | 1,631 | py | Python | lib/surface/iam/service_accounts/get_iam_policy.py | bopopescu/SDK | e6d9aaee2456f706d1d86e8ec2a41d146e33550d | [
"Apache-2.0"
] | null | null | null | lib/surface/iam/service_accounts/get_iam_policy.py | bopopescu/SDK | e6d9aaee2456f706d1d86e8ec2a41d146e33550d | [
"Apache-2.0"
] | null | null | null | lib/surface/iam/service_accounts/get_iam_policy.py | bopopescu/SDK | e6d9aaee2456f706d1d86e8ec2a41d146e33550d | [
"Apache-2.0"
] | 1 | 2020-07-25T12:23:41.000Z | 2020-07-25T12:23:41.000Z | # Copyright 2015 Google Inc. 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 applicable law or ag... | 33.979167 | 74 | 0.702636 |
ec338d3fb497c4bf1795b847801dfd1875b3d52f | 611 | py | Python | binarysearch.py | darkdebo/python_codes | 5644482b7a7cb4d775de0194bae84024e24bfcaf | [
"MIT"
] | null | null | null | binarysearch.py | darkdebo/python_codes | 5644482b7a7cb4d775de0194bae84024e24bfcaf | [
"MIT"
] | 1 | 2019-09-03T10:15:36.000Z | 2019-09-03T10:15:36.000Z | binarysearch.py | darkdebo/python_codes | 5644482b7a7cb4d775de0194bae84024e24bfcaf | [
"MIT"
] | null | null | null | def binary_search(l,ele_to_search):
i=0
while i<len(l):
if l[(len(l)-1)//2]==ele_to_search:
return f"index is {(len(l)-1)//2} and element is {ele_to_search}"
elif ele_to_search>l[(len(l)-1)//2]:
if ele_to_search==l[(len(l)-1)//2+i]:
return f"index is {(len(l)-1)//2+i} and element is {ele_to_searc... | 33.944444 | 76 | 0.569558 |
aa5c98f48cc85e0325b60804f5203764c46868a2 | 7,203 | py | Python | endpoint/vist/api_1_0/vist_record.py | lsqypro/PVSysteam | 6b67be509275af6cb6f77f797440827fd0297295 | [
"Apache-2.0"
] | null | null | null | endpoint/vist/api_1_0/vist_record.py | lsqypro/PVSysteam | 6b67be509275af6cb6f77f797440827fd0297295 | [
"Apache-2.0"
] | null | null | null | endpoint/vist/api_1_0/vist_record.py | lsqypro/PVSysteam | 6b67be509275af6cb6f77f797440827fd0297295 | [
"Apache-2.0"
] | null | null | null | #coding:utf-8
from logging import error, log
from . import api
from vist.utils.commons import check_user, check_admin, check_system, check_relation, check_prisoner
from flask import g, current_app, jsonify, request, session
from config import RET, Constants
from vist.utils.objectstorage.imagestorage import put_image_d... | 31.047414 | 153 | 0.644176 |
2a43a38a7f1fce52c96235f3a8d587f042064805 | 52,973 | py | Python | EQTransformer/core/mseed_predictor.py | iceseismic/EQTransformer | 195559f9728604906b9c4352a2f1f782541a0533 | [
"MIT"
] | 1 | 2021-02-07T18:59:34.000Z | 2021-02-07T18:59:34.000Z | EQTransformer/core/mseed_predictor.py | Hernando7/EQTransformer | 2061c8b882e6c1c8040e1588f69c5841e1068fdb | [
"MIT"
] | null | null | null | EQTransformer/core/mseed_predictor.py | Hernando7/EQTransformer | 2061c8b882e6c1c8040e1588f69c5841e1068fdb | [
"MIT"
] | 1 | 2021-04-14T07:20:09.000Z | 2021-04-14T07:20:09.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 21 21:55:54 2020
@author: mostafamousavi
last update: 06/28/2020
"""
from __future__ import print_function
from __future__ import division
from keras import backend as K
from keras.models import load_model
from keras.optimizers import Adam
import... | 38.922116 | 222 | 0.493534 |
b891acc75f821e0c921653d3784ec93f6c5e901a | 2,394 | py | Python | source/measures/invCL.py | marcos0318/UnsupervisedHypernymy | 79e20a74588132b04eca9e64638eb14adbb1bda9 | [
"Apache-2.0"
] | 51 | 2016-12-12T14:44:08.000Z | 2021-12-14T09:04:49.000Z | source/measures/invCL.py | marcos0318/UnsupervisedHypernymy | 79e20a74588132b04eca9e64638eb14adbb1bda9 | [
"Apache-2.0"
] | 4 | 2018-05-25T13:54:23.000Z | 2019-10-30T17:46:12.000Z | source/measures/invCL.py | marcos0318/UnsupervisedHypernymy | 79e20a74588132b04eca9e64638eb14adbb1bda9 | [
"Apache-2.0"
] | 12 | 2017-01-10T03:02:37.000Z | 2020-03-12T07:04:09.000Z | import sys
sys.path.append('../')
import math
import codecs
from common import *
from docopt import docopt
from clarkeDE import clarkeDE
from dsm_creation.common import *
def main():
"""
invCL - as described in:
A. Lenci and G. Benotto. 2012. Identifying hypernyms in distributional semantic spaces. In *... | 30.303797 | 106 | 0.615288 |
ae2b32870593fba9adaf9ea5cd703e0989e7e7ea | 4,688 | py | Python | huaweicloud-sdk-kms/huaweicloudsdkkms/v1/model/version.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-kms/huaweicloudsdkkms/v1/model/version.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-kms/huaweicloudsdkkms/v1/model/version.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class Version:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribu... | 28.071856 | 86 | 0.59023 |
793e32667921799dab9bef990d269426fbadcace | 300,811 | py | Python | run_unittests.py | marxin/meson | cd12a6fc391782fc9101f71e7bef56590358f06c | [
"Apache-2.0"
] | null | null | null | run_unittests.py | marxin/meson | cd12a6fc391782fc9101f71e7bef56590358f06c | [
"Apache-2.0"
] | null | null | null | run_unittests.py | marxin/meson | cd12a6fc391782fc9101f71e7bef56590358f06c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2016-2017 The Meson development team
# 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 ... | 45.73681 | 199 | 0.588539 |
b732dfa4da5173863c0988fd05c5fd2f1041f86b | 4,895 | py | Python | Python/Abhishek_Pratap_Singh-Railway_Announcement_System/main.py | lakhan098/Technocrats-HacktoberFest | 33968cf36747ec2342d53b8c38c2a48fc71be017 | [
"MIT"
] | 11 | 2021-10-01T15:39:40.000Z | 2021-10-12T16:33:03.000Z | Python/Abhishek_Pratap_Singh-Railway_Announcement_System/main.py | lakhan098/Technocrats-HacktoberFest | 33968cf36747ec2342d53b8c38c2a48fc71be017 | [
"MIT"
] | 62 | 2021-10-01T14:40:32.000Z | 2021-10-31T14:47:21.000Z | Python/Abhishek_Pratap_Singh-Railway_Announcement_System/main.py | lakhan098/Technocrats-HacktoberFest | 33968cf36747ec2342d53b8c38c2a48fc71be017 | [
"MIT"
] | 71 | 2021-10-01T14:42:03.000Z | 2021-10-21T15:51:24.000Z | import os
import pandas as pd
from pydub import AudioSegment
from gtts import gTTS
def textToSpeech(text, filename, language):
mytext = str(text)
myobj = gTTS(text=mytext, lang=language, slow=False)
myobj.save(filename)
# This function returns pydub audio segments
def mergeAudios(audios):
combined =... | 28.132184 | 125 | 0.637998 |
5eda29601e335a90b12ef984616b9245f79d6731 | 1,247 | py | Python | google/ads/googleads/v8/services/types/currency_constant_service.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | 285 | 2018-10-05T16:47:58.000Z | 2022-03-31T00:58:39.000Z | google/ads/googleads/v8/services/types/currency_constant_service.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | 425 | 2018-09-10T13:32:41.000Z | 2022-03-31T14:50:05.000Z | google/ads/googleads/v8/services/types/currency_constant_service.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | 369 | 2018-11-28T07:01:00.000Z | 2022-03-28T09:53:22.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 31.175 | 128 | 0.732959 |
34e7905e07486a15b0c10fe4a4fac72474abe977 | 3,866 | py | Python | fastai/dataloader.py | RyotaMono/fastai | 7b6c3ef9b561eadfc3edad3df055801a5468a430 | [
"Apache-2.0"
] | 4 | 2018-03-29T20:47:24.000Z | 2019-05-06T12:31:11.000Z | fastai/dataloader.py | RyotaMono/fastai | 7b6c3ef9b561eadfc3edad3df055801a5468a430 | [
"Apache-2.0"
] | null | null | null | fastai/dataloader.py | RyotaMono/fastai | 7b6c3ef9b561eadfc3edad3df055801a5468a430 | [
"Apache-2.0"
] | 1 | 2021-06-17T06:28:16.000Z | 2021-06-17T06:28:16.000Z | import torch, queue
from torch.utils.data.sampler import SequentialSampler, RandomSampler, BatchSampler
from .imports import *
from .core import *
import collections,sys,traceback,threading
string_classes = (str, bytes)
def get_tensor(batch, pin):
if isinstance(batch, (np.ndarray, np.generic)):
batch = T... | 44.953488 | 105 | 0.645887 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.