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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
af0520a4722ea5f1f8dd0e65547fbf2701eaadfa | fd2aab479e164fc6334ba6de46e1e1a11a4eee37 | /pygamer/ugame.py | 99ea2ffce43b4f228bcad1c1ab36db100dcbd451 | [
"MIT"
] | permissive | cwalther/circuitpython-stage | 4286c61288e672da4249439518a03fae921bf2cf | 9596a5904ed757e6fbffcf03e7aa77ae9ecf5223 | refs/heads/master | 2023-07-13T23:05:10.034386 | 2020-07-18T12:47:18 | 2020-07-18T16:36:09 | 283,866,058 | 0 | 0 | MIT | 2020-07-30T20:01:11 | 2020-07-30T20:01:10 | null | UTF-8 | Python | false | false | 2,890 | py | """
A helper module that initializes the display and buttons for the uGame
game console. See https://hackaday.io/project/27629-game
"""
import board
import digitalio
import analogio
import gamepadshift
import stage
import displayio
import busio
import time
K_X = 0x01
K_O = 0x02
K_START = 0x04
K_SELECT = 0x08
K_DOWN ... | [
"[email protected]"
] | |
9da2db5bfcfd595f9ceebece424d51f7ce16fdcb | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2823/60678/309534.py | ff9fc77e3106db7acaf5c0c5b11bbc5446c89c0d | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 411 | py | a = input()
if a == '2 1':
print(2)
elif a == '1000 1':
print(1000)
elif a == '122 1310':
print(913060508)
elif a == '3 2':
print(5)
elif a == '247 394':
print(579515894)
elif a == '6 4':
print(39)
elif a == '6 4':
print(39)
elif a == '276 803':
print(472119642)
elif a == '141 1620'... | [
"[email protected]"
] | |
35524ae86beda78a5c68d1cabaf6999179bed782 | d2c87e3374e637a22f72ef050d0c868d634443e9 | /tournament.py | 378a79e6895a9e8d2e8a51bfaf4f922f99203636 | [] | no_license | Mec-iS/nanodegree-relationaldb | 64a5a3ca29b27ee52132c73b6c202ddbcaa56c89 | 02f18eb003b405fae24f55ef46fcb507522c829d | refs/heads/master | 2020-06-01T10:01:07.408243 | 2015-03-19T15:31:20 | 2015-03-19T15:31:20 | 32,499,930 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,383 | py | #!/usr/bin/env python
#
# tournament.py -- implementation of a Swiss-system tournament
#
import psycopg2
def connect():
"""Connect to the PostgreSQL database. Returns a database connection."""
return psycopg2.connect("dbname=tournament user=vagrant")
def deleteMatches():
"""Remove all the match recor... | [
"[email protected]"
] | |
56090a90809fe8aa497d3bc52c32b42be2a07449 | 3b9b4049a8e7d38b49e07bb752780b2f1d792851 | /src/sync/syncable/DEPS | b0c904e40965a30b6f4ee6ae362b1d0d7dc40ede | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | webosce/chromium53 | f8e745e91363586aee9620c609aacf15b3261540 | 9171447efcf0bb393d41d1dc877c7c13c46d8e38 | refs/heads/webosce | 2020-03-26T23:08:14.416858 | 2018-08-23T08:35:17 | 2018-09-20T14:25:18 | 145,513,343 | 0 | 2 | Apache-2.0 | 2019-08-21T22:44:55 | 2018-08-21T05:52:31 | null | UTF-8 | Python | false | false | 259 | include_rules = [
"+net/base/escape.h",
"+sql",
"+sync/api/attachments",
"+sync/base",
"+sync/internal_api/public/base",
"+sync/internal_api/public/engine",
"+sync/internal_api/public/util",
"+sync/protocol",
"+sync/test",
"+sync/util",
]
| [
"[email protected]"
] | ||
81c2e9fcbbd0b7dc64330d4b895b0b65f9cac825 | b4bc5fb10b0d498cb0d3e5ee2ce3473b10b553e5 | /fast_transformers/recurrent/attention/self_attention/fradamax_attention.py | 99342c8b72ae8ed6b8e5873ca2bced7ffb99fc31 | [] | no_license | minhtannguyen/momentum-transformer-code-submission | 2f0005028ab7e32957612f642330acd802bded8e | 68b11ce5564a8212cd91cb2093b457a00d511046 | refs/heads/master | 2023-05-31T19:20:57.380490 | 2021-06-04T15:08:26 | 2021-06-04T15:08:26 | 373,784,396 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,207 | py | """Implement the causally masked linear attention as a recurrent model."""
import torch
from torch.nn import Module
from ....attention_registry import RecurrentAttentionRegistry, Optional, Float, Int, \
Callable, EventDispatcherInstance
from ....events import EventDispatcher
from ....feature_maps import elu_featu... | [
"[email protected]"
] | |
3f155324903843bae4304f1068687cdf92ed8338 | dba16143d8fa6aa73ca1d4df7bcfaca42824412c | /tests/src/year2021/test_day18a.py | 4a8bf87f8680744f81d6ef29b60953d7cddcb317 | [
"Unlicense"
] | permissive | lancelote/advent_of_code | 84559bf633189db3c3e4008b7777b1112f7ecd30 | 4b8ac6a97859b1320f77ba0ee91168b58db28cdb | refs/heads/master | 2023-02-03T14:13:07.674369 | 2023-01-24T20:06:43 | 2023-01-24T20:06:43 | 47,609,324 | 11 | 0 | null | 2019-10-07T07:06:42 | 2015-12-08T08:35:51 | Python | UTF-8 | Python | false | false | 3,719 | py | """2021 - Day 18 Part 1: Snailfish."""
import functools
from textwrap import dedent
import pytest
from src.year2021.day18a import explode
from src.year2021.day18a import Node
from src.year2021.day18a import reduce
from src.year2021.day18a import solve
from src.year2021.day18a import split
@pytest.mark.parametrize(
... | [
"[email protected]"
] | |
d9ac7951c1faea6379410b63657b01be113355d3 | d0d94276979375dd0e2ce0629afdfc9e7a1ca52e | /program/agent/basic.py | fafd805dd273843147d87a5c31748f7f0716b756 | [] | no_license | haoxizhong/handy | 04f1abfe9855eb30531e51ad833b546438502a7c | e805dcabdb50d25f852d2eaec583fba7f6709e18 | refs/heads/master | 2020-03-08T10:20:09.245659 | 2018-05-03T08:38:57 | 2018-05-03T08:38:57 | 128,070,628 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 167 | py | class BasicAgent:
def __init__(self, k, mod):
pass
def reinit(self):
pass
def next_step(self, l1, r1, l2, r2, action_list):
pass
| [
"[email protected]"
] | |
9a9a722f51886c3fdb5a4a62aed3c8878ddfb36e | 8ccf2280a5b14e5003cf876692f99fad59d47d92 | /coding_corner/urls.py | 6f0326b80566c55784e65c3b1673feede0bd7ee1 | [] | no_license | Ngahu/coding-corner | aa746dc0cac84f91c4afee620a593b7745a31b20 | 199839d093f4261384282e687af00a6dc46ae7f2 | refs/heads/master | 2020-03-11T05:00:12.444649 | 2018-04-16T20:13:51 | 2018-04-16T20:13:51 | 129,790,773 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 248 | py |
from django.conf.urls import include,url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^api-auth/', include('rest_framework.urls')),
url(r'^todo/', include('todo.urls', namespace='todo')),
]
| [
"[email protected]"
] | |
9dc9d9fb1df3a21179180a6280037b1caa2c6bb4 | e7718e75201b5506206871da1239e1e49c0c438e | /djredcap/management/commands/redcap.py | 504014e946de7f547374d5fc0346750477f76f0d | [
"BSD-3-Clause"
] | permissive | dmegahan/django-redcap | aeca161f463ac5b69a8b6ae7beeb2d441bc18b26 | 9907bf8d35c02ab5937c60fdcd5c9bd88ccb24d8 | refs/heads/master | 2021-01-18T08:55:20.825128 | 2013-07-12T20:18:53 | 2013-07-12T20:18:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,862 | py | import sys
from optparse import NO_DEFAULT, OptionParser
from django.core.management.base import CommandError, BaseCommand, handle_default_options
from django.utils.importlib import import_module
class Command(BaseCommand):
help = "A wrapper for REDCap subcommands"
commands = ['inspect']
def print_subco... | [
"[email protected]"
] | |
8118b5fbdb5b2009ee62c064de4350914636261b | 78d23de227a4c9f2ee6eb422e379b913c06dfcb8 | /LeetCode/205.py | 3bee43846ede99d934ea7b76898a58a5aed0797e | [] | no_license | siddharthcurious/Pythonic3-Feel | df145293a3f1a7627d08c4bedd7e22dfed9892c0 | 898b402b7a65073d58c280589342fc8c156a5cb1 | refs/heads/master | 2020-03-25T05:07:42.372477 | 2019-09-12T06:26:45 | 2019-09-12T06:26:45 | 143,430,534 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 650 | py | class Solution:
def isIsomorphic(self, s, t):
"""
:type s: str
:type t: str
:rtype: bool
"""
s1 = set(s)
t1 = set(t)
if len(s1) != len(t1):
return False
hashmap = {}
for i, j in zip(s,t):
if i in hashmap:
... | [
"[email protected]"
] | |
48627bb2a04d19b055aa36f14dabc49952e1c8a7 | e10422c540b3199cc5663c1c226ae2b8f24fd5cf | /OsComponents/mkdir_func.py | 7a3f21eb0fc810380d92f8b8716383523d149003 | [] | no_license | cccccsf/single_point | f014a9f0a18eb30ddd4a967a822eba3bd26ed53a | 61cc11b0c40e082b45c5458c8435dbea001af466 | refs/heads/master | 2020-05-09T10:10:05.035435 | 2019-05-07T12:44:30 | 2019-05-07T12:44:30 | 181,030,692 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 674 | py | #!/usr/bin/python3
import os
def mkdir(path):
folder = os.path.exists(path)
if not folder: #判断是否存在文件夹如果不存在则创建为文件夹
os.makedirs(path) #makedirs 创建文件时如果路径不存在会创建这个路径
print("--- new folder: ---")
print(os.path.split(os.path.split(os.path.split(path)[0])[0])[-1] + '/' + os.path.spli... | [
"[email protected]"
] | |
7fc5ebfee57b2b9578b1c963127de47bf9d7bf00 | c5294a8e9a6aa7da37850443d3a5d366ee4b5c35 | /build/spencer_people_tracking/messages/spencer_vision_msgs/catkin_generated/pkg.installspace.context.pc.py | 44a3d4ad2ccc89c32276c0ffe532f9874abd3346 | [] | no_license | scutDavid/ros_gradution_project | 6eab9a5776ae090ae8999d31e840a12a99020c79 | fbbd83ada5aa223809615d55a48e632699afd4b5 | refs/heads/master | 2020-03-07T18:39:24.084619 | 2018-04-25T13:41:04 | 2018-04-25T13:41:04 | 127,647,113 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 489 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/wwh/qqq/install/include".split(';') if "/home/wwh/qqq/install/include" != "" else []
PROJECT_CATKIN_DEPENDS = "roscpp;std_msgs;sensor_msgs;geometry_msgs;message_runtime".replace(';', ' ')
PKG_CON... | [
"[email protected]"
] | |
2de1274d7baaf6c2df45857c1c62f0be6aeb0e56 | e3c79bc77c660dd400e68ed498d876ec1b2a54f3 | /distances.py | 9686a61d7745b417ce403e8bcdcdd4ff25cde4cb | [] | no_license | rotolonico/image-regression | e3267e184b8ad30c3b8ce24d75b0a0b83eec9354 | edef7bf3aa9bc5b58c97e91fc4ffd3ac43ad9293 | refs/heads/master | 2022-09-11T02:23:20.387385 | 2020-06-02T17:26:08 | 2020-06-02T17:26:08 | 268,854,054 | 0 | 0 | null | 2020-06-02T16:35:45 | 2020-06-02T16:35:45 | null | UTF-8 | Python | false | false | 1,176 | py | from __future__ import division
import argparse
from skimage.io import imread
import numpy as np
from tsp_solver.greedy import solve_tsp
"""
Naively calculate a short path through the images
"""
arg_parser = argparse.ArgumentParser()
arg_parser.add_argument(
'-i',
dest='image_filenames',
nargs='+',
... | [
"[email protected]"
] | |
0c02dd809ad65b1b45b65187e2984797641b152a | 275a96a33ae1f89e7b2ee0ecdbac7d78abe6d6cc | /test/test_run_operation_result.py | 858116adc0976720fb2bb7ad92ca5198c0249495 | [] | no_license | cascadiarc/cyclos-python-client | 8029ce07174f2fe92350a92dda9a60976b2bb6c2 | a2e22a30e22944587293d51be2b8268bce808d70 | refs/heads/main | 2023-04-03T16:52:01.618444 | 2021-04-04T00:00:52 | 2021-04-04T00:00:52 | 354,419,532 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 903 | py | # coding: utf-8
"""
Cyclos 4.11.5 API
The REST API for Cyclos 4.11.5 # noqa: E501
OpenAPI spec version: 4.11.5
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import swagger_client
from swagger_client.models.run_ope... | [
"[email protected]"
] | |
8ea9654512a97537bcda051c9e026e93673c53da | eee85a1ee54fa54e74b93bf3af8391c3f0c80b2a | /basic/python_izm01/joinpath.py | 15e64e79b249d6c2dbacd0b88e92f6391351436d | [] | no_license | ryu-0406/study-python | 8712a6e235e1ca92bb3c00ad053c8298f691108c | da10d5913de32569b2ba4bc98d9919a78e85d22a | refs/heads/master | 2022-12-14T22:43:45.236184 | 2020-09-13T03:55:36 | 2020-09-13T03:55:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 195 | py | # os.join.path
import os
PROJECT_DIR = 'C:\python-izm'
SETTING_FILE = 'setting.ini'
print(os.path.join(PROJECT_DIR, SETTING_FILE))
print(os.path.join(PROJECT_DIR, 'setting_dir', SETTING_FILE))
| [
"[email protected]"
] | |
337304ee03e82971ba43476dce4568be927b4c77 | 44d1936bbc8e256534f3946f100bb0028e92fee5 | /backend/src/hatchling/builders/hooks/version.py | e139d19d9c3fdd6576fe6d2c89376873ed7d7b45 | [
"MIT"
] | permissive | pypa/hatch | aeb72e6a465a39073a020f63a931def16ce90ce8 | 7dac9856d2545393f7dd96d31fc8620dde0dc12d | refs/heads/master | 2023-09-04T04:04:25.079348 | 2023-09-03T23:48:21 | 2023-09-03T23:48:21 | 92,997,800 | 1,869 | 125 | MIT | 2023-09-13T19:39:25 | 2017-05-31T23:37:53 | Python | UTF-8 | Python | false | false | 2,362 | py | from __future__ import annotations
from typing import Any
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
from hatchling.version.core import VersionFile
class VersionBuildHook(BuildHookInterface):
PLUGIN_NAME = 'version'
def __init__(self, *args: Any, **kwargs: Any) -> None:
... | [
"[email protected]"
] | |
922d426fc1139ee74ca4893cc71971950691e447 | cec68acfc0187b7d92fb7d6e5107058e3f8269ea | /OOPRehber.py | ca98535ddc792915a8aac56bbfe827b36e878c99 | [] | no_license | vektorelpython/Python8 | 441575224100a687467c4934f7c741aa0c4bd087 | d135fbf1444d56a0da38c42fd2e8feda48646f49 | refs/heads/master | 2022-01-18T12:17:40.387422 | 2019-09-07T13:47:55 | 2019-09-07T13:47:55 | 205,534,765 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,727 | py | from datetime import datetime
import os
class OOPDosya():
dosyaFormat = ".csv"
def __init__(self,**kwargs):
self.dosya = None
for key,value in kwargs.items():
if key == "dosya":
self.adres =os.getcwd()+os.sep+value+self.dosyaFormat
if key == "veriler":
... | [
"Kurs"
] | Kurs |
0077d6ec93d6be2f47c4029e0d2c475b5640c47f | 3a4fbde06794da1ec4c778055dcc5586eec4b7d2 | /@lib/12-13-2011-01/vyperlogix/ssl/__init__.py | eb74e37cfe6c8bc07909756a2517d38c03690188 | [] | no_license | raychorn/svn_python-django-projects | 27b3f367303d6254af55c645ea003276a5807798 | df0d90c72d482b8a1e1b87e484d7ad991248ecc8 | refs/heads/main | 2022-12-30T20:36:25.884400 | 2020-10-15T21:52:32 | 2020-10-15T21:52:32 | 304,455,211 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,136 | py | __copyright__ = """\
(c). Copyright 2008-2014, Vyper Logix Corp., All Rights Reserved.
Published under Creative Commons License
(http://creativecommons.org/licenses/by-nc/3.0/)
restricted to non-commercial educational use only.,
http://www.VyperLogix.com for details
THE AUTHOR VYPER LOGIX CORP DISCLAIMS ... | [
"[email protected]"
] | |
3ecf8dfe7d9571bffd4b64faea23576dd474e7a9 | 14fc2ee47e1081416f0465e8afa18da33169095f | /src/PP4E/Internet/Other/http-getfile.py | 457616b78f1fe71aee22b13b3dcdf0b7839d82a9 | [] | no_license | madtyn/progPython | d95ea8021b1a54433e7b73de9d3b11d53a3096b7 | f3a1169149afdeb5191dd895462139f60d21d458 | refs/heads/master | 2021-07-09T13:35:27.519439 | 2017-10-04T14:46:57 | 2017-10-04T14:46:57 | 104,866,903 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,486 | py | """
fetch a file from an HTTP (web) server over sockets via http.client; the filename
parameter may have a full directory path, and may name a CGI script with ? query
parameters on the end to invoke a remote program; fetched file data or remote
program output could be saved to a local file to mimic FTP, or parsed wit... | [
"[email protected]"
] | |
a5c236042dbe21c66ff0f9cabec1cdaf04ff4535 | 24353bdd2695f7d277f00f1397b2fcc06a1413fe | /omsdk/http/sdkrestpdu.py | 1ef2eabd17449d6aab16f19fd08a9be4b26d8016 | [
"Apache-2.0",
"GPL-3.0-only",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | DanielFroehlich/omsdk | f129eb43a9335e29a9b1bb01b29a5c886138ea82 | 475d925e4033104957fdc64480fe8f9af0ab6b8a | refs/heads/master | 2020-04-10T00:16:48.223458 | 2018-12-06T14:00:33 | 2018-12-06T14:00:33 | 160,680,831 | 0 | 0 | Apache-2.0 | 2018-12-06T13:46:07 | 2018-12-06T13:46:07 | null | UTF-8 | Python | false | false | 4,655 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
#
# Copyright © 2018 Dell Inc. or its subsidiaries. All rights reserved.
# Dell, EMC, and other trademarks are trademarks of Dell Inc. or its subsidiaries.
# Other trademarks may be trademarks of their respective owners.
#
# Licensed under the Apache License, Ver... | [
"[email protected]"
] | |
ecae9cbc32b6ec9ff2a4302c98197f778c67bb43 | b3d86713ed58e0b7fe3c1191324e36659c0d9d78 | /RegressionProgram/Testcode/kmeans/kmeans_test1.py | 6cd86f98bfc94b55fd5f3dc719af5851cedc2e96 | [] | no_license | Kose-i/machine_learning_tutorial | 3d6cb30a20d65c66aa6efcba0e693de75791507a | def223fecb459ad1a6e7f9f36b3d733a89efd378 | refs/heads/master | 2021-07-03T10:37:26.809388 | 2020-07-27T12:53:19 | 2020-07-27T12:53:19 | 174,057,143 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 511 | py | #!/usr/bin/env python3
import numpy as np
import matplotlib.pyplot as plt
import kmeans
np.random.seed(0)
points1 = np.random.randn(50,2)
points2 = np.random.randn(50,2) + np.array([5,0])
points3 = np.random.randn(50,2) + np.array([5,5])
points = np.r_[points1, points2, points3]
np.random.shuffle(points)
model = km... | [
"[email protected]"
] | |
a3275208520062eedf2819e57546d3a412078bde | f1a5905649c19688f2d01998da805dbdd5b73a5d | /supervised_learning/0x06-keras/7-train.py.bak | 834bd89ded9a75a8f806b9a74ca732608ed8c39f | [] | no_license | Aishaharrash/holbertonschool-machine_learning | 4d388daab993848b8c354af33478e14b04a6ef25 | 8a3792da58e6102293cd2b4aadc938c264ec3928 | refs/heads/main | 2023-06-07T07:16:37.643164 | 2021-07-09T19:14:47 | 2021-07-09T19:14:47 | 358,292,419 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,430 | bak | #!/usr/bin/env python3
"""
7-train.py
Module that defines a function called train_model
"""
import tensorflow.keras as K
def train_model(network, data, labels, batch_size, epochs,
validation_data=None, early_stopping=False,
patience=0, learning_rate_decay=False, alpha=0.1,
... | [
"vagrant@precise32.(none)"
] | vagrant@precise32.(none) |
cc1137e006408026a166b891fd18a04af1c92d3a | c0b10aa2dbb20d916cf77c31aab9f27c3003ecdb | /constructbinarysearchtreefrompreordertraversal1008.py | e8b70142385656e327035da093e1706b8af6380d | [] | no_license | cc13ny/LeetcodePractices | f6ba4881ebaa6d739cc01217d21653ae971f837d | 95f3344a14e10a8ba7816632a6d2177c6c81b8a3 | refs/heads/master | 2021-01-14T14:38:12.559455 | 2020-02-24T03:59:38 | 2020-02-24T03:59:38 | 242,645,175 | 0 | 0 | null | 2020-02-24T04:19:18 | 2020-02-24T04:19:17 | null | UTF-8 | Python | false | false | 2,259 | py | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def bstFromPreorder(self, preorder):
#tree construction. insertion
if preorder == []:
return None
sel... | [
"[email protected]"
] | |
4177d7077e1bed4f0b9976c80926b62327c04b29 | 62ccdb11daefaecc8e63f235c7519cc7594f705a | /images/google-cloud-sdk/.install/.backup/lib/googlecloudsdk/command_lib/compute/sole_tenancy/node_groups/flags.py | e1dc5a919cd87800bfb7e546356817c7a02ba3cf | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | hiday1979/kalabasa-mas | eccc869bfe259bb474f9d2a4dc4b8561a481f308 | 53a9818eb2a6f35ee57c4df655e7abaaa3e7ef5b | refs/heads/master | 2021-07-05T16:34:44.962142 | 2018-07-10T10:22:24 | 2018-07-10T10:22:24 | 129,709,974 | 0 | 1 | null | 2020-07-24T22:15:29 | 2018-04-16T08:27:13 | Python | UTF-8 | Python | false | false | 2,212 | py | # Copyright 2018 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | [
"[email protected]"
] | |
362a7f37cbf41cc98839d61d62cb53d2eb8d9c2e | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/resolve/NumpyDocstringAttributeNameResolvesToInheritedClassAttribute.py | 63f5ca2af921064b5e58ab99eb759e16d26333fb | [
"Apache-2.0"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Python | false | false | 226 | py | class Foo:
"""
Attributes
----------
bar
Something cool
"""
bar = 1
class Baz(Foo):
"""
Attributes
----------
bar
<ref>
Re-documented but does exist still.
""" | [
"[email protected]"
] | |
84c352a89e220a60388723a844f438c3b940417c | caf8cbcafd448a301997770165b323438d119f5e | /.history/chapter01/python_05_if_condition_20201128215853.py | 959c6f854e6f730e5993c42e442d673bb15cbb06 | [
"MIT"
] | permissive | KustomApe/nerdape | 03e0691f675f13ce2aefa46ee230111247e90c72 | aef6fb2d1f8c364b26d91bf8570b4487a24de69a | refs/heads/main | 2023-01-23T10:13:26.584386 | 2020-11-28T22:29:49 | 2020-11-28T22:29:49 | 309,897,105 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,253 | py | """[if文について]
もし〜だったら、こうして
"""
# if 条件:
# 実行するブロック
# 条件によって処理を適応したい場合
# 3000kmごとにオイル交換しないといけない
distance = 3403
# if distance > 3000:
# print('オイル交換時期です')
# 文字列を比較する/リストを比較する
# if 'abc' == 'ABC':
# print('1同類です')
# if 'CDE' == 'CDE':
# print('2同類です')
# if 'あいうえお' == 'あいうえお':
# print('3同類です')
# if ... | [
"[email protected]"
] | |
8b09045d5961b139ce54084cacb2092c4503929d | 352b4d34a5d6f9b5fb6949f92f32cb1154c738c3 | /bin/quota-alignment/scripts/bed_utils.py | 52af9c802e37b56f44eb4667f6be7ef0494dfab8 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | LyonsLab/coge | f03d812273a5ff18880c61663a4114f3cbc6d3d5 | 1d9a8e84a8572809ee3260ede44290e14de3bdd1 | refs/heads/master | 2022-01-21T22:29:57.269859 | 2021-12-21T19:56:46 | 2021-12-21T19:56:46 | 11,158,196 | 41 | 24 | null | 2017-02-03T20:57:44 | 2013-07-03T18:28:31 | Perl | UTF-8 | Python | false | false | 3,433 | py | """
Classes to handle the .bed file and .raw file
"""
# get the gene order given a Bed object
get_order = lambda bed: dict((f['accn'], (i, f)) for (i, f) in enumerate(bed))
class BedLine(object):
# the Bed format supports more columns. we only need
# the first 4, but keep the information in 'stuff'.
__slot... | [
"[email protected]"
] | |
dfe9d224723292a459b863bc082a0024999c5ff6 | f971b59661f080752f5ff09daf1afc6eed855c25 | /genteams.py | da3c97bf653d54f382f847d46da7b92f8745b586 | [] | no_license | firstwiki/_scripts | ec11790e788e6627612711f018108d872e0edde0 | c7471955d4dc2368489c5270cbf05a8db714aec0 | refs/heads/master | 2020-04-06T04:24:33.468256 | 2018-05-12T06:52:12 | 2018-05-12T06:52:12 | 56,561,704 | 1 | 2 | null | 2016-12-18T00:13:13 | 2016-04-19T03:28:46 | Python | UTF-8 | Python | false | false | 4,972 | py | #!/usr/bin/env python
from collections import OrderedDict
import csv
import sys
import os
from os.path import abspath, dirname, exists, join
import optparse
import frontmatter
import code_from_gh
import yaml
def read_team_csv(csv_fname):
with open(csv_fname) as fp:
reader = csv.reader(fp)
for r... | [
"[email protected]"
] | |
0bfc3d132f23f8bb46e283bf3c17aac860f485f1 | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/errorlog_for_lts_request.py | 7d39c203c27e140395863f4f45c45340b5c45009 | [
"Apache-2.0"
] | permissive | huaweicloud/huaweicloud-sdk-python-v3 | cde6d849ce5b1de05ac5ebfd6153f27803837d84 | f69344c1dadb79067746ddf9bfde4bddc18d5ecf | refs/heads/master | 2023-09-01T19:29:43.013318 | 2023-08-31T08:28:59 | 2023-08-31T08:28:59 | 262,207,814 | 103 | 44 | NOASSERTION | 2023-06-22T14:50:48 | 2020-05-08T02:28:43 | Python | UTF-8 | Python | false | false | 8,936 | py | # coding: utf-8
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ErrorlogForLtsRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attrib... | [
"[email protected]"
] | |
c06ba9ae8cbb221882a80e62e7997bda650aa489 | 3a69627c55058a4c0933d16b29d0d7a7c91e172c | /students/management/commands/enroll_reminder.py | 60b687eb6604cecdd298fc70012469af8e5fe88a | [] | no_license | xor0x/educa | bb3647eba80fbabd07cb3604dfb3bb76e3a7fe12 | 6b97146d2e9f412645ccf04b63bfaee246a43b9e | refs/heads/master | 2020-11-28T03:29:37.144939 | 2020-01-05T10:17:50 | 2020-01-05T10:17:50 | 229,693,351 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,350 | py | import datetime
from django.conf import settings
from django.core.management.base import BaseCommand
from django.core.mail import send_mass_mail
from django.contrib.auth.models import User
from django.db.models import Count
"""
from django.core import management
management.call_command('enroll_reminder', days=20)
"""
... | [
"[email protected]"
] | |
e08edfe5a814aa3fdc8decd50ddae5f935b47d4f | f462679e25ee5dbae2a761f0222bc547f7b9da65 | /backup/srcPython/srcPython_desk_100119/out_minxss_sma_average.py | 780a1e8e0761b427b46f5edd893a2329c3362ac5 | [
"Apache-2.0"
] | permissive | FengYongQ/spock | f31a2f9cac58fbb1912f8e7b066b5318e0223835 | 08c01c01521429a70b5387e8769558e788f7cd3e | refs/heads/master | 2021-06-13T03:09:23.903196 | 2020-01-25T03:32:41 | 2020-01-25T03:32:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 200 | py | # Reads the output of minxss_sma_average.py
from read_input_file import *
from read_output_file import *
from orbit_average import *
def out_minxss_sma_average(main_input_filename_list, date_ini):
| [
"[email protected]"
] | |
00935ac28db148eb7bb1523af3c2be6cecafadc1 | fcdfe976c9ed60b18def889692a17dc18a8dd6d7 | /python/torch/list_cuda.py | c612de25cf8031c6597471eb13d2694a2b9c0425 | [] | no_license | akihikoy/ay_test | 4907470889c9bda11cdc84e8231ef3156fda8bd7 | a24dfb720960bfedb94be3b4d147e37616e7f39a | refs/heads/master | 2023-09-02T19:24:47.832392 | 2023-08-27T06:45:20 | 2023-08-27T06:45:20 | 181,903,332 | 6 | 3 | null | null | null | null | UTF-8 | Python | false | false | 397 | py | #!/usr/bin/python3
#\file list_cuda.py
#\brief List available CUDA devices.
#\author Akihiko Yamaguchi, [email protected]
#\version 0.1
#\date Oct.01, 2021
import torch
if __name__=='__main__':
print('Number of CUDA devices:', torch.cuda.device_count())
for i in range(torch.cuda.device_count()):
print... | [
"[email protected]"
] | |
5ad34a82314714deb74abfef98c2187642cbb641 | ac1fdf53359b53e183fb9b2602328595b07cf427 | /ParlAI/parlai/mturk/tasks/turn_annotations/constants.py | 643cf8e3310559f96493d3bed502bd3c31b66074 | [] | no_license | Ufukdogann/MasterThesis | 780410c5df85b789136b525bce86ba0831409233 | b09ede1e3c88c4ac3047800f5187c671eeda18be | refs/heads/main | 2023-01-24T18:09:52.285718 | 2020-11-27T16:14:29 | 2020-11-27T16:14:29 | 312,416,173 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 129 | py | version https://git-lfs.github.com/spec/v1
oid sha256:f604cb6189404aba2ec507ce5de08423d480fef202b1e438be8dfa3fbc7537bb
size 3113
| [
"134679852Ufuk*"
] | 134679852Ufuk* |
eeacb3481567c6c734549b300e411fe3b2b860d9 | b5a9d42f7ea5e26cd82b3be2b26c324d5da79ba1 | /tensorflow/python/eager/remote_test.py | edd00bc1f3f14fe6cc0d3a71becd864c3a8016f0 | [
"Apache-2.0"
] | permissive | uve/tensorflow | e48cb29f39ed24ee27e81afd1687960682e1fbef | e08079463bf43e5963acc41da1f57e95603f8080 | refs/heads/master | 2020-11-29T11:30:40.391232 | 2020-01-11T13:43:10 | 2020-01-11T13:43:10 | 230,088,347 | 0 | 0 | Apache-2.0 | 2019-12-25T10:49:15 | 2019-12-25T10:49:14 | null | UTF-8 | Python | false | false | 8,185 | py | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | [
"[email protected]"
] | |
44719b0024dc4b15ac8a0ec83ddb63cfba8e3093 | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-4/d278160c1fd0e8c3b24ee96c4fd91dddbbfab668-<_print_figure_tex>-bug.py | 60b91491bf1a7503ebe33d299abe5c10dfd4340c | [] | 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,481 | py | def _print_figure_tex(self, outfile, format, dpi, facecolor, edgecolor, orientation, isLandscape, papertype, metadata=None, **kwargs):
"\n If text.usetex is True in rc, a temporary pair of tex/eps files\n are created to allow tex to manage the text layout via the PSFrags\n package. These files ... | [
"[email protected]"
] | |
6e4c7c1f9873362de85924eedfa8590b9c5b2ebb | d7ee76b7f1d6cd038982335792f15959a58a8395 | /SWEA/3234. 준환이의 양팔저울.py | 4a705c6bef72acc0c16a6712a19c0da4eed31725 | [] | no_license | min1378/-algorithm | 1c5dea6b2f03e4d376275cfccbf11b240bc659d9 | bfb720277160077a816deec21469a7e597c62d14 | refs/heads/master | 2021-08-02T06:54:10.478501 | 2021-07-31T14:03:01 | 2021-07-31T14:03:01 | 202,688,865 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,127 | py | def make_per(k):
if k == N:
scale(0, 0, 0)
else:
for i in range(N):
if visited[i]:
continue
visited[i] = True
per[k] = mass[i]
make_per(k + 1)
visited[i] = False
def scale(k, left, right):
global cnt
if k == N... | [
"[email protected]"
] | |
e2e9258cf1c302d8bd7e00834cca4cb299126b6b | a95cf706c3111069c75055d558a710dfe8538195 | /collective/dexteritytextindexer/tests/test_utils.py | ee435d7e486a1d2b1037d5c9026fa6f0d0928a0f | [] | no_license | gusunavarro/collective.dexteritytextindexer | 2854409eff0f843be8ed92febbbb6698e452c4d4 | 34394c1c9b2016a14985ae3314d45b3a695790eb | refs/heads/master | 2021-01-16T21:28:00.404619 | 2012-03-16T11:49:09 | 2012-03-16T11:49:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 708 | py | from collective.dexteritytextindexer.directives import SEARCHABLE_KEY
from collective.dexteritytextindexer.utils import searchable
from plone.directives import form
from plone.supermodel.utils import mergedTaggedValueList
from unittest2 import TestCase
from zope import schema
class IExample(form.Schema):
foo = s... | [
"[email protected]"
] | |
04ec7b26a157c4907b015ca5d1c3f74ae18fd6f0 | 4ad0cfa350552458df8a0270038ed436bd1d06f4 | /interface/login.py | c25249f7829acc58a9d598047ec4c22ca03e182d | [] | no_license | fzk466569/python_tkinter | 4b2e505f91bc4f73d632bb4fe029bd3a3b07c590 | 8c63ac171d171cd13c7891426841279f2ef53262 | refs/heads/master | 2021-01-21T11:26:38.127214 | 2017-08-31T13:15:27 | 2017-08-31T13:15:27 | 102,001,271 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,364 | py | from tkinter import *
import tkinter.messagebox
from repository.user import login_check
from interface.main_form import MainForm
class Login(object):
def __init__(self):
self.login = Tk()
self.login.title('基于webshell的校园网络安全系统')
self.login.iconbitmap('../images/title.ico')
input =... | [
"fzk466569"
] | fzk466569 |
298c771a14c37a067196a174028e535fb052e119 | 47d1beba77ebde115c5d41b25a15ef144068c930 | /news/forms.py | 886b4b2d2460532d39973216f0431677c60234a9 | [] | no_license | uchicago-library/library_website | f32d7dcaf793b4646cac37ba7270715dccf84820 | e5912a17ed2de3a61ede2fbebda4a258664ff696 | refs/heads/master | 2023-08-16T20:20:45.063253 | 2023-08-10T21:19:12 | 2023-08-10T21:19:12 | 39,917,251 | 5 | 4 | null | 2023-08-10T21:19:14 | 2015-07-29T21:27:58 | Python | UTF-8 | Python | false | false | 405 | py | from django import forms
class EmailNotificationTestForm(forms.Form):
email_from = forms.EmailField(label='From email address:')
email_to = forms.EmailField(label='To email address:')
num_days = forms.IntegerField(label='Number of days of news stories to summarize:')
email_as_if_date = forms.DateField(... | [
"[email protected]"
] | |
6cbb7370e69db54a2b4d182c802e8fcd78aa82c8 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_cosmologies.py | e9122b4cb835c96b392e497a2cc11aa129f2ef0e | [
"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 | 236 | py |
#calss header
class _COSMOLOGIES():
def __init__(self,):
self.name = "COSMOLOGIES"
self.definitions = cosmology
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['cosmology']
| [
"[email protected]"
] | |
1c71026b627e3c90fc1188ef5c29c34a20fee5de | 991cd70073c162f637fbec3a9e921707aa434b8e | /opentelemetry-resourcedetector-gcp/src/opentelemetry/resourcedetector/gcp_resource_detector/_gke.py | 85588604c1b20ff45c51d068a2f19032307303ed | [
"Apache-2.0"
] | permissive | GoogleCloudPlatform/opentelemetry-operations-python | 700a59c954cd18ae6428032339d01908580a4f2d | b0ca7decb6a5bb01409822e746b7463f4a7a76ba | refs/heads/main | 2023-08-18T11:24:59.282098 | 2023-08-15T17:02:54 | 2023-08-15T17:02:54 | 244,484,614 | 49 | 42 | Apache-2.0 | 2023-09-01T14:42:48 | 2020-03-02T22:00:22 | Python | UTF-8 | Python | false | false | 1,677 | py | # Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | [
"[email protected]"
] | |
064eff60e1077689e1a891e530570737476af76d | 749faa57b9adbe1ee762b0ad0e5f8fa1f71e1f20 | /python/tests/utils_test.py | a552d125000c72741270f610a5266754f5b25655 | [
"Apache-2.0"
] | permissive | bitcard/olm-mirror | 8c97257bdca8f9083a0234fd37e941883b298a9d | 769d013ef7b20757d2f83ab2e933f660e38de2a7 | refs/heads/master | 2022-01-05T22:09:17.326695 | 2019-04-30T22:25:21 | 2019-04-30T22:25:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 716 | py | import base64
import hashlib
from future.utils import bytes_to_native_str
from hypothesis import given
from hypothesis.strategies import text
from olm import sha256
from olm._compat import to_bytes
class TestClass(object):
@given(text(), text())
def test_sha256(self, input1, input2):
first_hash = sh... | [
"[email protected]"
] | |
3342dd166c1a4b52cda6b0d424dc3bfcc3d8b674 | 677002b757c0a1a00b450d9710a8ec6aeb9b9e9a | /tiago_public_ws/build/openslam_gmapping/catkin_generated/pkg.installspace.context.pc.py | 00673387ed81d830eb08b81f6a79356ed99d2359 | [] | no_license | mrrocketraccoon/tiago_development | ce686c86459dbfe8623aa54cf4279021342887fb | a0539bdcf21b67ab902a4649b516dcb929c54042 | refs/heads/main | 2023-06-16T19:39:33.391293 | 2021-07-08T21:20:03 | 2021-07-08T21:20:03 | 384,249,894 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 575 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "${prefix}/include".split(';') if "${prefix}/include" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "-lgridfastslam;-lscanmatcher;-lsensor_base;-lsensor_... | [
"[email protected]"
] | |
5c9577919a2bb8b1da8842933a4f2f8656fe7c2c | c63fa9ad899c461aa6550a5404ffddb2d868a674 | /scripts/simulator_scripts/simple_international_simulator.py | cf96c290d24922ef5d7c76a84d31d714f0a0e017 | [] | no_license | cooperoelrichs/model_of_australia | 4f7dc065f8afad456c9700a33f11399731c91eff | 40eb9d8bf093aa7af0ae939108e1ed13fe08e6a2 | refs/heads/master | 2021-07-20T03:43:29.293008 | 2017-10-26T04:30:14 | 2017-10-26T04:30:14 | 103,367,029 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 547 | py | n_years = 20
n_iter = 1e4
simple_internation_gdp_sim = SimpleInternationalGDPSimulator.run(
un_gdp_pc['Australia'].values,
shared_variance_international_gdp_model_parameters,
n_years, n_iter
)
subset = un_gdp_pc.columns.difference(['date'])
fig = plt.figure(figsize=(20, 10))
plt.plot(un_gdp_pc['date'], u... | [
"[email protected]"
] | |
454ad9a3d78b7229f76b2ccc28782e5ec2a0a0a2 | ecf62aae48e02420cd99008f58c4725c6da56d22 | /models/city.py | 3cf1c50199c3fed43886a70749accf1730c301a9 | [] | no_license | ThibautBernard/AirBnB_clone | e3110415acd98b56134928eee0d2befb6bd68a25 | d495dd85add4332880eacf00b338704c2799d3e5 | refs/heads/main | 2023-03-08T15:51:46.968249 | 2021-03-03T15:58:29 | 2021-03-03T15:58:29 | 337,568,140 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 240 | py | #!/usr/bin/python3
from models.base_model import BaseModel
"""
Class that represent a city
"""
class City(BaseModel):
state_id = ""
name = ""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
| [
"[email protected]"
] | |
b5e0a9f369d3fccfbf3ceeae1aacce0df53aed4a | e3f64d087afb4f6dfd09940370d77e724a1886d7 | /ex12.py | 30b8c31a817dec36e526eb26c0ebe73fc45b2122 | [] | no_license | wangyi26/lpthw | 41e95d0414bb706b8c85d61737be982cd8c712f5 | 8e8705bf5f0eb070cacf7e82648d70c5637e6ec4 | refs/heads/master | 2020-03-26T19:27:17.014680 | 2018-08-19T02:04:16 | 2018-08-19T02:04:16 | 145,265,999 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 172 | py | age = input("How old are you?")
height = input("How old are you?")
weight = input("How much do you weigh?")
print(f"So,you're {age} old,{height} tall and {weight} heavy.") | [
"[email protected]"
] | |
107ffaf4a6924bb92f6a0915474629036599fe63 | d66818f4b951943553826a5f64413e90120e1fae | /hackerearth/Basic Programming/Implementation/Basics of Implementation/Very Cool Numbers/solution.py | d0b76a17de7dac94d7100683084222e2f12c7eb2 | [
"MIT"
] | permissive | HBinhCT/Q-project | 0f80cd15c9945c43e2e17072416ddb6e4745e7fa | 19923cbaa3c83c670527899ece5c3ad31bcebe65 | refs/heads/master | 2023-08-30T08:59:16.006567 | 2023-08-29T15:30:21 | 2023-08-29T15:30:21 | 247,630,603 | 8 | 1 | MIT | 2020-07-22T01:20:23 | 2020-03-16T06:48:02 | Python | UTF-8 | Python | false | false | 567 | py | from collections import Counter
from re import findall
t = int(input())
cases = []
x = 0
for _ in range(t):
r, k = map(int, input().strip().split())
cases.append((r, k))
x = max(x, r)
cools = []
for i in range(x + 1):
cools.append(len(findall("(?=101)", bin(i)[2:])))
cache = {}
for case in cases:
i... | [
"[email protected]"
] | |
ff921394e8df92a8806a79e4023bf057ce4b5314 | b7125b27e564d2cc80a2ce8d0a6f934aa22c8445 | /.history/sudoku_20201101151526.py | 388887e85bc5a316b4aaff19358fd78c533e9129 | [] | no_license | JensVL96/Puzzle-solver-for-fun | 4c15dcd570c3705b7ac555efb56b52913e81083c | 6d8a4378a480372213a596a336a4deca727a00fc | refs/heads/master | 2021-07-15T05:19:42.185495 | 2020-11-08T13:59:49 | 2020-11-08T13:59:49 | 224,855,888 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,354 | py | # -*- coding: utf-8 -*-
from __future__ import print_function
from config import *
from create_board import *
from solve_bloard import *
from display_board import *
from string import *
import pygame as pg
import numpy as np
# For error highlighting
def set_highlight(row, col, blk, lock):
global input_lock
in... | [
"[email protected]"
] | |
71800abbf276d7b24cd982bdac42bd2ef4473a07 | b8fb00ee277478c368f5b7512bfd265f3ecea356 | /python/if_condition/venv/Scripts/pip3.7-script.py | 9ef9b0fdd160350cb17bebb111a37435f82b0d3d | [] | no_license | DharmilShahJBSPL/DharmilShah | 574477c38a8b76616618130f3b0679a23a9c1af8 | 0d197189c8dcf794d38145e8f1edba6766b02df9 | refs/heads/master | 2021-07-07T11:47:03.770219 | 2019-01-19T13:13:38 | 2019-01-19T13:13:38 | 152,415,037 | 0 | 1 | null | 2020-07-20T10:44:20 | 2018-10-10T11:48:36 | Python | UTF-8 | Python | false | false | 414 | py | #!E:\dharmil\python_task\if_condition\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip3.7'
__requires__ = 'pip==10.0.1'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0... | [
"[email protected]"
] | |
b7ba8e7bdee898506b7d76ce65bc25678a96140d | fe22e8ffdb1b2f1e11becc027e71a7a512fe56eb | /util/merge.py | 83aafc267e2cfcc1d70ca06e26f9f32cd1dd0443 | [] | no_license | HEP-KBFI/stpol | 3cdb5dc125bb0394f4531abfdfe9629b0c8d0fa4 | 962837a3341dd26391025b9a07a9c1c93084bf64 | refs/heads/master | 2020-06-03T16:15:14.743807 | 2015-08-05T09:00:28 | 2015-08-05T09:00:28 | 5,716,481 | 0 | 1 | null | 2015-03-04T08:23:28 | 2012-09-07T12:27:30 | Python | UTF-8 | Python | false | false | 426 | py | from subprocess import check_call
from os import walk
from os.path import join
import sys
from glob import glob
if __name__=="__main__":
ind = sys.argv[1]
for root, dirs, items in walk(ind):
items_in_dirs = map(lambda x: glob(join(root, x, "*.root")), dirs)
tot = sum(map(lambda x: len(x), items... | [
"[email protected]"
] | |
4550cce6732f67469786d7760b44a1040f883e0d | 0e647273cffc1fb6cbd589fa3c7c277b221ba247 | /configs/hpt-pretrain/bdd_crop_blur/moco_v2_800ep_basetrain/5000-iters.py | 1294176225d78d0b2d97f068e432c64d14c478c4 | [
"Apache-2.0"
] | permissive | Berkeley-Data/OpenSelfSup | e9976bf011b69ebf918506ba184f464b1073ec13 | 221191b88d891de57725b149caf237ffef72e529 | refs/heads/master | 2023-05-12T07:34:52.268476 | 2021-04-08T00:58:37 | 2021-04-08T00:58:37 | 343,654,823 | 0 | 1 | Apache-2.0 | 2021-04-08T00:58:37 | 2021-03-02T05:20:27 | Python | UTF-8 | Python | false | false | 222 | py | _base_="../base-bdd_crop_blur-config.py"
# this will merge with the parent
model=dict(pretrained='data/basetrain_chkpts/moco_v2_800ep.pth')
# epoch related
total_iters=5000
checkpoint_config = dict(interval=total_iters)
| [
"[email protected]"
] | |
9bbf7a1e9839497b6c4bf70667b9bdd845fc9d37 | 552bc626603a1757cf7836401cff5f0332a91504 | /flask/doit_JumpToFlask/chap03/03-8/회원가입_기능추가/views/question_views.py | 613d79cb4fa7e8e0f4c9bf1896a9b710c5702646 | [] | no_license | anifilm/webapp | 85f3d0aae34f46917b3c9fdf8087ec8da5303df1 | 7ef1a9a8c0dccc125a8c21b22db7db4b9d5c0cda | refs/heads/master | 2023-08-29T18:33:00.323248 | 2023-08-26T07:42:39 | 2023-08-26T07:42:39 | 186,593,754 | 1 | 0 | null | 2023-04-21T12:19:59 | 2019-05-14T09:49:56 | JavaScript | UTF-8 | Python | false | false | 1,448 | py | from datetime import datetime
from flask import Blueprint, render_template, request, url_for, g
from werkzeug.utils import redirect
from pybo import db
from pybo.models import Question
from pybo.forms import QuestionForm, AnswerForm
from pybo.views.auth_views import login_required
bp = Blueprint("question", __name__,... | [
"[email protected]"
] | |
cabf99b46a69479e6f2d4ebc046f5591e50b087b | 09c39de5aad7b283cfac2f09a2b93e43086846d2 | /Unit 10 Advanced Topics in Python/01 Advanced Topics in Python/Review/15-Iterating Over Dictionaries.py | f3e71da8c2d4077bb403646af94b8975a0d49188 | [
"MIT"
] | permissive | lpython2006e/python-samples | b4e84080259faf75b41fb2fd4fb9d2fbc9f857aa | b94ba67ce0d7798ecf796dadae206aa75da58301 | refs/heads/master | 2023-01-21T13:16:13.295163 | 2020-11-29T11:01:50 | 2020-11-29T11:01:50 | 278,653,779 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 173 | py | movies = {
"Monty Python and the Holy Grail": "Great",
"Monty Python's Life of Brian": "Good",
"Monty Python's Meaning of Life": "Okay"
}
print(movies.items())
| [
"[email protected]"
] | |
5855ed722d94538a3f665167b38f410e54779d80 | c51eef37bb983a9c35635c7ccc96a0cf689a7438 | /sites/ncbi/04_links.py | 8f13b4f8f330a1d06c2cd610f90644165411818d | [] | no_license | Kyeongrok/python_crawler | 0a717b43be36584af1b0f7c1ad0c79108a5d11e0 | 5a5da8af7bb080f752a9a066741ac8adab136a3a | refs/heads/master | 2022-09-13T03:15:08.053639 | 2022-08-02T15:45:03 | 2022-08-02T15:45:03 | 124,719,435 | 40 | 34 | null | 2019-02-27T08:29:52 | 2018-03-11T03:20:32 | HTML | UTF-8 | Python | false | false | 564 | py | from bs4 import BeautifulSoup
def getLinks(pageStr):
bs_obj = BeautifulSoup(pageStr, "html.parser")
rprts = bs_obj.findAll("div", {"class":"rprt"})
links = []
for item in rprts:
atag = item.find("a")
links.append(atag["href"].replace("/pubmed/", ""))
return links
links = []
for n... | [
"[email protected]"
] | |
cdbcfbbd7551dcd8dd76c054b1f050e4cc635f35 | 5e9bb224cc0e79670016c78f5262f530a343f71a | /run/get_rede_3_class_counts.py | d28773b0a2251ba3271deaba6ac6d518753d6a22 | [
"MIT"
] | permissive | olavosamp/semiauto-video-annotation | 6f86bb3b8b98bb1b910be1c95abf5474cd8526bb | b1a46f9c0ad3bdcedab76b4cd730747ee2afd2fd | refs/heads/master | 2020-06-06T02:48:16.677814 | 2020-03-10T05:22:49 | 2020-03-10T05:22:49 | 192,616,435 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,164 | py | import numpy as np
import pandas as pd
from tqdm import tqdm
from glob import glob
from pathlib import Path
# from copy import copy
import libs.dirs as dirs
import libs.utils as utils
import libs.data... | [
"[email protected]"
] | |
fbff749542a7d8d29c63a1b8284959aa9c8f310d | 865aeaf85b7cf0a27b04b5c563dee2b79443e6b7 | /docs/support/trace_support.py | f5044d28a57d4fbd35f16e3094092849c63f2f4c | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | pmacosta/peng | d8cc6e8757d62fb9968a42eaf11b5b87227a8b47 | ab05fac3c0a6c0f8c70ab3e456b5cc57f0484389 | refs/heads/master | 2021-01-21T14:32:42.863574 | 2019-06-11T14:30:38 | 2019-06-11T14:30:38 | 58,596,416 | 0 | 2 | MIT | 2019-03-08T15:49:44 | 2016-05-12T01:24:18 | Python | UTF-8 | Python | false | false | 3,331 | py | # trace_support.py
# Copyright (c) 2013-2019 Pablo Acosta-Serafini
# See LICENSE for details
# pylint: disable=C0111,C0411,E0401,E0611,W0212
# Standard library imports
from __future__ import print_function
import collections
import copy
import datetime
import os
import warnings
# PyPI imports
with warnings.catch_warn... | [
"[email protected]"
] | |
3ef27a31c380abbfdb38ff95db3f8d2b9b8d285f | 36e12b65922ebbb6d95aff6cbac0777c47e24153 | /distinctregions_cGcC.py | 352b42f3b5be614d3c66d47944522d02075bcf1d | [
"MIT"
] | permissive | NailouZhang/AnalysisScripts | d0d00174f642d6722cc907f9a392084600630780 | 3df37d2f8fca9bc402afe5ea870c42200fca1ed3 | refs/heads/master | 2023-06-06T08:14:39.064920 | 2021-06-22T16:46:26 | 2021-06-22T16:46:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,677 | py | #Want to look at cGcC scores for "distinct" 3' UTR regions to get weighted cGcC scores based on the "distalness" of a sequence.
import re
import sys
from Bio import SeqIO
import numpy as np
import gffutils
#Need to get UTR regions that are distinct to each isoform
#Start with gff of 3' UTR regions
def getdistinctregi... | [
"[email protected]"
] | |
356b615d823669751feac2502978c4b41465f695 | 17ec70a0387905f84f7fc1e3ee7f3428dd4e7874 | /Aoj/dpl/dpl_1_b.py | b1eb71bc3859fb849884a5eabde842e4d01b4db4 | [] | no_license | onikazu/ProgramingCompetitionPractice | da348e984b6bcb79f96f461d9df15a33730169b2 | 5a682943976bcac8646176feef9b70a6784abd8a | refs/heads/master | 2021-02-09T06:27:54.994621 | 2020-03-14T02:28:50 | 2020-03-14T02:28:50 | 244,252,119 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 364 | py | n, limit = map(int, input().split())
items = [tuple(map(int, input().split())) for _ in range(n)]
dp = [([0] + [0] * limit) for _ in range(n+1)]
for i in range(1, n+1):
v, w = items[i-1]
for j in range(limit+1):
if j < w:
dp[i][j] = dp[i-1][j]
else:
dp[i][j] = max(dp[i... | [
"[email protected]"
] | |
40bf41cc14776bfc93ee66abe4f2e8c67807d90d | 3090b3e964601e0392a03c903d28f324b4351936 | /src/demo/urls.py | fd264174fd4d5bde963b1d4b28312df4909f73b0 | [] | no_license | infoxchange/django-verification | eeebb4f7372ed95d43d8afd6f7b20ebdaa0e295e | 51ac7a648863393d44fe7a2813eccbfbee2eb615 | refs/heads/master | 2021-01-24T23:42:01.913727 | 2014-07-29T08:29:12 | 2014-07-29T08:29:12 | 24,980,017 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 711 | py | from __future__ import unicode_literals
from django.contrib import admin
from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
admin.autodiscover()
urlpatterns = staticfiles_urlpatterns()
urlpatterns += ... | [
"[email protected]"
] | |
e9406c5e1be4ae6d6959da2fb43a7d0f3fdd50d9 | 779afab3a8fd338a8a5b82284ca1269090ff92ee | /3 Processing/2D/BubbleSort/BubbleSort.pyde | 77c8f6c2685f9e8c88d84b4121f49d1b271ba1ac | [] | no_license | vitroid/PythonTutorials | 341ea037d168f744bee42c26c1c9408763b4bb50 | 32dd7325ca7099954f5eb33927ec9e122bb54066 | refs/heads/master | 2023-08-03T05:15:48.254380 | 2023-08-01T08:29:52 | 2023-08-01T08:29:52 | 36,958,329 | 3 | 0 | null | 2016-05-06T01:13:23 | 2015-06-05T22:22:43 | Python | UTF-8 | Python | false | false | 835 | pyde | """
ソーティング(並べ替え)のプロセスを可視化したものです。
"""
def bubblesort(data):
for x in range(len(data)):
for y in range(x+1,len(data)):
if data[x] > data[y]:
data[x],data[y] = data[y],data[x]
yield data
pix = 8
import random
data = [random.random() for i in range(50)]
iter = bub... | [
"[email protected]"
] | |
e6d8834ca974ac3aabfaa64cbd846a640643e735 | d57ebd908a78ad6b34f6b217f14d53fc894ff791 | /Algorithm/1836.py | e826069535f81c8de1cf17c21aeef474811d8727 | [] | no_license | ruanhq/Leetcode | df732730b63988b808a382ad17bddc49e00bc3a5 | fcb4ccbc9e84e1d2bd4541efc040bd957a96a3a2 | refs/heads/master | 2023-07-05T04:01:43.097980 | 2021-08-08T06:12:14 | 2021-08-08T06:12:14 | 320,983,033 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,885 | py | #1836. Remove duplicates from an unsorted linked list:
import collections
class Solution:
def deleteDuplicatesUnsorted(self, head: ListNode) -> ListNode:
currentHead = head
freqMap = {}
#Construct a frequency map of the element in the linked list by scanning through.
while currentHea... | [
"[email protected]"
] | |
e38ce9a9d274b921ae53a30071c5f87e314be6a9 | 67487a6df520e3ddbd918fdf4b9c8dcd4c783147 | /PythonExercicios/Mundo 3/17_modulos_e_pacotes/ex111/teste.py | a08e94b1c22d868580dc033e894c3bfcd761062e | [
"MIT"
] | permissive | GuilhermoCampos/Curso-Python3-curso-em-video | c7d7a25f87f5a8fd706f34030282f12b1dc88e01 | 723767bc6069e9c1fa9e28fe412e694f9eb8d05e | refs/heads/master | 2021-05-18T22:33:48.062467 | 2020-09-20T10:52:40 | 2020-09-20T10:52:40 | 251,457,675 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 331 | py | # Crie um pacote chamado utilidadesCeV que tenha dois módulos
# internos chamados moeda e dado.
# Transfira as funçoesutilizadas nos desafios 107, 108 e 109
# para o primeiro pacotee mantenha tuo funcionando
from utilidadescev import moeda
# Programa Principal
num = float(input('Digite um valor: '))
moeda.resumo(num,... | [
"[email protected]"
] | |
352740fa47b921639904c9a26c20c6b293eda782 | 61357ffa1e3b1174864a52da12c23500cfbc462a | /chatter.py | 02689dcecbb652d21784630c84d74085dc2c3d74 | [] | no_license | alexcg1/wechat-tools | 6968229a6c3440552b5612f9f9402bd3e613dc46 | 0709dedec7127a78a21eab2d56c49958aedd199f | refs/heads/master | 2022-12-13T12:00:43.164734 | 2018-10-17T04:06:14 | 2018-10-17T04:06:14 | 149,095,345 | 0 | 0 | null | 2022-12-08T02:56:23 | 2018-09-17T08:45:44 | Python | UTF-8 | Python | false | false | 5,843 | py | #!/usr/bin/env python3
import pyperclip
import readline
import threading
import time
import sys
import os
import itchat
from datetime import datetime
from itchat.content import *
from wem_functions import *
from pprint import pprint
from colorama import Fore, Back, Style
global chat_partner
App.start()
global outp... | [
"[email protected]"
] | |
03f1ca426fc4cd4120dc4c58bf06a5217f7229ac | 282b1d7bce60803580f9e0e234606dfc69a3be9e | /cougar/graphs/loss/triplet_loss.py | 99ca2e66090e3da78d7b8a820ed097ac7837906d | [
"MIT"
] | permissive | Swall0w/cougar | 4b2894089ac4857dcd319e388077b7330c228512 | 9161b2b1d0c256f4bb952ec190351684f28ec1b7 | refs/heads/master | 2022-11-01T14:57:18.077650 | 2019-09-17T14:30:56 | 2019-09-17T14:30:56 | 205,391,913 | 1 | 0 | MIT | 2022-10-18T19:27:35 | 2019-08-30T13:51:48 | Python | UTF-8 | Python | false | false | 771 | py | import torch
import torch.nn as nn
import torch.nn.functional as F
class TripletLoss(nn.Module):
"""
Triplet loss
Takes embeddings of an anchor sample, a positive sample and a negative sample
"""
def __init__(self, margin):
super(TripletLoss, self).__init__()
self.margin = margin
... | [
"[email protected]"
] | |
68915f0176b12bb9db7d9f9e48a878345db3dade | 1f96392824039390531a17b43156b2a26a956d4e | /treeserver/manage.py | 02da027d3b243dbf10e99cfffe063c9e7598ae1e | [] | no_license | benthomasson/tree | 9eca1e61406effa95b3d707fde44fe0f309180f6 | 4ccf7fa47e614f1a263a312f477c08af5f2f8d0b | refs/heads/master | 2020-04-10T22:46:04.574886 | 2012-12-22T22:11:05 | 2012-12-22T22:11:05 | 5,841,945 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 253 | py | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "treeserver.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| [
"[email protected]"
] | |
00b77addd4d58bcfcf481433d1298aaedd8b394f | bbd4d550b5f60763872b2ecd58c5b2bde21ecd0b | /test2/file_workflow.py | 7b5ed83826e9c4a2c7b196c1f39780e76410aa0d | [] | no_license | MaLei666/workflow_test | 4894a96f1b9858e6beb454f62cb6acad34e8fc3e | 312d23e36086bb0967f20b290a3f9b1f5f6be184 | refs/heads/master | 2022-07-31T00:13:46.307736 | 2020-05-24T14:32:18 | 2020-05-24T14:32:18 | 266,557,985 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,510 | py | # #-*- coding:utf-8 -*-
# # @author : MaLei
# # @datetime : 2020/4/21 7:22 下午
# # @file : file_workflow.py
# # @software : PyCharm
#
# from SpiffWorkflow.specs import WorkflowSpec,ExclusiveChoice,Simple,Cancel
# from SpiffWorkflow.serializer.json import JSONSerializer
# from SpiffWorkflow.operators import Equal,Attrib
... | [
"[email protected]"
] | |
200d1b874c07190b35bb0877add010ffb64f521a | 780900f95f56d9272a01bd50f01642efa771bd16 | /scrape.py | 95fbb4de529518f0b2404683a92f94fd932e7c8b | [] | no_license | pallih/veidigjald-signatures | 107ab19153807ee45ab0cdbfe4142e5c9731a49e | 78e301e55f76c3ff5c3672a7bf21b779080864a9 | refs/heads/master | 2021-01-22T02:49:02.968416 | 2013-06-20T00:37:59 | 2013-06-20T00:37:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,786 | py | import scraperwiki
import requests
import lxml.html
url = 'http://www.petitions24.com/signatures/obreytt_veidigjald/start/%s'
headers = {'User-Agent': 'Mozilla/5.0'}
#setup at start
'''
record = {}
record['last_page'] = '0'
scraperwiki.sqlite.save(['last_page'], data=record, table_name='runtime_info')
exit()
'''
sel... | [
"[email protected]"
] | |
03151d8300aa740a122197a386f399d7e9451450 | d272b041f84bbd18fd65a48b42e0158ef6cceb20 | /catch/datasets/tho.py | 58fee5408125281b49c221f55d5e91b94fc7a0a6 | [
"MIT"
] | permissive | jahanshah/catch | bbffeadd4113251cc2b2ec9893e3d014608896ce | 2fedca15f921116f580de8b2ae7ac9972932e59e | refs/heads/master | 2023-02-19T13:30:13.677960 | 2021-01-26T03:41:10 | 2021-01-26T03:41:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 362 | py | """Dataset with 'T'Ho virus' sequences.
A dataset with 1 'T'Ho virus' genomes.
THIS PYTHON FILE WAS GENERATED BY A COMPUTER PROGRAM! DO NOT EDIT!
"""
import sys
from catch.datasets import GenomesDatasetSingleChrom
ds = GenomesDatasetSingleChrom(__name__, __file__, __spec__)
ds.add_fasta_path("data/tho.fasta.gz", ... | [
"[email protected]"
] | |
cf7c9dcfbb59460a88b0b3e568306304f7583811 | ff853d7b3773db8de783fd26a76bd92742f85384 | /0x0F-python-object_relational_mapping/2-my_filter_states.py | c480b9cf408630749b250433478da0e0b9fde823 | [] | no_license | stuartses/holbertonschool-higher_level_programming | 1b3315f624f9c2dc0c63ee3481021c5ed093a81d | 40497b632bf71c3b877cb61fce79b9d82b4519da | refs/heads/master | 2020-09-29T00:51:57.791491 | 2020-05-14T16:51:44 | 2020-05-14T16:51:44 | 226,905,912 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 681 | py | #!/usr/bin/python3
"""2. Filter states by user input
This module make a MySQL Query using MySQLdb
Filter states with a input name
Holberton School
Foundations - Higher-level programming - Python
By Stuart Echeverry
"""
if __name__ == "__main__":
import sys
import MySQLdb
len_args = len(sys.argv) - 1
... | [
"[email protected]"
] | |
8ce62413b34f91d34f9f8084f3428a42d543ee3b | 037d5d18b9b81205305e158d7d9fdad131d318cb | /tests/revert/test_many_to_many_relationships.py | 973dd97bac9f110e036e38a0e9b662a28abc0024 | [] | permissive | kvesteri/sqlalchemy-continuum | ee7acf2c961b27eab3dd8f61598d9159d801ee21 | a7a6bd7952185b1f82af985c0271834d886a617c | refs/heads/master | 2023-08-24T09:14:33.515416 | 2022-11-17T05:41:09 | 2023-07-24T23:37:12 | 10,312,759 | 479 | 134 | BSD-3-Clause | 2023-09-12T20:07:04 | 2013-05-27T10:30:55 | Python | UTF-8 | Python | false | false | 2,806 | py | import sqlalchemy as sa
from tests import TestCase
class TestRevertManyToManyRelationship(TestCase):
def create_models(self):
class Article(self.Model):
__tablename__ = 'article'
__versioned__ = {
'base_classes': (self.Model, )
}
id = sa.Co... | [
"[email protected]"
] | |
6d355c5c5093df76111c6227f1d90df7885f252b | 2744fbd0c33c181f6bb71abbb26982f57a07ae9a | /config.py | ff0067d0d32bc4e56fcd10d7032f29d1dfc7de97 | [] | no_license | mehulchopradev/yannick-webapp | f2d777cfc23786b142551deefb2437cd24fb7592 | 4eb18a574177fb3f2d595255b4d3d421d5518944 | refs/heads/master | 2020-04-01T21:01:15.273151 | 2018-10-18T14:01:47 | 2018-10-18T14:01:47 | 153,633,107 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 147 | py | class Config:
SQLALCHEMY_DATABASE_URI='mysql+mysqlconnector://root:root@localhost/yannickwebapp_db'
SQLALCHEMY_TRACK_MODIFICATIONS = False
| [
"[email protected]"
] | |
317568248fa7b20af7cf4cfac25cb622ab9e5eb1 | 46244bb6af145cb393846505f37bf576a8396aa0 | /algorithms/ch4/4.1.13.py | 1d5cc8e306e2a491210d8e21daa6a91adca28254 | [] | no_license | aoeuidht/homework | c4fabfb5f45dbef0874e9732c7d026a7f00e13dc | 49fb2a2f8a78227589da3e5ec82ea7844b36e0e7 | refs/heads/master | 2022-10-28T06:42:04.343618 | 2022-10-15T15:52:06 | 2022-10-15T15:52:06 | 18,726,877 | 4 | 3 | null | null | null | null | UTF-8 | Python | false | false | 809 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import graph
class BreadthFirstPaths:
def __init__(self, g, s):
self.g = g
self.s = s
self.marked = set()
def dist_to(self, v):
# the queue for the vertex list
return dist_to_wrapper(self.s, v, 0)
def dist_to_wrapper(... | [
"[email protected]"
] | |
ebc5a7e1b4004327a673f2af979efc3495396138 | 9fcd6a91132fd12731d259fe7d709cdf222381bb | /2020/19/foo.py | 8c0e0c373ff1f394ff39b4c49fbfbf9a2b6b2b61 | [] | no_license | protocol7/advent-of-code | f5bdb541d21414ba833760958a1b9d05fc26f84a | fa110cef83510d86e82cb5d02f6af5bb7016f2c7 | refs/heads/master | 2023-04-05T15:33:26.146031 | 2023-03-18T14:22:43 | 2023-03-18T14:22:43 | 159,989,507 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 654 | py | import sys
from collections import *
import re
rs, msgs = sys.stdin.read().split("\n\n")
rules = defaultdict(list)
for r in rs.split("\n"):
a, b = r.split(": ")
if '"' in b:
rules[a] = b[1:-1]
else:
for o in b.split(" | "):
rules[a].append(o.split())
def build(rule):
reg =... | [
"[email protected]"
] | |
ed6a9ce70978a4f43af6c5e0df07abcb7cda0242 | c61a28aba19f7cdf9a5127e8a782bf115c265e70 | /apps/recruitpro/recruitpro/recruitpro/doctype/project_user/project_user.py | 2485ab02a13cefca8d30d07a52de8ce60c0592d9 | [
"MIT"
] | permissive | sharmilaviji/RecruitPRO-NEW | fa72c8fc00f469a41798b1047c11dcc470fbc495 | dcfaedebe56b45acd6ddcab7e24c939b853a2c8c | refs/heads/master | 2021-05-26T12:14:12.611154 | 2020-04-27T04:40:50 | 2020-04-27T04:40:50 | 254,125,640 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 257 | py | # -*- coding: utf-8 -*-
# Copyright (c) 2020, teampro and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class ProjectUser(Document):
pass
| [
"[email protected]"
] | |
7977a21d9cd1ff00ad98f7bdf786cad24b051af1 | 423ba09a145b3468a322acf4ddf7d2c2446e227d | /atcoder/abc119/abc119_c.py | 4d8b05eaf0c2223837bb66ee8d6761db24fbe938 | [] | no_license | hirosuzuki/procon | 13d3bc332d6e4368fd54fec742b32b09729658ed | 533f40e13456542b202905a61814ad926c3c206e | refs/heads/master | 2021-05-12T10:42:51.920561 | 2020-05-20T15:49:05 | 2020-05-20T15:49:05 | 117,356,746 | 0 | 0 | null | 2018-01-29T14:46:28 | 2018-01-13T15:56:40 | Python | UTF-8 | Python | false | false | 832 | py | N, A, B, C = [int(_) for _ in input().split()]
L = [int(input()) for i in range(N)]
from itertools import combinations
def combi(xs, left):
for i in range(len(xs) - left):
for r in combinations(xs, i + 1):
yield r
def diff(a, b):
result = a[:]
for x in b:
if x in result:
... | [
"[email protected]"
] | |
cb551e3a871a6f00f0bc6847baa76f890601f945 | 6ad55b80c944e123fef29468aa018e15505cd4a3 | /references/lr/parser/adder.py | 41435d2272f198ac21eec7fa984834313768a71b | [] | no_license | ramalho/kaminpy | c7799d58edd81ada1ba7914528d16872ecb771f2 | 2f5038a9ebacb378fc45fd7fd840a50ac47c940e | refs/heads/master | 2021-01-13T02:22:16.765278 | 2018-11-19T12:34:45 | 2018-11-19T12:34:45 | 2,436,569 | 17 | 5 | null | null | null | null | UTF-8 | Python | false | false | 1,444 | py | import token as py_token
import util
class Token:
def __init__(self, src, start, end, line):
self.src = src
self.start = start
self.end = end
self.line = line
self.evaluate()
def evaluate(self):
pass
def nud(self):
raise SyntaxError('unexpected %... | [
"[email protected]"
] | |
044e6cd2bcf67dd9722c851da59f18e8d33316c7 | c6dfa13fad324443e1e93a6a3e165938f6114bfe | /mysite_register/views.py | 8f05f5163c8230d657018d89d436baab542e335a | [] | no_license | keystonecyberstop/testTimePass | d94687647b2ad5b933a1ac99db856778e96a4acd | ff505f12889157c69694b648fe608de9f9511e43 | refs/heads/master | 2022-12-24T03:24:52.013959 | 2020-10-11T11:32:38 | 2020-10-11T11:32:38 | 303,101,369 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 626 | py | from django.shortcuts import render
from django.views.generic import ListView
from .models import Entry
class HomeView(ListView):
model = Entry
template_name = 'entries/index.html'
# def get_context_data(self, **kwargs):
# print(kwargs)
# context = super().get_context_data(**kwargs)
# ... | [
"--global"
] | --global |
492309989d063058f709494cce513673f29adee7 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2190/48117/253305.py | 9bedb5ef7bc7e20973cbbca26cc70d059c294ec9 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 691 | py | questNum = int(input())
for i in range(questNum):
quest = input().split(' ')
s = quest[0]
k = int(quest[1])
sa = []
index = 0
for count in range(1, len(s) + 1):
for i in range(len(s)):
if i + count <= len(s):
sa.append(s[i:i + count])
countList = [0] * l... | [
"[email protected]"
] | |
2ed3942ae4abf416e93c8b60d8e80353a2aeb6ce | 62b066da43081895098e43b31e843a1af3700546 | /CNN/FractalNet/test.py | 136d42b6cc9bbe3229ba7c4cb1573cdeec72665b | [
"MIT"
] | permissive | bssrdf/Paper2Code | 6945251cf508e99c2d7d40b2b8639e993ab30bff | 2fb18b3d4ed66b68cab86139c4d9a0dcbf1eba39 | refs/heads/master | 2022-03-30T16:52:21.834511 | 2020-04-18T13:25:59 | 2020-04-18T13:25:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,812 | py | import os
import glob
from keras.callbacks import LearningRateScheduler, ModelCheckpoint
from keras.datasets import cifar10
from keras.layers import Activation, Input, Dense, Flatten
from keras.models import Model
from keras.optimizers import SGD, RMSprop, Adam, Nadam
from keras.utils import plot_model
from keras.utils... | [
"[email protected]"
] | |
c72e1e6f41a202b2b1cd09a03a1bee06830d0410 | 1f1e8b335470065b67cce28338cfb4a6da503c95 | /0x08-python-more_classes/1-rectangle.py | 3c53e4b25f9cde658c140933cf6de96b3862d9a7 | [] | no_license | guxal/holbertonschool-higher_level_programming | 48353071e719a509e10f3067f0c3f88cb44bd27d | fffd287c510602dc45e36df486f60cdfa1205335 | refs/heads/master | 2020-07-22T23:40:03.266880 | 2020-02-14T02:42:11 | 2020-02-14T02:42:11 | 207,370,750 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,192 | py | #!/usr/bin/python3
class Rectangle:
"""
The Rectangle class create a new object
Args:
width (int): integer value of the width
height (int): integer value of the height
Attributes:
width (int): integer value of the width
height (int): integer value of the height
"""... | [
"[email protected]"
] | |
a79112df59f5d14d3ae00fe0a7bcfb6ee357574e | 87af51366dd4597fb6ecf7887e44a53dacf67364 | /juaphe/wsgi.py | 19cbcbef0a0746d16594e05a93fdf826304ac291 | [] | no_license | MoTechStore/CIS | 8707e17c1a1702dfdf17dbbba08e6ccf232acb45 | b169cf374efdf1db315fde345f865f0831e58694 | refs/heads/master | 2023-06-24T07:43:14.144910 | 2021-04-22T15:31:50 | 2021-04-22T15:31:50 | 360,562,193 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 389 | py | """
WSGI config for juaphe 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]"
] | |
15e6250031174b4e039ad1e59a431cd4543e313f | 25e481ef7fba79285f4c8a7fa2e81c8b2b7f9cce | /saleor/product/urls.py | 792a3322de14affc3b6b5778fce32134a08c3d1e | [
"BSD-2-Clause"
] | permissive | arslanahmd/Ghar-Tameer | 59e60def48a14f9452dfefe2edf30e362878191d | 72401b2fc0079e6d52e844afd8fcf57122ad319f | refs/heads/master | 2023-01-31T04:08:26.288332 | 2018-06-07T18:02:01 | 2018-06-07T18:02:01 | 136,231,127 | 0 | 0 | NOASSERTION | 2023-01-11T22:21:42 | 2018-06-05T20:28:11 | Python | UTF-8 | Python | false | false | 423 | py | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^(?P<slug>[a-z0-9-_]+?)-(?P<product_id>[0-9]+)/$',
views.product_details, name='details'),
url(r'^category/(?P<path>[a-z0-9-_/]+?)-(?P<category_id>[0-9]+)/$',
views.category_index, name='category'),
url(r'(?P<slug>... | [
"[email protected]"
] | |
65784261a12349ca676e73e89cd86d05c20a0261 | 3d19e1a316de4d6d96471c64332fff7acfaf1308 | /Users/N/NicolaHughes/oecd_international_ngo_identifiers.py | 9f0a72e55aef8b2b9a0796f890d51a673f3013f3 | [] | no_license | BerilBBJ/scraperwiki-scraper-vault | 4e98837ac3b1cc3a3edb01b8954ed00f341c8fcc | 65ea6a943cc348a9caf3782b900b36446f7e137d | refs/heads/master | 2021-12-02T23:55:58.481210 | 2013-09-30T17:02:59 | 2013-09-30T17:02:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,286 | py | import scraperwiki
from bs4 import BeautifulSoup
url = "http://old.iatistandard.org/codelists/organisation_identifier_ingo"
html = scraperwiki.scrape(url)
soup = BeautifulSoup(html)
table = soup.find("tbody")
for td in table.find_all("tr"):
code = td.find("td", "column-1").get_text()
country = td.find("td", ... | [
"[email protected]"
] | |
2d2260b9fe36da45dcd750354ca6cccbdf07ab61 | d49f90aac10fe247d3dab988860c47fc4cb6a38e | /test_coverage_site/wsgi.py | 874b39ec3bf368563be03bcda8346571b0c4c8d2 | [] | no_license | slobdell/test-coverage-site | ae12220c8302f683f5513372920d471897b3c07f | 95c9caff146061f602a1283e3bf87486daf9a8c6 | refs/heads/master | 2021-01-16T19:20:47.312548 | 2015-05-04T23:41:40 | 2015-05-04T23:41:40 | 34,973,209 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 447 | py | """
WSGI config for test_coverage_site project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_coverage_site.settings... | [
"[email protected]"
] | |
7fea7b0f0a2dc5011bde9c1504e953d155324690 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/helpers/typeshed/stubs/oauthlib/oauthlib/oauth2/rfc6749/grant_types/base.pyi | ba8171b0111fc0f9461d642587b7be5a8fd91df1 | [
"Apache-2.0",
"MIT"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Python | false | false | 1,127 | pyi | from typing import Any
log: Any
class ValidatorsContainer:
pre_auth: Any
post_auth: Any
pre_token: Any
post_token: Any
def __init__(self, post_auth, post_token, pre_auth, pre_token) -> None: ...
@property
def all_pre(self): ...
@property
def all_post(self): ...
class GrantTypeBase... | [
"[email protected]"
] | |
6eb33391091d6da8cb07157f81214fd33aad700a | 1424812c4f211d3d5e356e8b3889a689162062f3 | /arcade/python/65_calc_bonuses.py | f7049b69442fdc3417020fec21d30b0c0719e3bf | [] | no_license | nazomeku/codefights | cb7d3c40be0809695ec524a87c88dbebcf5b47bc | b23f6816f9b5b0720feac1c49c31163923e0a554 | refs/heads/master | 2021-01-22T12:49:35.905165 | 2017-11-21T19:03:37 | 2017-11-21T19:03:37 | 102,357,617 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 291 | py | """Given the bonuses the player got, your task is to return his final
score for the level."""
def calc_bonuses(bonuses, n):
it = (x for x in bonuses)
res = 0
try:
for _ in range(n):
res += next(it)
except StopIteration:
res = 0
return res
| [
"[email protected]"
] | |
a68323c8d34f11fe9205e298a3142449f9f35bd1 | 999879f8d18e041d7fa313132408b252aded47f8 | /01-codes/scipy-master/benchmarks/benchmarks/go_benchmark_functions/go_funcs_Z.py | 948d35ef731d2bb98ed71725b8de543e3329add0 | [
"MIT"
] | permissive | QPanProjects/Surrogate-Model | ebcaf05728e82dcbcd924c2edca1b490ab085173 | 848c7128201218b0819c9665e2cec72e3b1d29ac | refs/heads/master | 2022-10-11T19:03:55.224257 | 2020-06-09T14:37:35 | 2020-06-09T14:37:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,799 | py | # -*- coding: utf-8 -*-
from __future__ import division, print_function, absolute_import
from numpy import abs, sum, sign, arange
from .go_benchmark import Benchmark
class Zacharov(Benchmark):
r"""
Zacharov objective function.
This class defines the Zacharov [1]_ global optimization problem. This
i... | [
"[email protected]"
] | |
9324e5dad5c5d41d9712524e5664e5b589a4683a | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02735/s229136257.py | 7525f09b2d7be32d9b898770a7896fc24d111e97 | [] | 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 | 696 | py | H,W = map(int,input().split())
s = []
for i in range(H):
S = list(input())
s.append(S)
dis = [[float("inf")] * W for i in range(H)]
if s[0][0] == "#":
dis[0][0] = 1
else:
dis[0][0] = 0
for i in range(H):
for j in range(W):
if i != H-1:
if s[i][j] == "." and s[i+1][j] == ... | [
"[email protected]"
] | |
e7c530faea76708714903acd3aee7445bd19cd73 | 6bf336bc8d6ba061e0c707bdd8595368dee4d27b | /algorithms/implementation/chocolate_feast.py | 167c71bac7ce61c4730dfdc418b5534bdd26088e | [
"MIT"
] | permissive | avenet/hackerrank | aa536214dbccf5a822a30ea226e1dbaac9afb243 | e522030a023af4ff50d5fc64bd3eba30144e006c | refs/heads/master | 2021-01-01T20:15:06.647873 | 2017-11-24T23:59:19 | 2017-11-24T23:59:19 | 98,801,566 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 408 | py | n = int(input())
for i in range(n):
money, item_price, exchange_wrapper = [int(x) for x in input().split(' ')]
bought = money // item_price
answer = bought
wrappers = bought
while wrappers >= exchange_wrapper:
extra_items = wrappers // exchange_wrapper
answer += extra_items
... | [
"[email protected]"
] | |
f9f5c7d65ca52302442ac3af9842e3e0c2658298 | 62e58c051128baef9452e7e0eb0b5a83367add26 | /x12/4042/261004042.py | 270e503879fc4b824982174d8abaee91802da7e1 | [] | no_license | dougvanhorn/bots-grammars | 2eb6c0a6b5231c14a6faf194b932aa614809076c | 09db18d9d9bd9d92cefbf00f1c0de1c590fe3d0d | refs/heads/master | 2021-05-16T12:55:58.022904 | 2019-05-17T15:22:23 | 2019-05-17T15:22:23 | 105,274,633 | 0 | 0 | null | 2017-09-29T13:21:21 | 2017-09-29T13:21:21 | null | UTF-8 | Python | false | false | 2,478 | py | from bots.botsconfig import *
from records004042 import recorddefs
syntax = {
'version' : '00403', #version of ISA to send
'functionalgroup' : 'ME',
}
structure = [
{ID: 'ST', MIN: 1, MAX: 1, LEVEL: [
{ID: 'BGN', MIN: 1, MAX: 1},
{ID: 'TRN', MIN: 0, MAX: 1},
... | [
"[email protected]"
] | |
2e93b69a71388f075c9082fa5e2e275073673eb8 | edeeb2fa2ece9f2f19a792bedbf842319e90e417 | /model/model.py | d77c10ee6a5a18179c282acd64d92cee86ba17fa | [] | no_license | ywl0911/TextCnn | 9461023cba84b24cf46d79c42720822baebe0c4c | 15af406ba05c71f9d18929ecd6d958216a1b53c2 | refs/heads/master | 2021-02-06T07:14:55.221200 | 2018-12-15T00:30:09 | 2018-12-15T00:30:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,474 | py | from __future__ import print_function
from model.text_cnn import TextCnn
import tensorflow as tf
from tensorflow.contrib import layers
import json
import os
path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
config_path = os.path.join(path, 'config')
params_path = os.path.join(config_path, 'kaggle_mo... | [
"[email protected]"
] | |
024c1ce5c3908c2e84353f3e0600a60e88bec43e | 59aed92059824381f34e1585e9600878d91cadb0 | /supervised_learning/0x0D-RNNs/5-bi_forward.py | 3bea5f82bfbcd5608895cf8bd8aabce38d00fccf | [] | no_license | jdarangop/holbertonschool-machine_learning | 3509eaa6d191f6887be9bbbb5a1df565b0b51cc8 | 75274394adb52d740f6cd4000cc00bbde44b9b72 | refs/heads/master | 2021-05-17T04:51:44.675655 | 2020-12-02T02:52:31 | 2020-12-02T02:52:31 | 250,633,089 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,192 | py | #!/usr/bin/env python3
""" Bidirectional Cell Forward """
import numpy as np
class BidirectionalCell(object):
""" BidirectionalCell class. """
def __init__(self, i, h, o):
""" Initializer.
Args:
i: the dimensionality of the data.
h: the dimensionality of th... | [
"[email protected]"
] | |
579bff385dfa8e145f010cd9a5919a7d939ee332 | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/domain/ShopOrderModifyResult.py | 9082302886be32ebbbbaf87862cab8d4893c57bb | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-python-all | 8bd20882852ffeb70a6e929038bf88ff1d1eff1c | 1fad300587c9e7e099747305ba9077d4cd7afde9 | refs/heads/master | 2023-08-27T21:35:01.778771 | 2023-08-23T07:12:26 | 2023-08-23T07:12:26 | 133,338,689 | 247 | 70 | Apache-2.0 | 2023-04-25T04:54:02 | 2018-05-14T09:40:54 | Python | UTF-8 | Python | false | false | 2,321 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class ShopOrderModifyResult(object):
def __init__(self):
self._ext_infos = None
self._result_code = None
self._shop_id = None
self._store_id = None
@property
de... | [
"[email protected]"
] | |
78336ba51d32b62181a4ce2bb2a6dbf2229c8c53 | dde7259b842de982208caff054d9c9cb3c18c7be | /debug .rock.py | 71e80dfc08454845c7b70946650d47577162cdad | [] | no_license | pooja-pichad/more_excersise | d1137ab4b757e68bf8109405d7a8cf47e9a0bbfd | f9f94b04ad533a5a5ca983d33775b94af8bd146e | refs/heads/main | 2023-06-18T22:21:03.690142 | 2021-07-20T06:56:34 | 2021-07-20T06:56:34 | 387,700,700 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,108 | py | from random import randint
def win():
print ('You win!')
def lose():
print ('You lose!')
while True:
player_choice = input('What do you pick? (rock, paper, scissors)')
player_choice.strip()
random_move = randint(0, 2)
moves = ['rock', 'paper', 'scissors']
computer_choice = moves[random_mo... | [
"[email protected]"
] | |
b1ae0c007b11135e8f16664aa1a43c6d13c5c89c | 255e19ddc1bcde0d3d4fe70e01cec9bb724979c9 | /all-gists/9276216/snippet.py | 27e3f6d7e286538a706d09b067ed2b79a247d7b7 | [
"MIT"
] | permissive | gistable/gistable | 26c1e909928ec463026811f69b61619b62f14721 | 665d39a2bd82543d5196555f0801ef8fd4a3ee48 | refs/heads/master | 2023-02-17T21:33:55.558398 | 2023-02-11T18:20:10 | 2023-02-11T18:20:10 | 119,861,038 | 76 | 19 | null | 2020-07-26T03:14:55 | 2018-02-01T16:19:24 | Python | UTF-8 | Python | false | false | 1,494 | py | #!/usr/bin/python
''' Python command line argument example using argparse module
Example output:
./parser.py --server=pyserver --port=8080,443,25,22,21 --keyword=pyisgood
Server name: [ pyserver ]
Port: [ 8080 ]
Port: [ 443 ]
Port: [ 25 ]
Port: [ 22 ]
Port: [ 21 ]
Keyword assigned: [ pyisgood ]
'''
import argpa... | [
"[email protected]"
] | |
746f58db6baa85c1093e025491da54c87739e1c6 | dd6c5f31a2a14f610bd9ae7ebffa37586cfdf6fa | /jingfen_app/manage.py | 7a8b7fb2debbfdb45fa14d397a32c43df9c8696f | [] | no_license | wean/jingfen | 534945e8fe12686e25a3fd9788b29bca2ba49be1 | ed9cc88f57b83c5c77ff85fab58ddf5094f7793f | refs/heads/master | 2020-04-05T07:11:46.721676 | 2018-04-10T05:21:33 | 2018-04-10T05:21:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 294 | py | #! /usr/bin/python
# -*- coding:utf-8 -*-
# @Time : 2018/3/12 下午9:21
# from jingfen.jingfen_app import create_app, d
# b
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return 'hello world!'
pass
if __name__ == '__main__':
app.run(debug=True)
| [
"[email protected]"
] | |
6df0cb04a29969a2e6fb06c94560c3eb5217a2e8 | 5e22728a45dc131b5abcdde3c10928557177898b | /tests/nb_test.py | 0634d44b1e6eb8abdd7c5d0d810154d9280e95fc | [
"MIT"
] | permissive | microsoft/msticnb | 74fc9636964be68900702ee0c85b0c992f0779ad | cefc4ee5a22285d33e7abd91371c617fe42f8129 | refs/heads/main | 2023-06-30T02:00:29.253130 | 2023-03-16T20:14:27 | 2023-03-16T20:14:27 | 250,417,186 | 25 | 11 | MIT | 2023-03-16T20:14:28 | 2020-03-27T02:00:17 | Python | UTF-8 | Python | false | false | 3,942 | py | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""Noteboo... | [
"[email protected]"
] | |
41fc9b8079910692b8adde95dc4604182ba9dbc7 | 58ade65dffc7cbe103d93d7c769096a20d9f9815 | /src/smach_based_introspection_framework/offline_part/anomaly_classification_feature_selection/msg_filters_with_scaling_and_clip.py | a375c305a1c8e01a004943519b8b7a4c2b4adc1a | [
"BSD-3-Clause"
] | permissive | birlrobotics/smach_based_introspection_framework | 2cff69ecec030a5b5046dea99f9e15105f52361b | f16742339cddfc86effba4dbf6e5062304704b89 | refs/heads/master | 2021-05-09T12:02:26.946473 | 2019-05-29T02:46:47 | 2019-05-29T02:46:47 | 119,001,821 | 7 | 1 | null | 2018-07-05T04:58:40 | 2018-01-26T03:37:58 | Python | UTF-8 | Python | false | false | 634 | py | from rostopics_to_timeseries import TopicMsgFilter
import numpy as np
class TactileStaticStdScaleClipMaxFilter(TopicMsgFilter):
def __init__(self):
super(TactileStaticStdScaleClipMaxFilter, self).__init__()
def convert(self, msg):
ret = np.array([
np.std(msg.taxels[0].values),
... | [
"[email protected]"
] | |
724e03976eb11b0ba1df23167f2f294516dc6dad | a6719f4815ff41d3a1f09e9a63a64c4582d03702 | /error_handling/try-except.py | 881cf6cfddef1e2ef9f597573159206f16b57db8 | [
"MIT"
] | permissive | thanh-vt/python-basic-programming | 8136007b8435dae6339ae33015fe536e21b19d1d | 5fe817986fbef2649b4b03955f07b59d2a2035d8 | refs/heads/main | 2023-01-30T12:57:36.819687 | 2020-12-13T17:27:05 | 2020-12-13T17:27:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 293 | py | try:
print(x)
except NameError:
print("Variable x is not defined")
except Exception as ex:
print(ex.__cause__)
print("An exception occurred")
try:
print("Hello")
except Exception as ex:
print(ex)
print("Something went wrong")
else:
print("Nothing went wrong")
| [
"[email protected]"
] | |
5ed01a03bd11edf9b7d88470801ecb14f19ac080 | a1119965e2e3bdc40126fd92f4b4b8ee7016dfca | /trunk/repy/tests/ut_repytests_veryslownetsend-testsend.py | 29cb9e30a07108c0c3fa576534605471fbacbae1 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | SeattleTestbed/attic | 0e33211ddf39efdbcf5573d4fc7fa5201aa7310d | f618a962ce2fd3c4838564e8c62c10924f5df45f | refs/heads/master | 2021-06-10T23:10:47.792847 | 2017-05-15T12:05:43 | 2017-05-15T12:05:43 | 20,154,061 | 0 | 1 | null | 2014-10-16T17:21:06 | 2014-05-25T12:34:00 | Python | UTF-8 | Python | false | false | 331 | py | #pragma repy restrictions.veryslownetsend
def foo(ip,port,mess, ch):
stopcomm(ch)
exitall()
if callfunc == 'initialize':
ip = getmyip()
recvmess(ip,<messport>,foo)
sleep(.1)
sendmess(ip,<messport>,'hi')
sendmess(ip,<messport>,'Hello, this is too long of a message to be received in such a short time')
... | [
"USER@DOMAIN"
] | USER@DOMAIN |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.