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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c925b2637715a9f2f135c947d06035c815739be7 | 434b6556038ad326ffaa8584a8a91edf8ad5c037 | /DP-1/MinStepsTo1_IterativeDP.py | a3f670d079c5c84019726bd05d7717a5a128e3d0 | [] | no_license | Pranav016/DS-Algo-in-Python | 60702460ad6639dd3e8a1fdc3caf0821b8e0b4c2 | 5557e371ccdf801d78ba123ca83c0dd47b3bdb3b | refs/heads/master | 2023-01-23T08:29:32.186861 | 2020-11-01T17:14:12 | 2020-11-01T17:14:12 | 284,651,382 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 367 | py | import sys
def minStepsIterative(n):
dp=[-1 for i in range(n+1)]
dp[0]=dp[1]=0
for i in range(2,n+1):
ans1=ans2=ans3=sys.maxsize
if i%3==0:
ans1=dp[i//3]
if i%2==0:
ans2=dp[i//2]
ans3=dp[i-1]
dp[i]=1+min(ans1,ans2,ans3)
return dp[n]
# ... | [
"[email protected]"
] | |
7f6ada10257846c167743e85db32815a21168d88 | d24cef73100a0c5d5c275fd0f92493f86d113c62 | /SRC/common/brushstyle.spy | e0783b6eccb843c7e84f0f7042b33858e2133c9c | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | rlinder1/oof3d | 813e2a8acfc89e67c3cf8fdb6af6b2b983b8b8ee | 1fb6764d9d61126bd8ad4025a2ce7487225d736e | refs/heads/master | 2021-01-23T00:40:34.642449 | 2016-09-15T20:51:19 | 2016-09-15T20:51:19 | 92,832,740 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,777 | spy | # -*- python -*-
# $RCSfile: brushstyle.spy,v $
# $Revision: 1.2.18.1 $
# $Author: langer $
# $Date: 2014/09/27 22:33:47 $
# This software was produced by NIST, an agency of the U.S. government,
# and by statute is not subject to copyright in the United States.
# Recipients of this software assume all responsibilities... | [
"[email protected]"
] | |
381da1385d47377eeaa12cedb3eee290fa920879 | 3517bef3bb174fef1f2f6a5edd221d23af2a4a99 | /backend/emma_phillips_3684/urls.py | 4c3f152a16e4c4be9cdae8fe722eacab23a51993 | [] | no_license | crowdbotics-apps/emma-phillips-3684 | e8fe2c0c7e68abda4f199c4cc4396bb2268afffc | 7ee256d6a167d5236800751a478023c48056b162 | refs/heads/master | 2020-05-25T23:38:41.448295 | 2019-05-22T12:55:07 | 2019-05-22T12:55:07 | 188,038,544 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,070 | py | """emma_phillips_3684 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home... | [
"[email protected]"
] | |
55fc69c3daeea8d2a118a7e02188c932abb24f83 | 8d2a785ffc06ec46a546cdf50af41054a382f05a | /classes/day11/practice/数据库博库/db_con_insert.py | 201679238f0035ffd314aad79db425ae24484c53 | [] | no_license | Pigcanflysohigh/Py27 | 4be0d9ad93f5d695c48fd89157952230ec4d111a | 2f6568fce2a6f09c73cdc08342a8b05645c87736 | refs/heads/master | 2020-06-18T08:09:08.217036 | 2019-11-20T16:14:05 | 2019-11-20T16:14:05 | 196,225,940 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 324 | py | import pymysql
conn = pymysql.connect(host='10.211.55.5',user='root',password='root',database='mlg')
cur = conn.cursor()
cur.execute("insert into t8 values('女','rap');")
conn.commit() # 涉及到修改/写入(insert/update/delete)数据库内容的,多需要执行提交操作才能生效
cur.close()
conn.close() | [
"[email protected]"
] | |
3be2fbf38cc96ef463cecd4366ea19e030cca99a | 3c8aaef535328f7c4d812cf086a637b27d891752 | /interview/google/hard/LC327.py | 6e8c0bbf06d684ef7b05a58684d8b05985f7d649 | [] | no_license | zhangshv123/superjump | 9339cd7f5e75d8a94be60d44c752267cc38183d3 | 7de5f69e6e44ca4e74d75fed2af390b3d2cbd2b9 | refs/heads/master | 2020-03-20T20:36:34.378950 | 2019-03-08T04:37:22 | 2019-03-08T04:37:22 | 137,696,605 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,574 | py | #!/usr/bin/python
"""
First compute the prefix sums: first[m] is the sum of the first m numbers.
Then the sum of any subarray nums[i:k] is simply first[k] - first[i].
So we just need to count those where first[k] - first[i] is in [lower,upper].
To find those pairs, I use mergesort with embedded counting. The pairs in ... | [
"[email protected]"
] | |
76da49d71b796760d616591e77762c095f4a80b5 | d2f893a95f74b59ec7f073a008d9502c22afb04a | /cwcnn/extend/cuda_functions/round_cuda.py | 8066ff17b0f52d0d7e12a1c8cf7951624e09e703 | [] | no_license | liu-yangyang/CNN-based-Image-Compression-Guided-by-YOLOv2 | bbf03ce26b51e1247b1655c6d8aa909530702339 | 850391525908ca751b832ed882eca3f5eccd819c | refs/heads/master | 2020-03-19T03:07:26.152652 | 2018-05-27T08:23:09 | 2018-05-27T08:23:09 | 135,697,677 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,172 | py | import torch as th
from torch.autograd import Variable, Function
#include_path = '/home/snk/Desktop/workspace/pytorch_implement/extend/'
include_path = "/home/zhangwenqiang/jobs/pytorch_implement/extend"
import sys
if include_path not in sys.path:
sys.path.append(include_path)
from round import round_forward_wrap... | [
"[email protected]"
] | |
9acd73bb18291d9817ce151961855002e16b1075 | fdca7a2818602fa40b0848a15f630afb68a2ec13 | /page/search.py | 163526ad1ac64c5ba863746b6dc9ed85152a1222 | [] | no_license | sisul1204/appium_zhuangshiqi | 0bded9307c92f57749ad6eb514431b0348deaebc | c457d267fee86ee0f516e3cbab25afd514a7c7fc | refs/heads/main | 2023-01-07T07:05:31.420987 | 2020-11-13T03:47:48 | 2020-11-13T03:47:48 | 312,163,395 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 629 | py | # * coding:utf-8 *
# Author:sisul
#创建时间:2020/11/11 17:11
import yaml
from selenium.webdriver.common.by import By
from page.base_page import BasePage
class Search(BasePage):
def search(self, name):
self._params['name'] = name
self.steps('../page/search.yaml')
def add(self, name):
se... | [
"[email protected]"
] | |
d22d9284208ebd8f92edf3f7139fd34bf723d63a | 6bf1b595a7f4d3cbf0995455869d438a7d0e0624 | /lingvo/core/scatter_update.py | 4be545fde721c2587c20f8f3dff3ccfb2a8f9048 | [
"Apache-2.0"
] | permissive | huaxz1986/lingvo | 889abc82b1bab6f37ba861c41eb480b7e89362c0 | b83984577610423e3b1c6b04ca248cd23f2842f7 | refs/heads/master | 2022-05-15T03:29:56.903688 | 2022-04-02T01:41:25 | 2022-04-02T01:41:25 | 173,536,461 | 1 | 0 | Apache-2.0 | 2019-03-03T05:52:01 | 2019-03-03T05:52:01 | null | UTF-8 | Python | false | false | 2,341 | py | # Lint as: python3
# Copyright 2021 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 ... | [
"[email protected]"
] | |
b832f61d96cc32d7408a37057ca8f6beeaa6d209 | 786027545626c24486753351d6e19093b261cd7d | /ghidra9.2.1_pyi/ghidra/dalvik/dex/inject/InjectPayloadDexRange.pyi | 6efab5017e40b6f8e42699d88edaa8c65a0cbbb8 | [
"MIT"
] | permissive | kohnakagawa/ghidra_scripts | 51cede1874ef2b1fed901b802316449b4bf25661 | 5afed1234a7266c0624ec445133280993077c376 | refs/heads/main | 2023-03-25T08:25:16.842142 | 2021-03-18T13:31:40 | 2021-03-18T13:31:40 | 338,577,905 | 14 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,994 | pyi | from typing import List
import ghidra.app.plugin.processors.sleigh
import ghidra.program.model.lang
import ghidra.program.model.listing
import ghidra.program.model.pcode
import java.lang
class InjectPayloadDexRange(object, ghidra.program.model.lang.InjectPayload):
CALLFIXUP_TYPE: int = 1
CALLMECHANISM_TYPE: i... | [
"[email protected]"
] | |
741d55862503d5f145872c689ccfd3f4780a57c2 | 645b5211c50b1a07a5d576b96624b22055802dc4 | /pvw-dependencies/pv-flow/flow/plugins/__init__.py | 1b8e3c325a97cccaf1c8c5f4654e6b07c027e9f1 | [
"Apache-2.0"
] | permissive | dealenx/hpccloud-kemsu | 7c3a33e5ce01560d6fc7abcb9524e4526b9f4848 | 42fc44b06385c6eb25a979477dcea53fe66cfbfa | refs/heads/master | 2023-02-05T21:13:07.328928 | 2021-06-25T04:56:39 | 2021-06-25T04:56:39 | 252,550,259 | 3 | 0 | Apache-2.0 | 2023-01-24T23:21:39 | 2020-04-02T19:41:31 | Python | UTF-8 | Python | false | false | 626 | py | import os
from paraview import simple
# -----------------------------------------------------------------------------
MODULE_PATH = os.path.dirname(os.path.abspath(__file__))
PLUGINS = [
'parflow.py'
]
FULL_PATHS = [
'/Applications/ParaView-5.6.0-1626-g52acf2f741.app/Contents/Plugins/ParFlow.so',
]
# -----... | [
"[email protected]"
] | |
6cd6eee44b489002c6e6e5258534b94e5f4f6c30 | 6be956588b6bfdb5004d812872ef23973de9e07c | /l_006_docker/ubuntu/load_all.py | e24265db010f75fe97e70320bfbd6f2c4639320b | [] | no_license | Serg-sh/teleBots_aiogram | 45c8ee60501cff9a6035dbbab820975aade897e8 | 4bc9d452b6b6098fb25d4c9704a025737d59d4c8 | refs/heads/master | 2023-06-10T14:28:10.696277 | 2021-07-05T14:30:46 | 2021-07-05T14:30:46 | 375,966,651 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 803 | py | import asyncio
import logging
from aiogram import Bot, types
from aiogram import Dispatcher
from aiogram.contrib.fsm_storage.memory import MemoryStorage
from config import TOKEN
from sql import create_pool, create_db
# from aiogram.contrib.fsm_storage.redis import RedisStorage2
logging.basicConfig(format=u'%(filena... | [
"[email protected]"
] | |
f5efd08c910b830ef549e690e939ca4a01a2f950 | 9615178b79a69519883c092b20cfdd060b426a69 | /sublemon/version.py | 2e863c21379228f97e1ba1ac4cb053db461ad577 | [
"MIT"
] | permissive | emuhedo/sublemon | 3635799567a8b18f863d582e7b23d6840069ce37 | 198da2ec96d4d50c7017f4ebfa8e69e5aa0681b0 | refs/heads/master | 2020-04-02T09:22:31.272188 | 2018-10-20T19:10:18 | 2018-10-20T19:10:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 134 | py | """Version info for the `sublemon` library."""
__version_info__ = (0, 0, 2)
__version__ = '.'.join(str(i) for i in __version_info__)
| [
"[email protected]"
] | |
8a70a022a1bff29b68d30aa56e8fbe8aadb30ed0 | 14f1af759b594b4fab570fd98fc8dceae668d62f | /file_IO_exercise/bonus_crashTest.py | b5c7ff5ef2a8d870dfe9eba6a717490f50abbd02 | [] | no_license | ziqingW/python-exercise-flex-Mar08 | cb10bf8c6f376808ff5bfadc86066a7c31b48120 | 070be19fb63b1ec6312c477bb656c19339448d67 | refs/heads/master | 2021-04-03T01:45:53.533366 | 2018-03-09T16:51:43 | 2018-03-09T16:51:43 | 124,464,476 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 391 | py | import io
file_handle = io.StringIO()
while True:
file_handle.write("B" * 1024 * 1024)
size_contents = len(file_handle.getvalue())
print("Characters count: {}".format(size_contents))
# crash happens at counting of 208666624
# MemoryError
# I use 1mb as one time write, so totally it reached to 200mb
# it's ... | [
"[email protected]"
] | |
2e18e65d3098282a56dc5d1a6a480e964b0032af | 176bda9771b0ec07a3206112eb4dbd34f5dc293a | /seznamy/seznamy/06_zmena_polozky.py | 2f5345e2776005aa4f10f4fe61bfd83a219421a2 | [] | no_license | HelenaJanda/pyladies-7 | 8b4254f85295fb5695c60b1b5d8f70e29d1a999f | 00613e2ff1bea2b8b8f60d3e4ce7a83345f2300d | refs/heads/master | 2022-12-24T03:12:35.338933 | 2020-10-14T15:32:46 | 2020-10-14T15:32:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 162 | py | # Zkusme zmenit pismeno v retezci
retezec = "ahoj"
retezec[0] = "A"
print(retezec)
# A nyni v seznamu
cisla = [1, 0, 2, 3, -6, 8, 13]
cisla[0] = 42
print(cisla) | [
"[email protected]"
] | |
676193468f407b65515fcd72b955175e02eb7f4c | afc8d5a9b1c2dd476ea59a7211b455732806fdfd | /Configurations/ggH_SF/Full2017_v6/cuts_loose.py | 5b5523ca9223e6190987132c5c63712a4cce2ab3 | [] | no_license | latinos/PlotsConfigurations | 6d88a5ad828dde4a7f45c68765081ed182fcda21 | 02417839021e2112e740607b0fb78e09b58c930f | refs/heads/master | 2023-08-18T20:39:31.954943 | 2023-08-18T09:23:34 | 2023-08-18T09:23:34 | 39,819,875 | 10 | 63 | null | 2023-08-10T14:08:04 | 2015-07-28T07:36:50 | Python | UTF-8 | Python | false | false | 5,984 | py |
supercut = ' mll>12 \
&& Lepton_pt[0]>25 \
&& Lepton_pt[1]>10 \
&& (abs(Lepton_pdgId[1])==13 || Lepton_pt[1]>13) \
&& (nLepton>=2 && Alt$(Lepton_pt[2],0)<10) \
&& abs(Lepton_eta[0])<2.5 && abs(Lepton_eta[1])<2.5 \
&& ptll>30 \
&& Pu... | [
"[email protected]"
] | |
81eaca22372f4565c7fec498ad3d996d96707f81 | 2ecfe0e10d10513917e4f2770e0a56075404c5d8 | /oldnumba/exttypes/jitclass.py | 2e89053cda7b823f46c4d499735c02ce96b0d72c | [
"BSD-2-Clause"
] | permissive | laserson/numba | 84ab7615ea0177b496a63e2a86319f0b12992cd2 | 35546517b27764a9120f6dfcd82eba7f4dd858cb | refs/heads/master | 2020-05-20T23:13:23.011971 | 2014-12-08T20:16:20 | 2014-12-08T20:16:20 | 16,754,385 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,662 | py | """
Compiling @jit extension classes works as follows:
* Create an extension Numba type holding a symtab
* Capture attribute types in the symtab ...
* ... from the class attributes:
@jit
class Foo(object):
attr = double
* ... from __init__
... | [
"[email protected]"
] | |
e54bf79baf0acedc05e53d70a7ae27e37fdab96a | 59254f1c203bd7ebd3a5d85d5ec31959c1e90182 | /rdis/formalisms/RDIS/primitive2connection.py | a7f32d38fdb66e9533143417be4bde7ef91ff1b1 | [] | no_license | monicadelaine/preop_create | c9c687012a23d99d200d4396237ba69862a285fc | 34dbe0bb8d96d6adcb2c79ac33474007044b65dd | refs/heads/master | 2020-04-11T04:23:20.150444 | 2013-02-22T22:02:51 | 2013-02-22T22:02:51 | 68,144,611 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,255 | py | """
__primitive2connection.py_____________________________________________________
Automatically generated AToM3 syntactic object (DO NOT MODIFY DIRECTLY)
Author: pkilgo
Modified: Sun Apr 15 13:18:31 2012
______________________________________________________________________________
"""
from ASGNode import *
from ATO... | [
"[email protected]"
] | |
39643dc2ed9ecf04dec6ff9dde56590ba88e04a0 | 0bde5f7f09aa537ed1f4828d4e5ebee66475918f | /h2o-py/tests/testdir_apis/Data_Manipulation/pyunit_h2oH2OFrame_relevel.py | cd2911c2ef668d093498efb7a014986253e94b6f | [
"Apache-2.0"
] | permissive | Winfredemalx54/h2o-3 | d69f1c07e1f5d2540cb0ce5e6073415fa0780d32 | dfb163c82ff3bfa6f88cdf02465a9bb4c8189cb7 | refs/heads/master | 2022-12-14T08:59:04.109986 | 2020-09-23T08:36:59 | 2020-09-23T08:36:59 | 297,947,978 | 2 | 0 | Apache-2.0 | 2020-09-23T11:28:54 | 2020-09-23T11:28:54 | null | UTF-8 | Python | false | false | 930 | py | from __future__ import print_function
import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
import numpy as np
def h2o_H2OFrame_relevel():
"""
Python API test: h2o.frame.H2OFrame.relevel(y)
"""
python_lists = np.random.randint(-5,5, (100, 2))
h2oframe = h2o.H2OFrame(p... | [
"[email protected]"
] | |
20441db34cdbb7bf136e9eb5365a49f9a7aa8058 | 65fce73a1e6a36718238cdef09a17493b19532a0 | /16/test/test_document_frequency_response_entity.py | c5787167fde15302326b94889bfb8d06f4cdb9e8 | [
"Apache-2.0"
] | permissive | apitore/apitore-sdk-python | eb419589609efb86bd279cd1733c2a03cdc03680 | c0814c5635ddd09e9a20fcb155b62122bee41d33 | refs/heads/master | 2020-03-21T10:06:34.557781 | 2018-06-23T21:26:27 | 2018-06-23T21:26:27 | 138,434,217 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,063 | py | # coding: utf-8
"""
Document frequency APIs
Document frequency of Wikipedia.<BR />[Endpoint] https://api.apitore.com/api/16 # noqa: E501
OpenAPI spec version: 0.0.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
im... | [
"[email protected]"
] | |
cd5c3d30b568aaa4322afa96b7a059e9f2d2c049 | 68d9fffda9c1ee0f4819371067adfd4985332319 | /python/108.将有序数组转换为二叉搜索树.py | 987eb6ba870034bcba75c49281ce7e0aac793c31 | [
"MIT"
] | permissive | Wanger-SJTU/leetcode-solutions | ade9486cef05ede6fa44cbbb5d726037518fac15 | eb7f2fb142b8a30d987c5ac8002a96ead0aa56f4 | refs/heads/master | 2023-04-11T19:56:13.561234 | 2021-05-10T12:00:28 | 2021-05-10T12:00:28 | 129,606,869 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 612 | py | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def sortedArrayToBST(self, nums):
"""
:type nums: List[int]
:rtype: TreeNode
"""
... | [
"[email protected]"
] | |
00b5fbd1b10e3a326da7fa05e534df9b62574feb | 5fd32c6c52fda2739f3423be9d11fb932611bea5 | /Python/bosch/bbs_mop_crawl.py | c13f3b74571579a28adc094bd5c4d05c085f4bd4 | [] | no_license | luogangyi/Spider | 446765886c328602cd4224bfe6b7b5e51633a7d7 | e703f69399854331a141a2f2270d4e9b9e2c63e3 | refs/heads/master | 2021-01-18T18:13:03.048432 | 2014-06-10T17:21:46 | 2014-06-10T17:21:46 | 11,663,610 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 575 | py | #!/usr/bin/python
#-*-coding:utf-8-*-
from config import *
from bbs_utils import *
from utils import *
from baidu import Baidu
from goole_search import Google
MOP_INFO_SOURCE_ID = 20
def main():
try:
obj = Baidu(id,'dzh.mop.com','bbs')
obj.main()
except Exception, e:
... | [
"[email protected]"
] | |
38bbe3bd03f55ab1849071c514c13807a7883541 | 488de2f3cadeb866ccbe4064411f7db5d3dc3a57 | /ttt.py | 252be389ef5f8e434dbf58c94879cffea666b1a6 | [] | no_license | yp000925/Holo_synthetic | 8a23d587462e79efe5ba27f8c0a6ad8d9fc028b9 | 711b449bd6295a95d2a2a6e73fcea47c8058dad4 | refs/heads/master | 2023-08-30T04:39:16.820671 | 2021-10-31T04:14:08 | 2021-10-31T04:14:08 | 317,855,268 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,162 | py | from __future__ import print_function, division
import sys
import os
import torch
import numpy as np
import random
import csv
from torch.utils.data import Dataset, DataLoader
from torchvision import transforms, utils
from torch.utils.data.sampler import Sampler
import pandas as pd
from PIL import Image
class myDatalo... | [
"[email protected]"
] | |
82908ae8ac24e79217bf0b66161e59606ee3b4f4 | 91d1a6968b90d9d461e9a2ece12b465486e3ccc2 | /dataexchange_read_2/revision_get.py | aa8e9858a1a6eee389251c26211af7da94e53e10 | [] | 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 | 983 | 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 execute_two_parameter
# url : https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dataexchange/get-revision.html
if __name__ ==... | [
"[email protected]"
] | |
ed2dee8a9a297a14b1e6a0827a7ecca5e8a197c7 | f3553f36a248d5e2a30713af68dd714df90953d7 | /kuaishou/1.py | 51178e065731b5fe3e9606a854b3219244ac41fe | [] | no_license | Mrzhouqifei/offfer | 8a699653850cf6cc91ed5a622ad166fd61b8e294 | 4c73e7a591e79348471e00272dcb8e1b5cc6d7cb | refs/heads/master | 2023-04-09T05:58:49.858037 | 2020-12-30T06:13:52 | 2020-12-30T06:13:52 | 298,285,069 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 394 | py | s = str(input().split())
match, left, right = 0, 0 , 0
stack = []
for x in s:
if x == '(' or x == ')':
stack.append(x)
while len(stack) > 0:
t = stack.pop()
if t == '(':
if right > 0:
match += 1
right -= 1
else:
left += 1
elif t == ')':
... | [
"[email protected]"
] | |
c2b218be5ab2b6c61f063656e3d0cc3fad868684 | 0fd49b4779351c68bbe51ee978939f39c8e57d7c | /400-1000/412-Fizz Buzz.py | d10f822657cd03fff2f4df88968aae90c1ba0e31 | [] | no_license | jia0713/leetcode | 8f632b96d0bc900cf4357ab1b8affd6068964dec | 13565941f16c74d32124020285ce887a4cb31b27 | refs/heads/master | 2023-06-17T20:41:47.185832 | 2021-07-16T09:42:39 | 2021-07-16T09:42:39 | 247,866,418 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 482 | py | class Solution(object):
def fizzBuzz(self, n):
"""
:type n: int
:rtype: List[str]
"""
res = [0] * (n + 1)
for i in range(n + 1):
res[i] = str(i)
for i in range(n // 3 + 1):
res[3 * i] = "Fizz"
for i in range(n // 5 + 1):
... | [
"[email protected]"
] | |
e719ea9ed023608f7635c6fd8bf85b0b352cde9c | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03797/s857928689.py | 5a492d61ed9095cbcb8fca6a600a3c13717f356e | [] | 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 | 149 | py | N, M = map(int, input().split())
cnt = 0
if N<=M//2:
cnt = N
N,M =0,M-2*N
cnt += M//4
print(cnt)
else:
cnt = M//2
print(cnt) | [
"[email protected]"
] | |
3f800f7039c5fc6489b128bf37624959ce17273a | 8fcc27160f8700be46296568260fa0017a0b3004 | /client/eve/client/script/ui/shared/planet/pinContainers/LaunchpadContainer.py | 614755276a054e01a0a618a178a4f59d06d3a490 | [] | no_license | connoryang/dec-eve-serenity | 5d867f4eedfa896a4ef60f92556356cafd632c96 | b670aec7c8b4514fc47cd52e186d7ccf3aabb69e | refs/heads/master | 2021-01-22T06:33:16.303760 | 2016-03-16T15:15:32 | 2016-03-16T15:15:32 | 56,389,750 | 1 | 0 | null | 2016-04-16T15:05:24 | 2016-04-16T15:05:24 | null | UTF-8 | Python | false | false | 2,664 | py | #Embedded file name: e:\jenkins\workspace\client_SERENITY\branches\release\SERENITY\eve\client\script\ui\shared\planet\pinContainers\LaunchpadContainer.py
import carbonui.const as uiconst
from eve.client.script.ui.control.eveLabel import Label
import uiprimitives
import util
import localization
from .BasePinConta... | [
"[email protected]"
] | |
4e16ccc77fd56253143c198ecaa008a328bcd0b8 | f0fa96d39a66c3ddaae4266442a13ec3feb7a462 | /dynaminc_programing/perfectSquare.py | 7b3a7b89619c22b047ff08c46b1d7e59fa335c19 | [] | no_license | ashishgupta2014/problem_solving_practices | 14d587e98d9996a95efe822335ca4baccb39b1a1 | bc4f4b07e1e33273010e34428e0c31d2d6656c14 | refs/heads/master | 2023-04-26T03:47:40.766508 | 2021-06-07T04:55:52 | 2021-06-07T04:55:52 | 298,063,915 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 415 | py | import math
def perfectSquare(n):
if (n < 3): return n
square_nums = [i ** 2 for i in range(0, int(math.sqrt(n)) + 1)]
dp = [float('inf')] * (n + 1)
dp[0] = 0
for i in range(1, n + 1):
for square in square_nums:
if (i < square): break
dp[i] = min(dp[i], dp[i - square... | [
"[email protected]"
] | |
5c9e8206af3d623bc4bcb23dcb9e1c079e59e878 | bf7959048edc0005e04431a0864c719adc5ea9ea | /python版本/6038-MinimizeResult.py | e33698a2a56562956fcdb3f35ab04e87657c7df2 | [] | no_license | Yohager/Leetcode | 7c24f490cfa5fd8e3cdb09e5a2305a134a064a93 | 585af82ff2c2d534053f6886714406019ed0c7d1 | refs/heads/master | 2022-12-07T23:51:16.347174 | 2022-11-28T02:30:53 | 2022-11-28T02:30:53 | 178,201,848 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 987 | py | class Solution:
def minimizeResult(self, e: str) -> str:
n = len(e)
arr = e.split('+')
l1,l2 = len(arr[0]), len(arr[1])
init = eval(e)
res = float('inf')
p1,p2 = -1,-1
for i in range(l1):
for j in range(n,n-l2,-1):
if i == 0 and j =... | [
"[email protected]"
] | |
de40442e18ca727417a8eb58201487d77ae1f7eb | 23107f38f7c28da5e2e5e51f6eda3ba6b5b9a2ff | /kitchen_project/settings.py | b1c6eb6dddc924b8e595337e856f15b714f1cb08 | [] | no_license | sarigu/kitchen_app | fe818aca3fb0605c185fe9ab0b496ea4e0bca0c7 | f2eacf907eb75afd4cecd1cdce19900230b8fb33 | refs/heads/master | 2023-02-22T19:34:41.094263 | 2021-01-25T09:24:01 | 2021-01-25T09:24:01 | 315,796,319 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,204 | py | """
Django settings for kitchen_project project.
Generated by 'django-admin startproject' using Django 3.1.3.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from... | [
"[email protected]"
] | |
8e1eaca2c534ab590ef058f10c521bcab1b4c678 | 6443a587e16658a58b884a2e5c6dbbab1be50674 | /Leetcode/Unique Binary Search Trees.py | c83974a73a1bea84808319b93ca6f42ec0b06328 | [] | no_license | xiaochenchen-PITT/CC150_Python | a6cbe213946851639a827068961934920b6c3e57 | e96394265d8a41a1b4558d5d2b34aa34af99662f | refs/heads/master | 2020-12-24T17:18:14.606804 | 2014-11-08T21:48:20 | 2014-11-08T21:48:20 | 25,654,100 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 866 | py | # Unique Binary Search Trees
class Solution:
# @return an integer
def numTrees(n):
# DP
mp = {0: 1, 1: 1} # key: n, value: number of different structures
if n in mp:
return mp[n]
for i in range(2, n+1): # i nodes
res = 0
sm = 0
for j in ... | [
"[email protected]"
] | |
50ab018c1be8d2a4d8012cffc93a214ded31a1c8 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03339/s461187106.py | 117afdfcdef0aa4d725b5db1581f92a01b0ab81a | [] | 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 | 270 | py | n = int(input())
s = input()
ec = 0
wc = 0
el = []
wl = []
for f,r in zip(s,reversed(s)):
el.append(ec)
wl.append(wc)
if f == 'W':
wc += 1
if r == 'E':
ec += 1
ans = n
for e,w in zip(wl, reversed(el)):
ans = min(ans, e+w)
print(ans) | [
"[email protected]"
] | |
60d9374afa434145e400c9430c0c5b40ef4a1df4 | 0b529ba1efe44c47b540dd22a7fd9cc6a73f907f | /src/1300-1400/_1344_angle-between-hands-of-a-clock.py | f352f9345e2663c99a674b740103ff27b7269469 | [] | no_license | alexparunov/leetcode_solutions | b9445a02182bc61f490257328a1960c2a627d7bc | bc19dbcc903782f91846d5b9d73a7ffb9b2f002d | refs/heads/master | 2022-11-28T21:10:24.875260 | 2020-08-15T12:42:40 | 2020-08-15T12:42:40 | 261,517,109 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 494 | py | """
https://leetcode.com/problems/angle-between-hands-of-a-clock/
"""
class Solution:
def angleClock(self, hour: int, minutes: int) -> float:
angle_in_hour_minute = 360 / (12 * 60)
angle_in_minute = 360 // 60
angle_of_hour = (hour * angle_in_hour_minute * 60 + minutes * angle_in_hour_min... | [
"[email protected]"
] | |
bd8669f2afe46f47983bf9b249cef07baa413cf6 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03000/s283498849.py | 4b5184d2bd4bb37f346be633557e0c253010dab9 | [] | 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 | 306 | py | def main():
N, X = (int(i) for i in input().split())
L = [int(i) for i in input().split()]
from itertools import accumulate
S = list(accumulate([0] + L))
ans = 0
for s in S:
if X < s:
break
ans += 1
print(ans)
if __name__ == '__main__':
main()
| [
"[email protected]"
] | |
7e75de29e7392a2689f4241b3e42ee1e2d5a54a7 | 0c8214d0d7827a42225b629b7ebcb5d2b57904b0 | /examples/matplotlib/E001_Basics/main.py | 85b515aeab4272d66c0f3674054cc913aa4f050a | [] | no_license | mertturkmenoglu/python-examples | 831b54314410762c73fe2b9e77aee76fe32e24da | 394072e1ca3e62b882d0d793394c135e9eb7a56e | refs/heads/master | 2020-05-04T15:42:03.816771 | 2020-01-06T19:37:05 | 2020-01-06T19:37:05 | 179,252,826 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 417 | py | import matplotlib.pyplot as mpl
def fib(n: int) -> list:
a = 1
b = 1
result = [a, b]
for i in range(3, n):
c = a + b
result.append(c)
a = b
b = c
return result
if __name__ == '__main__':
y_values = fib(10)
x_values = [i + 1 for i in range(len(y_values))]... | [
"[email protected]"
] | |
a4f3ed80aaf08dd5a18b2c21b6803d9b7bd49b9b | ddd4edc45481e6a7c7141b93e47b974634506d2d | /tradgram/chatrooms/serializers.py | b371a510b3309043cb8b9ef1ab0734ad2bea6c3c | [
"MIT"
] | permissive | didils/tradgram | 407de9d05d01bc840c5c165155d370f092d82f0d | 4868ca082ab78a1b5b96f25ee9f958567bd1bb1e | refs/heads/master | 2021-11-19T02:47:02.224088 | 2019-04-05T08:19:14 | 2019-04-05T08:19:14 | 148,162,588 | 0 | 0 | MIT | 2021-09-08T00:57:43 | 2018-09-10T13:49:57 | Python | UTF-8 | Python | false | false | 350 | py | from rest_framework import serializers
from . import models
from tradgram.users import models as user_models
class ChatRoomSerializer(serializers.ModelSerializer):
class Meta:
model = models.ChatRoom
fields = (
'user1',
'user2',
'last_message',
... | [
"[email protected]"
] | |
3fc82e87b1bddde9014a48c4e580873adf678bc4 | a367a015dbc36287ca933955ded1ee58b5a2a61a | /swagger_client/models/disease_group.py | 776059fb3fa87b5485cc3d698aca7fb81e4dba90 | [] | no_license | kerniee/inno_intership_1_test_task | 70211e153450011c427df595a02e3574dfe7ed9f | fc0619ef54b00806a3b59f3c07c1c1684682d65b | refs/heads/master | 2023-05-23T02:24:40.083723 | 2021-06-21T16:15:04 | 2021-06-21T16:15:04 | 365,855,831 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,717 | py | # coding: utf-8
"""
Teleagronom
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 1.1.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
... | [
"[email protected]"
] | |
c565643c4f2c79d599b5eb9b424e914fcb11f621 | 88906fbe13de27413a51da917ebe46b473bec1b9 | /Part-II/Project-2-Data-Visualisation/Chapter 15 - Generating Data/random_walk_2.py | a41d63019aa7797ec13e4ca91ffd50709a3776ab | [] | no_license | lonewolfcub/Python-Crash-Course | 0b127e40f5029d84ad036263fd9153f6c88c2420 | 322388dfb81f3335eeffabcdfb8f9c5a1db737a4 | refs/heads/master | 2021-01-01T16:45:50.617189 | 2017-10-27T14:23:58 | 2017-10-27T14:23:58 | 97,911,584 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,115 | py | from random import choice
class RandomWalk():
"""A class to generate random walks."""
def __init__(self, num_points=5000):
"""Initialize attributes of a walk."""
self.num_points = num_points
# All walks start at (0, 0)
self.x_values = [0]
self.y_values = [0]
def ... | [
"[email protected]"
] | |
f9200b25f79758ec7d91ceee76d4b01687175579 | b08d42933ac06045905d7c005ca9c114ed3aecc0 | /src/coefSubset/evaluate/ranks/twentyPercent/rank_3uzv_J.py | 675fb8afa38dcf61c4544fa34ba93dc97dac281a | [] | no_license | TanemuraKiyoto/PPI-native-detection-via-LR | d148d53f5eb60a4dda5318b371a3048e3f662725 | 897e7188b0da94e87126a4acc0c9a6ff44a64574 | refs/heads/master | 2022-12-05T11:59:01.014309 | 2020-08-10T00:41:17 | 2020-08-10T00:41:17 | 225,272,083 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,392 | py | # 9 July 2019
# Kiyoto Aramis Tanemura
# Several metrics are used to assess the performance of the trained RF model, notably native ranking. This script returns a ranking of the native protein-protein complex among a decoy set. For convenience, I will define as a function and will call in a general performance assess... | [
"[email protected]"
] | |
e78096450e3762e13172fbb51ef0a06a34d1680c | 957e5aef8b48cf21804d51447ed93a026aab35ff | /script/chk_dup.py | 1fdcc86fc2f8ac8af76c1ce69c5e116ae660a27d | [
"Apache-2.0"
] | permissive | dannysauer/oidctest | 045a438ee934b5c9e27aae9876765e08dac16a37 | e7593e02af7caa71f92220ad0f5b67bb40e30f97 | refs/heads/master | 2021-07-08T07:36:30.362597 | 2020-05-14T07:21:25 | 2020-05-14T07:21:25 | 152,679,266 | 0 | 0 | NOASSERTION | 2018-10-12T01:54:49 | 2018-10-12T01:54:49 | null | UTF-8 | Python | false | false | 292 | py | #!/usr/bin/env python3
import json
ap = json.loads(open('assigned_ports.json').read())
inv = {}
for iss, port in ap.items():
try:
inv[port].append(iss)
except KeyError:
inv[port] = [iss]
for port, iss in inv.items():
if len(iss) != 1:
print(port, iss) | [
"[email protected]"
] | |
c8e318873904d5e634587d89ee920d2feffa58ee | 6cc37dfc44880f57823bb9523ea5f8206d5e3f22 | /python_OOP/labs_and_homeworks/07_solid_exercise/05_emails.py | adeddfd64439568ad2e5a90b04ba83bc9cc780b0 | [] | no_license | dimitar-daskalov/SoftUni-Courses | 70d265936fd86712a7bfe0586ec6ebd1c7384f77 | 2054bc58ffb5f41ed86f5d7c98729b101c3b1368 | refs/heads/main | 2023-05-31T06:44:35.498399 | 2021-07-11T10:16:08 | 2021-07-11T10:16:08 | 322,896,365 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,714 | py | # SRP (Single Responsibility Principle)
from abc import ABC, abstractmethod
class IEmail(ABC):
@abstractmethod
def set_sender(self, sender):
pass
@abstractmethod
def set_receiver(self, receiver):
pass
@abstractmethod
def set_content(self, content):
pass
class Email... | [
"[email protected]"
] | |
03fc2be0614708dcfbee8c1d6b82759f19bcf7fc | 59f4e4f57c4590b9fe969274960c49e7218ed275 | /.venv/bin/ptw | 6cb2d4a3f8ba91373047a8d4474bb0d5b0042e9d | [] | no_license | MohamadSheikhAlshabab/math-series | be82710d0cb0e8784543ee097c569964dfb8a376 | 6fe5772e2b67beadebbf6d27676bbe5aa91bd367 | refs/heads/master | 2022-12-06T12:56:18.678827 | 2020-08-17T16:49:47 | 2020-08-17T16:49:47 | 288,155,962 | 0 | 0 | null | 2020-08-20T22:58:04 | 2020-08-17T10:56:20 | Python | UTF-8 | Python | false | false | 420 | #!/home/mohamad/401/math-series/.venv/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'pytest-watch==4.2.0','console_scripts','ptw'
__requires__ = 'pytest-watch==4.2.0'
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[... | [
"[email protected]"
] | ||
815a53ab6d3b0f60494ac49b3988449512470445 | 38da8edb2102ad29eda8784cbb845cac0b96bbca | /151_lambda_expression.py | f4ae995bf65597a88920a1d5cd79443c18b826fd | [] | no_license | Prateek2201/Python_codes | 1a655a3e6820e7ecb1fb8a8abd266a8ae0508cb5 | 436a36544edac80cbe420c7b9ddb718df46b68da | refs/heads/main | 2023-08-01T03:10:51.864186 | 2021-09-17T18:08:40 | 2021-09-17T18:08:40 | 407,635,606 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 466 | py | ##def is_even(a):
## return a%2==0
##print(is_even(5))
##
##is_even2=lambda a:a%2==0
##print(is_even2(6))
##def last_char(s):
## return s[-1]
##print(last_char('Prateek'))
##
##last_char2=lambda s: s[-1]
##print(last_char2('Prateek'))
def f(s):
if len(s)>5:
return True
return Fa... | [
"[email protected]"
] | |
57b36a522a4a39bda75590c6ed08055b2fd1ba63 | f3d8e1351e52526959e2d44d72fd716924f1751d | /problems/56_merge_intervals.py | 5b845275a27f0c956cd1a1031bf770ef73b34f38 | [] | no_license | xueyuanl/leetcode-py | c27a4faff5b9040d57cf864d3a11f1683d8182e3 | 03d3e34522c8c819388634ab4b63077da864a4e1 | refs/heads/master | 2021-07-14T23:40:32.913822 | 2021-07-14T13:43:19 | 2021-07-14T13:43:19 | 206,973,737 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 577 | py | class Solution(object):
def merge(self, intervals):
"""
:type intervals: List[List[int]]
:rtype: List[List[int]]
"""
if len(intervals) < 1:
return []
res = []
sorted_intervals = sorted(intervals)
new_pair = sorted_intervals[0]
res.... | [
"[email protected]"
] | |
d2c204a4d44b2ff1d4ff5c3b10a7ccc2a91de537 | 1c904e7b4ab661c9f90536c9bfcde970540271d8 | /setup.py | 918cc1176dfec9a809df9ea34f452fb6de684980 | [] | no_license | koslab/pydatamall.webui | a7803a652441acb74adc75d2d09d9dced7cc9520 | b483e8ca1aeef73a2c2c430cabf74e8fd0d0daf2 | refs/heads/master | 2021-01-10T07:56:48.159898 | 2015-11-20T15:55:09 | 2015-11-20T15:55:09 | 45,684,674 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,269 | py | from setuptools import setup, find_packages
import os
version = '1.0'
long_description = (
open('README.txt').read()
+ '\n' +
'Contributors\n'
'============\n'
+ '\n' +
open('CONTRIBUTORS.txt').read()
+ '\n' +
open('CHANGES.txt').read()
+ '\n')
setup(name='pydatamall.webui',
... | [
"[email protected]"
] | |
6e87c83ff642eaea9ea8bc5eccfac1ca58e50696 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_142/863.py | a5243b5969ac2f11082e3e3b90863e0c03738b35 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,195 | py | class GameInstance:
def __init__(self, init_str):
self.strs = init_str
self.total_action = 0
self.tab_strs = []
self.tabularize()
def tabularize(self):
#set_trace()
N = len(self.strs)
for i in range(0, N):
self.tab_strs.append([[self.strs[i][0... | [
"[email protected]"
] | |
e5f2b67f813053e0c4f7d0204c27f0484fd58db9 | 89e3f694021f261b95e494d2b479367bacde8251 | /followthemoney/cli/ocds.py | 536ec92f0f70666a97530d0dcc850e5d8f6e74e3 | [
"MIT"
] | permissive | dchaplinsky/followthemoney | 6f9c05f430f8bfb04f7841378fd2ee5cf9b33235 | a2a150f558acb5a1c985b9dc891c98c0fdf2f17e | refs/heads/master | 2020-09-10T08:16:14.617602 | 2019-11-14T09:15:52 | 2019-11-14T09:15:52 | 221,699,199 | 1 | 0 | MIT | 2019-11-14T13:03:41 | 2019-11-14T13:03:41 | null | UTF-8 | Python | false | false | 5,146 | py | import json
import click
import logging
from pprint import pprint # noqa
from followthemoney import model
from followthemoney.cli.cli import cli
from followthemoney.cli.util import write_object
log = logging.getLogger(__name__)
IDENTIFIERS = {
'TRADE_REGISTER': 'registrationNumber',
'TAX_ID': 'vatCode',
... | [
"[email protected]"
] | |
43d460ce6a3a415277321f9a4f8658f6d7c4dbec | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/verbs/_parody.py | 947ea401561ad67bf848e6ab6ddc4814d3613dd2 | [
"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 | 340 | py |
#calss header
class _PARODY():
def __init__(self,):
self.name = "PARODY"
self.definitions = [u'to copy the style of someone or something in a humorous way: ']
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.specie = 'verbs'
def run(self, obj1 = [], obj2 = []):
r... | [
"[email protected]"
] | |
c515faf8793eb07a829146f36ac33429993b55ef | 8ff6c3e513e17be6c51b484bed81d03150bdd175 | /2013-04-analytic/part2/ex52b.py | be5ca1d980f5e1a94ea1ffb0ae488dd765182979 | [] | no_license | ricbit/Oldies | f1a2ac520b64e43d11c250cc372d526e9febeedd | 2d884c61ac777605f7260cd4d36a13ed5a2c6a58 | refs/heads/master | 2023-04-27T20:35:19.485763 | 2023-04-26T04:45:44 | 2023-04-26T04:45:44 | 2,050,140 | 40 | 8 | null | null | null | null | UTF-8 | Python | false | false | 652 | py | import itertools, sys
def surjection(seq):
hist = {}
for i in seq:
hist[i] = 1 + hist.get(i, 0)
m = max(hist.iterkeys())
for i in xrange(1, 1 + m):
if hist.get(i, 0) < 3:
return False
return True
def triple_surjections(n):
for seq in itertools.product(xrange(1, 1 + n / 3), repeat=n):
if ... | [
"[email protected]"
] | |
cf53263187c3025a04b1d121a9c4f9bfaa1f2106 | 3d69b7fe8fa95fcd6dbab25885f2e3e42bc891d6 | /src/nlp/classification/tf1/xlnet/prepro_utils.py | fc945d6d64a46f483a18389895831414c5f33e17 | [
"Apache-2.0"
] | permissive | wu-uw/OpenCompetition | ac652d066f667dc2b3061947af5ea0425643a1b5 | 9aa9d7a50ada1deb653d295dd8a7fe46321b9094 | refs/heads/master | 2021-01-03T04:59:28.987099 | 2020-03-02T07:49:11 | 2020-03-02T07:49:11 | 239,932,371 | 0 | 0 | Apache-2.0 | 2020-03-02T07:49:12 | 2020-02-12T05:12:02 | Python | UTF-8 | Python | false | false | 5,013 | py | # coding=utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import unicodedata
import six
from functools import partial
SPIECE_UNDERLINE = '▁'
def printable_text(text):
"""Returns text encoded in a way suitable for print or `tf.logging`."""
#... | [
"[email protected]"
] | |
44cdec8d130987c667d3ddd3a464bad33f309eeb | 5dd47abf7061201d9378e73e51f08fbb314ba2fd | /envdsys/envcontacts/migrations/0050_auto_20210219_2128.py | b9ec01c328ffb1adf3231e767f6654bbfec32bcf | [
"Unlicense"
] | permissive | NOAA-PMEL/envDataSystem | 4d264ae5209015e4faee648f37608d68a4461d0a | 4db4a3569d2329658799a3eef06ce36dd5c0597d | refs/heads/master | 2023-02-23T22:33:14.334737 | 2021-07-22T01:09:16 | 2021-07-22T01:09:16 | 191,809,007 | 1 | 0 | Unlicense | 2023-02-08T00:45:54 | 2019-06-13T17:50:03 | Python | UTF-8 | Python | false | false | 1,175 | py | # Generated by Django 3.1.7 on 2021-02-19 21:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('envcontacts', '0049_auto_20210219_2127'),
]
operations = [
migrations.AlterField(
model_name='person',
name='email1_... | [
"[email protected]"
] | |
4b50d3a9c44f387818b24514e492f94d5951050f | e0527bce5c53a196752d3a16adf50cb60754de5f | /03-Workshop/Workshop-Questions/C_fun_with_flags.py | 8627af965e3f1c5c0e3e439a2dc9c83893f634a1 | [] | no_license | ARWA-ALraddadi/python-tutorial-for-beginners | ddeb657f419fbc176bea273bc9fb6b88d1894191 | 21cedfc47871ca4d25c2382464c60ab0a2121205 | refs/heads/master | 2023-06-30T20:24:30.688800 | 2021-08-08T08:22:29 | 2021-08-08T08:22:29 | 193,094,651 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,068 | py | #--------------------------------------------------------------------
#
# Fun With Flags
#
# In the lecture demonstration program "stars and stripes" we saw
# how function definitions allowed us to reuse code that drew a
# star and a rectangle (stripe) multiple times to create a copy of
# the United States flag.
#
# As... | [
"[email protected]"
] | |
fe416a0e81300a32016388151c240e79727ff3ad | e7ec251afc62616525c573c1b1b9e6416454aaaa | /bcbio/pipeline/__init__.py | 298c4775b143c01b611e1483575f90280a9da72a | [
"MIT"
] | permissive | YTLogos/bcbio-nextgen | 157e023341b9085b6c3f36d68c2b68ae31e063f2 | f964a25ab74a31551273b7e50518f3451c90f473 | refs/heads/master | 2022-12-28T15:11:28.127131 | 2017-09-20T18:58:45 | 2017-09-20T18:59:57 | 104,303,076 | 1 | 1 | MIT | 2022-12-12T12:18:27 | 2017-09-21T04:52:21 | Python | UTF-8 | Python | false | false | 598 | py | """High level code for driving a next-gen analysis pipeline.
This structures processing steps into the following modules:
- lane.py: Analyze a single fastq file.
- fastq.py: Utilities to retrieve fastq files.
- alignment.py: Align to a reference genome.
- sample.py: Analyze a sample, which may consist of... | [
"[email protected]"
] | |
f7db4248308429362c6ea3a4382920078bbd0636 | 465097858def678018ff76865bb09d34735d8eb9 | /mysite/blog/forms.py | 0d517f8db2dec175dc7af7cd362d511e1f0ffa33 | [] | no_license | bunnycast/django_girls | f9c3f3eb30955db64d2e643109bd2aa483b0f4b7 | fc24a8301dd55d98b790c8fb19bd9e68129a7c63 | refs/heads/master | 2022-11-13T09:12:30.860813 | 2020-07-02T02:28:51 | 2020-07-02T02:28:51 | 275,992,110 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 287 | py | from django import forms
from blog.models import Post, Comment
class PostForm(forms.ModelForm):
class Meta:
model = Post
fields = ('title', 'text',)
class CommentForm(forms.ModelForm):
class Meta:
model = Comment
fields = ('author', 'text',)
| [
"[email protected]"
] | |
77d9d1e0b97cfe7890c04957f93b007a82d99098 | d318975fdf4daeccecbf90c24aba5009d51637eb | /server/env/bin/symilar | 2bc1d53bf60868c4ab248a62a2e1b4c6610295af | [] | no_license | Jrius4/data-shuffle | 759702914b052c737b75f8cf5f84170f4e0cae40 | 4a0e7ac500d91903fcf4806d878ad01083068119 | refs/heads/master | 2023-01-24T10:38:59.467067 | 2019-10-13T20:01:33 | 2019-10-13T20:01:33 | 214,883,377 | 0 | 0 | null | 2023-01-04T12:23:25 | 2019-10-13T19:47:20 | Python | UTF-8 | Python | false | false | 274 | #!/home/jrius/Kaxiuz/investment/datastore/v1-UI/server/env/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from pylint import run_symilar
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(run_symilar())
| [
"[email protected]"
] | ||
b305b26622db5f2f5eb4e89f70911e77ea7254d5 | f6f632bee57875e76e1a2aa713fdbe9f25e18d66 | /python/CodingInterviews_2/30_bao-han-minhan-shu-de-zhan-lcof.py | e9a86f1b3ff003b07e9bfbf7235100b290513e37 | [] | no_license | Wang-Yann/LeetCodeMe | b50ee60beeeb3661869bb948bef4fbe21fc6d904 | 44765a7d89423b7ec2c159f70b1a6f6e446523c2 | refs/heads/master | 2023-08-07T05:31:23.428240 | 2021-09-30T15:33:53 | 2021-09-30T15:33:53 | 253,497,185 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,551 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author : Rock Wayne
# @Created : 2020-05-06 23:17:56
# @Last Modified : 2020-05-06 23:17:56
# @Mail : [email protected]
# @Version : alpha-1.0
# 定义栈的数据结构,请在该类型中实现一个能够得到栈的最小元素的 min 函数在该栈中,调用 min、push 及 pop 的时间复杂度都是 O(1)。
#
#
#
# 示例:
#
# ... | [
"[email protected]"
] | |
36173a6b0f8010fa465e6f58b4576b374a85c962 | 24b1fa231f4e89f1a588c09ebee6fe4da6915c53 | /Tutorials/Canvas/Fundamental-Theorem-Algebra.py | 39eb49279e27df600cc9cb59f442cec0a5a30844 | [] | no_license | cyrt63/demos | a429214154cf0e51b58710f67670e1d902bfcac6 | a4b54b862dba4ad33a707511896324829f4cc7b1 | refs/heads/master | 2020-04-08T13:51:40.823058 | 2015-04-21T14:01:41 | 2015-04-21T14:01:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,331 | py | from browser import *
from workbench import *
from math import *
from units import *
from easel import *
from eight import *
popup = window.open("","","width=800,height=600")
popup.document.body.style.backgroundColor = "202020"
popup.document.body.style.overflow = "hidden"
popup.document.title = "Visualizing Geometric... | [
"[email protected]"
] | |
9a9b603dacd11b6877b6f71b4b1dbcf95b157098 | cd0f3fa5c3b202599812ac8b49e374fe2b2f2e8b | /ExerciciosFixacao/Cap08/C08EXFIX01.py | 2da857eb09708d1fde3beae9840f79314ba2abba | [] | no_license | J-AugustoManzano/livro_Python | 46c14dc4bc5fb361d850fcd361477a952de172c2 | e42b79ef78c6b1ab936fe9a13d32ddc94deeb2a8 | refs/heads/main | 2023-06-25T03:10:30.297226 | 2023-06-08T23:34:54 | 2023-06-08T23:34:54 | 354,116,051 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 234 | py | a = []
for i in range(10):
a.append(input("Entre o {0:2}o. nome: ".format(i + 1)))
print()
for i in range(10):
print("{0:2}o. nome {1}.".format(i + 1, a[i]))
enter = input("\nPressione <Enter> para encerrar... ")
| [
"[email protected]"
] | |
e32226900cf40f40d2d4e42c722d43e09866fa5f | b65f31d9d273c3d4bb826ff83a805368570bcd4d | /Lesson 13 - Email Search/mailgui.py | c5fb8aa0db53048004cfdfd786ea43e8f8f717fb | [] | no_license | kobaltkween/python2 | 3fde6cc9ca1413b900c87656d8ceb99cb3f34f42 | f7e529abd303b65f0b794c8a9ed87dbf085541a8 | refs/heads/master | 2020-12-31T05:09:39.297693 | 2016-04-13T23:27:10 | 2016-04-13T23:27:10 | 56,192,556 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,280 | py | from tkinter import *
from maildb import msgs
import datetime
import mysql.connector as mysqlc
from database import loginInfo
def getDate(s):
"""
Assumes a date form of yyyy-mm-dd, returns a corresponding datetime.date.
"""
syear = s[:4]
smonth = s[5:7]
sday = s[8:]
return datetime.date(int... | [
"[email protected]"
] | |
f3ae9c1a7bf1d55613b290744e12c443dcac932d | 693568f813603806fbde976a1c69a97b06195708 | /mods/tests/test_install.py | 05669735deeb25b553bc8a1df5f2d8a56faf3514 | [
"MIT"
] | permissive | danlkv/pywebviz | c664a584c5a16d66c49aa233b69ef3b29ccaa081 | 5892ef90f28dbd43c33fefbfa5a199d15322a120 | refs/heads/master | 2023-02-11T06:06:13.451408 | 2021-01-13T07:22:08 | 2021-01-13T07:23:17 | 172,800,287 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 835 | py | from importlib import reload
import libvis.modules.installed as modules
import libvis_mods
from pathlib import Path
mocks = Path(__file__).parent / 'mocks'
def test_install_files():
global modules
pyfile, webfle = mocks/'module.py', mocks/'blah.coffee'
try:
libvis_mods.install('Test', pyfile, we... | [
"[email protected]"
] | |
fb0b3cea6186400de9e2106c276c471deea1a9c1 | e67fd8a02af7c913d5469b86b1fcc02a3497d863 | /organizing_hub/migrations/0004_auto_20181003_2101.py | 412f0ae3cf448c84b4866ed408a26659932c1147 | [
"MIT"
] | permissive | Our-Revolution/site | 37268727ab4761ca5d3e222b9b11c809327e01c2 | c8024b805ff5ff0e16f54dce7bf05097fd2f08e0 | refs/heads/master | 2023-01-20T18:10:57.479047 | 2019-08-02T17:26:52 | 2019-08-02T17:26:52 | 71,601,229 | 4 | 3 | MIT | 2023-01-12T08:22:58 | 2016-10-21T22:19:53 | Python | UTF-8 | Python | false | false | 744 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2018-10-03 21:01
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('organizing_hub', '0003_organizinghubloginalert_alert_level'),
]
operations = [
... | [
"[email protected]"
] | |
f283b2717969e97a9084442cb738ded2f130471c | 5896669c7ccf3efe979a4780516fc810844bfbba | /conf.py | 790504a29ba2e1d53b75d3f3ec6fffc60661f7ed | [
"MIT"
] | permissive | Hiestaa/miniboard-factorio-manager | ea1ff7e6084ef88869db635cb866517601f5b055 | 9ff5f1f063f17c0eaa47f43ac05bce0e74d90d45 | refs/heads/master | 2021-01-01T03:47:25.674434 | 2016-04-30T14:45:03 | 2016-04-30T14:45:03 | 57,064,708 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,373 | py | # -*- coding: utf8 -*-
from __future__ import unicode_literals
import logging
import netifaces
def getIpWindows(adapteridx):
try:
import wmi
except:
logging.error("You must need Win32com (win32 extensions for python)")
raise
adapters = wmi.WMI().Win32_NetworkAdapt... | [
"[email protected]"
] | |
08ad9df9dd16c3d904a326e08dbe5b1848f362ff | c157097e9883757f588c6da74d419b964a1c75cc | /python_fundamentals/08-user-input/command-line-parameters-01.py | 25984b506bf0dc30f4e2eb2bba2086dcb995dfb2 | [] | no_license | sudhansom/python_sda | 8d888216740c559ab66b700d3bea54c05caa0333 | 25d563854ef9d31ab910f84c973e48e3259de585 | refs/heads/master | 2022-04-26T15:26:15.263236 | 2020-04-25T07:32:10 | 2020-04-25T07:32:10 | 257,564,556 | 0 | 0 | null | 2020-04-29T16:41:37 | 2020-04-21T10:49:59 | Python | UTF-8 | Python | false | false | 191 | py | import sys
my_dict = {}
country_list = sys.argv[1:]
for i in range(0, len(country_list), 2):
my_dict[country_list[i]] = country_list[i+1]
print(f"\nDictionary details : \n\n {my_dict}")
| [
"[email protected]"
] | |
79669a5b1eccf60216afd0fadf1e13d7389fd0d1 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_168/109.py | 50abe5d4745d2991cd4d5af4fe4809c0886ebe1c | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,885 | py | #!/usr/bin/python
import sys
import numpy as np # http://www.numpy.org/
import scipy # http://scipy.org/
import networkx as nx # https://networkx.github.io/
import sympy # http://www.sympy.org
import itertools
import operator
import string
import fractions
#import visual # vpython.org
#imp... | [
"[email protected]"
] | |
7b993e2d2391a2c6f2fdf7c9b7dcc0ae0b47bb85 | 509823ea14f04d5791486b56a592d7e7499d7d51 | /parte05/ex5.05_remover_duplicados_lista.py | e2c0ee58c5eaf7c39ca0c9d8479cad0f6d096521 | [] | no_license | Fhernd/Python-CursoV2 | 7613144cbed0410501b68bedd289a4d7fbefe291 | 1ce30162d4335945227f7cbb875f99bc5f682b98 | refs/heads/master | 2023-08-08T05:09:44.167755 | 2023-08-05T19:59:38 | 2023-08-05T19:59:38 | 239,033,656 | 64 | 38 | null | null | null | null | UTF-8 | Python | false | false | 793 | py | # Ejercicio 5.5: Remover los valores duplicados en una lista.
numeros = [1, 2, 3, 1, 1, 1, 4, 5, 6, 3, 3, 2, 5]
print('Contenido actual de la lista `numeros`:', numeros)
print('Cantidad actual de la lista `numeros`:', len(numeros))
print()
# Solución #1:
print('Solución #1:')
numeros_sin_repetir = []
for n in numer... | [
"[email protected]"
] | |
ff21461f29ea8d9161ba90e7c5ee44d3fba4e68d | f5ee595836adfb75047d2798928ca020533bd597 | /nanobrok/ext/ssl.py | 43a2b503b138db55be7ab8dc961127139043fb33 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | santaklouse/Nanobrok | efcc836484a799f614c21d50a75e0f5d1088f8bb | 680b112f76e248f64c021337769bef163527bce0 | refs/heads/master | 2023-08-13T03:52:25.137896 | 2021-09-18T18:11:13 | 2021-09-18T18:11:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 158 | py | # TODO disabled features
# from flask_talisman import Talisman
# def init_app(app):
# # need to run with disable debug
# talisman = Talisman(app)
| [
"[email protected]"
] | |
a5f3a1d7bc6d6ea8f54a13b11fa07fa758a81d39 | 00c6ded41b84008489a126a36657a8dc773626a5 | /.history/Sizing_Method/ConstrainsAnalysis/DesignPointSelectStrategy_20210714191514.py | 60ba3be53c8d65f3e3bf954ef6f39baf671d731c | [] | no_license | 12libao/DEA | 85f5f4274edf72c7f030a356bae9c499e3afc2ed | 1c6f8109bbc18c4451a50eacad9b4dedd29682bd | refs/heads/master | 2023-06-17T02:10:40.184423 | 2021-07-16T19:05:18 | 2021-07-16T19:05:18 | 346,111,158 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,787 | py | # author: Bao Li #
# Georgia Institute of Technology #
import sys
import os
sys.path.insert(0, os.getcwd())
import numpy as np
import matplotlib.pylab as plt
import Sizing_Method.Other.US_Standard_Atmosphere_1976 as atm
import Sizing_Method.Aerodynamics.ThrustLapse as thrust_lapse
import Sizing_Method.Aerodynamics.Ae... | [
"[email protected]"
] | |
5cdb06fe2b728a7c56950f0ef7ab873a08acf5b7 | df7b40e95718ac0f6071a0ba571b42efc81cf6de | /mmseg/models/backbones/fightingcv/conv/DepthwiseSeparableConvolution.py | 8dde19054b1cbfee8452cf320b61bf165bbdeceb | [
"Apache-2.0"
] | permissive | shinianzhihou/ChangeDetection | 87fa2c498248e6124aeefb8f0ee8154bda36deee | 354e71234bef38b6e142b6ba02f23db958582844 | refs/heads/master | 2023-01-23T20:42:31.017006 | 2023-01-09T11:37:24 | 2023-01-09T11:37:24 | 218,001,748 | 162 | 29 | Apache-2.0 | 2022-11-03T04:11:00 | 2019-10-28T08:41:54 | Python | UTF-8 | Python | false | false | 899 | py | import torch
from torch import nn
class DepthwiseSeparableConvolution(nn.Module):
def __init__(self,in_ch,out_ch,kernel_size=3,stride=1,padding=1):
super().__init__()
self.depthwise_conv=nn.Conv2d(
in_channels=in_ch,
out_channels=in_ch,
kernel_size=kernel_size,
... | [
"[email protected]"
] | |
14e16f4f11ae53470f7f9898327d4ed7af13658a | ee6fc02e8392ff780a4f0d1a5789776e4d0b6a29 | /code/practice/abc/abc017/b.py | 00e2723566008b22396a8f37944c3663d2794fdc | [] | no_license | mollinaca/ac | e99bb5d5c07159b3ef98cd7067424fa2751c0256 | 2f40dd4333c2b39573b75b45b06ad52cf36d75c3 | refs/heads/master | 2020-12-22T11:02:13.269855 | 2020-09-18T01:02:29 | 2020-09-18T01:02:29 | 236,757,685 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 177 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
s = input()
s = s.replace('ch','').replace('o','').replace('k','').replace('u','')
print ("YES") if len(s) == 0 else print ("NO")
| [
"[email protected]"
] | |
f78fe98818ec4e3c7f3f8938e6c2b1cc0aacfeb5 | f030c1b724ad3a04dade2463374bd3c03e17b93c | /napari/layers/_tests/test_source.py | de9e0954979762eb743aedccddb1bc784505ff21 | [
"BSD-3-Clause"
] | permissive | sandutsar/napari | 3c8568979c320d57cdb80e2ea2a5db7ea035413b | 37d476bc0b00252177f17f25e7d1fd52ddc4bb69 | refs/heads/master | 2023-07-25T08:31:32.189843 | 2021-09-05T11:01:02 | 2021-09-05T11:01:02 | 390,003,115 | 0 | 0 | BSD-3-Clause | 2021-09-05T12:18:14 | 2021-07-27T13:56:23 | Python | UTF-8 | Python | false | false | 1,457 | py | from napari.layers import Points
from napari.layers._source import Source, current_source, layer_source
def test_layer_source():
"""Test basic layer source assignment mechanism"""
with layer_source(path='some_path', reader_plugin='builtins'):
points = Points()
assert points.source == Source(path=... | [
"[email protected]"
] | |
2c2b4b54559435087b2f62c0c283829e9b7231ac | f865fdd970f8e37ea2aa5157374af8c4d6ced987 | /test/test_vehicle.py | bee0fd446e3e911c97a237c630c531bd3edceb95 | [] | no_license | gkeep-openapi/python-sdk | 7e809448355bff535b3d64e013f001e9196c5e19 | 7c4f3785b47a110386ef10109619654522c95de5 | refs/heads/master | 2022-05-28T16:13:06.643958 | 2022-05-13T14:58:39 | 2022-05-13T14:58:39 | 235,536,010 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 765 | py | # coding: utf-8
"""
Gkeep API
Gkeep API # noqa: E501
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import swagger_client
from models.vehicle import Vehicle # noqa: E501
from swagger_cli... | [
"gkeep-ci-jenkins"
] | gkeep-ci-jenkins |
480ee4addf549a8560df46c79e497d97793f9f92 | 6dc9f1753f0e2ccaef6fb385324ba0602a04042a | /CUHK_CPM/GPS_Project/RR_Robot/build/pi_six_axis/pi_description/catkin_generated/pkg.develspace.context.pc.py | 3d97e1ad3fa96f593b07648b7de288c2fbc559fa | [] | no_license | SunnyLyz/Deep_Learning | c413abe3ef6510b3492f0a73c9a287b4bf56ec2c | 9fa58688a7daffdded8037b9fa20c571a00f87e0 | refs/heads/master | 2021-06-21T12:12:39.450564 | 2017-07-18T12:20:45 | 2017-07-18T12:20:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 391 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "pi_description"
PROJECT_SPACE_DIR = "... | [
"[email protected]"
] | |
f617d8bc124c5f917b3c4b77f2bbec4e77496e8d | 55ae369a3ef1593ff31a76847deb2a0d33898895 | /mango/orderbookside.py | 68ec8576483ae87a4daf73e9dff659332c7bc063 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | Investin-pro/mango-explorer | 63afb2ad4fb272f5640d18d3df367a6877b3a99a | 4760bd5f9d7067e24c12941d3d7d113b1a7173ef | refs/heads/master | 2023-07-31T23:23:00.590654 | 2021-10-01T17:13:18 | 2021-10-01T17:13:18 | 402,579,362 | 1 | 3 | MIT | 2021-10-02T16:31:43 | 2021-09-02T22:31:31 | Python | UTF-8 | Python | false | false | 6,432 | py | # # ⚠ Warning
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
# LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIA... | [
"[email protected]"
] | |
298d061ade3f8aae2939f4898a724e5ec2c4bd4d | 432481b47d95ea2ce63f4e1ceb2e27e8a6f155a1 | /Project/Portfolio_construction/data.py | 4534e88433e71c81ef7b704e42acdf7eb5e05458 | [] | no_license | dxcv/Project-2 | 81fe3777fb7ee3db3df84d24b7321c8d40fcbb91 | 8105f996f97b657b5f1644a04f6f678005119b06 | refs/heads/master | 2020-09-08T09:58:56.829060 | 2019-11-08T17:51:36 | 2019-11-08T17:51:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,748 | py | """
Importation of the data.
"""
# Author: John Sibony <[email protected]>
from util import *
from password import *
import pandas as pd
from sqlalchemy import create_engine
def extraction_data(link_engine, query):
"""Extraction of the data using Vadim's database.
:param link_engine: Link t... | [
"[email protected]"
] | |
3f510935494dd7cead655b91bd5e53778d5689d1 | 2d9a706cb899dfc355fe49dc6a37a0dc257b22fd | /test/crab_HIMB2_pixel_eff_sysEta_v1.py | 9d910a1c9daa66e6f3f82a2a1547f4b45f121d17 | [] | no_license | BetterWang/QWCumuGap | b1f4d3169d2019d3d465ea985fed2094279b62b6 | 61beb88799fd3c18398061b64b849ad5a849871d | refs/heads/master | 2020-04-04T22:25:33.686266 | 2018-03-16T19:27:01 | 2018-03-16T19:27:01 | 82,000,312 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,737 | py | from CRABAPI.RawCommand import crabCommand
from CRABClient.UserUtilities import config, getUsernameFromSiteDB
from CRABClient.ClientExceptions import ClientException
from httplib import HTTPException
config = config()
config.General.requestName = 'HIMB2_CumuGap_Pixel_eff_cent_sysPos_v1'
config.General.workArea = 'Cra... | [
"[email protected]"
] | |
01720e33170d4697953e0ec099bcda60e4576d6c | 923f707341f7e6a4c86673c52ca796f40638619c | /809. Expressive Words.py | 3080ddd64ba075863b8c0ce379c733da3c6944d6 | [] | no_license | Huijuan2015/leetcode_Python_2019 | bb1e54801faa15ee3ef2a7bd7628b6a16033f7c7 | 36c584e8f92a0725bab7a567dfd10b918408627b | refs/heads/master | 2020-04-22T13:31:55.203162 | 2020-03-10T00:00:58 | 2020-03-10T00:00:58 | 170,412,291 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,205 | py | class Solution(object):
def expressiveWords(self, S, words):
"""
:type S: str
:type words: List[str]
:rtype: int
"""
自己定义map,不能直接用map,还需要考虑key的顺序
def RLE(s): # return string, list
prev = -1
key = ""
cnts = []
for... | [
"[email protected]"
] | |
fa07ea6fbca874d31aa899db0aad1b1f300167e5 | 545f817485cbf75e5b791ef39c7ff25f66a8de29 | /src/brasil/gov/portal/tests/test_externalcontent_content_type.py | 2c1a81689ccd3e718b59d796319d9a806340079c | [] | no_license | Assistevc/brasil.gov.portal | b5e85e749b19b3bc5080f1ed0b7ee727ad58bad0 | 54eb24e7e0ee81d74012a2af27bc8c9a8d56ef71 | refs/heads/master | 2021-01-15T19:05:01.335974 | 2014-12-17T13:46:55 | 2014-12-17T13:46:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,602 | py | # -*- coding: utf-8 -*-
from brasil.gov.portal.browser.content.external import ExternalContentView
from brasil.gov.portal.content.external import IExternalContent
from brasil.gov.portal.testing import INTEGRATION_TESTING
from plone import api
from plone.dexterity.interfaces import IDexterityFTI
from plone.dexterity.sch... | [
"[email protected]"
] | |
3a60668b274b8710c9d34d5244a5c0d11c03ec42 | 22712d4a3633c93c6173b826882b01174a4c6928 | /sign/migrations/0001_initial.py | 04cd63636e29f7b459fdb68d99865fb8594ccfe3 | [] | no_license | New2object/guest2 | e5dcbdcfb6fbbe386a5da51e7b7a18f97de8815d | 30edbe54261a074fdea10150b52cb59e3bc6d781 | refs/heads/master | 2022-12-23T22:27:44.275577 | 2018-03-23T14:03:45 | 2018-03-23T14:03:45 | 124,031,317 | 1 | 1 | null | 2022-12-10T19:20:25 | 2018-03-06T06:24:45 | Python | UTF-8 | Python | false | false | 1,662 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-04-30 09:33
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Crea... | [
"[email protected]"
] | |
a008914d98ae2a6baab427010b3bfc9a8e14ee65 | 1beac95667f9236084dfecdf2550fb6e8a28b0b8 | /backend/api/decapod_api/exceptions.py | c172c2796f82a2f416855d9af5c3ba696ff06535 | [
"Apache-2.0"
] | permissive | lihaijing/ceph-lcm | 52b9d2fae24ad8b54a386cda4c528d93288d603d | d7c07fbb87dc170d5b8a0a5c8a2cf857f71ae466 | refs/heads/master | 2021-01-12T08:17:03.919876 | 2016-12-12T07:58:58 | 2016-12-12T07:58:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,709 | py | # -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software... | [
"[email protected]"
] | |
2c4b39edafd28a4c21b76214cd3c205f4ee1d683 | d5c578256dc7d8f0bbd5c4b340e804c9d6676b90 | /combine_A_and_B.py | e966b73df86d87a284b567626d54ac819d9b0d81 | [] | no_license | Bala93/Life_science | 470728376a5ce37017bf9647d49b8fb2b93fcac6 | fbd0f16ddde13e356269fe14c679af8e4005eb74 | refs/heads/master | 2021-09-17T16:15:21.356685 | 2018-07-03T19:14:49 | 2018-07-03T19:14:49 | 129,958,449 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,205 | py | import os
import numpy as np
import cv2
import argparse
parser = argparse.ArgumentParser('create image pairs')
parser.add_argument('--fold_A', dest='fold_A', help='input directory for image A', type=str, default='../dataset/50kshoes_edges')
parser.add_argument('--fold_B', dest='fold_B', help='input directory for image... | [
"[email protected]"
] | |
b73e66f56dd25716dad74184c383b3a7b077bf13 | aa9fc66c8b94f05d4651f243f6f21799f4c1fd80 | /jump-game-vi/jump-game-vi.py | 4eadd56dcea8503cbfdedc446f3ea6d98917e497 | [] | no_license | baranee-18/Data-Structures-and-Algorithms | 3cd739ba3c0710835d5995a6ccf2b44f612f8352 | 5074bac42b9323b8e7353d533355ece18dd5f5f1 | refs/heads/main | 2023-08-23T23:06:59.028649 | 2021-10-19T19:21:43 | 2021-10-19T19:21:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 485 | py | class Solution:
def maxResult(self, nums: List[int], k: int) -> int:
n = len(nums)
queue = []
val = 0
for i in range(n):
maxV = 0
if queue:
maxV, indx = queue[0]
while indx+k < i:
maxV, indx = heapq.heappop(q... | [
"[email protected]"
] | |
f7f9d2048aac2ff8422cdb78315139cfe63f6cc3 | 87a9706379670da62739b3c1fbbdd75edb5107b8 | /alien_invasion/scoreboard.py | 11f4eb35474043303f80b3f5ed7dcbf980ac7b77 | [] | no_license | zxbzxb180/python_work | ba21ab74f842e0d560a8bb192bb8a874d356b9e1 | 6406024e011aa06d1bda78d97cfecc47f7f2058c | refs/heads/master | 2022-12-12T23:53:36.887963 | 2020-03-04T07:20:29 | 2020-03-04T07:20:29 | 194,494,744 | 0 | 0 | null | 2022-11-22T03:54:47 | 2019-06-30T08:48:44 | Python | GB18030 | Python | false | false | 985 | py | #coding=gbk
import pygame.font
class Scoreboard():
"""显示得分信息的类"""
def __init__(self,ai_settings,screen,stats):
"""初始化显示得分涉及的属性"""
self.screen = screen
self.screen_rect = screen.get_rect()
self.ai_settings = ai_settings
self.stats = stats
#显示得分信息时使用的字体设置
self.text_color = (30,30,30)
s... | [
"[email protected]"
] | |
c518c6954e9b0640ead738942f5c31574b6e8035 | 3c2d4ed20da3aa3e045b617c787df68c7d0ddd1d | /src/drugex/__main__.py | 50f052ac1a040383a0178b2488fc5a6b739f347c | [
"MIT"
] | permissive | cthoyt/DrugEx | 699ea37a86bfd0ed06e5c5112a68d5bd46ed05af | 9e4d31adb2c65d0afc852948f502c79dcf8308a3 | refs/heads/master | 2020-06-07T22:08:26.799943 | 2019-06-21T16:38:20 | 2019-06-21T16:38:20 | 193,103,470 | 0 | 0 | MIT | 2019-06-21T13:34:04 | 2019-06-21T13:34:03 | null | UTF-8 | Python | false | false | 328 | py | # -*- coding: utf-8 -*-
"""Entrypoint module, in case you use `python -m drugex`.
Why does this file exist, and why ``__main__``? For more info, read:
- https://www.python.org/dev/peps/pep-0338/
- https://docs.python.org/3/using/cmdline.html#cmdoption-m
"""
from drugex.cli import main
if __name__ == '__main__':
... | [
"[email protected]"
] | |
232c6641ae1d5833e25fbf1e833963f1e1d7e53d | 956cc6ff2b58a69292f7d1223461bc9c2b9ea6f1 | /monk/system_unit_tests/gluon/test_block_mobilenet_v2_inverted_linear_bottleneck.py | 805df2c924d747b85329f2e810c0f1bdc52a05e7 | [
"Apache-2.0"
] | permissive | Aanisha/monk_v1 | c24279b2b461df9b3de2984bae0e2583aba48143 | c9e89b2bc0c1dbb320aa6da5cba0aa1c1526ad72 | refs/heads/master | 2022-12-29T00:37:15.320129 | 2020-10-18T09:12:13 | 2020-10-18T09:12:13 | 286,278,278 | 0 | 0 | Apache-2.0 | 2020-08-09T16:51:02 | 2020-08-09T16:51:02 | null | UTF-8 | Python | false | false | 1,512 | py | import os
import sys
sys.path.append("../../../../monk_v1");
sys.path.append("../../../monk/");
import psutil
from gluon_prototype import prototype
from compare_prototype import compare
from common import print_start
from common import print_status
import mxnet as mx
import numpy as np
from gluon.losses.return_loss i... | [
"[email protected]"
] | |
004aa18f2e1b9effc7eca12b7058f92597767819 | 9acbf0279c38d11e89f16831e9c43b49badabb00 | /IPTVPlayer/tsiplayer/addons/resources/hosters/uptostream.py | 314392de9337b64f4093974ba2f8058e0b501c6c | [] | no_license | dgbkn/e2iPlayer | 4f101b87bc5f67bf14690d012a62cbe8755ab82c | e5f413ea032eb9012569d9d149a368a3e73d9579 | refs/heads/master | 2023-05-15T05:01:18.204256 | 2021-06-06T18:03:42 | 2021-06-06T18:03:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,329 | py | # -*- coding: utf-8 -*-
# vStream https://github.com/Kodi-vStream/venom-xbmc-addons
#
import re
import json
from Plugins.Extensions.IPTVPlayer.tsiplayer.addons.resources.lib.config import GestionCookie
from Plugins.Extensions.IPTVPlayer.tsiplayer.addons.resources.hosters.hoster import iHoster
from Plugins.Extensions.I... | [
"[email protected]"
] | |
b4b1cae9c7e54d74e89f8afd4bcbdbde27236d80 | 562d4bf000dbb66cd7109844c972bfc00ea7224c | /addons/advertising/controllers/controllers.py | 1868e3ae1ee47ecfdd4a0d92df979f22c6b5bda9 | [] | no_license | Mohamed33/odoo-efact-11-pos | e9da1d17b38ddfe5b2d0901b3dbadf7a76bd2059 | de38355aea74cdc643a347f7d52e1d287c208ff8 | refs/heads/master | 2023-03-10T15:24:44.052883 | 2021-03-06T13:25:58 | 2021-03-06T13:25:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 759 | py | # -*- coding: utf-8 -*-
from odoo import http
# class Advertising(http.Controller):
# @http.route('/advertising/advertising/', auth='public')
# def index(self, **kw):
# return "Hello, world"
# @http.route('/advertising/advertising/objects/', auth='public')
# def list(self, **kw):
# ret... | [
"[email protected]"
] | |
ed83154aac965d7020394db30fc7d33772351c78 | 94f4bb0f6e43b2eb2f1bdb284a580b76121fa9af | /055.py | 3426c8ddb88f7c434c1f5ca842561dae076bd58f | [] | 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 | 401 | py | class Solution(object):
def canJump(self, nums):
"""
:type nums: List[int]
:rtype: bool
"""
if not nums or len(nums)==1:
return True
pre = nums[0]
for i in range(1, len(nums)):
if pre == 0:
return False
... | [
"[email protected]"
] | |
97e996c0fe83b4c2b8a1bafa79f0a29358a094de | 904a87f73eb0e3902a738e823f959cbad2f68a82 | /plotClass/plotting/plotGroups_mer.py | dc83b9a7dba4eeb9344b2b365d782974bbc46fe8 | [] | no_license | ashrafkasem/hepML1Lep | 2ccf167432e7d2a1550991137b7a247e044af1b1 | 9ed3b73887b36f26b9d4ca0243eedd3cac0c420e | refs/heads/master | 2021-07-11T22:31:18.498721 | 2020-08-31T21:30:10 | 2020-08-31T21:30:10 | 193,732,937 | 1 | 4 | null | 2020-05-18T06:55:53 | 2019-06-25T15:17:21 | Jupyter Notebook | UTF-8 | Python | false | false | 2,881 | py | import ROOT
All_files = {
'DiLepTT' :
{
'files': ['TTJets_DiLepton','TTJets_LO_HT'] ,
'select' : '&& DiLep_Flag == 1',
'scale' : '1000.0/sumOfWeights*genWeight*Xsec*1*btagSF*puRatio*lepSF*nISRttweight',
"fill": ROOT.TAttFill(ROOT.kRed, 1001),
"line": ROOT.TAttLine(... | [
"[email protected]"
] | |
d51a4bd7dc7436067f703bec0084d907b03f9157 | a5ba631dddaf2912c309601f8fbdd3c5b494fe20 | /src/azure-cli-core/tests/test_logging.py | 14cddef8a729a9767cf3f2dedc6a9e237df9fe80 | [
"MIT"
] | permissive | saurabsa/azure-cli-old | 37471020cd2af9a53e949e739643299f71037565 | f77477a98c9aa9cb55daf5b0d2f410d1455a9225 | refs/heads/master | 2023-01-09T04:00:15.642883 | 2018-04-23T21:40:04 | 2018-04-23T21:40:04 | 130,759,501 | 0 | 0 | NOASSERTION | 2022-12-27T14:59:06 | 2018-04-23T21:33:34 | Python | UTF-8 | Python | false | false | 2,897 | py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | [
"[email protected]"
] | |
a2b971c67d0456fbbf6fd22640af49583f80fce2 | e62d13d578ebbe3acc3713e3eb783c81c785f2a8 | /myems-api/core/version.py | f1ef5dfaf78eabc8ce8847750632ade6fd4f7c29 | [
"MIT"
] | permissive | tianlinzhong/myems | c25d7ece4f1853bb4415e2cedfdc8cb9cf8ff991 | 07dd1eb8060f4145be66c8d1a20b5e064a68281b | refs/heads/master | 2023-03-25T05:24:05.057248 | 2021-03-28T09:06:45 | 2021-03-28T09:06:45 | 340,333,276 | 2 | 0 | MIT | 2021-02-28T14:00:06 | 2021-02-19T10:22:32 | Python | UTF-8 | Python | false | false | 452 | py | import falcon
import simplejson as json
class VersionItem:
@staticmethod
def __init__():
pass
@staticmethod
def on_options(req, resp, id_):
resp.status = falcon.HTTP_200
@staticmethod
def on_get(req, resp):
result = {"version": 'MyEMS 1.1.0 (Community Edition)',
... | [
"[email protected]"
] | |
67a45c24fd1b92104a81304a32b145bd2a77baa6 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_118/2715.py | 53c87fa3b23e56f4d4d2ff037c02e48d28108491 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 592 | py | import math
f = open('/home/dexter/input1.in', 'r')
cases = int(f.readline())
for k in range (0, cases):
a = f.readline()
itms=a.split()
out=0
for i in range(int(itms[0]),int(itms[1])+1):
x=str(i)
y =x[::-1]
if(y==x):
x=int(x)
if((math.sqrt(x)-int(ma... | [
"[email protected]"
] | |
80c70e681d1be2636cc0167b75f54d09254d1b14 | 301c85e8f2391896b11c9f4cf9f440283865593e | /armstrong/spiders/spider.py | 1e2f822c32a2f498a48612c4df8490fd7bf8d844 | [] | no_license | hristo-grudev/armstrong | 513e5639c347c8a3ffc8df3cafd5860d2ab3fb81 | 8bbcad8a72f58456638c84369f72c985c93e3cc9 | refs/heads/main | 2023-03-29T11:33:06.484366 | 2021-04-07T07:51:26 | 2021-04-07T07:51:26 | 355,458,241 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,208 | py | import scrapy
from scrapy.loader import ItemLoader
from ..items import ArmstrongItem
from itemloaders.processors import TakeFirst
class ArmstrongSpider(scrapy.Spider):
name = 'armstrong'
start_urls = ['https://www.armstrong.bank/connect/news-and-updates']
def parse(self, response):
post_links = response.xpath... | [
"[email protected]"
] | |
3d7b94751b9c6a8ebf732eec60f889bc243c3977 | 08ddce92744c78432b69409d197ad1393ca685aa | /weixin/Bot/test2.py | 3537329a673c998099f7e0f15bc0b992e3d3d01a | [] | no_license | baliguan163/PythonDemo | 71255eb21850134b4b6afb2eeed948cc34326e7a | c4fe1b6ea36bec2c531244ef95c809e17b64b727 | refs/heads/master | 2021-01-02T08:13:18.809740 | 2019-05-19T16:28:16 | 2019-05-19T16:28:16 | 98,963,901 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,524 | py | #-*-coding:utf-8-*-
__author__ = 'Administrator'
from wxpy import *
# wxpy的好友统计功能非常好用,可以很方便地统计好友的地理位置分布和性别分布。
# 下面的代码中,强哥统计了下自己的好友的分布情况,并打印出人数最多的10个地
bot = Bot(cache_path=True)
friends_stat = bot.friends().stats()
# print(friends_stat)
friend_loc = [] # 每一个元素是一个二元列表,分别存储地区和人数信息
for province, count in friends_stat... | [
"[email protected]"
] | |
386a8bf05a7ce8388ed78b86e6713dc8bb4e3535 | aba442afba026d2130c4aeca863308ca26e7e472 | /tabular/src/autogluon/tabular/__init__.py | 132b85f2fd121822af13adfd0428350ff276ff5c | [
"Apache-2.0"
] | permissive | stjordanis/autogluon | c8fd03a9bf7624911b13e90239e9260dd8885ddf | 6af92e149491f6e5062495d87306b3625d12d992 | refs/heads/master | 2023-08-21T15:16:53.202431 | 2023-08-11T20:15:31 | 2023-08-11T20:15:31 | 228,360,888 | 0 | 0 | Apache-2.0 | 2019-12-16T10:25:32 | 2019-12-16T10:25:30 | null | UTF-8 | Python | false | false | 322 | py | from autogluon.common.features.feature_metadata import FeatureMetadata
from autogluon.common.utils.log_utils import _add_stream_handler
from autogluon.core.dataset import TabularDataset
try:
from .version import __version__
except ImportError:
pass
from .predictor import TabularPredictor
_add_stream_handler(... | [
"[email protected]"
] | |
c68cdb6fed4d1c16def268726b0762202f070da8 | f44b4e41d3b64fc64dc8f28cce1a42aac5715530 | /metrics/plastic_analysis.py | 66002d70c98efae0fbcf9a1785ee1d8a245228ca | [
"Apache-2.0"
] | permissive | jmribeiro/PLASTIC-Algorithms | d4ba4dbae9fea15a446e6557b9fe58f06b687464 | c59ad567a906f320220a09caff64c4a6273151f8 | refs/heads/main | 2022-12-31T00:16:10.108189 | 2020-10-20T22:06:11 | 2020-10-20T22:06:11 | 305,774,055 | 7 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,308 | py | from agents.plastic.PLASTICAgent import PLASTICAgent
from agents.plastic.model.LearningPLASTICModel import LearningPLASTICModel
from agents.plastic.model.LearntPLASTICModel import LearntPLASTICModel
from agents.teammates.GreedyAgent import GreedyAgent
from agents.teammates.TeammateAwareAgent import TeammateAwareAgent
... | [
"[email protected]"
] | |
0ae73847354ad0243e92bc20077f9c2eef00d8b6 | 6227637b2b3e13e2d17d7dd2c954e879bc6947a8 | /configs/bash/keyring.py | 5509f45c1543c39f7696c29c13788dfe38180959 | [] | no_license | Owensa/confs | 28c01e57984a9f8187740a19d95d9c51844c7a1d | f247448fbba3d873460a4f99228f372230f1b1bc | refs/heads/master | 2021-04-15T04:36:03.755459 | 2018-03-31T22:31:50 | 2018-03-31T22:31:50 | 126,733,834 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 225 | py | #!/usr/bin/env/ python3
import os
#Get archive key and get rid of strange apt behavior
def fetch():
os.system("wget -q -O - https://archive.kali.org/archive-key.asc | apt-key add && apt-get update >> bootstrap_log.md")
| [
"[email protected]"
] | |
392c843a677b5ebc71e265798518ab247c504ee7 | 164b499e14412e7e5d0b1f917922873a7b5d072c | /studyNote/python-2/cmd_serve.py | 87aace6bc1f982e3ab23341bf7b8f5656e6c00df | [] | no_license | liangliang115715/pythonStudyNote | f55293b0ad2ded21dbb6938ac82f7bee77e724ef | c36ef8c032ee8d85570d0f2234a26370a3709402 | refs/heads/master | 2023-01-09T19:14:16.076798 | 2019-10-16T10:59:48 | 2019-10-16T10:59:48 | 215,523,473 | 0 | 0 | null | 2023-01-04T12:31:28 | 2019-10-16T10:42:51 | Python | UTF-8 | Python | false | false | 778 | py | #_author:
#date:
import socket
import subprocess
# 创建socket对象
sk=socket.socket()
# 为socket对象提供ip地址和端口,然后绑定
adress=("127.0.0.1",8000)
sk.bind(adress)
# 监听设置端口 等待客户端的请求
sk.listen(2)
while True:
print("waiting.....")
conn, addr = sk.accept()
print(addr)
while True:
try:
data=conn.recv(1024... | [
"[email protected]"
] | |
5f570981e26c2bac4086a1ffe4a40b861456aeb1 | 687928e5bc8d5cf68d543005bb24c862460edcfc | /nssrc/com/citrix/netscaler/nitro/resource/stat/network/rnatip_stats.py | ff47d65c3c79e5bbfd9e2bf5f9e1a3baa6292bb4 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"Python-2.0"
] | permissive | mbs91/nitro | c6c81665d6abd04de8b9f09554e5e8e541f4a2b8 | be74e1e177f5c205c16126bc9b023f2348788409 | refs/heads/master | 2021-05-29T19:24:04.520762 | 2015-06-26T02:03:09 | 2015-06-26T02:03:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,255 | py | #
# Copyright (c) 2008-2015 Citrix 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 applicable l... | [
"[email protected]"
] | |
783de3fff23bcde48f9048bc5d4df16607e2da6c | 39157aabbbab0f7824138a31ee26fbf88853e601 | /users/migrations/0001_initial.py | 2aeb55036fc284fbf105e0ea7fffddaaa53843ef | [
"MIT"
] | permissive | CecileSerene/uptv | 825d9bb0dc7e44cc8e7224632403b82f30443b07 | 47bd79b34d409405396e9640c18578837d45e91b | refs/heads/master | 2020-04-10T22:59:43.281114 | 2018-11-06T12:22:32 | 2018-11-06T12:22:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,952 | py | # Generated by Django 2.1.2 on 2018-10-12 08:34
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0009_alter_user_last_name_ma... | [
"[email protected]"
] | |
bc0bcf60649a00c4d9f7212b42af2077cb311863 | d954e2f74d1186c8e35be8ea579656513d8d3b98 | /rllib/connectors/agent/obs_preproc.py | 93f016e1e22a3f7275f5ed6e1bc017d7b3ecd56e | [
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | vakker/ray | a865de214e60f9e62d61c03ae7ce55ad6030f84c | de238dd626a48a16c8b3cd006f3482db75f63a83 | refs/heads/master | 2023-01-23T22:30:44.839942 | 2022-10-23T01:05:48 | 2022-10-23T01:05:48 | 171,845,804 | 0 | 1 | Apache-2.0 | 2023-01-14T08:01:04 | 2019-02-21T09:54:36 | Python | UTF-8 | Python | false | false | 2,447 | py | from typing import Any
from ray.rllib.connectors.connector import (
AgentConnector,
ConnectorContext,
register_connector,
)
from ray.rllib.models.preprocessors import get_preprocessor
from ray.rllib.policy.sample_batch import SampleBatch
from ray.rllib.utils.typing import AgentConnectorDataType
from ray.ut... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.