blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 288 | content_id stringlengths 40 40 | detected_licenses listlengths 0 112 | license_type stringclasses 2
values | repo_name stringlengths 5 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 684
values | visit_date timestamp[us]date 2015-08-06 10:31:46 2023-09-06 10:44:38 | revision_date timestamp[us]date 1970-01-01 02:38:32 2037-05-03 13:00:00 | committer_date timestamp[us]date 1970-01-01 02:38:32 2023-09-06 01:08:06 | github_id int64 4.92k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-04 01:52:49 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-21 12:35:19 ⌀ | gha_language stringclasses 147
values | src_encoding stringclasses 25
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 128 12.7k | extension stringclasses 142
values | content stringlengths 128 8.19k | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
867c39b81f0bd2f14694cd585a733a351b7c50fa | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/adjectives/_spinier.py | 0482c9921fbb9ca2d0ffe46b31b1181f2f50e5f1 | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 243 | py |
from xai.brain.wordbase.adjectives._spiny import _SPINY
#calss header
class _SPINIER(_SPINY, ):
def __init__(self,):
_SPINY.__init__(self)
self.name = "SPINIER"
self.specie = 'adjectives'
self.basic = "spiny"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
00a109d7ceb3af65458a2708817bd3fcbd90c405 | 38f19ae4963df9be7a851458e63ffb94d824eb03 | /stellar_sdk/__version__.py | 328854e119791d65c471bc64c026b784c86512b9 | [
"Apache-2.0"
] | permissive | brunodabo/py-stellar-base | e033da687e3a2a76076cfed88e82c7951ae4e57e | 7897a23bc426324cb389a7cdeb695dfce10a673f | refs/heads/master | 2022-11-05T12:35:37.140735 | 2020-06-03T13:41:30 | 2020-06-03T13:54:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 860 | py | """
_____ _______ ______ _ _ _____ _____ _____ _ __
/ ____|__ __| ____| | | | /\ | __ \ / ____| __ \| |/ /
| (___ | | | |__ | | | | / \ | |__) |____| (___ | | | | ' /
\___ \ | | | __| | | | | / /\ \ | _ /______\___ \| | | | <
_... | [
"4catcode@gmail.com"
] | 4catcode@gmail.com |
ceb03e78d5da369eaa15cfadb539d06f2ad3979b | c3e2f56672e01590dc7dc7e184f30c2884ce5d3a | /Programs/MyPythonXII/Unit1/PyChap03/summatrix.py | a00722d07d1ce3b80baa6858b737eb411c6ad68e | [] | no_license | mridulrb/Basic-Python-Examples-for-Beginners | ef47e830f3cc21cee203de2a7720c7b34690e3e1 | 86b0c488de4b23b34f7424f25097afe1874222bd | refs/heads/main | 2023-01-04T09:38:35.444130 | 2020-10-18T15:59:29 | 2020-10-18T15:59:29 | 305,129,417 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,941 | py | # File name: ...\\MyPythonXII\Unit1\PyChap03\summatrix.py
# Program to add two matrices
# Declaration of three 10 x 10 matrices
A = [[0 for x in range(10)] for x in range(10)]
B = [[0 for x in range(10)] for x in range(10)]
C = [[0 for x in range(10)] for x in range(10)]
print("Enter the number of Rows of ... | [
"mridurb@gmail.com"
] | mridurb@gmail.com |
5581f1877e0859073d8bad360dbf8d6e6b5ed449 | 43949d3f05bf1d1212cc25fd5766a47940723f7b | /generators/gen.py | 5202bb3d33b604cfc3856de4de253eacca2d802f | [] | no_license | asing177/python_programs | f6aa5b53b6f0b2d8c824c8b796ca77d8a1121110 | dfa18f7ec6bd0eb29311a393e011d89dac1a7e26 | refs/heads/master | 2020-12-21T14:39:27.761117 | 2020-02-06T08:12:32 | 2020-02-06T08:12:32 | 236,462,869 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 290 | py | def my_gen():
n = 1
print('This is printed first')
# Generator function contains yield statements
yield n
n += 1
print('This is printed second')
yield n
n += 1
print('This is printed at last')
yield n
a = my_gen()
next(a)
next(a)
next(a)
next(a) | [
"adityasingh27@hotmail.com"
] | adityasingh27@hotmail.com |
1b58373ac66d0ddb7dc9aeda27c62602f8569f74 | de707c94c91f554d549e604737b72e6c86eb0755 | /math/0x01-plotting/2-change_scale.py | 480bf1b1af07c3d6f3b678dbbd1083ba7969a535 | [] | no_license | ejonakodra/holbertonschool-machine_learning-1 | 885cf89c1737573228071e4dc8e26304f393bc30 | 8834b201ca84937365e4dcc0fac978656cdf5293 | refs/heads/main | 2023-07-10T09:11:01.298863 | 2021-08-11T03:43:59 | 2021-08-11T03:43:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 393 | py | #!/usr/bin/env python3
""" plots x, y as a line graph where y-axis is scaled logarithmically """
import numpy as np
import matplotlib.pyplot as plt
x = np.arange(0, 28651, 5730)
r = np.log(0.5)
t = 5730
y = np.exp((r / t) * x)
plt.plot(x, y)
plt.xlabel('Time (years)')
plt.ylabel('Fraction Remaining')
plt.title("Expon... | [
"eislek02@gmail.com"
] | eislek02@gmail.com |
1c3fe0cc2873b5858a438ae7dbeaf43f1ace5c25 | 8c6466e12bb3351031c25677127dc86d13bd9b19 | /Project data Modelling with Postgress/sql_queries.py | 09f272907dc0ece9579ce135decdb08810006f0f | [] | no_license | andreodendaal/udacity_data_engineering | ac8eb889db002014b3ccf1fe15b16f77361b8d55 | 03524ffbd1830d168761fcc996cab329dd064977 | refs/heads/master | 2020-05-05T09:24:02.921194 | 2020-01-15T20:22:14 | 2020-01-15T20:22:14 | 179,902,884 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,481 | py | # DROP TABLES
songplay_table_drop = "DROP TABLE IF EXISTS songplays;"
user_table_drop = "DROP TABLE IF EXISTS users;"
song_table_drop = "DROP TABLE IF EXISTS songs;"
artist_table_drop = "DROP TABLE IF EXISTS artists;"
time_table_drop = "DROP TABLE IF EXISTS songplays;"
# CREATE TABLES
songplay_table_create = ("""CRE... | [
"aodendaal.direct@gmail.com"
] | aodendaal.direct@gmail.com |
d485cc88de5469d66c7dbc503dbb0e3206144138 | b1ffcbd977595bccf15dd56e965bda62867d1e10 | /omrdatasettools/downloaders/PrintedMusicSymbolsDatasetDownloader.py | 818cb93eca0478aa48e520f084374eba04cbd048 | [
"CC-BY-NC-SA-4.0",
"GPL-2.0-only",
"CC-BY-SA-3.0",
"MIT",
"GPL-1.0-or-later",
"CC-BY-SA-4.0",
"LicenseRef-scancode-public-domain",
"AGPL-3.0-only"
] | permissive | fzalkow/OMR-Datasets | 7ded5bb9278e47c84a16de01081876d6bb2e6dbe | c9e7a986199998d6a735875503e6dcce5fdf1193 | refs/heads/master | 2020-09-14T15:30:45.824800 | 2020-01-06T12:07:52 | 2020-01-06T12:07:52 | 223,169,792 | 0 | 0 | MIT | 2019-11-21T12:32:31 | 2019-11-21T12:32:30 | null | UTF-8 | Python | false | false | 1,896 | py | import argparse
import os
from omrdatasettools.downloaders.DatasetDownloader import DatasetDownloader
class PrintedMusicSymbolsDatasetDownloader(DatasetDownloader):
""" Loads the Printed Music Symbols dataset
https://github.com/apacha/PrintedMusicSymbolsDataset
Copyright 2017 by Alexander Pacha u... | [
"alexander.pacha@gmail.com"
] | alexander.pacha@gmail.com |
333c48d27ec8d5b0ea5633bffadd6e27638c0522 | 315450354c6ddeda9269ffa4c96750783963d629 | /CMSSW_7_0_4/src/Configuration/TotemCommon/python/__init__.py | 6cf341a440a2c973942ba5aad7ebac154203e274 | [] | no_license | elizamelo/CMSTOTEMSim | e5928d49edb32cbfeae0aedfcf7bd3131211627e | b415e0ff0dad101be5e5de1def59c5894d7ca3e8 | refs/heads/master | 2021-05-01T01:31:38.139992 | 2017-09-12T17:07:12 | 2017-09-12T17:07:12 | 76,041,270 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 202 | py | #Automatically created by SCRAM
import os
__path__.append(os.path.dirname(os.path.abspath(__file__).rsplit('/Configuration/TotemCommon/',1)[0])+'/cfipython/slc6_amd64_gcc481/Configuration/TotemCommon')
| [
"eliza@cern.ch"
] | eliza@cern.ch |
5ddfb724efcc821a79c4e342fe9315c9e87c4d99 | 038e6e41d117431869edad4952a5b1463d5131bc | /donations/urls.py | f1cd42016e4516213c853992d4476f9cab832f42 | [
"MIT"
] | permissive | MikaelSantilio/aprepi-django | c49290855b7c83ecaf08de82ee9eedf8e8baa15a | 5e2b5ecffb287eab929c0759ea35ab073cc19d96 | refs/heads/master | 2023-06-19T00:18:15.986920 | 2021-06-15T20:15:59 | 2021-06-15T20:15:59 | 329,428,268 | 0 | 1 | MIT | 2021-02-05T16:21:45 | 2021-01-13T20:50:18 | Python | UTF-8 | Python | false | false | 1,043 | py | from django.urls import path
from donations import views
app_name = "donations"
urlpatterns = [
path('', views.MakeDonation.as_view(), name='unique-donation'),
path('historico/', views.DonationListView.as_view(), name='list'),
# path('checkout/<str:value>', views.MPCheckout.as_view(), name='mp-checkout'),... | [
"mikael.santilio@gmail.com"
] | mikael.santilio@gmail.com |
427ad4d206db8a5e4f376c716b47b039b82fba5a | 033da72a51c76e5510a06be93229a547a538cf28 | /Data Engineer with Python Track/03. Streamlined Data Ingestion with Pandas/Chapter/03. Importing Data from Databases/03-Selecting columns with SQL.py | 9ce77ea8c2536cbf0133ba6d5c5008e87273de10 | [] | no_license | ikhwan1366/Datacamp | d5dcd40c1bfeb04248977014260936b1fb1d3065 | 7738614eaebec446842d89177ae2bc30ab0f2551 | refs/heads/master | 2023-03-06T13:41:06.522721 | 2021-02-17T22:41:54 | 2021-02-17T22:41:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,327 | py | '''
Selecting columns with SQL
Datasets can contain columns that are not required for an analysis, like the weather table in data.db does. Some, such as elevation, are redundant, since all observations occurred at the same place, while others contain variables we are not interested in. After making a database engine,... | [
"surel.chandrapratama@gmail.com"
] | surel.chandrapratama@gmail.com |
27c0b921e96a11906286be5d2fb8bac1c678ad1c | 20c20938e201a0834ccf8b5f2eb5d570d407ad15 | /abc152/abc152_f/9661160.py | 040bdabbffd7805e7f362fb6eff11285789dc375 | [] | no_license | kouhei-k/atcoder_submissions | 8e1a1fb30c38e0d443b585a27c6d134bf1af610a | 584b4fd842ccfabb16200998fe6652f018edbfc5 | refs/heads/master | 2021-07-02T21:20:05.379886 | 2021-03-01T12:52:26 | 2021-03-01T12:52:26 | 227,364,764 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,354 | py | import collections
from itertools import combinations
N = int(input())
ab = [tuple(map(int, input().split())) for i in range(N-1)]
M = int(input())
uv = [tuple(map(int, input().split())) for i in range(M)]
def popcount(x):
x = x - ((x >> 1) & 0x5555555555555555)
x = (x & 0x3333333333333333) + ((x >> 2) & 0x33... | [
"kouhei.k.0116@gmail.com"
] | kouhei.k.0116@gmail.com |
f37bf6d7e69087bad285023e03ef4723bb8ba36b | 397e125e94f4f139f2bf5055824d81f24b8b1757 | /ABC/145/B.py | c96cb419eb5372858a0ff144fa21e734a83f0e9e | [] | no_license | tails1434/Atcoder | ecbab6ee238e3f225551297db961b1b502841fa4 | e7c7fed36be46bbaaf020a70997842240ba98d62 | refs/heads/master | 2021-07-07T00:31:49.235625 | 2020-09-30T01:42:01 | 2020-09-30T01:42:01 | 189,009,622 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 265 | py | def main():
N = int(input())
S = input()
if N % 2 != 0:
print('No')
else:
A = S[:N//2]
B = S[N//2:N]
if A == B:
print('Yes')
else:
print('No')
if __name__ == "__main__":
main() | [
"sososo1333@gmail.com"
] | sososo1333@gmail.com |
9900fb23966c7170f49463766fb9144b67096696 | 6323bd983f6304d95e62909bfc4883d2f9ef1a14 | /Leetcode/Medium/Range Sum query.py | 4e7d5a0537c1ad2d9022d5981e76015b68d98328 | [] | no_license | akshay-sahu-dev/PySolutions | 4c2d67d5f66fe83a6e302e1742a5bf17dafe2b99 | 83552962805768914034a284bf39197f52ca5017 | refs/heads/master | 2023-06-17T06:36:50.252943 | 2021-07-09T17:28:53 | 2021-07-09T17:28:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 355 | py | ## https://leetcode.com/problems/range-sum-query-immutable
class NumArray:
def __init__(self, nums: List[int]):
self.nums = nums
def sumRange(self, i: int, j: int) -> int:
return sum(self.nums[i:j+1])
# Your NumArray object will be instantiated and called as such:
# obj = NumArray(... | [
"akki5233@gmail.com"
] | akki5233@gmail.com |
d81bf82845c2f8e12980533f9d59d8e047901438 | e07da133c4efa517e716af2bdf67a46f88a65b42 | /hub20/apps/blockchain/management/commands/sync_blockchain.py | b28399a2a20dc1fa41b00b74038c1e23e9e449e6 | [
"MIT"
] | permissive | cryptobuks1/hub20 | be1da5f77a884f70068fd41edaa45d5e65b7c35e | 3a4d9cf16ed9d91495ac1a28c464ffb05e9f837b | refs/heads/master | 2022-04-19T21:26:15.386567 | 2020-04-19T07:17:47 | 2020-04-19T07:17:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,304 | py | import asyncio
import logging
from django.core.management.base import BaseCommand
from hub20.apps.blockchain.app_settings import START_BLOCK_NUMBER
from hub20.apps.blockchain.models import Block, make_web3
logger = logging.getLogger(__name__)
def split_block_lists(block_numbers, group_size=25):
for n in range(... | [
"raphael@lullis.net"
] | raphael@lullis.net |
ade677f8e988685507a1c948ac73be652ce39b49 | f0d3b759d9b0d2000cea2c291a4974e157651216 | /apps/goods/migrations/0001_initial.py | 303ea309f8cf6f7ee582bdc2901bd642b7490841 | [] | no_license | PYBPYB/Fresh-every-day | 526265ae0a9b1fe8e8f8944e0320ea8a47b8571c | 5b62fda9effe327a5da9ce45644bf44ee9d7108f | refs/heads/master | 2020-04-12T14:39:31.325736 | 2019-05-31T02:31:54 | 2019-05-31T02:31:54 | 162,558,199 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,310 | py | # Generated by Django 2.1.3 on 2018-11-26 09:10
from django.db import migrations, models
import django.db.models.deletion
import tinymce.models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Goods',
... | [
"you@example.com"
] | you@example.com |
e3656c3a8b753864e8154ec4f8a46ac7e789e3b0 | 9decd5901a491d08e9235abc7fb8dade362d215e | /pastepwn/database/__init__.py | d67e426275658725e14ea82b809b9e95828cb0b9 | [
"MIT"
] | permissive | jonahrosenblum/pastepwn | b4e7644fefd289d8ffb2a1cc6e77224dd1545c46 | 26c9e426a195d403894f00638eca6c5687cbd959 | refs/heads/master | 2021-01-02T22:03:26.922322 | 2020-02-04T23:36:08 | 2020-02-04T23:36:08 | 239,809,524 | 0 | 0 | MIT | 2020-02-11T16:27:06 | 2020-02-11T16:27:05 | null | UTF-8 | Python | false | false | 209 | py | # -*- coding: utf-8 -*-
from .abstractdb import AbstractDB
from .mongodb import MongoDB
from .mysqldb import MysqlDB
from .sqlitedb import SQLiteDB
__all__ = ('AbstractDB', 'MongoDB', 'SQLiteDB', 'MysqlDB')
| [
"d-Rickyy-b@users.noreply.github.com"
] | d-Rickyy-b@users.noreply.github.com |
be0d795ee4a482be60cebd7782452cdb1ec3243e | 5593b35f326748f18053e7ea042c98fe6b70a850 | /tqt/function/_utils.py | fcfe437056c27c6c9f5efbfe6e9d8517486bdff4 | [
"BSD-3-Clause"
] | permissive | sicdl/TQT | 7dfe3bce2bb5dace9a467945512e65525a0c3be9 | 27b73fcf27ddfb67cd28f6ed27e49341f27c9f16 | refs/heads/main | 2023-04-14T18:28:23.224689 | 2021-04-22T14:46:46 | 2021-04-22T14:46:46 | 362,503,682 | 0 | 0 | BSD-3-Clause | 2021-04-28T14:45:14 | 2021-04-28T14:45:13 | null | UTF-8 | Python | false | false | 153 | py | import torch
def number_to_tensor(x, t):
r'''
Turn x in to a tensor with data type like tensor t.
'''
return torch.tensor(x).type_as(t) | [
"you@example.com"
] | you@example.com |
f7322bfe24f366e1da7e22987d6cb7ed70e9b213 | 2031771d8c226806a0b35c3579af990dd0747e64 | /pyobjc-framework-SecurityInterface/PyObjCTest/test_sfchooseidentitypanel.py | 128a8fe463da4b1756ea2b16a7730993712ab6e7 | [
"MIT"
] | permissive | GreatFruitOmsk/pyobjc-mirror | a146b5363a5e39181f09761087fd854127c07c86 | 4f4cf0e4416ea67240633077e5665f5ed9724140 | refs/heads/master | 2018-12-22T12:38:52.382389 | 2018-11-12T09:54:18 | 2018-11-12T09:54:18 | 109,211,701 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 830 | py | from PyObjCTools.TestSupport import *
import SecurityInterface
class TestSFChooseIdentityPanelHelper (SecurityInterface.NSObject):
def chooseIdentityPanelShowHelp_(self, v): return 1
class TestSFChooseIdentityPanel (TestCase):
def test_classes(self):
SecurityInterface.SFChooseIdentityPanel
def t... | [
"ronaldoussoren@mac.com"
] | ronaldoussoren@mac.com |
307afce7174d1f60914d4a08060660c34b82e628 | 794be26e4ab7bdd9af017ce1d0c6ce1f087d968d | /functional_tests/test_create.py | b0b5e0c8678060723a0834273615afdbe0ad3866 | [
"Apache-2.0",
"LGPL-3.0-only"
] | permissive | jasinner/elliott | 02fcc2f67b56d4e16eef28f0323d276fbd954593 | 67d77913517d0f7954dc02d918eb96ba78ec1ea8 | refs/heads/master | 2021-06-18T19:59:45.878716 | 2021-04-29T21:33:51 | 2021-04-29T21:33:51 | 215,217,286 | 0 | 0 | Apache-2.0 | 2019-10-15T05:52:13 | 2019-10-15T05:52:13 | null | UTF-8 | Python | false | false | 662 | py | from __future__ import absolute_import, print_function, unicode_literals
import unittest
import subprocess
from functional_tests import constants
class GreateTestCase(unittest.TestCase):
def test_create_rhba(self):
out = subprocess.check_output(
constants.ELLIOTT_CMD
+ [
... | [
"yuxzhu@redhat.com"
] | yuxzhu@redhat.com |
38f612204aaf7a5bb92d2ddfc8514649d07bdcad | a73cc710aa370be94b70248f2268d9c3b14059d0 | /server/src/weblab/core/web/quickadmin.py | 1fba2f6ba62d2380539e03e37e0669230626b289 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | weblabdeusto/weblabdeusto | 05692d4cc0a36287191544551d4a1113b3d95164 | 62e488afac04242a68efa4eb09fd91d7e999d4dd | refs/heads/master | 2023-05-10T23:14:05.407266 | 2022-08-31T14:16:23 | 2022-08-31T14:16:23 | 5,719,299 | 19 | 23 | BSD-2-Clause | 2023-05-01T20:18:53 | 2012-09-07T16:24:03 | Python | UTF-8 | Python | false | false | 7,417 | py | from __future__ import print_function, unicode_literals
import datetime
import calendar
from flask import render_template, request, send_file, Response, url_for
from functools import wraps, partial
from weblab.core.web import weblab_api
from weblab.core.db import UsesQueryParams
def check_credentials(func):
@wraps... | [
"pablo.orduna@deusto.es"
] | pablo.orduna@deusto.es |
a463d23256ed3b7f0178434ea5256ff915ef0430 | 4bb1a23a62bf6dc83a107d4da8daefd9b383fc99 | /work/abc034_d2.py | 4afb3860d7f983c4de267f774fec7425d98c023d | [] | no_license | takushi-m/atcoder-work | 0aeea397c85173318497e08cb849efd459a9f6b6 | f6769f0be9c085bde88129a1e9205fb817bb556a | refs/heads/master | 2021-09-24T16:52:58.752112 | 2021-09-11T14:17:10 | 2021-09-11T14:17:10 | 144,509,843 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 397 | py | n,k = map(int, input().split())
wpl = [list(map(int, input().split())) for _ in range(n)]
def f(w,p,x):
p = p/100
return p*w - w*x
def check(x):
l = [f(wpl[i][0], wpl[i][1], x) for i in range(n)]
l.sort(reverse=True)
return sum(l[:k])>=0
ok = 0
ng = 1
while abs(ng-ok)>10**-7:
mid = (ok+ng)/2
... | [
"takushi-m@users.noreply.github.com"
] | takushi-m@users.noreply.github.com |
061e1a704629d8949be1743454ac0c89316349fb | 54f352a242a8ad6ff5516703e91da61e08d9a9e6 | /Source Codes/AtCoder/agc025/C/2618079.py | c2927f9e67892662b56299b7a9fff478e70376c2 | [] | no_license | Kawser-nerd/CLCDSA | 5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb | aee32551795763b54acb26856ab239370cac4e75 | refs/heads/master | 2022-02-09T11:08:56.588303 | 2022-01-26T18:53:40 | 2022-01-26T18:53:40 | 211,783,197 | 23 | 9 | null | null | null | null | UTF-8 | Python | false | false | 280 | py | n = int(input())
l = []
r = []
for i in range(n):
lt, rt = map(int,input().split())
l.append(lt)
r.append(rt)
l.append(0)
r.append(0)
l.sort()
r.sort()
l.reverse()
ans = 0
i = 0
while r[i]<l[i]:
ans += 2*(l[i] - r[i])
i+=1
print(ans) | [
"kwnafi@yahoo.com"
] | kwnafi@yahoo.com |
594eaa6cce6464e3ce1165188820b67175525a11 | 91d1a6968b90d9d461e9a2ece12b465486e3ccc2 | /opsworks_write_f/rds-db-instance_update.py | 3257b4557a10fe6a781cb6c9086bdfa3b85a8b86 | [] | no_license | lxtxl/aws_cli | c31fc994c9a4296d6bac851e680d5adbf7e93481 | aaf35df1b7509abf5601d3f09ff1fece482facda | refs/heads/master | 2023-02-06T09:00:33.088379 | 2020-12-27T13:38:45 | 2020-12-27T13:38:45 | 318,686,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 805 | py | #!/usr/bin/python
# -*- codding: utf-8 -*-
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
from common.execute_command import write_parameter
# url : https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-instances.html
if __name__ == '__main__... | [
"hcseo77@gmail.com"
] | hcseo77@gmail.com |
766973ba9748fa74c5378e42398721badd887cf3 | 2612f336d667a087823234daf946f09b40d8ca3d | /python/lib/Lib/site-packages/django/utils/decorators.py | 17f2ea30b337f624c0f984698e31aebbb19f6d37 | [
"Apache-2.0"
] | permissive | tnorbye/intellij-community | df7f181861fc5c551c02c73df3b00b70ab2dd589 | f01cf262fc196bf4dbb99e20cd937dee3705a7b6 | refs/heads/master | 2021-04-06T06:57:57.974599 | 2018-03-13T17:37:00 | 2018-03-13T17:37:00 | 125,079,130 | 2 | 0 | Apache-2.0 | 2018-03-13T16:09:41 | 2018-03-13T16:09:41 | null | UTF-8 | Python | false | false | 4,290 | py | "Functions that help with dynamically creating decorators for views."
try:
from functools import wraps, update_wrapper, WRAPPER_ASSIGNMENTS
except ImportError:
from django.utils.functional import wraps, update_wrapper, WRAPPER_ASSIGNMENTS # Python 2.4 fallback.
class classonlymethod(classmethod):
def __g... | [
"dmitry.trofimov@jetbrains.com"
] | dmitry.trofimov@jetbrains.com |
e1a24bee538f55419b12446f7f37bc4f25bc8e38 | 03c8d75d11dd34a253d265ce5b44bf7984311bab | /root2yoda | ddf417c19d865e0e7c684d83a4ebafd3e9738188 | [] | no_license | raggleton/QGAnalysisRIVET | e8a57fbfa1380e1c67365b0d5a944119f715813b | 0703bdf81bf27f5fc91d8eedb6e44651d978749a | refs/heads/master | 2021-06-08T19:29:53.683282 | 2021-04-06T07:22:56 | 2021-04-06T07:22:56 | 142,179,672 | 0 | 1 | null | 2020-11-03T17:19:58 | 2018-07-24T15:40:48 | Gnuplot | UTF-8 | Python | false | false | 1,656 | #! /usr/bin/env python
"""\
%prog rootfile [yodafile]
Convert a ROOT data file to the YODA data format.
"""
import yoda, os, sys, optparse
from yoda.script_helpers import parse_x2y_args, filter_aos
parser = optparse.OptionParser(usage=__doc__)
parser.add_option("-m", "--match", dest="MATCH", metavar="PATT", default... | [
"robin.aggleton@cern.ch"
] | robin.aggleton@cern.ch | |
e0b51af08de583fc6d2449bff3c69e61e59ce414 | 3f3f2b3eaab992d3cc8f49fcd03e4824a11fddab | /diamond.releng.jenkins/job.scripts/email_owners_of_submittable_changes.py | 7bfd821419fa2722938f0131ed624a2ce5f2ba3e | [] | no_license | DiamondLightSource/diamond-releng | 7bff1926e3fd2f9df3c056d8af5521b4e74aaf41 | ba15336e7f7d3c160d3c3bc28316817cb4585305 | refs/heads/master | 2021-01-25T03:19:25.403769 | 2019-01-02T16:05:28 | 2019-01-02T16:05:28 | 19,986,689 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 8,159 | py | #!/usr/bin/env python3
###
### Requires Python 3
###
'''
Identify Gerrit changes that are ready to submit, and email the owners
'''
from email.message import EmailMessage
from email.headerregistry import Address
import datetime
import itertools
import json
import logging
import operator
import os
import os.path
impor... | [
"matthew.webber@diamond.ac.uk"
] | matthew.webber@diamond.ac.uk |
44a16f28b318d131dbeefaf200012cfa5e1bd8de | 3395a234e7c80d011607e79c49cd48bf516f256b | /dependencies/jedi/third_party/typeshed/tests/pytype_test.py | ee7ac0bb9cb9d9175b955f913e9188cc8bbc75a2 | [
"MIT",
"Apache-2.0"
] | permissive | srusskih/SublimeJEDI | 67329b72e184bc9584843968dcc534a002c797a1 | 95c185d778425c04536d53517b0e3fe6dedf8e59 | refs/heads/master | 2023-08-24T11:30:37.801834 | 2022-08-30T09:04:17 | 2022-08-30T09:04:17 | 6,241,108 | 669 | 125 | MIT | 2022-08-30T09:04:18 | 2012-10-16T08:23:57 | Python | UTF-8 | Python | false | false | 7,915 | py | #!/usr/bin/env python3
"""Test runner for typeshed.
Depends on pytype being installed.
If pytype is installed:
1. For every pyi, do nothing if it is in pytype_blacklist.txt.
2. Otherwise, call 'pytype.io.parse_pyi'.
Option two will load the file and all the builtins, typeshed dependencies. This
will also disc... | [
"srusskih@users.noreply.github.com"
] | srusskih@users.noreply.github.com |
3092c08a731b61558189665e7d2e63d08603ab03 | d9eafd325ab775b7b32af2dd0b63afc7310be53d | /pfwra/home/migrations/0004_auto_20210323_0728.py | 3678a7c488fe83d6dd909f1c2f80b1f809a9fe79 | [
"MIT"
] | permissive | johnkellehernz/pfwra | 54b0db7debaed629d6003e0826a15bde2fd4a197 | 5b8c718bb2f1aaa34e9a718e07baf270294f7ba6 | refs/heads/main | 2023-05-01T14:39:42.419993 | 2021-05-13T11:00:07 | 2021-05-13T11:00:07 | 353,514,688 | 0 | 0 | MIT | 2021-03-31T23:15:32 | 2021-03-31T23:15:31 | null | UTF-8 | Python | false | false | 1,670 | py | # Generated by Django 3.0.11 on 2021-03-23 07:28
from django.db import migrations, models
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.images.blocks
class Migration(migrations.Migration):
dependencies = [
('home', '0003_auto_20210219_0827'),
]
operations = [
migr... | [
"jordi.joan@gmail.com"
] | jordi.joan@gmail.com |
43b9efcb67283c12ab78d41bf4a139edda32f6a5 | 8101c599bdf68e0fcc2dbc8188640abfebc4a790 | /test/test.py | f651e500372ecdf139f269049f79c37f139d61d8 | [
"BSD-3-Clause"
] | permissive | symbooglix/boogie-runner | 2a39ddc86d1fee8e3750db6c07f3d20363195390 | 01e1fe993d5eacf7055f1d950a209583c0405fd6 | refs/heads/master | 2021-01-21T04:37:04.636241 | 2016-04-05T16:28:27 | 2016-04-05T16:28:27 | 28,610,541 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,484 | py | #!/usr/bin/env python
# vim: set sw=2 ts=2 softtabstop=2 expandtab:
import argparse
import logging
import os
import pprint
import re
import shutil
import subprocess
import sys
import yaml
testDir = os.path.dirname(os.path.abspath(__file__))
repoDir = os.path.dirname(testDir)
# Hack
sys.path.insert(0, repoDir)
from Bo... | [
"daniel.liew@imperial.ac.uk"
] | daniel.liew@imperial.ac.uk |
814bbf98eeee530f21372492d0a0d9f8a9ce62d1 | d8f7b9943049bd483189fe58fd4abf37163866dd | /GUI Code/search.py | 9d83c91ad738a58d3a07107996a978d96e19663f | [] | no_license | NagahShinawy/python-data-structures-algorithms | d14ecd478caa13e36c4f2dcdf942e5f9e9f351e5 | c254f12dca78444e3b2bbd667d4508a699b9fb89 | refs/heads/main | 2023-05-12T17:26:23.477742 | 2021-05-10T07:08:30 | 2021-05-10T07:08:30 | 365,436,195 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,940 | py | """
Python Data Structures - A Game-Based Approach
Robin Andrews - https://compucademy.net/
Search Algorithms for use in GUI.
"""
import config
import heapq
import helper_functions as helpers
from collections import deque
class PriorityQueue:
def __init__(self):
self.elements = []
def is_empty(self):... | [
"E-n.Shinawy@lean.sa"
] | E-n.Shinawy@lean.sa |
4dee0daf77fa48f37448dd8cf7d857f94c9426d5 | e91ba13a71dc8757e4c6f483d300bb32db8947d4 | /kubernetes-mastery/slides/markmaker.py | d7ef7a0356e368ba4cf696f9414f7f69f63ba6cc | [
"Apache-2.0"
] | permissive | sijoonlee/kubernetes_study | 752788d4ecf542072436e13ad98b9c67c3b3db2c | 668abacf4f855b55f23562486e420d29397bbe6d | refs/heads/master | 2022-12-22T06:52:51.224364 | 2020-09-30T17:38:18 | 2020-09-30T17:38:18 | 276,719,232 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,687 | py | #!/usr/bin/env python
# transforms a YAML manifest into a HTML workshop file
import glob
import logging
import os
import re
import string
import subprocess
import sys
import yaml
logging.basicConfig(level=os.environ.get("LOG_LEVEL", "INFO"))
class InvalidChapter(ValueError):
def __init__(self, chapter):
... | [
"shijoonlee@gmail.com"
] | shijoonlee@gmail.com |
0c78396cacf3dcb777ca52b8bb646c14114b8fd8 | b323fe5968aea700322428ba6bd239b45bc88c00 | /sohpen/website/migrations/0004_auto_20170518_0707.py | 9cbdfebe44d099d22afdb59741aada8fb2fc3ec3 | [] | no_license | aakashres/sophen | a1862be0fe4aaac51a03f111c1943c1e44f517cb | d84b8e8640f10eef22a79b8afba3e226405f9e5d | refs/heads/master | 2022-11-08T01:46:05.697691 | 2017-11-06T11:10:22 | 2017-11-06T11:10:22 | 273,651,423 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 555 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-05-18 07:07
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('website', '0003_auto_20170518_0544'),
]
operations... | [
"aakash.shres@gmail.com"
] | aakash.shres@gmail.com |
50faf2e04d91afe1be4128df90c192dd546b38fe | 50948d4cb10dcb1cc9bc0355918478fb2841322a | /azure-mgmt-network/azure/mgmt/network/v2018_06_01/models/application_gateway_probe.py | d04d03bf97211b720086089e3307cafdb95580c8 | [
"MIT"
] | permissive | xiafu-msft/azure-sdk-for-python | de9cd680b39962702b629a8e94726bb4ab261594 | 4d9560cfd519ee60667f3cc2f5295a58c18625db | refs/heads/master | 2023-08-12T20:36:24.284497 | 2019-05-22T00:55:16 | 2019-05-22T00:55:16 | 187,986,993 | 1 | 0 | MIT | 2020-10-02T01:17:02 | 2019-05-22T07:33:46 | Python | UTF-8 | Python | false | false | 4,616 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | [
"lmazuel@microsoft.com"
] | lmazuel@microsoft.com |
30aec9891a46dbbe643a92b765ac61393ad4a416 | 56bd9b3518f21080a0493f5330249bf5e85289fd | /engineering/common/econstants.py | 6c98788eeb4a4ac58e6294df9a553babe863a6f2 | [
"Apache-2.0"
] | permissive | kevin-zhangsen/badam | da680bf8669722b5bc922381537bc4762fa5c228 | 6823f7dcd7c1b54c3b38edeffe59c16317598a2c | refs/heads/master | 2020-04-01T13:43:03.300155 | 2015-10-29T01:07:46 | 2015-10-29T01:07:46 | 45,371,347 | 2 | 0 | null | 2015-11-02T04:02:50 | 2015-11-02T04:02:47 | null | UTF-8 | Python | false | false | 7,858 | py | __author__ = 'nash.xiejun'
import os
class OperationType(object):
CFG_ALL_IN_ONE = 'cfg-all-in-one'
CFG_HOST_NAME = 'cfg-hostname'
DEPLOY_CASCADING = 'deploy-cascade-openstack'
DEPLOY_HYBRID_CLOUD = 'deploy-hybrid-cloud'
class EndpointType(object):
COMPUTE = 'compute'
VOLUME = 'volume'
VOL... | [
"nash.xiejun@gmail.com"
] | nash.xiejun@gmail.com |
200a81f58579323116fcf06d8ac860193ba85b33 | c954904d3a3259f0bee4bc3942998c30f4714e68 | /shortener/shorturl/__init__.py | 841083c46d1e89eca6a52cddcb079e6658197c16 | [] | no_license | Alodhaib/django-shortener-example | 9443e51191086fa1321468eb3fdefa137c25e330 | d037c913ed18e0a7b24865b7f4f5aaf68df2cca3 | refs/heads/master | 2021-01-24T10:06:40.965556 | 2013-05-11T16:01:13 | 2013-05-11T16:01:13 | 69,673,280 | 0 | 0 | null | 2016-09-30T14:22:22 | 2016-09-30T14:22:22 | null | UTF-8 | Python | false | false | 2,822 | py | #!/usr/bin/env python
#
# Converts any integer into a base [BASE] number. I have chosen 62
# as it is meant to represent the integers using all the alphanumeric
# characters, [no special characters] = {0..9}, {A..Z}, {a..z}
#
# I plan on using this to shorten the representation of possibly long ids,
# a la url shorte... | [
"allisson@gmail.com"
] | allisson@gmail.com |
6b8e063df39d1bc4647cc63b5d37bbb741026f94 | 84856442c382b0b670246636d378beb095effa0a | /dev_cloud/cc1/pkg/node/usr/sbin/cc1_node_update_config | e017f54f299318ea27deee56590d47e9bbbd9034 | [
"Apache-2.0",
"LicenseRef-scancode-philippe-de-muyter"
] | permissive | Dev-Cloud-Platform/Dev-Cloud | f50cc3292245156c4cf55942e4426fda22443fd6 | b2fb9f4318aeb6dde1e8babca32da527943f1fb4 | refs/heads/master | 2020-12-29T02:43:14.022401 | 2017-05-05T07:18:21 | 2017-05-05T07:18:21 | 28,969,864 | 1 | 1 | null | 2015-01-14T16:46:57 | 2015-01-08T14:36:52 | Python | UTF-8 | Python | false | false | 1,615 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# @cond LICENSE
#
# Copyright [2010-2013] Institute of Nuclear Physics PAN, Krakow, Poland
#
# 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
#
# ... | [
"michal.szczygiel@wp.pl"
] | michal.szczygiel@wp.pl | |
71bc398215f05023c66de7b67055c6c4452211b3 | 71dfa5d568d408fd8464a1313f87c1133e3d061c | /ATS/urls.py | b3d6e11901bbb899f6983c3d21e1d181763c2df1 | [] | no_license | harshdonga/Alumni-Tracking-System | 3819e26e82145ca2cf277c1f260494cb6a6fbd4c | f0c836d5fb405f8b61fb73d78acc4c47802a9c11 | refs/heads/master | 2020-12-29T17:48:13.989148 | 2020-02-07T04:27:59 | 2020-02-07T04:27:59 | 238,687,836 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 165 | py | from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('alumni.urls')),
]
| [
"harshdonga99@gmail.com"
] | harshdonga99@gmail.com |
5c107d3057995ffc314bc3eebe9f4fdb39227a36 | 321e58ab3e6b2385bb3549aaaefd56a58c2a51e7 | /python/atpic/atcookies.py | 1d2ea4668a4d530a17d2d2233e73e24b0279454c | [] | no_license | alexmadon/atpic_photosharing | 7829118d032344bd9a67818cd50e2c27a228d028 | 9fdddeb78548dadf946b1951aea0d0632e979156 | refs/heads/master | 2020-06-02T15:00:29.282979 | 2017-06-12T17:09:52 | 2017-06-12T17:09:52 | 94,095,494 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 623 | py | # cookies libary to process
# lang, format, resolution, wiki
# file:///home/madon/doc/python-3.3a0-docs-html/library/http.cookies.html
from http import cookies
C = cookies.SimpleCookie()
C["fig"] = "newton"
C["sugar"] = "wafer"
print(C)
C = cookies.SimpleCookie()
C["rocky"] = "road"
C["rocky"]["path"] = "/cookie"
pri... | [
"alex.madon@gmail.com"
] | alex.madon@gmail.com |
ff3179806be417683f17da0629967ff753f5acd1 | c06d18ac5b87b3b82fc486454c422b119d6c1ee9 | /src/demo/NLPBook/chapter5/stanford.py | e7a74651d98ea5d99c3a6e7fc528c3f3e51716fd | [] | no_license | tangermi/nlp | b3a4c9612e6049463bf12bc9abb7aff06a084ace | aa36b8b20e8c91807be73a252ff7799789514302 | refs/heads/master | 2022-12-09T12:33:15.009413 | 2020-04-03T04:03:24 | 2020-04-03T04:03:24 | 252,056,010 | 0 | 0 | null | 2022-12-08T07:26:55 | 2020-04-01T02:55:05 | Jupyter Notebook | UTF-8 | Python | false | false | 2,411 | py | # -*- coding: utf-8 -*-
import sys
import os
# CoreNLP 3.6 jar包和中文模型包
# ejml-0.23.jar
# javax.json.jar
# jollyday.jar
# joda-time.jar
# jollyday.jar
# protobuf.jar
# slf4j-api.jar
# slf4j-simple.jar
# stanford-corenlp-3.6.0.jar
# xom.jar
class StanfordCoreNLP(object):
def __init__(self,jarpath):
self.root = jarpat... | [
"n10057862@qut.edu.au"
] | n10057862@qut.edu.au |
8a16091fafc3f2319884a057c8e434ab0e79a775 | 7759c0ad152fe9c369b074a24601e54806b0afa8 | /backend/event/api/v1/viewsets.py | 4cba77ae5ad9f884a97fa17647488092f6c46aa1 | [] | no_license | crowdbotics-apps/covidcheck-15163 | be59f495e31b50948725fb332429751749f9b611 | a2f80fc2541bbc069cf3ec6a7f4d740aa665c77b | refs/heads/master | 2023-02-08T22:01:35.813215 | 2020-03-29T16:50:54 | 2020-03-29T16:50:54 | 250,877,575 | 0 | 0 | null | 2023-01-24T01:47:09 | 2020-03-28T19:33:39 | JavaScript | UTF-8 | Python | false | false | 3,066 | py | from rest_framework import authentication
from event.models import (
Category,
Faq,
Favorites,
Location,
MySchedule,
Presenter,
Schedule,
Sponsor,
Vendor,
VendorDetail,
)
from .serializers import (
CategorySerializer,
FaqSerializer,
FavoritesSerializer,
LocationSe... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
9b3e528238dee10f5bdee6ca543158322d95ff6a | a46d135ba8fd7bd40f0b7d7a96c72be446025719 | /packages/python/plotly/plotly/validators/scattergl/_xsrc.py | 2c107c6b510e42d803ee235a58aa1eabf4f21690 | [
"MIT"
] | permissive | hugovk/plotly.py | 5e763fe96f225d964c4fcd1dea79dbefa50b4692 | cfad7862594b35965c0e000813bd7805e8494a5b | refs/heads/master | 2022-05-10T12:17:38.797994 | 2021-12-21T03:49:19 | 2021-12-21T03:49:19 | 234,146,634 | 0 | 0 | MIT | 2020-01-15T18:33:43 | 2020-01-15T18:33:41 | null | UTF-8 | Python | false | false | 386 | py | import _plotly_utils.basevalidators
class XsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="xsrc", parent_name="scattergl", **kwargs):
super(XsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_typ... | [
"noreply@github.com"
] | hugovk.noreply@github.com |
4aa11ff5954703255ef2662ebc7538a8a164e33c | 0eb6c70503c680ebec415016ff1b0cfac92486ca | /lincdm/views/sitemap.py | f33aa93f833be7422fb0e7b0f58bb61365b8d717 | [] | no_license | alexliyu/lincdm | c8b473946f59aca9145b3291890635474f144583 | eab93285f0b03217ea041a7910edae7e00095cd8 | refs/heads/master | 2020-12-30T10:50:05.248988 | 2011-08-09T15:52:38 | 2011-08-09T15:52:38 | 1,464,255 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 465 | py | """Views for entry sitemap"""
from django.views.generic.simple import direct_to_template
from lincdm.entry.models import Entry
from lincdm.entry.models import Category
def sitemap(*ka, **kw):
"""Wrapper around the direct to template generic view to
force the update of the extra context"""
kw['extra_conte... | [
"alexliyu2012@gmail.com"
] | alexliyu2012@gmail.com |
e7102e8a75f1b70c301e29ea4054d292404bf23c | 709bd5f2ecc69a340da85f6aed67af4d0603177e | /tests/test_analytics.py | d6818e163a670b22b8bcf46edc578302d57d81ae | [
"BSD-3-Clause"
] | permissive | Kenstogram/opensale | 41c869ee004d195bd191a1a28bf582cc6fbb3c00 | 5102f461fa90f2eeb13b9a0a94ef9cb86bd3a3ba | refs/heads/master | 2022-12-15T02:48:48.810025 | 2020-03-10T02:55:10 | 2020-03-10T02:55:10 | 163,656,395 | 8 | 0 | BSD-3-Clause | 2022-12-08T01:31:09 | 2018-12-31T09:30:41 | Python | UTF-8 | Python | false | false | 1,647 | py | from decimal import Decimal
from saleor.core.analytics import (
get_order_payloads, get_view_payloads, report_order, report_view)
def test_get_order_payloads(order_with_lines):
order = order_with_lines
generator = get_order_payloads(order)
data = list(generator)
assert len(data) == order.lines.c... | [
"Kenstogram@gmail.com"
] | Kenstogram@gmail.com |
51a44f03eb696ececa3a9e650a63d3177d62f625 | 976a21364b7c54e7bccddf1c9deec74577ce8bb8 | /build/rob_control/catkin_generated/pkg.develspace.context.pc.py | ae505c4d62a69cc0f460001a4541d25f31f1d6e7 | [] | no_license | jinweikim/catkin_ws | f0168b17c04863a6e5472f6199a4a9c525e0f3aa | 268ce7e348a162019e90d0e4527de4c9140ac0f8 | refs/heads/master | 2023-01-02T17:23:06.834527 | 2020-10-23T12:03:49 | 2020-10-23T12:03:49 | 262,527,249 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 387 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "actionlib_msgs".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "rob_control"
PROJECT_SP... | [
"jinweikim@gmail.com"
] | jinweikim@gmail.com |
fbca50ebf0262d7c137ebc41118f7bd0b71c47de | 674649dc02390c4a60b9c62b586b81d405969047 | /network/__init__.py | 19f1226938b882bcbc77dc6b13f7782a531efc6f | [] | no_license | weijiawu/Pytorch_Classification | 709513be3e019a896ef11a1739829a97bb99c9db | 7609a1d809590c1423f4ed0ee1f0d918954355a9 | refs/heads/master | 2022-12-06T00:51:26.716590 | 2020-09-01T07:38:22 | 2020-09-01T07:38:22 | 285,811,133 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,252 | py | from __future__ import absolute_import
"""The models subpackage contains definitions for the following model for CIFAR10/CIFAR100
architectures:
- `AlexNet`_
- `VGG`_
- `ResNet`_
- `SqueezeNet`_
- `DenseNet`_
You can construct a model with random weights by calling its constructor:
.. code:: python
import tor... | [
"wwj123@zju.edu.cn"
] | wwj123@zju.edu.cn |
38c685e5b3daa3c48549492e8305d7c6ec9b4a63 | 12b41c3bddc48a6df5e55bd16f7b2792ed6e4848 | /k8_vmware/vsphere/VM.py | 7d14aa69fb7f78566e20968c659a9f980499f6e4 | [
"Apache-2.0"
] | permissive | NourEddineX/k8-vmware | b128b03b988f8a94d6029458c5415cdd68e12b0a | 80f2a6d56021a1298919487c8372a88aff3f1fb9 | refs/heads/main | 2023-01-23T22:59:41.767216 | 2020-12-11T12:33:11 | 2020-12-11T12:33:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,321 | py | import pyVmomi
from osbot_utils.utils.Misc import wait
from k8_vmware.vsphere.VM_Keystroke import VM_Keystroke
class VM:
def __init__(self, vm):
self.vm = vm
def config(self):
return self.summary().config
def controller_scsi(self):
controllers = self.devices_SCSI_Controllers()
... | [
"dinis.cruz@owasp.org"
] | dinis.cruz@owasp.org |
0584747d8f65280307db8e8f7a973bf9d702eb19 | 39f1ae1e3b95d717f6d103b3ac534b468090c36f | /py_blackbox_backend/py_blackbox_backend/settings.py | 52046da510da0ace923632f0a9d29badf4aa06f4 | [] | no_license | arron1993/blackbox.arron.id | 5d532af4e9557986f8af5c9018d9d789bbd03470 | 4da60f3dd524bd0afbdc3613767a818bcab1cd8d | refs/heads/master | 2023-05-04T05:19:15.792063 | 2021-05-20T20:34:28 | 2021-05-20T20:34:28 | 346,052,952 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,974 | py | """
Django settings for py_blackbox_backend project.
Generated by 'django-admin startproject' using Django 3.1.7.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
i... | [
"arron.moore93@gmail.com"
] | arron.moore93@gmail.com |
b0a4fdf7a72979e444fdfa623f69a8f29cd809db | 13a179f6251d8354b058ff02b3101d904b606f0b | /src/shepherd_simu/src/sailboat_sim.py | 55da970d98847cf36e6b2ca0d542b0e025b062a6 | [
"MIT"
] | permissive | ENSTA-Bretagne-Shepherd/Shepherd-Ros-Structure | 4bb2ecb146e9fbc0897a780980634a711dc1788b | 6ce33426911fc50dfd61f165d73efe9702c2009b | refs/heads/master | 2021-01-12T08:36:38.511501 | 2017-02-22T13:20:17 | 2017-02-22T13:20:17 | 76,635,278 | 1 | 0 | null | 2017-02-10T16:13:33 | 2016-12-16T08:16:52 | CMake | UTF-8 | Python | false | false | 1,281 | py | #!/usr/bin/env python
import rospy
from models.sailboat import Sailboat
from shepherd_reg.msg import SailboatCmd
from shepherd_disp.msg import SailboatPose
from std_msgs.msg import Float64
def update_cmd(msg):
global cmd
print 'Updated cmd:', msg.rudder_angle, msg.sail_angle
cmd = [msg.rudder_angle, msg.s... | [
"ejalaa12@gmail.com"
] | ejalaa12@gmail.com |
3b5faf029aed4be7d85694ac734b8aed784d187a | b156aad4624ec6dbc2efcca93181bbb948d16cc6 | /utils/utils.py | c128221bb9fdc076717f2e26e232be3b58d048cc | [] | no_license | itang85/bookshop-django | d191e2af002db94073ee8c59eeb768002443958f | b136629b4e5b1dc7f0661e4b06618f31c95d7ede | refs/heads/master | 2023-03-28T02:59:06.729909 | 2021-03-05T15:41:49 | 2021-03-05T15:41:49 | 332,227,518 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,870 | py | import base64, json, re, jwt, datetime, time, hashlib, random
from calendar import timegm
# 导入谷歌验证码相关模块
# import pyotp
# 导入使用缓存的模块
# from django.core.cache import cache
from rest_framework.throttling import BaseThrottle
from django.conf import settings
from conf.area.area_list import area_dict
from utils.settings im... | [
"1094252227@qq.com"
] | 1094252227@qq.com |
55058d7c8d58c89e603d4127debeb4b8df5bd25a | 70730512e2643833e546e68761ee6cd3d7b95e1d | /01-python基础/code/day03/day02_exercise/exercise03.py | fadfaaf9e18f4ab6a6bc3a1b8aadc81dd9936e0a | [] | no_license | Yuchen1995-0315/review | 7f0b0403aea2da62566642c6797a98a0485811d1 | 502859fe11686cc59d2a6d5cc77193469997fe6a | refs/heads/master | 2020-08-26T23:16:33.193952 | 2019-10-24T00:30:32 | 2019-10-24T00:30:32 | 217,177,822 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 406 | py | """
(扩展)在控制台中录入一个秒,计算是几小时零几分钟零几秒钟.
"""
# 10:40
total_second = int(input("请输入总秒数:"))
second = total_second % 60
hour = total_second // 60 // 60
minute = total_second // 60 % 60
# 在字符串中插入变量:
# “...x...” “..."+变量+"...”
print(str(hour) + "小时零" + str(minute) + "分钟零" + str(second) + "秒钟")
| [
"2456830920@qq.com"
] | 2456830920@qq.com |
4fe27b358e04b2dd76cba83b1b138fdd6e369026 | 29fd3daff8c31764c00777e67d2cc9b3e94ba761 | /examples/ch05_examples/mandelbrot/mandelbrot/cython_pure_python/setup.py | 440f9ca05742dda490c59ab9d203bd5d6f221906 | [] | no_license | mwoinoski/crs1906 | 06a70a91fc99e2d80e2ed3cea5724afa22dce97d | 202f7cc4cae684461f1ec2c2c497ef20211b3e5e | refs/heads/master | 2023-06-23T17:13:08.163430 | 2023-06-12T21:44:39 | 2023-06-12T21:44:39 | 39,789,380 | 1 | 2 | null | 2022-01-26T20:43:18 | 2015-07-27T17:54:56 | Python | UTF-8 | Python | false | false | 424 | py | from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
# for notes on compiler flags e.g. using
# export CFLAGS=-O2
# so gcc has -O2 passed (even though it doesn't make the code faster!)
# http://docs.python.org/install/index.html
setup(
cmdclass = {'... | [
"michaelw@articulatedesign.us.com"
] | michaelw@articulatedesign.us.com |
951e54a1ed72d5527bcb0dd1b534c6ef1079a65b | 2cc84af3d2a146b4dbb04bed3cfd542fa0622489 | /image-tools/image_clustering/tile_clustering.py | 1047091f0afa7d8cb8376a27b8df124a3fda22b4 | [
"MIT"
] | permissive | flegac/deep-experiments | e6a05b1a58eadf4c39580e95bb56d311e3dfa0ac | e1b12e724f2c8340cbe9c51396cf3f42e3b4e934 | refs/heads/master | 2020-04-09T00:20:15.132255 | 2019-10-11T16:39:47 | 2019-10-11T16:39:47 | 159,862,795 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,458 | py | import glob
import os
from typing import List, Callable
import cv2
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.colors import to_rgb
from scipy.stats import wasserstein_distance
from sklearn.cluster import KMeans
from sklearn.decomposition import PCA
from sklearn.pipeline import Pipeline
from im... | [
"florent.legac@gmail.com"
] | florent.legac@gmail.com |
d6ce1c57d5d48ad3fcd540884b07b83997ecc399 | 4c3e992678341ccaa1d4d14e97dac2e0682026d1 | /addons/mass_mailing/tests/test_mail.py | 09822f1c111822ef55b13830edbcad40590accf1 | [] | no_license | gahan-corporation/wyatt | 3a6add8f8f815bd26643e1e7c81aea024945130d | 77e56da362bec56f13bf0abc9f8cf13e98461111 | refs/heads/master | 2021-09-03T18:56:15.726392 | 2018-01-08T02:54:47 | 2018-01-08T02:54:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 328 | py | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from gerp.addons.mail.tests.common import TestMail
class test_message_compose(TestMail):
def test_OO_mail_mail_tracking(self):
""" Tests designed for mail_mail tracking (opened, replied, bounced) """
... | [
"duchess@gahan-corporation.com"
] | duchess@gahan-corporation.com |
c3814fd79b1a1d8c165a84db0088b1cace467d56 | 417e6eb589d3441c3c8b9901e2d35873dd35f097 | /src/structural/observer.py | 0ea844bf4d99f8480fb048987da3a1e944975507 | [] | no_license | vmgabriel/pattern-python | 4fc6127ebdb521d0a4a7b10b4b68880f691ee630 | 74f1cd1314a79060d1df1a6df018c39572bc2b4c | refs/heads/master | 2023-04-24T06:45:16.773415 | 2021-05-10T21:14:51 | 2021-05-10T21:14:51 | 365,394,737 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,379 | py | """Observer Pattern"""
# Libraries
from abc import ABCMeta, abstractmethod
class Publisher(metaclass=ABCMeta):
def add_observer(self, observer):
pass
def remove_observer(self, observer):
pass
def notify_all(self):
pass
def write_post(self, text):
pass
class Platzi... | [
"vmgabriel96@gmail.com"
] | vmgabriel96@gmail.com |
be868d1d34aa3dad1df6b4c850a30a4565685c4c | e22390ec9aa1a842626075113472f81076e1bf5f | /pullenti/semantic/SemFragment.py | 3954b163c1693d239274475b64e5e3f1cd4930fb | [] | no_license | pullenti/PullentiPython | ba9f450f3f49786732e80f34d0506d4a6d41afc3 | 815d550b99f113034c27f60d97493ce2f8e4cfcc | refs/heads/master | 2021-06-22T17:12:36.771479 | 2020-12-11T06:10:23 | 2020-12-11T06:10:23 | 161,268,453 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,299 | py | # Copyright (c) 2013, Pullenti. All rights reserved.
# Non-Commercial Freeware and Commercial Software.
# This class is generated using the converter UniSharping (www.unisharping.ru) from Pullenti C#.NET project.
# The latest version of the code is available on the site www.pullenti.ru
import typing
from pullen... | [
"alex@alexkuk.ru"
] | alex@alexkuk.ru |
a39f0bac82f84873a6dbf8cfd3f6a437ad45d06c | 045cb1a5638c3575296f83471758dc09a8065725 | /addons/stock_account/wizard/stock_picking_return.py | 5d54d201e6b6a357cd694038a75f20b33ff45cc4 | [] | no_license | marionumza/saas | 7236842b0db98d1a0d0c3c88df32d268509629cb | 148dd95d991a348ebbaff9396759a7dd1fe6e101 | refs/heads/main | 2023-03-27T14:08:57.121601 | 2021-03-20T07:59:08 | 2021-03-20T07:59:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,299 | py | # -*- coding: utf-8 -*-
# Part of Harpiya. See LICENSE file for full copyright and licensing details.
from harpiya import api, fields, models
class StockReturnPicking(models.TransientModel):
_inherit = "stock.return.picking"
@api.model
def default_get(self, default_fields):
res = super(StockRetu... | [
"yasir@harpiya.com"
] | yasir@harpiya.com |
f9ae3dfa9e5cae2982f31a833e426773e239ed40 | e77732bce61e7e97bad5cee1b07d1b5f9b6fa590 | /cat/utils/data/exclude_corpus.py | 08cc3af28cfc90a11efade2a6bdf4941e1369fb7 | [
"Apache-2.0"
] | permissive | entn-at/CAT | 9f28f5ff75b37ac90baf63609226deb99d73dbe2 | fc74841e8f6b7eb2f2f88bb7c09b30ad5a8c16f4 | refs/heads/master | 2023-04-10T13:32:31.333889 | 2023-02-27T16:50:43 | 2023-02-27T17:29:07 | 236,718,892 | 0 | 0 | null | 2020-01-28T11:24:01 | 2020-01-28T11:24:00 | null | UTF-8 | Python | false | false | 2,432 | py | # Author: Huahuan Zheng (maxwellzh@outlook.com)
#
# Fetch n lines from source corpus and exclude part of the source if needed.
#
import sys
import os
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("corpus", type=str,
help="Path to the ... | [
"maxwellzh@outlook.com"
] | maxwellzh@outlook.com |
6c249c704fb9dcad286b896aac14b4023e741304 | 98dbb9cd9523809b4ee0e6b92334fa6a2a6af2a3 | /bingads/v13/bulk/entities/audiences/bulk_campaign_negative_product_audience_association.py | 80d8c4fc61c6babc61466c3ac50597c9c0a847f1 | [
"MIT"
] | permissive | BingAds/BingAds-Python-SDK | a2f9b0c099b574a4495d0052218f263af55cdb32 | 373a586402bf24af7137b7c49321dbc70c859fce | refs/heads/main | 2023-07-27T15:31:41.354708 | 2023-07-10T03:21:03 | 2023-07-10T03:21:03 | 31,927,550 | 105 | 182 | NOASSERTION | 2023-09-04T06:51:20 | 2015-03-09T23:09:01 | Python | UTF-8 | Python | false | false | 586 | py | from bingads.v13.bulk.entities.audiences.bulk_campaign_negative_audience_association import *
class BulkCampaignNegativeProductAudienceAssociation(BulkCampaignNegativeAudienceAssociation):
""" Represents an Campaign Negative Product Audience Association that can be read or written in a bulk file.
For more in... | [
"qitia@microsoft.com"
] | qitia@microsoft.com |
a1cf5368c4eea778d041c5af86d0bf3a3f4abd62 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/adjectives/_sodden.py | 9a58a5d33739918fea93b36c32416d0d46ba6316 | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 410 | py |
#calss header
class _SODDEN():
def __init__(self,):
self.name = "SODDEN"
self.definitions = [u'(of something that can absorb water) extremely wet: ']
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.specie = 'adjectives'
def run(self, obj1, obj2):
self.jsondata[... | [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
282399609317833cf35a9418fdac25bece55fe85 | 5afc3043b9b43a0e72bc94a90ed832a9576bb580 | /base/skill_59/py_06/py_44_copyreg.py | d527bd7b1839bbf108f061884156436b5976dfb3 | [] | no_license | JR1QQ4/python | 629e7ddec7a261fb8a59b834160ceea80239a0f7 | a162a5121fdeeffbfdad9912472f2a790bb1ff53 | refs/heads/main | 2023-08-25T00:40:25.975915 | 2021-11-07T14:10:20 | 2021-11-07T14:10:20 | 311,769,673 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 517 | py | #!/usr/bin/python
# -*- coding:utf-8 -*-
# 第 44 条: 用 copyreg 实现可靠的 pickle 操作
# 内置的 pickle 模块,只适合用来在彼此信任的程序之间,对相关对象执行序列化和反序列化操作
# 如果用法比较复杂,那么 pickle 模块的功能也许就会出问题
# 我们可以把内置的 copyreg 模块同 pickle 结合起来使用,以便为旧数据缺失的属性值、进行类的版本管理,
# 并给序列化之后的数据提供固定的引入路径
| [
"chenjunrenyx@163.com"
] | chenjunrenyx@163.com |
627b37547257bf028218c394028ba638d78fb0a6 | bdd8fe60144b364dade0c383ba9ac7a400457c69 | /freight/api/task_log.py | 1f03bac3b2cbdff6275b4d8d6b4886d30a94c799 | [
"Apache-2.0"
] | permissive | thoas/freight | 61eda7cb397696eb2c3a7504d03f2f4654ad7e8f | 9934cfb3c868b5e4b813259ca83c748676d598a0 | refs/heads/master | 2021-01-18T17:24:25.758448 | 2015-09-03T20:45:35 | 2015-09-03T20:45:36 | 41,413,179 | 1 | 0 | null | 2015-08-26T08:13:07 | 2015-08-26T08:13:06 | Python | UTF-8 | Python | false | false | 2,200 | py | from __future__ import absolute_import
from flask_restful import reqparse
from freight.api.base import ApiView
from freight.config import db
from freight.models import LogChunk
from .task_details import TaskMixin
class TaskLogApiView(ApiView, TaskMixin):
get_parser = reqparse.RequestParser()
get_parser.add... | [
"dcramer@gmail.com"
] | dcramer@gmail.com |
7e5e4f719b75a501b9e069ca581e0344b89df260 | 51f887286aa3bd2c3dbe4c616ad306ce08976441 | /pybind/slxos/v17r_1_01a/brocade_mpls_rpc/clear_mpls_auto_bandwidth_statistics_lsp/input/__init__.py | c69003159bbe860e7c9e51d4eb0d278fd1ce133e | [
"Apache-2.0"
] | permissive | b2220333/pybind | a8c06460fd66a97a78c243bf144488eb88d7732a | 44c467e71b2b425be63867aba6e6fa28b2cfe7fb | refs/heads/master | 2020-03-18T09:09:29.574226 | 2018-04-03T20:09:50 | 2018-04-03T20:09:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,711 | py |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | [
"badaniya@brocade.com"
] | badaniya@brocade.com |
8dcecbb2db91f0781c70434f88392b4d940ba544 | 32eeb97dff5b1bf18cf5be2926b70bb322e5c1bd | /benchmark/ankiandroid/testcase/firstcases/testcase4_014.py | be1af9489a3d62454bebe7063c442ec02f4fe4d7 | [] | no_license | Prefest2018/Prefest | c374d0441d714fb90fca40226fe2875b41cf37fc | ac236987512889e822ea6686c5d2e5b66b295648 | refs/heads/master | 2021-12-09T19:36:24.554864 | 2021-12-06T12:46:14 | 2021-12-06T12:46:14 | 173,225,161 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,621 | py | #coding=utf-8
import os
import subprocess
import time
import traceback
from appium import webdriver
from appium.webdriver.common.touch_action import TouchAction
from selenium.common.exceptions import NoSuchElementException, WebDriverException
desired_caps = {
'platformName' : 'Android',
'deviceName' : 'Android Emulat... | [
"prefest2018@gmail.com"
] | prefest2018@gmail.com |
ce641dbede6f04804b41a0a8460de2268bda2a1e | b87f66b13293782321e20c39aebc05defd8d4b48 | /maps/build/TraitsGUI/enthought/pyface/key_pressed_event.py | 0072c81aca8d415f585dffb9111cb439544649df | [
"BSD-3-Clause"
] | permissive | m-elhussieny/code | 5eae020932d935e4d724c2f3d16126a0d42ebf04 | 5466f5858dbd2f1f082fa0d7417b57c8fb068fad | refs/heads/master | 2021-06-13T18:47:08.700053 | 2016-11-01T05:51:06 | 2016-11-01T05:51:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 673 | py | """ The event that is generated when a key is pressed. """
# Enthought library imports.
from enthought.traits.api import Bool, HasTraits, Int, Any
class KeyPressedEvent(HasTraits):
""" The event that is generated when a key is pressed. """
#### 'KeyPressedEvent' interface ##################################... | [
"fspaolo@gmail.com"
] | fspaolo@gmail.com |
d94eac8d709bc2eb7d4ac8bf5765e1247c5dc9c7 | 67ceb35320d3d02867350bc6d460ae391e0324e8 | /practice/easy/0231-Power_of_Two.py | 2937bb2cf84cca61705c0d77d1f846cbe4ef3766 | [] | no_license | mattjp/leetcode | fb11cf6016aef46843eaf0b55314e88ccd87c91a | 88ccd910dfdb0e6ca6a70fa2d37906c31f4b3d70 | refs/heads/master | 2023-01-22T20:40:48.104388 | 2022-12-26T22:03:02 | 2022-12-26T22:03:02 | 184,347,356 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 140 | py | class Solution:
def isPowerOfTwo(self, n: int) -> bool:
while n > 0 and n % 2 == 0:
n /= 2
return True if n == 1 else False
| [
"noreply@github.com"
] | mattjp.noreply@github.com |
52140a927a1c45b88b007bd1af0bfe4d2d942003 | 50402cc4388dfee3a9dbe9e121ef217759ebdba8 | /django_wk/Mikesite/pubApp/pubmanager.py | fec872afed9ea1d9834c4cc18521c7088d2b2c74 | [] | no_license | dqyi11/SVNBackup | bd46a69ec55e3a4f981a9bca4c8340944d8d5886 | 9ad38e38453ef8539011cf4d9a9c0a363e668759 | refs/heads/master | 2020-03-26T12:15:01.155873 | 2015-12-10T01:11:36 | 2015-12-10T01:11:36 | 144,883,382 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,134 | py | '''
Created on 2013-12-29
@author: Walter
'''
from pubApp.models import Paper
class PubManager(object):
'''
classdocs
'''
def __init__(self):
'''
Constructor
'''
self.type = "all"
self.year = "all"
self.type_all = "all"
... | [
"walter@e224401c-0ce2-47f2-81f6-2da1fe30fd39"
] | walter@e224401c-0ce2-47f2-81f6-2da1fe30fd39 |
3a42023dfd9ac8cc3bbee4b8459c832bd62732a1 | 9e38b45f555ffa08fe036b7b0429871ccdd85303 | /Python/string_split_and_join.py | 8b17eac33966a7d952c106de079a896dbe6307f7 | [] | no_license | shayaankhan05/HackerRank | b066969b0514046bd8620b55d0458d8284a12005 | a975fac85af80310ec2ec5f6275c94ceefe3715b | refs/heads/master | 2023-06-01T09:06:23.374474 | 2021-06-24T08:10:38 | 2021-06-24T08:10:38 | 294,485,980 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 193 | py | def split_and_join(line):
a = line
a = a.split(" ")
a = "-".join(a)
return a
if __name__ == '__main__':
line = input()
result = split_and_join(line)
print(result)
| [
"you@example.com"
] | you@example.com |
8dbad1d4354d63d045a7b9f71ef8405a05615120 | e16cc78f0e05e50d589558535ae0fc5e414dd4a0 | /IM5.4.0_timing/ztest_e_send5_video.py | 1c13ecf0caf88ccbce3128b36482d9396bea79b6 | [] | no_license | wenqiang1990/wenqiang_code | df825b089e3bd3c55bcff98f4946f235f50f2f3d | 3c9d77e0a11af081c60a5b1f4c72ecd159945864 | refs/heads/master | 2020-06-19T04:38:39.052037 | 2019-12-18T03:40:39 | 2019-12-18T03:40:39 | 196,561,628 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,642 | py | #coding:utf-8
import time
import datetime
import unittest
from appium.webdriver.common.touch_action import TouchAction
from robot.utils.asserts import *
from appium import webdriver
from public import login
from public import logout
from clear_massage import clear_massage
from set_driver import set_driver
class Imtes... | [
"1058099258@qq.com"
] | 1058099258@qq.com |
088973a0dbd18923e03afc75a341c75a61a348e9 | cb80ebc49bc92c350f6d6f039a6a4f0efa6b4c60 | /EnvironmentVariables/EnvironmentVariables.py | 9e6a9451d078f7f1d2002410d1982b10be2b1a30 | [] | no_license | rabramley/pythonTrials | 9708ef1b39011c8c08909808132114ff3b30d34a | bbc93a9f69afbe3cd045de5835ad3c8a4a557050 | refs/heads/master | 2021-01-15T23:07:48.074817 | 2015-06-22T14:11:20 | 2015-06-22T14:11:20 | 32,924,481 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 361 | py | #!/usr/bin/env python
import os
print os.environ['HOME']
# using get will return `None` if a key is not present rather than raise a `KeyError`
print os.environ.get('KEY_THAT_MIGHT_EXIST')
default_value = 'Use this instead'
# os.getenv is equivalent, and can also give a default value instead of `None`
print os.geten... | [
"rabramley@gmail.com"
] | rabramley@gmail.com |
745f90f519853d1de410ac75ee637f5d3b14f3a6 | 070b693744e7e73634c19b1ee5bc9e06f9fb852a | /python/problem-tree/maximum_width_of_binary_tree.py | a18203e5b1c59a32be6b1e9d83fef22553353874 | [] | no_license | rheehot/practice | a7a4ce177e8cb129192a60ba596745eec9a7d19e | aa0355d3879e61cf43a4333a6446f3d377ed5580 | refs/heads/master | 2021-04-15T22:04:34.484285 | 2020-03-20T17:20:00 | 2020-03-20T17:20:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,855 | py | # https://leetcode.com/problems/maximum-width-of-binary-tree
# https://leetcode.com/problems/maximum-width-of-binary-tree/solution
from TreeNode import TreeNode
class Solution:
# Wrong Answer
def widthOfBinaryTree0(self, root):
if root is None:
return 0
print(root)
... | [
"agapelover4u@yahoo.co.kr"
] | agapelover4u@yahoo.co.kr |
e3f4e1bc264e4e9e928ef3ebb533de57033f0c84 | 600df3590cce1fe49b9a96e9ca5b5242884a2a70 | /tools/perf/measurements/power.py | 58551ae3207e2de8e876bea951fc32323d5b63c9 | [
"BSD-3-Clause",
"LGPL-2.0-or-later",
"LicenseRef-scancode-unknown-license-reference",
"GPL-2.0-only",
"Apache-2.0",
"LicenseRef-scancode-unknown",
"MIT"
] | permissive | metux/chromium-suckless | efd087ba4f4070a6caac5bfbfb0f7a4e2f3c438a | 72a05af97787001756bae2511b7985e61498c965 | refs/heads/orig | 2022-12-04T23:53:58.681218 | 2017-04-30T10:59:06 | 2017-04-30T23:35:58 | 89,884,931 | 5 | 3 | BSD-3-Clause | 2022-11-23T20:52:53 | 2017-05-01T00:09:08 | null | UTF-8 | Python | false | false | 1,961 | py | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import time
from metrics import network
from metrics import power
from telemetry.core import util
from telemetry.page import legacy_page_test
class Power(... | [
"enrico.weigelt@gr13.net"
] | enrico.weigelt@gr13.net |
c144c9ebf7ac40827af104a5950dc340e65e4004 | 83d947dd8683ed447b6bdb9d15683109ca0195bc | /git_sew/ui/cli/containers/App.py | b38e83e444cd4ff51285d171725911c2c7266b75 | [
"MIT"
] | permissive | fcurella/git-sew | dda6b84a3b522bb1fc5982bfa610b174159cb691 | 920bc26125a127e257be3e37a9bf10cb90aa5368 | refs/heads/master | 2020-07-23T14:51:39.476225 | 2019-09-09T22:56:11 | 2019-09-10T15:45:11 | 207,599,791 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 475 | py | import urwid
from urwid_pydux import ConnectedComponent
from git_sew.ui.cli.components.gitlogs import Footer, Loading
class App(ConnectedComponent):
def map_state_to_props(self, state, own_props):
return {"body": state["box"]}
def render_component(self, props):
if props["body"] is None:
... | [
"flavio.curella@gmail.com"
] | flavio.curella@gmail.com |
17f859589c603a22117367624010559c8063f80b | f6a8d93c0b764f84b9e90eaf4415ab09d8060ec8 | /Functions/orders.py | 7fef95d38a0f0303db054de91a1ee188f9750e62 | [] | no_license | DimoDimchev/SoftUni-Python-Fundamentals | 90c92f6e8128b62954c4f9c32b01ff4fbb405a02 | 970360dd6ffd54b852946a37d81b5b16248871ec | refs/heads/main | 2023-03-18T17:44:11.856197 | 2021-03-06T12:00:32 | 2021-03-06T12:00:32 | 329,729,960 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 478 | py | def order(product, times_ordered):
final_price = 0
for i in range (times_ordered):
if product == "coffee":
final_price += 1.50
elif product == "water":
final_price += 1.00
elif product == "coke":
final_price += 1.40
elif product == "snacks":
... | [
"noreply@github.com"
] | DimoDimchev.noreply@github.com |
3f5447789a83847dcf555f556eaf2067a532731c | c06c2c4e084dad8191cbb6fb02227f7b05ba86e7 | /chat/extras/output/output_adapter.py | 33c6cd8c7c3458943de637f070c279efad3b0687 | [] | no_license | thiagorocha06/chatbot | 053c525d0c6d037570851411618f3cb1186b32b4 | 2d22a355926c50d9b389d3db883f435950b47a77 | refs/heads/master | 2020-03-24T14:31:59.134462 | 2018-07-29T14:42:55 | 2018-07-29T14:42:55 | 142,770,645 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 660 | py | from chat.extras.adapters import Adapter
class OutputAdapter(Adapter):
"""
A generic class that can be overridden by a subclass to provide extended
functionality, such as delivering a response to an API endpoint.
"""
def process_response(self, statement, session_id=None):
"""
... | [
"thiagorocha06@gmail.com"
] | thiagorocha06@gmail.com |
e2c63fd44222cfa6dd178d152e811377be48d2ef | 25873da962b0acdcf2c46b60695866d29008c11d | /test/programrtest/aiml_tests/learn_tests/test_learn_aiml.py | face1b7f8aacdcafc02f4548da2466da762b9c4a | [] | no_license | LombeC/program-r | 79f81fa82a617f053ccde1115af3344369b1cfa5 | a7eb6820696a2e5314d29f8d82aaad45a0dc0362 | refs/heads/master | 2022-12-01T14:40:40.208360 | 2020-08-10T21:10:30 | 2020-08-10T21:10:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,303 | py | import unittest
import os
from programr.context import ClientContext
from programrtest.aiml_tests.client import TestClient
class LearnTestClient(TestClient):
def __init__(self):
TestClient.__init__(self)
def load_configuration(self, arguments):
super(LearnTestClient, self).load_configurati... | [
"hilbert.cantor@gmail.com"
] | hilbert.cantor@gmail.com |
39fe66b6f1dcefaec65de082d6af8a0c15789557 | e77a7cc1ed343a85662f0ad3c448a350ab776261 | /data_structures/array/number_of_1_in_sorted_array.py | 79689872fbb5d35fdec0a24168779d5ce80f4454 | [
"MIT"
] | permissive | M4cs/python-ds | 9dcecab10291be6a274130c42450319dc112ac46 | 434c127ea4c49eb8d6bf65c71ff6ee10361d994e | refs/heads/master | 2020-08-10T03:40:22.340529 | 2019-10-10T17:52:28 | 2019-10-10T17:52:28 | 214,247,733 | 2 | 0 | MIT | 2019-10-10T17:43:31 | 2019-10-10T17:43:30 | null | UTF-8 | Python | false | false | 390 | py | # The array is sorted in decreasing order
def count(arr):
start = 0
end = len(arr) - 1
while start <= end:
mid = (start + end) // 2
if arr[mid] == 1 and (arr[mid + 1] == 0 or mid == high):
return mid + 1
if arr[mid] == 1:
start = mid + 1
else:
... | [
"prabhupant09@gmail.com"
] | prabhupant09@gmail.com |
37c6df9686c851389868af110179898a2a55def7 | 8775aac665c4011cc743d737c12342e1b08d8f41 | /config/hosts.py | 3766ccf2d2f934ea128736f30b19f3dc8166cf79 | [] | no_license | kongp3/sys_deploy | 734dfa3815c93305eca77f5d3f9488968c90ef6f | 8cd750c4df3f3f64515e3b0051038569d6e8bce2 | refs/heads/master | 2020-04-09T06:53:01.340569 | 2018-12-03T04:13:22 | 2018-12-03T04:13:22 | 160,131,093 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 176 | py | # -*- coding: utf-8 -*-
from config import *
SERVER_HOSTS = [
SERVER1_USER + '@' + SERVER1_IP,
SERVER2_USER + '@' + SERVER2_IP,
SERVER3_USER + '@' + SERVER3_IP,
]
| [
"kongp3@outlook"
] | kongp3@outlook |
7b57c6b8f00aee7146f0fe59c37715e1d98abd23 | 360558c34098ef95077e70a318cda7cb3895c6d9 | /tests/test_observable/test_windowwithtimeorcount.py | 266b08416b4ddd813c1b2536d83e66bbad25aa6f | [
"Apache-2.0"
] | permissive | AlexMost/RxPY | 8bcccf04fb5a0bab171aaec897e909ab8098b117 | 05cb14c72806dc41e243789c05f498dede11cebd | refs/heads/master | 2021-01-15T07:53:20.515781 | 2016-03-04T04:53:10 | 2016-03-04T04:53:10 | 53,108,280 | 0 | 1 | null | 2016-03-04T04:50:00 | 2016-03-04T04:49:59 | null | UTF-8 | Python | false | false | 3,316 | py | import unittest
from datetime import timedelta
from rx import Observable
from rx.testing import TestScheduler, ReactiveTest, is_prime, MockDisposable
from rx.disposables import Disposable, SerialDisposable
on_next = ReactiveTest.on_next
on_completed = ReactiveTest.on_completed
on_error = ReactiveTest.on_error
subscri... | [
"dag@brattli.net"
] | dag@brattli.net |
f12ce4028eef8a875d3961103e02377c34e07746 | 7a1a65b0cda41ea204fad4848934db143ebf199a | /automatedprocesses_firststage/adsym_core_last60_test.py | c36727a8b0dc54c680f0dc9be9f8cf1ac23510a5 | [] | no_license | bpopovich44/ReaperSec | 4b015e448ed5ce23316bd9b9e33966373daea9c0 | 22acba4d84313e62dbbf95cf2a5465283a6491b0 | refs/heads/master | 2021-05-02T18:26:11.875122 | 2019-06-22T15:02:09 | 2019-06-22T15:02:09 | 120,664,056 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,164 | py | #!/usr/bin/python2.7
import json
from mysql.connector import MySQLConnection, Error
from python_dbconfig import read_db_config
import aol_api_R_test
def connect():
# """Gets AOL Data and writes them to a MySQL table"""
db = "mysql_sl"
api = "adsym"
# Connect To DB:
db_config = read_db_config(db... | [
"bpopovich4@gmail.com"
] | bpopovich4@gmail.com |
6e4dd4e629e9a48bb151508f9ec6c2120f4cb676 | ce3964c7195de67e07818b08a43286f7ec9fec3e | /angle_peaks.py | 3f18f3fab246542885ea6329ac9dc15a38b0f1c8 | [] | no_license | zhuligs/physics | 82b601c856f12817c0cfedb17394b7b6ce6b843c | 7cbac1be7904612fd65b66b34edef453aac77973 | refs/heads/master | 2021-05-28T07:39:19.822692 | 2013-06-05T04:53:08 | 2013-06-05T04:53:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,031 | py | #!/usr/bin/env python
"""
Create a data set of nn_dist peak distances vs rs & P, for a given neighbor
"""
import os, sys, commands, glob
# RS is a list of all the names of the rs directories
global RS
RS = commands.getoutput('ls -1 | grep "1\." | grep -v c').split()
def main():
# Open the output file
out = o... | [
"boates@gmail.com"
] | boates@gmail.com |
d0b528903a9a1e72d759138a3f5ab4c43d124a28 | 494b763f2613d4447bc0013100705a0b852523c0 | /cnn/answer/M1_cp32_3_m_d512.py | f18fed9ba897d5083554c7a56ca3c5934c11fd9c | [] | no_license | DL-DeepLearning/Neural-Network | dc4a2dd5efb1b4ef1a3480a1df6896c191ae487f | 3160c4af78dba6bd39552bb19f09a699aaab8e9e | refs/heads/master | 2021-06-17T05:16:22.583816 | 2017-06-07T01:21:39 | 2017-06-07T01:21:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,704 | py | # libraries & packages
import numpy
import math
import sys
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation, Flatten
from keras.layers import Convolution2D, MaxPooling2D
from keras.optimizers import SGD
from keras.utils import np_utils
from os import listdir
from os.path import is... | [
"teinhonglo@gmail.com"
] | teinhonglo@gmail.com |
88743421203b00b54d21f449bdbbc3fddf47d0a0 | faea85c8583771933ffc9c2807aacb59c7bd96e6 | /python/pencilnew/visu/internal/MinorSymLogLocator.py | 1e83f3c925453c62d8eeb6f112a86c81dcdb0538 | [] | no_license | JosephMouallem/pencil_code | 1dc68377ecdbda3bd3dd56731593ddb9b0e35404 | 624b742369c09d65bc20fdef25d2201cab7f758d | refs/heads/master | 2023-03-25T09:12:02.647416 | 2021-03-22T02:30:54 | 2021-03-22T02:30:54 | 350,038,447 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,328 | py | ##
## symlog tick helper
from matplotlib.ticker import Locator
class MinorSymLogLocator(Locator):
"""
Dynamically find minor tick positions based on the positions of
major ticks for a symlog scaling.
"""
def __init__(self, linthresh):
"""
Ticks will be placed between the major ticks.
The pla... | [
"j3mouall@uwaterloo.ca"
] | j3mouall@uwaterloo.ca |
a69df7f43308fc5480efdd170214dcdb43a9bc12 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03288/s994428906.py | 8f675834b3b195d3bece521191e038e01a6a4385 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 158 | py | def main():
n = int(input())
if n < 1200:
print("ABC")
elif 1200 <= n < 2800:
print("ARC")
else:
print("AGC")
main() | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
942bad6052ac0e1168ff2fd57652246ca6e3a2fd | 3416464630bc3322dd677001811de1a6884c7dd0 | /others/q14_longest_common_prefix/__init__.py | 2e8fe4c2d56cc68aee767b789c99e32124d7ef6d | [] | no_license | ttomchy/LeetCodeInAction | f10403189faa9fb21e6a952972d291dc04a01ff8 | 14a56b5eca8d292c823a028b196fe0c780a57e10 | refs/heads/master | 2023-03-29T22:10:04.324056 | 2021-03-25T13:37:01 | 2021-03-25T13:37:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 149 | py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
FileName: __init__.py.py
Description:
Author: Barry Chow
Date: 2020/12/4 10:45 PM
Version: 0.1
""" | [
"zhouenguo@163.com"
] | zhouenguo@163.com |
9fbd4414790f6c01e7a84591c3d5093412933571 | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-5/1293ec85dd68dfc31183ae9ec654333301103660-<test_distribution_version>-fix.py | fb83f3cec75b577fead88273ad25d671dc08b97c | [] | no_license | wsgan001/PyFPattern | e0fe06341cc5d51b3ad0fe29b84098d140ed54d1 | cc347e32745f99c0cd95e79a18ddacc4574d7faa | refs/heads/main | 2023-08-25T23:48:26.112133 | 2021-10-23T14:11:22 | 2021-10-23T14:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 902 | py | @pytest.mark.parametrize('testcase', TESTSETS, ids=(lambda x: x['name']))
def test_distribution_version(testcase):
'tests the distribution parsing code of the Facts class\n\n testsets have\n * a name (for output/debugging only)\n * input files that are faked\n * those should be complete and also inclu... | [
"dg1732004@smail.nju.edu.cn"
] | dg1732004@smail.nju.edu.cn |
c7097703377e37843c47abd796ec4f333f4d2e77 | fde31c14f7a31bc98221e3959748748c32bfc7ad | /stock/tests.py | 6c296e822db3a61d931e039b2f4a94f5f04f77dd | [] | no_license | schoolofnetcom/django-avancado | d557d05a96db6bc8471fec6cfc1bc80b78ea2266 | 0a9e0c92c437928caf3e647b7d9a35a0633d1ff2 | refs/heads/master | 2021-05-04T19:47:14.636565 | 2018-12-19T22:13:39 | 2018-12-19T22:13:39 | 106,818,135 | 5 | 4 | null | null | null | null | UTF-8 | Python | false | false | 1,908 | py | from django.contrib.auth.models import User
from django.test import TestCase
# Create your tests here.
from django.test.testcases import SimpleTestCase
from django.urls.base import reverse
from stock.models import Product, TimestampableMixin, StockEntry
class ProductTest(SimpleTestCase):
def test_value_initial_... | [
"argentinaluiz@gmail.com"
] | argentinaluiz@gmail.com |
7e5bb7c4fd4c0b14d3a1b3190ac870bc303b7697 | a20c2e03720ac51191c2807af29d85ea0fa23390 | /vowelorconsonant.py | 18231b547eae391f8d07f55d552ba6abc0453b56 | [] | no_license | KishoreKicha14/Guvi1 | f71577a2c16dfe476adc3640dfdd8658da532e0d | ddea89224f4f20f92ebc47d45294ec79040e48ac | refs/heads/master | 2020-04-29T23:32:13.628601 | 2019-08-05T17:48:18 | 2019-08-05T17:48:18 | 176,479,262 | 0 | 3 | null | null | null | null | UTF-8 | Python | false | false | 255 | py | n=input()
a=ord(n)
f=0
if (a in range(97,123))or(a in range(65,98)):
v=[65,69,73,79,85,97,101,105,111,117]
for i in v:
if(i==a):
f=1
print(vowel)
break
if(f==0):
print("Consonant")
else:
print("invalid")
| [
"noreply@github.com"
] | KishoreKicha14.noreply@github.com |
3d48ec33045fb784ead90b898d450e65020f22cd | 40ce4d7545309ca57f0670a3aa27573d43b18552 | /com.ppc.Microservices/intelligence/daylight/location_midnight_microservice.py | c6ef5c09622b3603af1f31da45b9aac04e419e01 | [
"Apache-2.0"
] | permissive | slrobertson1/botlab | 769dab97cca9ee291f3cccffe214544663d5178e | fef6005c57010a30ed8d1d599d15644dd7c870d8 | refs/heads/master | 2020-07-28T06:45:37.316094 | 2019-09-18T15:34:08 | 2019-09-18T15:34:08 | 209,341,818 | 0 | 0 | Apache-2.0 | 2019-09-18T15:23:37 | 2019-09-18T15:23:37 | null | UTF-8 | Python | false | false | 878 | py | '''
Created on February 25, 2019
This file is subject to the terms and conditions defined in the
file 'LICENSE.txt', which is part of this source code package.
@author: David Moss
'''
from intelligence.intelligence import Intelligence
class LocationMidnightMicroservice(Intelligence):
"""
Announce midnight t... | [
"dmoss@peoplepowerco.com"
] | dmoss@peoplepowerco.com |
bee0d4a64d8b86383ac57f7631cf62041079a8ed | b66bf5a58584b45c76b9d0c5bf828a3400ecbe04 | /week-04/4-recursion/6.py | 757f22bf72fb91301f22cd313315ff7f695c6926 | [] | no_license | greenfox-velox/szepnapot | 1196dcb4be297f12af7953221c27cd1a5924cfaa | 41c3825b920b25e20b3691a1680da7c10820a718 | refs/heads/master | 2020-12-21T08:11:41.252889 | 2016-08-13T10:07:15 | 2016-08-13T10:07:15 | 58,042,932 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 501 | py | # 6. We have bunnies standing in a line, numbered 1, 2, ... The odd bunnies
# (1, 3, ..) have the normal 2 ears. The even bunnies (2, 4, ..) we'll say
# have 3 ears, because they each have a raised foot. Recursively return the
# number of "ears" in the bunny line 1, 2, ... n (without loops or
# multiplication).
def ha... | [
"silentpocok@gmail.com"
] | silentpocok@gmail.com |
7ac8563d6aacb10540b4737d547e048a5b5d34cb | 8723e6a6104e0aa6d0a1e865fcaaa8900b50ff35 | /util/test_registration.py | 552ee309cf404634bd31b78fa6016c8364671422 | [] | no_license | ejeschke/ginga-plugin-template | 9c4324b7c6ffaa5009cce718de8ea2fc5172bc81 | 545c785a184aedb1535d161d3c5ca5e7bf5bed6e | refs/heads/master | 2022-11-22T17:50:57.503956 | 2022-11-10T23:20:09 | 2022-11-10T23:20:09 | 78,906,928 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 833 | py | """
This program allows you to test whether your plugin will register
itself correctly.
"""
from pkg_resources import iter_entry_points
groups = ['ginga.rv.plugins']
available_methods = []
for group in groups:
for entry_point in iter_entry_points(group=group, name=None):
available_methods.append(entry_po... | [
"eric@naoj.org"
] | eric@naoj.org |
4ab0aeb36367fb0df10d5a681a0fd858593a06fd | 5d13e9565779b4123e1b72815396eee0051d4980 | /parse_titles_with_dictionary.py | 136868340d5c6c8b92b10d3a91f34b556fdbc104 | [] | no_license | futuresystems-courses/475-Dictionary-Based-Analysis-of-PubMed-Article-Titles-for-Mental-Disorders-Kia | b455574908971e487b99a175d8fdbd48d13f8c60 | 1ab992b1859905ee57e51a258777192b2ec32339 | refs/heads/master | 2021-01-10T11:06:37.112800 | 2015-12-28T17:03:00 | 2015-12-28T17:03:00 | 48,702,480 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,328 | py | import sys
import nltk
import csv
import ast
from operator import itemgetter
import random
stopwords = nltk.corpus.stopwords.words('english')
disorder_phrases = {}
DICTIONARY_FILE = 'mental diseases dictionary.csv'
try:
TITLES_FILE = 'parsed_titles.txt'
except IndexError:
print "\nERROR: No file name given. Ple... | [
"hroe.lee@gmail.com"
] | hroe.lee@gmail.com |
dec11357af01c915a67ab8710067b1a3a55ad0ad | 3f90f4f6876f77d6b43e4a5759b20e2e8d20e684 | /ex10/ex10.py | 89d4ec1d631136bdb021736fec2f1dbed4325af0 | [] | no_license | kwangilahn/kwang | 00d82d1bdca45000ee44fa2be55bdb8bff182c91 | df2fa199648ae894cbcf18952f6924a9b897d639 | refs/heads/master | 2021-01-21T04:47:02.719819 | 2016-06-07T03:59:57 | 2016-06-07T03:59:57 | 54,316,240 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 252 | py | tabby_cat = "\t I'm tabbed in"
persian_cat = "I'm split\non a line"
backslash_cat = "I'm \\ a \\ cat."
fat_cat = """
I'll do a list:
\t* Cat food
\t* Fishes
\t* catnip\n\t* Grass
"""
print tabby_cat
print persian_cat
print backslash_cat
print fat_cat | [
"CAD Client"
] | CAD Client |
6ac47a2b80b00b8628a0e5edd7e2a578430cde8a | 7d2442279b6dbaae617e2653ded92e63bb00f573 | /neupy/layers/transformations.py | ee9240912d7a646656b8944c68acbf4b57ff406b | [
"MIT"
] | permissive | albertwy/neupy | c830526859b821472592f38033f8475828f2d389 | a8a9a8b1c11b8039382c27bf8f826c57e90e8b30 | refs/heads/master | 2021-06-03T21:23:37.636005 | 2016-05-24T21:18:25 | 2016-05-24T21:18:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,522 | py | import numpy as np
import theano.tensor as T
from neupy.core.properties import ProperFractionProperty, TypedListProperty
from .base import BaseLayer
__all__ = ('Dropout', 'Reshape')
class Dropout(BaseLayer):
""" Dropout layer
Parameters
----------
proba : float
Fraction of the input units ... | [
"mail@itdxer.com"
] | mail@itdxer.com |
b63a247f0dd508911578fa7843a6d083a5623821 | ab79f8297105a7d412303a8b33eaa25038f38c0b | /mutif_all_vit_addons/vit_order_analysis/sale_order_analysis.py | c0ecfe10c045ce7610f50f2b9d062756034a7600 | [] | no_license | adahra/addons | 41a23cbea1e35079f7a9864ade3c32851ee2fb09 | c5a5678379649ccdf57a9d55b09b30436428b430 | refs/heads/master | 2022-06-17T21:22:22.306787 | 2020-05-15T10:51:14 | 2020-05-15T10:51:14 | 264,167,002 | 1 | 0 | null | 2020-05-15T10:39:26 | 2020-05-15T10:39:26 | null | UTF-8 | Python | false | false | 1,273 | py | from openerp import tools
from openerp.osv import fields,osv
import openerp.addons.decimal_precision as dp
import time
import logging
from openerp.tools.translate import _
_logger = logging.getLogger(__name__)
class sale_order_analysis(osv.osv):
_name = "vit_order_analysis.sale_order_analysis"
_columns = {
'or... | [
"prog1@381544ba-743e-41a5-bf0d-221725b9d5af"
] | prog1@381544ba-743e-41a5-bf0d-221725b9d5af |
86c3fa0419163a6f6c84f50c5591118e84995339 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_233/ch29_2020_03_04_11_52_21_685286.py | 86e106c02ae7810c6ae8a20278ff5d4c498791af | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 497 | py | inicial = float(input())
taxa = float(input())
aumento = 0
for i in range(24):
valor = inicial * taxa ** i
aumento += valor - inicial
decimos = int(valor * 10 - int(valor))
centesimos = int(valor * 100 - decimos * 10 - int(valor) * 100)
print('%d,%d%d' % (int(valor), decimos, centes... | [
"you@example.com"
] | you@example.com |
4f349f89eb2be66ea2a6218beb51cb31cef6cd36 | 8e62465c912ccbe41e322006a5c62b883e39143d | /src/boot/commands.py | 91a37e3fd7c203c3e16b96d277ed893a5ada17b4 | [
"BSD-3-Clause",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | JayHeng/NXP-MCUBootFlasher | b41dd2ffe0bf2cde61b9deacdb6353835e9e4538 | a7643b2de6429481c3bf54bc2508d7e76c76562d | refs/heads/master | 2022-05-27T06:26:49.532173 | 2022-03-21T07:23:01 | 2022-03-21T07:23:01 | 176,099,535 | 37 | 16 | Apache-2.0 | 2022-03-14T06:28:23 | 2019-03-17T12:42:14 | Python | UTF-8 | Python | false | false | 3,357 | py | #! /usr/bin/env python
# Copyright 2021 NXP
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
from collections import namedtuple
# Command constants.
kCommandTag_FlashEraseAll = 0x01
kCommandTag_FlashEraseRegion = 0x02
kCommandTag_ReadMemory = 0x03
kCommandTag_WriteMemory ... | [
"jie.heng@nxp.com"
] | jie.heng@nxp.com |
747707c028e314a5eff983e4a9e35bede5aae0c0 | fb133bb72cbc965f405e726796e02d01ef8905e2 | /combinatorics/permutations.py | 25809abf4e33cb533feaca93aa0fc997e499ce67 | [
"Unlicense",
"LicenseRef-scancode-public-domain"
] | permissive | eklitzke/algorithms | a90b470c6ea485b3b6227fe74b23f40109cfd1f5 | 170b49c7aaeb06f0a91142b1c04e47246ec52fd1 | refs/heads/master | 2021-01-22T11:15:52.029559 | 2017-05-28T19:39:32 | 2017-05-28T19:39:32 | 92,677,550 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 621 | py | """Implementation of permutations.
This uses the "interleaving" technique, which I find the most intuitive. It's
not the most efficient algorithm.
"""
def interleave(x, xs):
"""Interleave x into xs."""
for pos in range(len(xs) + 1):
yield xs[:pos] + [x] + xs[pos:]
def permutations(xs):
"""Gener... | [
"evan@eklitzke.org"
] | evan@eklitzke.org |
0d4217a71c1443b49fbe2b08c76d0a241f2633fd | c237dfae82e07e606ba9385b336af8173d01b251 | /lib/python/Products/ZCTextIndex/tests/mailtest.py | e8852d178ca4296bb828459acad38e1cdfcd1f25 | [
"ZPL-2.0"
] | permissive | OS2World/APP-SERVER-Zope | 242e0eec294bfb1ac4e6fa715ed423dd2b3ea6ff | dedc799bd7eda913ffc45da43507abe2fa5113be | refs/heads/master | 2020-05-09T18:29:47.818789 | 2014-11-07T01:48:29 | 2014-11-07T01:48:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,988 | py | """Test an index with a Unix mailbox file.
usage: python mailtest.py [options] <data.fs>
options:
-v -- verbose
Index Generation
-i mailbox
-n NNN -- max number of messages to read from mailbox
-t NNN -- commit a transaction every NNN messages (default: 1)
-p NNN -- pack <data.fs> every N... | [
"martin@os2world.com"
] | martin@os2world.com |
4f3c73e27f6f55f81e9f77fb85fc19fbed7f387b | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02928/s256920562.py | c89b4ce6cab3fe975f18c176f86c82863230a7df | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 797 | py | #第一回日本最強プログラマー学生選手権-予選- -B Kleene Inversion
"""
リストをk回繰り返したものの、転倒数の個数を求めよ
先ず純粋に与えられたリスト内での転倒数を求めた後、
それを1~k倍したものを足し合わせる
"""
import sys
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0
mod = 10**9+7
n,k = map(int,readline().split())
lst1 = list(map(int,readline().split()))
fall = 0
fall_al = 0... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
96fd7941d77aa61220eefc52fc789617803291c0 | eaba398a0ca5414c10dd1890e662fdcd87e157b6 | /tests/steps/basic.py | 1ca0ec3034bcc7987e7c7eee0bf0ef965a096c27 | [
"MIT"
] | permissive | coddingtonbear/jirafs | a78f47e59836d9a6024bc287ea2a1247fb297e62 | 778cba9812f99eeaf726a77c1bca5ae2650a35e9 | refs/heads/development | 2023-06-16T00:06:33.262635 | 2022-09-20T04:06:26 | 2022-09-20T04:06:26 | 21,588,191 | 125 | 17 | MIT | 2023-06-02T05:48:53 | 2014-07-07T21:54:20 | Python | UTF-8 | Python | false | false | 3,047 | py | from __future__ import print_function
import collections
import json
import os
import shutil
import subprocess
from behave import *
from jira.client import JIRA
@given("jirafs is installed and configured")
def installed_and_configured(context):
pass
@given("a cloned ticket with the following fields")
def clon... | [
"me@adamcoddington.net"
] | me@adamcoddington.net |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.