blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 616 | 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 777
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 149
values | src_encoding stringclasses 26
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 3 10.2M | extension stringclasses 188
values | content stringlengths 3 10.2M | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
51773aa0f9023d2645abc5899ed45f0596fa157c | 473ae3b2ea92549d18adc1b33c473edda0abd6cb | /back-end/news/newsapi/serializer.py | 5192fc39bfd70dcb7d0b3c57dcac1c22199fbdd6 | [] | no_license | Stelmaszv/news-api | 0e7aabc8425f8b4105ce278261034b2ea2ad3aee | 86bb933b882fda2c14ecabf352bfa50c875cf91f | refs/heads/master | 2023-01-09T17:27:05.918639 | 2020-03-23T10:47:56 | 2020-03-23T10:47:56 | 244,368,280 | 0 | 1 | null | 2023-01-07T15:29:37 | 2020-03-02T12:41:55 | Python | UTF-8 | Python | false | false | 184 | py | from .models import news;
from rest_framework.serializers import ModelSerializer
class NewsSerializer(ModelSerializer):
class Meta:
model = news;
fields= '__all__' | [
"stelmaszv@gmail.com"
] | stelmaszv@gmail.com |
6aa14a16c6fa5277c86e7faedb75368cd0993321 | deaf60a5ba012e68f8509c0df0d35a5228419b71 | /慧聪网系列/慧聪网抓取22/慧聪网诚信/hui_cong_gong/hui_cong_gong/pipelines.py | 01a5437673b488171028c31edfad2a8828267ed3 | [] | no_license | kokohui/con_spider | 7162d8e58725d9334db5f1da34649cd1d1ef29ea | da1181b53e5cbca546d1bb749f9efc2f48e698f8 | refs/heads/master | 2022-03-03T19:37:33.721533 | 2019-08-22T10:05:32 | 2019-08-22T10:05:32 | 193,631,800 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,658 | py | import pymysql
class HuiCongGongPipeline(object):
cursor = None # mysql游标对象声明
cur = None # 获取一个游标
def open_spider(self, spdier):
print('爬虫开始》》》》')
self.conn = pymysql.Connect(host='192.168.1.210', user='root', passwd='zhangxing888', db='ktcx_buschance',
... | [
"2686162923@qq.com"
] | 2686162923@qq.com |
48874e51e27fff452749f385f2d2110852fbf097 | b1bf615bfa1ee2065e3adfe90310814c3b27c61d | /2021-3-5/linked-list-random-node.py | ca1fb15ecae5681d7901a7c15f9a0a1db9a706f2 | [] | no_license | Huajiecheng/leetcode | 73b09a88e61ea3b16ca3bf440fadd1470652ccf2 | 4becf814a2a06611ee909ec700380ab83ac8ab99 | refs/heads/main | 2023-03-19T21:54:20.952909 | 2021-03-06T03:34:52 | 2021-03-06T03:34:52 | 320,959,720 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 976 | py | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def __init__(self, head):
"""
@param head The linked list's head.
Note that the head is guaranteed to be not null,... | [
"chenghuajie1998@gmail.com"
] | chenghuajie1998@gmail.com |
28a7c9652a39e99bb330602f434d02b8f724b3d2 | 13f9fbda48604fe1d588e03460d9cba0d6ffd376 | /venv/Lib/site-packages/bs4/builder/__init__.py | 100fa153a6a9213dcbec6918cdcb3d1e11cb84cf | [] | no_license | gogoheejun/HangHae-01-miniproject | 96e4bb128bcaecf0603bce43265872cc12090980 | c1ac7d77a2e7d23ecc4aa8a06fb7ad939fb53872 | refs/heads/master | 2023-08-17T05:10:10.408421 | 2021-09-17T13:00:56 | 2021-09-17T13:00:56 | 406,779,223 | 0 | 1 | null | 2021-09-18T04:20:28 | 2021-09-15T13:35:46 | Python | UTF-8 | Python | false | false | 20,390 | py | # Use of this source code is governed by the MIT license.
__license__ = "MIT"
from collections import defaultdict
import itertools
import sys
from bs4.element import (
CharsetMetaAttributeValue,
ContentMetaAttributeValue,
Stylesheet,
Script,
TemplateString,
nonwhitespace_re
)
__... | [
"heejjuunn@gmail.com"
] | heejjuunn@gmail.com |
7abe0c4b9e89b36e941c342c156fa86726cb9d19 | 50025b693f437cd43e27282daadef67d7b77c5e0 | /models/transformer_model.py | d9e945f449b61d42cfaa7e03d2b04dc6c9913a57 | [] | no_license | MatthijsBiondina/Memory-Augmented-Neural-Networks | b29e99a2b167ce94e03b1eea63afd90049ddcb47 | 510e6f6703775db9ade6b8599744623b9b58f074 | refs/heads/master | 2023-01-11T00:33:41.024739 | 2020-11-06T16:32:09 | 2020-11-06T16:32:09 | 301,348,077 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 925 | py | import torch
from torch import nn, Tensor
from torch.nn import functional as F
import utils.config as cfg
BATCH_DIM, CHANNEL_DIM, LENGTH_DIM = 0, 1, 2
class TransformerModel(nn.Module):
def __init__(self):
super(TransformerModel, self).__init__()
self.line_prep = nn.Linear(cfg.input_size, cfg.nu... | [
"biondina.matthijs@gmail.com"
] | biondina.matthijs@gmail.com |
306c04c7f95a6a4e5a99170f0e7f803142db8232 | cf7d96bdd34205ede987f0985dfc9e3ab415ee06 | /ad_covering_doc/wizard/covering_doc_onshipping.py | e959848948a72a36f9ae05490d5e15731633b6aa | [] | no_license | hendrasaputra0501/btxjalan | afc93467d54a6f20ef6ac46f7359e964ad5d42a0 | d02bc085ad03efc982460d77f7af1eb5641db729 | refs/heads/master | 2020-12-30T11:02:05.416120 | 2017-07-31T01:34:08 | 2017-07-31T01:34:08 | 98,836,234 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,274 | py | from osv import osv, fields
from openerp.osv import fields, osv
from openerp.tools.translate import _
import time
class covering_doc_onshipping(osv.osv_memory):
_name = "covering.doc.onshipping"
_description = "Covering Document Onshipping"
_columns = {
'group': fields.boolean("Group by Schedule Date"),
'date... | [
"hendrasaputra0501@gmail.com"
] | hendrasaputra0501@gmail.com |
71d18a339f1b635e154e3405773182b72cdbc9d5 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03011/s920009528.py | a440fe2b8de7164c55132fdded3ac14222505c8d | [] | 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 | 85 | py | def main():
p,q,r = map(int,input().split())
print(min(p + q, q + r, p + r))
main() | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
07d52412d20ea4ec85aa04fd4b20a37ddf627a91 | e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f | /indices/pendl.py | 1f55494f2d716915dafccf5f5c00b43991dd1aba | [] | no_license | psdh/WhatsintheVector | e8aabacc054a88b4cb25303548980af9a10c12a8 | a24168d068d9c69dc7a0fd13f606c080ae82e2a6 | refs/heads/master | 2021-01-25T10:34:22.651619 | 2015-09-23T11:54:06 | 2015-09-23T11:54:06 | 42,749,205 | 2 | 3 | null | 2015-09-23T11:54:07 | 2015-09-18T22:06:38 | Python | UTF-8 | Python | false | false | 24 | py | ii = [('BrewDTO.py', 4)] | [
"prabhjyotsingh95@gmail.com"
] | prabhjyotsingh95@gmail.com |
46a12423a8d6c6b20f8ab09c075dec14e3b86ed4 | b6b30fb06124883b074144c419b43d9182efcdff | /GA/knights.py | 04d7d422c42d92594d18da47964b6a7db8d1ff86 | [] | no_license | JohnnySunkel/BlueSky | da9f5107034289bfbdd3ba40458f9b9bd8d01a13 | 5a20eba9ef7509a5a7b7af86e7be848242e1a72f | refs/heads/master | 2021-07-07T09:57:37.256950 | 2020-09-02T23:06:46 | 2020-09-02T23:06:46 | 166,883,639 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,575 | py | import random
import datetime
import unittest
import genetic
def get_fitness(genes, boardWidth, boardHeight):
attacked = set(pos
for kn in genes
for pos in get_attacks(kn, boardWidth, boardHeight))
return len(attacked)
def display(candidate, startTime, boardWidth,... | [
"noreply@github.com"
] | JohnnySunkel.noreply@github.com |
2ae877bd29510457c3407d98e4d00cfde6085d75 | 07e8eaeaa6f3493546ba6b499be1593252f3c773 | /tests/opytimizer/optimizers/social/test_bso.py | 1b7810493c269d228b55c0c519a4f952dd8f4efa | [
"Apache-2.0"
] | permissive | himanshuRepo/opytimizer | 91dd848fffbe85736d8074169d515e46a8b54d74 | 09e5485b9e30eca622ad404e85c22de0c42c8abd | refs/heads/master | 2023-07-20T18:16:00.565759 | 2021-09-02T19:40:43 | 2021-09-02T19:40:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,984 | py | from types import new_class
import numpy as np
from opytimizer.optimizers.social import bso
from opytimizer.spaces import search
def test_bso_params():
params = {
'm': 5,
'p_replacement_cluster': 0.2,
'p_single_cluster': 0.8,
'p_single_best': 0.4,
'p_double_best': 0.5,
... | [
"gth.rosa@uol.com.br"
] | gth.rosa@uol.com.br |
6e24ab11cd0ec830788f36d1221a31b0ac317caf | 1391218903f06d62735d973829205a6b32754d64 | /lib/kb_hisat2/util.py | 49f9a18d9f86f26a395628eccd7293ab313faff1 | [
"MIT"
] | permissive | JamesJeffryes/kb_hisat2 | 9ff28b19c9f8fcaea8291a79ed05c8a2636a9438 | 9179a9d44d8ae3b6e149d27b64052004eef17fd2 | refs/heads/master | 2020-03-28T11:12:29.078124 | 2018-08-20T18:28:20 | 2018-08-20T18:28:20 | 148,188,592 | 0 | 0 | null | 2018-09-10T16:51:25 | 2018-09-10T16:51:25 | null | UTF-8 | Python | false | false | 6,051 | py | """
Some utility functions for the HISAT2 module.
These mainly deal with manipulating files from Workspace objects.
There's also some parameter checking and munging functions.
"""
from __future__ import print_function
import re
from pprint import pprint
from Workspace.WorkspaceClient import Workspace
from DataFileUtil.... | [
"wjriehl@lbl.gov"
] | wjriehl@lbl.gov |
88a0541b16ace96c3908ebeeb1ad3d953465b14c | fc64ba451a7a78238d28400a013ca366a96beb05 | /pic_analyzer_python/finalwork..py | 86cf3dac6af7d3b8e4fc8282bbd4a2b5ca2f8ffe | [
"MIT"
] | permissive | 610yilingliu/simi_pic_detection | e11204147d4098e488babb4a7119d867815683e7 | b523a388831e1968fadd065bb8e77099f9f80567 | refs/heads/master | 2021-02-20T09:13:20.405716 | 2020-03-09T05:45:12 | 2020-03-09T05:45:12 | 245,332,652 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,183 | py | from PIL import Image
import numpy as np
import matplotlib.pyplot as plt
pic1 = Image.open('../pics/edited_colorlevel_2.jpg')
pic2 = Image.open('../pics/edited_colorlevel_1.jpg')
w = 65
h = 64
def count_dhash(image_obj, width, height):
image = image_obj.resize((width, height), Image.ANTIALIAS)
gray_img = im... | [
"yilingliu1994@gmail.com"
] | yilingliu1994@gmail.com |
c7e82e376d6a927d0d5020f13ec78bad68ff39ff | a838d4bed14d5df5314000b41f8318c4ebe0974e | /sdk/servicebus/azure-servicebus/azure/servicebus/aio/management/_management_client_async.py | da2c08ec1e5a0f6afdf0324df3f3fa45fa71687c | [
"MIT",
"LicenseRef-scancode-generic-cla",
"LGPL-2.1-or-later"
] | permissive | scbedd/azure-sdk-for-python | ee7cbd6a8725ddd4a6edfde5f40a2a589808daea | cc8bdfceb23e5ae9f78323edc2a4e66e348bb17a | refs/heads/master | 2023-09-01T08:38:56.188954 | 2021-06-17T22:52:28 | 2021-06-17T22:52:28 | 159,568,218 | 2 | 0 | MIT | 2019-08-11T21:16:01 | 2018-11-28T21:34:49 | Python | UTF-8 | Python | false | false | 53,244 | py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | [
"noreply@github.com"
] | scbedd.noreply@github.com |
075a9d195c8d0b7d80ec26a4fe420d20d8bfd829 | f4f6148303cfa9e0123ef73bc3c10f25604bad16 | /92. Reverse Linked List II.py | 8e57cef53a36950fa67b1f0ceaa99283065a6a3a | [] | no_license | newfull5/LeetCode | b1d45345603ed0bfdf45976c4b6fc21fbf10538d | 97ada948a3a4ca8ca14ab6e2f1c020e12e862dce | refs/heads/main | 2023-07-20T09:00:39.434876 | 2021-08-18T04:02:13 | 2021-08-18T04:02:13 | 325,930,197 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 615 | py | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def reverseBetween(self, head: ListNode, left: int, right: int) -> ListNode:
arr = []
while head is not None:
... | [
"noreply@github.com"
] | newfull5.noreply@github.com |
21b4966a8b048a8668344f0e63eed7dee5ea7c38 | a8062308fb3bf6c8952257504a50c3e97d801294 | /test/test_subsets.py | 31cbb496ef446cc84619af46c77e190494a4cc15 | [] | no_license | wan-catherine/Leetcode | 650d697a873ad23c0b64d08ad525bf9fcdb62b1b | 238995bd23c8a6c40c6035890e94baa2473d4bbc | refs/heads/master | 2023-09-01T00:56:27.677230 | 2023-08-31T00:49:31 | 2023-08-31T00:49:31 | 143,770,000 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 340 | py | from unittest import TestCase
from problems.Subsets import Solution
class TestSolution(TestCase):
def test_subsets(self):
solution = Solution()
res = solution.subsets([1,2,3])
expected = [
[3],
[1],
[2],
[1,2,3],
[1,3],
[2,3],
[1,2],
[]
]
self.assertEqual(sorted(res)... | [
"rarry2012@gmail.com"
] | rarry2012@gmail.com |
87cbe13b16a4e002ab1e5145656ab99cb2412621 | 015106a1a964305ef8ceb478cc56fd7d4fbd86d5 | /495.py | 1523a6d84353326e0f42d942bf3794c7b5599774 | [] | no_license | zenmeder/leetcode | 51a0fa4dc6a82aca4c67b5f4e0ee8916d26f976a | 0fddcc61923d760faa5fc60311861cbe89a54ba9 | refs/heads/master | 2020-12-02T18:16:10.825121 | 2018-10-30T11:47:53 | 2018-10-30T11:47:53 | 96,505,735 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 594 | py | #!/usr/local/bin/ python3
# -*- coding:utf-8 -*-
# __author__ = "zenmeder"
class Solution(object):
def findPoisonedDuration(self, timeSeries, duration):
"""
:type timeSeries: List[int]
:type duration: int
:rtype: int
"""
if not timeSeries:
return 0
l = []
for time in timeSeries:
if not l:
l ... | [
"zenmeder@gmail.com"
] | zenmeder@gmail.com |
7f773cfe5a7dd4e7d6b2a836e151328b9978e51b | 814e4ad96172a76d9b72ac35697553980d0db5f1 | /pyalp/chosen/fields.py | 442207f9e1d55eaa01973595a36a4c382c74f889 | [
"MIT"
] | permissive | Mause/pyalp | 29785037d3b4ebc2822e6ec74621aa65f621bb8e | fb0f723070e11f8c9ed57e2475eb963599f442a6 | refs/heads/master | 2022-12-05T12:05:01.804305 | 2014-07-02T13:04:21 | 2014-07-02T13:04:21 | 15,419,434 | 0 | 0 | MIT | 2022-11-22T00:24:05 | 2013-12-24T14:00:26 | PHP | UTF-8 | Python | false | false | 2,105 | py | from django import forms
from chosen.widgets import (
ChosenSelect,
ChosenSelectMultiple,
ChosenGroupSelect
)
__all__ = [
'ChosenFieldMixin', 'ChosenChoiceField', 'ChosenMultipleChoiceField',
'ChosenModelChoiceField', 'ChosenModelMultipleChoiceField',
'ChosenGroupChoiceField',
]
class Chosen... | [
"jack.thatch@gmail.com"
] | jack.thatch@gmail.com |
b996caa2550c772ef6e349a1776a0104a8b45f12 | 8f3336bbf7cd12485a4c52daa831b5d39749cf9b | /Python/card-flipping-game.py | b755a10e0db7dfd461f122b6fbfbcc3341cd5b83 | [] | no_license | black-shadows/LeetCode-Topicwise-Solutions | 9487de1f9a1da79558287b2bc2c6b28d3d27db07 | b1692583f7b710943ffb19b392b8bf64845b5d7a | refs/heads/master | 2022-05-30T22:16:38.536678 | 2022-05-18T09:18:32 | 2022-05-18T09:18:32 | 188,701,704 | 240 | 110 | null | 2020-05-08T13:04:36 | 2019-05-26T15:41:03 | C++ | UTF-8 | Python | false | false | 508 | py | # Time: O(n)
# Space: O(n)
import itertools
class Solution(object):
def flipgame(self, fronts, backs):
"""
:type fronts: List[int]
:type backs: List[int]
:rtype: int
"""
same = {n for i, n in enumerate(fronts) if n == backs[i]}
result = float... | [
"noreply@github.com"
] | black-shadows.noreply@github.com |
b8adc8f00940fea61f6707c605d5d1bf01b846dc | 703312a73790e17473cccc577a208c3bec2b457f | /migrations/versions/d614011d4982_.py | 0b7cc107ca9a06fe5215029f191ea3be4abc0ae4 | [] | no_license | t8116189520/flasky | 0bd1be65d2b1ff0f79f3979f0f3c71dea86253bc | c9be14a1182878c6789eccdd0b82e6c9a07484ef | refs/heads/master | 2021-01-21T23:47:51.459924 | 2017-09-02T07:52:29 | 2017-09-02T07:52:29 | 102,181,441 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,390 | py | """empty message
Revision ID: d614011d4982
Revises:
Create Date: 2017-08-10 11:14:25.087757
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'd614011d4982'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gene... | [
"lsxxxxxx@126.com"
] | lsxxxxxx@126.com |
4887b831cf09aa8d24799853c73e7b0c63d8a282 | 1c562a6aca9f6a288e596a4dc4fe96d4567372e5 | /pypeln/process.py | fdc5e40358962155e49b61458eb8af753a3ff570 | [
"MIT"
] | permissive | Tezeo/pypeln | 90ea6fc998ed3a1e0e1d0419ccf928004360f12b | 29947c4da13f3f0d1f8bc4870e852f0d0c485d9f | refs/heads/master | 2020-04-02T02:37:37.040142 | 2018-10-15T17:52:23 | 2018-10-15T17:52:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,209 | py | """ The `process` module lets you create pipelines using objects from python's [multiprocessing](https://docs.python.org/3.4/library/multiprocessing.html) module according to Pypeline's general [architecture](https://cgarciae.gitbook.io/pypeln/#architecture). Use this module when you are in need of true parallelism for... | [
"cgarcia.e88@gmail.com"
] | cgarcia.e88@gmail.com |
b0d9bfbf78e240cfb7656fdc6c78420eb8d9cada | c9ddbdb5678ba6e1c5c7e64adf2802ca16df778c | /cases/synthetic/tree-big-3329.py | 3250d9a0680f6052876ed43222c30451dcd5c6ca | [] | no_license | Virtlink/ccbench-chocopy | c3f7f6af6349aff6503196f727ef89f210a1eac8 | c7efae43bf32696ee2b2ee781bdfe4f7730dec3f | refs/heads/main | 2023-04-07T15:07:12.464038 | 2022-02-03T15:42:39 | 2022-02-03T15:42:39 | 451,969,776 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 23,289 | py | # Binary-search trees
class TreeNode(object):
value:int = 0
left:"TreeNode" = None
right:"TreeNode" = None
def insert(self:"TreeNode", x:int) -> bool:
if x < self.value:
if self.left is None:
self.left = makeNode(x)
return True
else:
... | [
"647530+Virtlink@users.noreply.github.com"
] | 647530+Virtlink@users.noreply.github.com |
decbd9eefc318e9f340928501dd77dc2fd3feae5 | 2a1b8a671aceda6bc446f8ce26400aa84fa444a6 | /Packs/GoogleChronicleBackstory/Scripts/ChronicleDBotScoreWidgetScript/ChronicleDBotScoreWidgetScript_test.py | 233fec01a3ba223ad7e138ca621f62f0ad7167e3 | [
"MIT"
] | permissive | demisto/content | 6d4722d46f0ff0beea2748e9f7de585bf91a78b4 | 890def5a0e0ae8d6eaa538148249ddbc851dbb6b | refs/heads/master | 2023-09-04T00:02:25.618032 | 2023-09-03T21:56:22 | 2023-09-03T21:56:22 | 60,525,392 | 1,023 | 1,921 | MIT | 2023-09-14T20:55:24 | 2016-06-06T12:17:02 | Python | UTF-8 | Python | false | false | 2,273 | py | from unittest.mock import patch
import demistomock as demisto
import ChronicleDBotScoreWidgetScript
DBOT_SCORE = [{'CustomFields': {'chronicledbotscore': 2}}]
def test_main_success(mocker):
"""
When main function is called, get_html_representation should be called.
"""
mocker.patch.object(demis... | [
"noreply@github.com"
] | demisto.noreply@github.com |
eaadf08598bc9363904e1e138f7be007406303dd | e547f7a92e7a1c1d79f8631f9e8ee8a93879a4eb | /src/tests/parsing_test_12.py | 9cd550d8a61b41538e0f4f4749160a0deb26a210 | [] | no_license | gsakkas/seq2parse | 3c33ec7bc6cc6e4abd9e4981e53efdc173b7a7b9 | 7ae0681f1139cb873868727f035c1b7a369c3eb9 | refs/heads/main | 2023-04-09T12:29:37.902066 | 2023-01-18T21:32:12 | 2023-01-18T21:32:12 | 417,597,310 | 7 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,037 | py | def distributeCandies(candies):
"""Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of the corresponding kind. You need to distribute these candies equally in number to brother and sister. Return the maximum number o... | [
"george.p.sakkas@gmail.com"
] | george.p.sakkas@gmail.com |
8497472c087b3e8dfcbaddcb08b0b577a736e7f8 | 76dfedcfdcc686a7a0c5604309512ee20466ae63 | /tater/core/visitors.py | 2a3fa78fc1e2758fe5d68f0efb6687aa00f4352a | [
"BSD-3-Clause"
] | permissive | pombredanne/tater | 1d485e72232b75677ce743a1a84b10a27cbdc50c | 8df0f686f295fb2fdfa1d0387268105677d70dc0 | refs/heads/master | 2021-01-24T14:45:59.917067 | 2013-11-08T22:41:27 | 2013-11-08T22:41:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,922 | py | from tater.base.visitor import Visitor
class Transformer(Visitor):
'''A visitor that replaces the visited node with the
output of the visitor function.
'''
def visit_nodes(self, node):
'''If the visitor function returns a new node, replace
the current node with it, then stop.
... | [
"twneale@gmail.com"
] | twneale@gmail.com |
fabe5682cf9ca2d1969332761e1b6359bb59f68b | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/469/usersdata/304/111875/submittedfiles/Av2_Parte4.py | 83fdc5c98c3ffc1bd4ce32042c996c4e2531ca26 | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 807 | py | # -*- coding: utf-8 -*-
m = int(input('Coluna: '))
n = int(input('Linha: '))
matriz = []
for i in range (0,m,1):
linha=[]
for j in range (0,n,1):
linha.append(int(input('Linha: ')))
matriz.append(linha)
soma1 = 0
soma2 = 0
soma3 = 0
soma4 = 0
for j in range (0,m,1):
soma1 = soma1 + matriz[i][0]+... | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
d57ca73d1db71a5c04110ccef3b6f4aa3826a8b2 | 1285703d35b5a37734e40121cd660e9c1a73b076 | /at_coder/abc/old/138/c.py | 192446c41cea29241ee36a2e3850f0be6b17c42a | [] | no_license | takin6/algorithm-practice | 21826c711f57131108168775f08e4e13d07a3b38 | f4098bea2085a77d11c29e1593b3cc3f579c24aa | refs/heads/master | 2022-11-30T09:40:58.083766 | 2020-08-07T22:07:46 | 2020-08-07T22:07:46 | 283,609,862 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 229 | py | import heapq
N = int(input())
A = [ i for i in list(map(int,input().split()))]
heapq.heapify(A)
for i in range(N-1):
a = heapq.heappop(A)
b = heapq.heappop(A)
heapq.heappush(A, ((a+b)/2))
print(heapq.heappop(A)) | [
"takayukiinoue116@gmail.com"
] | takayukiinoue116@gmail.com |
9bf6f107258718c52bb3048142ac5f1f53abf79c | a8a5772674e62beaa4f5b1f115d280103fd03749 | /boyle_coello_model.py | ee18846957fefb1f7050aebdba1dc53f9a62af0e | [] | no_license | tahentx/pv_workbook | c6fb3309d9acde5302dd3ea06a34ad2aee0de4b7 | 08912b0ef36a5226d23fa0430216a3f277aca33b | refs/heads/master | 2022-12-12T20:39:35.688510 | 2021-03-30T03:20:54 | 2021-03-30T03:20:54 | 172,827,250 | 0 | 1 | null | 2022-12-08T16:47:39 | 2019-02-27T02:25:24 | Python | UTF-8 | Python | false | false | 1,454 | py |
def boyle_coello_model(self,time,rain = 0,rainthreshold = 0,tilt = 0,pm2_5 = 0,pm_10=,**kwargs):
"""
Use the :py:func:`boyle_coello_model` function to determine the impact of dirt accumulation on performance.
Parameters
----------
time : numeric
Importing the datetime module would be suit... | [
"hendricks.ta@gmail.com"
] | hendricks.ta@gmail.com |
0d0c4847d7dd3f15c7552f308fddb0e884b9708f | 0f20f3e02aa05b8e690190a96e92a524b211338f | /프로그래머스/Level2/전화번호 목록.py | ba3a8b6089d7dcfebd4b0157b6e4632aec28a767 | [] | no_license | HYEONAH-SONG/Algorithms | ec744b7e775a52ee0756cd5951185c30b09226d5 | c74ab3ef21a728dcd03459788aab2859560367e6 | refs/heads/master | 2023-07-18T14:41:48.360182 | 2021-09-03T13:41:23 | 2021-09-03T13:41:23 | 336,240,949 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 666 | py | # ["119", "97674223", "1195524421"]
# zip 활용하기
# 이중 for 문 절대 사용 x
def solution(phone_book):
phone_book.sort()
for p1, p2 in zip(phone_book, phone_book[1:]):
if p1 in p2[:len(p1)]:
return False
return True
phone_book = ["119", "97674223", "1195524421"]
print(solution(phone_book))
#
# def... | [
"sha082072@gmail.com"
] | sha082072@gmail.com |
9266cc2fa80f7bd6d02259c385446d72e46a40ca | 8fcc27160f8700be46296568260fa0017a0b3004 | /client/PaperdollSculptingGhost.py | 05f89551022a65a105bc5ddbc5ead7c726d90203 | [] | 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 | 244 | py | #Embedded file name: e:\jenkins\workspace\client_SERENITY\branches\release\SERENITY\eve\common\modules\nice\client\_nastyspace\PaperdollSculptingGhost.py
from eve.client.script.paperDoll.PaperdollSculptingGhost import PaperdollSculptingGhost
| [
"masaho.shiro@gmail.com"
] | masaho.shiro@gmail.com |
914c501cc5e67519401fa1fe18f0b726b7a83dcf | bb33e6be8316f35decbb2b81badf2b6dcf7df515 | /source/res/scripts/client/gui/impl/lobby/mode_selector/items/epic_mode_selector_item.py | 5ec8fbb916cf65c72c3009f55d06c1ec08f8e4ad | [] | no_license | StranikS-Scan/WorldOfTanks-Decompiled | 999c9567de38c32c760ab72c21c00ea7bc20990c | d2fe9c195825ececc728e87a02983908b7ea9199 | refs/heads/1.18 | 2023-08-25T17:39:27.718097 | 2022-09-22T06:49:44 | 2022-09-22T06:49:44 | 148,696,315 | 103 | 39 | null | 2022-09-14T17:50:03 | 2018-09-13T20:49:11 | Python | UTF-8 | Python | false | false | 4,683 | py | # Python bytecode 2.7 (decompiled from Python 2.7)
# Embedded file name: scripts/client/gui/impl/lobby/mode_selector/items/epic_mode_selector_item.py
import typing
from gui.impl import backport
from gui.impl.gen import R
from gui.impl.gen.view_models.views.lobby.mode_selector.mode_selector_card_types import ModeSelecto... | [
"StranikS_Scan@mail.ru"
] | StranikS_Scan@mail.ru |
d60c82a2165499d5910f67b4948ff962e472bd62 | 76de4fc4f00a04c8c9acc1e9e4a5fae12cf0c08a | /tags/release-0.7.2/pyformex/examples/Clock.py | efd5affc5d3cdb0b4bf75aa8c70dd37a5f479b1f | [] | no_license | BackupTheBerlios/pyformex-svn | ec2361b1b9967918be65e892217a691a6f8b145d | f5404809095711334bbb938d9d119a69ad8fc260 | refs/heads/master | 2020-12-24T13:20:47.422165 | 2011-11-15T11:52:23 | 2011-11-15T11:52:23 | 40,749,266 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,458 | py | #!/usr/bin/env pyformex --gui
# $Id$
##
## This file is part of pyFormex 0.7.2 Release Tue Sep 23 16:18:43 2008
## pyFormex is a Python implementation of Formex algebra
## Website: http://pyformex.berlios.de/
## Copyright (C) Benedict Verhegghe (benedict.verhegghe@ugent.be)
##
## This program is distributed under the ... | [
"bverheg@8d6f1305-3bde-0310-9e88-884b4813ce35"
] | bverheg@8d6f1305-3bde-0310-9e88-884b4813ce35 |
6d66b0273af64eacb5f11ceecc9bd3c0e6ec7cd8 | 54f352a242a8ad6ff5516703e91da61e08d9a9e6 | /Source Codes/CodeJamData/15/43/13.py | 0d2d8218a97f9192b5a80288431e4d9cacbbae7a | [] | no_license | Kawser-nerd/CLCDSA | 5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb | aee32551795763b54acb26856ab239370cac4e75 | refs/heads/master | 2022-02-09T11:08:56.588303 | 2022-01-26T18:53:40 | 2022-01-26T18:53:40 | 211,783,197 | 23 | 9 | null | null | null | null | UTF-8 | Python | false | false | 612 | py | def solve():
n = int(raw_input())
text = [raw_input().split() for _ in xrange(n)]
base = [set(text[0]), set(text[1])]
base_res = len(base[0] & base[1])
if n == 2: return base_res
res = 1e9
for i in xrange(2 ** (n - 2)):
added = [set(), set()]
for j in xrange(n - 2):
lang = ((i >> j) & 1)
for... | [
"kwnafi@yahoo.com"
] | kwnafi@yahoo.com |
85b562fb5ad9eb517991e871954a55520b0cf345 | 6d162c19c9f1dc1d03f330cad63d0dcde1df082d | /util/test/tests/Vulkan/VK_Synchronization_2.py | b4ce34cc6a9e18b8c49152887914de8d9b4884b1 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"CC-BY-3.0",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | baldurk/renderdoc | 24efbb84446a9d443bb9350013f3bfab9e9c5923 | a214ffcaf38bf5319b2b23d3d014cf3772cda3c6 | refs/heads/v1.x | 2023-08-16T21:20:43.886587 | 2023-07-28T22:34:10 | 2023-08-15T09:09:40 | 17,253,131 | 7,729 | 1,358 | MIT | 2023-09-13T09:36:53 | 2014-02-27T15:16:30 | C++ | UTF-8 | Python | false | false | 4,360 | py | import rdtest
import renderdoc as rd
class VK_Synchronization_2(rdtest.TestCase):
demos_test_name = 'VK_Synchronization_2'
def get_capture_options(self):
opts = rd.CaptureOptions()
# Ref all resources to pull in the image with unbound data
opts.refAllResources = True
return ... | [
"baldurk@baldurk.org"
] | baldurk@baldurk.org |
7d65874d66433649931e827dc23a00315d029607 | 49cc32d5859e9002cb4b94ade25d72f5f4fe1612 | /CLASE4_PYTHON/CODIGOS/serial_python.py | 43e9522e950f183e31d94dd1531efffa2455861a | [] | no_license | jorgepdsML/DIGITAL-IMAGE-PROCESSING-PYTHON | c8441215b4cf9e912dad1885a82058c1b0bbb872 | 781c8c6d583aebda6381a301cdc33ad4d09f20c5 | refs/heads/master | 2021-06-26T00:06:44.344201 | 2021-01-21T17:41:36 | 2021-01-21T17:41:36 | 194,336,928 | 6 | 1 | null | null | null | null | UTF-8 | Python | false | false | 345 | py | #importar modulo serial
import serial
#usar la clase Serial
#creando un objeto Serial
objeto_serial=serial.Serial()
#CONFIGURANDO LA VELOCIDAD DE COMUNICACIÓN DEL OBJETO SERIAL
objeto_serial.baudrate=9600
objeto_serial.port="COM16"
objeto_serial.open()
objeto_serial.write("sfadg")
dato=objeto_serial.read()
o... | [
"noreply@github.com"
] | jorgepdsML.noreply@github.com |
b3f94c94e05413730db58e91ad49543f9373f995 | f259a50a663a035c7c79bffbe4f7e08fc1ca5ce2 | /pepysdiary/annotations/__init__.py | 2e85a18199d3ff74ff2e7cbb8681c9b6532c3a40 | [] | no_license | eskadah/pepysdiary | a22aa5d4c82c9a92410940e5e9562eb232873258 | 7fd706fc862e216216d8d80238516328404f5786 | refs/heads/master | 2022-09-13T12:21:19.237047 | 2020-06-03T10:34:54 | 2020-06-03T10:34:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 273 | py | default_app_config = "pepysdiary.annotations.apps.AnnotationsConfig"
def get_model():
from pepysdiary.annotations.models import Annotation
return Annotation
def get_form():
from pepysdiary.annotations.forms import AnnotationForm
return AnnotationForm
| [
"phil@gyford.com"
] | phil@gyford.com |
d33581d9970083928f2bd10daedf11d919f2aeee | 8d29fd856250e746f19e086975e83d2dea2cf6a3 | /ResourceStatusSystem/Agent/test/Test_SSInspectorAgent/fixtures.py | 5e164fec36b40673dd1bb2d867db9da3fd471a7f | [] | no_license | hanyl/DIRAC | 048c749154192e3940e17b24396afe0e667444b2 | 82eb56888fc039f94ba1033ea4b6d3ad503bf96e | refs/heads/master | 2021-01-16T00:23:00.344192 | 2013-01-19T00:01:05 | 2013-01-19T00:02:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,193 | py | import unittest, sys
from DIRAC.ResourceStatusSystem.PolicySystem.mock.PEP import PEP
from DIRAC.ResourceStatusSystem.Client.mock.ResourceStatusClient import ResourceStatusClient
from DIRAC.ResourceStatusSystem.mock import CheckingFreqs
from DIRAC.ResourceStatusSystem.Utilities.m... | [
"mario.ubeda.garcia@cern.ch"
] | mario.ubeda.garcia@cern.ch |
3c53bda6c1dda03b00707e591ebe42019e901d8d | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /K5277r6RmsJRSz27t_1.py | 8f51eb7e5f7e14c77fa0f9009fe9c23f6d01a7d5 | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 634 | py | """
The challenge is to recreate the functionality of the `title()` method into a
function called `emphasise()`. The `title()` method capitalises the first
letter of _every word_ and lowercases all of the other letters in the word.
### Examples
emphasise("hello world") ➞ "Hello World"
emphasise("GOOD ... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
929885ae6922340d428fa9858beeb3cfdd43d863 | e7b312b4cc3355f4ca98313ef2ac9f3b0d81f245 | /abc/100/d/d.py | 6802afb2d5e0137ddc0db2a12ffb1d70809ab5bc | [] | no_license | minus9d/programming_contest_archive | 75466ab820e45ee0fcd829e6fac8ebc2accbbcff | 0cb9e709f40460305635ae4d46c8ddec1e86455e | refs/heads/master | 2023-02-16T18:08:42.579335 | 2023-02-11T14:10:49 | 2023-02-11T14:10:49 | 21,788,942 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 671 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys
N, M = map(int, input().split())
XYZs = []
for n in range(N):
x, y, z = map(int, input().sp... | [
"minus9d@gmail.com"
] | minus9d@gmail.com |
3fbb25875d5ed9d4a1c9f86aeb665817922af9a8 | 262311e60529868e38c2c57ee3db573f8e11c458 | /mysite/books/models.py | d197441088c1c45f016b482eeb1d336bedac587b | [] | no_license | huileizhan227/untitled | 1c5604736d9ffcce6f7cb7e308cdc0ebd07e116a | 07df74c89291b1664a28e3c8dcba51a917f1835f | refs/heads/master | 2023-01-27T11:51:37.609210 | 2020-04-16T11:49:59 | 2020-04-16T11:49:59 | 150,606,504 | 1 | 0 | null | 2023-01-09T12:00:12 | 2018-09-27T15:12:18 | HTML | UTF-8 | Python | false | false | 1,468 | py | from django.db import models
# Create your models here.
class Publisher(models.Model):
'''
出版商 - 名称,地址,所在城市,省,国家,网站
'''
name = models.CharField(max_length=30)
address = models.CharField(max_length=100)
city = models.CharField(max_length=60)
state_province = models.CharField(max_length=30)
... | [
"374826581@qq.com"
] | 374826581@qq.com |
689b6003d2c9cf04e858dc49e68af06d8e75d941 | 500daf0ee45c943293920e0ce3fd9b539f05fcb6 | /tensorloaders/redisdataset.py | 6fafa8c00b901549697cbeec03254ad91eb51bb2 | [
"BSD-3-Clause"
] | permissive | deeptechlabs/tensorloaders | 6a8cd5cd97d217d0f6a352a99b68da3729085257 | f3db29828d5e0fdc28c2089726420fa5fbdf1ff2 | refs/heads/master | 2020-04-23T23:48:28.338670 | 2019-03-12T11:41:28 | 2019-03-12T11:41:28 | 171,546,662 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 951 | py | """
Shows how to store and load data from redis using a PyTorch
Dataset and DataLoader (with multiple workers).
@author: ptrblck
"""
import redis
import torch
from torch.utils.data import Dataset
import numpy as np
# Create RedisDataset
class RedisDataset(Dataset):
def __init__(self,
redis_host=... | [
"suhubdyd@iro.umontreal.ca"
] | suhubdyd@iro.umontreal.ca |
04c7fcf52789924a483aa1830f9cda339da0de7b | c9ddbdb5678ba6e1c5c7e64adf2802ca16df778c | /cases/synthetic/stdlib-big-2274.py | e14b1b28785336353e0de986324748db63bda4f2 | [] | no_license | Virtlink/ccbench-chocopy | c3f7f6af6349aff6503196f727ef89f210a1eac8 | c7efae43bf32696ee2b2ee781bdfe4f7730dec3f | refs/heads/main | 2023-04-07T15:07:12.464038 | 2022-02-03T15:42:39 | 2022-02-03T15:42:39 | 451,969,776 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,006 | py | # ChocoPy library functions
def int_to_str(x: int) -> str:
digits:[str] = None
result:str = ""
# Set-up digit mapping
digits = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
# Write sign if necessary
if x < 0:
result = "-"
x = -x
# Write digits using a recursive call
... | [
"647530+Virtlink@users.noreply.github.com"
] | 647530+Virtlink@users.noreply.github.com |
8adc6546de6c9c690bd02fbceb11bb4e0269169d | 1b47e0fb58651a224ca7269c5365c174f9e6197b | /django2/cve/venv/bin/static | ac9f5aae41fb626d4856b268b1d74de823547d47 | [] | no_license | ggrecco/python | a3f0f6f6f99e6aeb49cacabf11c2e986eada4479 | d5895a1b8067358e4336e6273b1b493010dab2ce | refs/heads/master | 2022-12-13T19:53:51.706179 | 2020-02-20T19:32:21 | 2020-02-20T19:32:21 | 107,701,916 | 0 | 0 | null | 2022-12-08T02:05:15 | 2017-10-20T16:35:16 | Python | UTF-8 | Python | false | false | 344 | #!/home/ggrecco/Documentos/python/django2/cve/venv/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'static3==0.7.0','console_scripts','static'
__requires__ = 'static3==0.7.0'
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.exit(
load_entry_point('static3==0.7.0', 'console_scri... | [
"gustavo.grecco@hotmail.com"
] | gustavo.grecco@hotmail.com | |
d1ae8ef5423ff53c51eb1efd77f1100c2598de28 | 8d7262650584eb6d66b5874d2e4651963918ad1d | /sp/migrations/0004_auto_20200401_1328.py | 40a4fd3e76205868fb5342f378d749ed3612589d | [
"BSD-3-Clause"
] | permissive | imsweb/django-saml-sp | dee5757ac9807526849a7382550815c02057d1ae | d8c3bdb91e4a5988e282690d79a8069af77a0c7a | refs/heads/main | 2023-03-07T08:41:28.291208 | 2023-02-24T16:32:45 | 2023-02-24T16:32:45 | 220,322,548 | 14 | 11 | BSD-3-Clause | 2023-02-24T14:16:00 | 2019-11-07T20:23:22 | Python | UTF-8 | Python | false | false | 930 | py | # Generated by Django 3.0.4 on 2020-04-01 13:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("sp", "0003_auto_20200331_1934"),
]
operations = [
migrations.AlterField(
model_name="idp",
name="authenticate_method"... | [
"dcwatson@gmail.com"
] | dcwatson@gmail.com |
b43c00902b34c537eae4a4a8cb803bbe7ca2daec | 102a1e4885a39c9af588ca4215bcf625f9dce312 | /deploy/deploy12.py | f9de7a832c6e399e18e51b127aa742e24617ae8f | [] | no_license | lingxiao/good-great-ngrams | 9c51136b5e7af5d522193d159e8e5e74596140a2 | ac189b638a34b410a2f7fe84406ad4baf111792c | refs/heads/master | 2021-01-11T21:15:29.648113 | 2017-02-21T01:42:54 | 2017-02-21T01:42:54 | 79,279,190 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 799 | py | ############################################################
# Module : Applicaton Main
# Date : November 14th
# Author : Xiao Ling
############################################################
from app import *
from prelude import *
from utils import *
from server import *
from client import *
##########... | [
"lingxiao@seas.upenn.edu"
] | lingxiao@seas.upenn.edu |
58bd14d240242ed58dcff35fe91cebeae4899478 | 18136ff686211c8a1c1938c369c2bacd03f10133 | /leet/matrix/numberOfIslands.py | 01201be8ad186c6f9d51c14c688c155234eacb23 | [
"Apache-2.0"
] | permissive | KshitijSrivastava/python-cp-cheatsheet | e13ef9f7260ce18b77a1171c8c8d13e74d8292c5 | a5514b08816959de1198156f7764c54a7a585f20 | refs/heads/master | 2023-07-08T10:24:28.165854 | 2021-08-09T15:33:46 | 2021-08-09T15:33:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,362 | py | """
time: X * Y
space: worst case X * Y
"""
class Solution:
def numIslands(self, grid: List[List[str]]) -> int:
if not grid:
return 0
Y = len(grid)
X = len(grid[0])
def dfs(y, x):
if y < 0 or x < 0 or y > Y-1 or x > X-1:
... | [
"peterrlamar@gmail.com"
] | peterrlamar@gmail.com |
53a4492d522dec93f874e933bc11a1b32ad07ede | 1b2f4a5528a366da4d586f14328c28f234bb3e86 | /docs/conf.py | ed44bcac90899e2aa6e564cf571b156b9411fd61 | [
"BSD-3-Clause"
] | permissive | molssi-seamm/loop_step | 51cdbb171131a51507f301d50daaa86dba1986c2 | aa44a410c1e613a2c262d374c4cadeacf1a83adb | refs/heads/main | 2023-08-17T02:38:17.194247 | 2023-04-24T18:59:28 | 2023-04-24T18:59:28 | 165,525,662 | 0 | 1 | BSD-3-Clause | 2023-04-24T18:51:20 | 2019-01-13T16:07:18 | Python | UTF-8 | Python | false | false | 9,510 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# loop_step documentation build configuration file,
# created by the SEAMM step cookiecutter.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.... | [
"paul@thesaxes.net"
] | paul@thesaxes.net |
b83707b7b3c7b8d985fb452b2237fc9ca45e35ce | feef30d93f43b9f5e08c050f0c97237b4fb4ba9c | /Login/UserRegistration/admin.py | 5fa7543a9d186355023c55b6b4fdb2d7ee13fb95 | [] | no_license | cmrajib/django_resale_market_place | 3926d051a7a47b6a77fe0a06a570bd8d4fddc98c | a8b6557fb50c34ce91a96f2e795837851b3aaf2c | refs/heads/main | 2023-02-11T22:54:41.022680 | 2021-01-10T02:28:08 | 2021-01-10T02:28:08 | 328,287,772 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 745 | py | from django.contrib import admin
from django.utils.html import format_html
# Register your models here.
from UserRegistration.models import User, Profile
class CarAdmin(admin.ModelAdmin):
def thumbnail(self, object):
return format_html('<img src="{}" width="40" style="border-radius: 50px;"/>'.format(ob... | [
"cmrajib@gmail.com"
] | cmrajib@gmail.com |
1276f3aadbfeca2b05571f2c36083d8ce4f88638 | b0f1acbe5cd30c2ade801465924c12403ab7e585 | /Corda_Api_Library/test/test_net_corda_core_context_auth_service_id.py | 62b0ee61a3b07529252bc9c118598e42cffe31e6 | [] | no_license | TanzimAzadNishan/Blockchain-Based-Online-Ticketing-Platform | 94ea0f06a7761f9033f7a1dc61548ade6f6ff499 | d04a2696cab4c41743c7c5999c623002d0e57f80 | refs/heads/main | 2023-03-09T14:34:27.148340 | 2021-02-24T11:49:26 | 2021-02-24T11:49:26 | 338,845,282 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 899 | py | """
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import openapi_client
from openapi_client.model.net_corda_c... | [
"64527153+TanzimAzadNishan@users.noreply.github.com"
] | 64527153+TanzimAzadNishan@users.noreply.github.com |
1ba5eb3665cadc23d5d6eb759ee9015d804c800d | b35cf6b82290ef5f3f6d2e3d12d3321aeaba099f | /backend/home/migrations/0002_load_initial_data.py | 80b25ac73b80bc50b0c43a86ef6d30f4aee74408 | [] | no_license | crowdbotics-apps/check-plannss-dev-1905 | 26339d7cb82bcc623a7006a2a25b8159dd557e3c | cb1355e7a58f58671dd71c93d47e9858be60d041 | refs/heads/master | 2022-04-08T01:23:31.526664 | 2020-03-10T16:26:04 | 2020-03-10T16:26:04 | 246,351,512 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,309 | py | from django.db import migrations
def create_customtext(apps, schema_editor):
CustomText = apps.get_model("home", "CustomText")
customtext_title = "check plannss"
CustomText.objects.create(title=customtext_title)
def create_homepage(apps, schema_editor):
HomePage = apps.get_model("home", "HomePage")... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
70c7c0082ae0fd69750b6dffa4ecbc4c018fc7b9 | 85de8e224f9bf8202b25a0aee939f4949f69471c | /day_9/Rotting_Oranges.py | 2f48c21c4b8f2aee0e2c08bcc52ae57ad88e79fd | [] | no_license | ahmedmeshref/August-LeetCoding-Challenge | 78d17ad3bbcaa240ebe53841832ff1f835cae729 | 68b69d30e9d0a32cf6cd1a5f8c05cb2eb572946b | refs/heads/master | 2022-12-05T08:19:55.659127 | 2020-09-01T02:06:56 | 2020-09-01T02:06:56 | 284,369,702 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,308 | py | from collections import deque
class Solution:
def orangesRotting(self, grid) -> int:
rotten_q = deque()
self.tot_fresh = 0
def rotten(i, j):
grid[i][j] = 2
self.tot_fresh -= 1
self.rotten = True
return [i, j]
for i in ... | [
"a.meshref@alustudent.com"
] | a.meshref@alustudent.com |
adee69a1c6986002dedb3deed09e40a4833e5728 | bd17e9fc0e5978cb664037bffdcf618a893e0523 | /python/models/rnnseq2seq.py | d3b4a2b94c3abe396f4232f79e71aef412e17af1 | [] | no_license | kedz/ntg | 598513fb2c6e910ad11f40f031675a587eb7ec79 | 34f13b23a6850eb0c8a727a51e7aa49fd6aec098 | refs/heads/master | 2020-12-07T15:29:10.305416 | 2017-11-07T03:07:52 | 2017-11-07T03:07:52 | 95,521,368 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,552 | py | import torch
import torch.nn as nn
from torch.autograd import Variable
from models.sequence_predictor import SequencePredictor
from encoder import RNNEncoder
from decoder import RNNDecoder
import bridge as be
from parallel_module import ParallelModule
class RNNSeq2Seq(SequencePredictor):
@classmethod
def fr... | [
"kedzie@cs.columbia.edu"
] | kedzie@cs.columbia.edu |
d7d8d16a859496673b797120662e9289bd77dcbd | cb13037cdbd3e0ab6108670108e9497cc1e2a5a7 | /0.leetcode/3.刷题/1.数据结构系列/1.线性结构/3.栈/1.单调栈/2.最小栈/456.mid_132模式.py | d52e63ba018f3ae19666a84483eb475d55592f48 | [] | no_license | GMwang550146647/network | 390fe0d1c72dcaca8b6d6dd1307adca0d56b55ce | 576de9b993f7763789d25a995702b40c9bc6fa57 | refs/heads/master | 2023-06-15T04:42:54.306077 | 2021-07-12T06:06:02 | 2021-07-12T06:06:02 | 315,488,828 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,709 | py | from fundamentals.test_time import test_time
from math import ceil
class Solution():
def __init__(self):
pass
# @test_time
# def find132pattern_ans(self, nums):
# if len(nums) < 3:
# return False
#
# pre_mins = [nums[0]]
# for i in range(1, len(nums)):
... | [
"gmwang_global@qq.com"
] | gmwang_global@qq.com |
ecc18e3af497e0ca2abb1553abd591c27b215a95 | d54e1b89dbd0ec5baa6a018464a419e718c1beac | /Python from start to practice/Chapters/Chatper11_20200408_test_class/employee.py | f1860aa47e1c95ce3745cf45e926609001f81631 | [] | no_license | cjx1996/vscode_Pythoncode | eda438279b7318e6cb73211e26107c7e1587fdfb | f269ebf7ed80091b22334c48839af2a205a15549 | refs/heads/master | 2021-01-03T19:16:18.103858 | 2020-05-07T13:51:31 | 2020-05-07T13:51:31 | 240,205,057 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 442 | py | class Employee():
'''存储雇员的信息'''
def __init__(self, first, last, wage):
'''
定义雇员的基本信息,包括姓,名,年薪
'''
self.first = first
self.last = last
self.wage = wage
def give_raise(self, number=5000):
'''给员工增加年薪,默认增加5000,也可以增加其他值'''
self.wage = self.wage + n... | [
"1121287904@qq.com"
] | 1121287904@qq.com |
51e9cb3c0299e3467570be9639804c4196211c3b | 740af83394e19b1e68c08dc0fdbec8c44ac6216e | /jesse/indicators/atr.py | 8116f5d70f6fa5ed96f1da2f0f44026824644b07 | [
"MIT"
] | permissive | dinet/jesse | 9a6b60c48b4f51a09e7092bf66df446763dd7b21 | e6f59fba3f56b01b12bf6c1adf9829afe8dcd2df | refs/heads/master | 2022-06-22T21:06:42.348993 | 2020-05-09T19:45:35 | 2020-05-09T19:45:35 | 262,654,825 | 1 | 0 | MIT | 2020-05-09T20:38:11 | 2020-05-09T20:38:10 | null | UTF-8 | Python | false | false | 604 | py | import numpy as np
import talib
from typing import Union
def atr(candles: np.ndarray, period=14, sequential=False) -> Union[float, np.ndarray]:
"""
ATR - Average True Range
:param candles: np.ndarray
:param period: int - default=14
:param sequential: bool - default=False
:return: float | np... | [
"fischersully@gmail.com"
] | fischersully@gmail.com |
2999798603d8b2c64207d963cda92df262135cb4 | 3fad7381b03607e908dc06a7f91ae60f10e5be16 | /01_tests/05_andrei_repository/2017.07.01_SgdComparison/sgd_src/solvers.py | 0c38dacb4fe3477439eb6608953a24c820401493 | [] | no_license | Cloudifier/CLOUDIFIER_WORK | ea5efe0f8e75315313db5ee145f4cc8092b542fa | e8ce18fad97b1207545e933ed0947347ed09c536 | refs/heads/master | 2021-12-23T16:41:03.149554 | 2021-12-13T13:16:51 | 2021-12-13T13:16:51 | 108,911,842 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,381 | py | from abc import ABC, abstractmethod
import numpy as np
import time
class SgdSolver(ABC):
def __init__(self, logger, epsilon):
self.logger = logger
self.epsilon = epsilon
self.model = None
self.cost_history = []
self.epochs_to_convergence = 0
np.set_printoptions(precision = 6)
def sigmoid(... | [
"damian@cloudifier.net"
] | damian@cloudifier.net |
8b63183a6ac2ad40af1c8b51e501977274c5f4b4 | d110546d747d7e3865ce5742d5fca09f404623c0 | /tests/pytests/unit/test_crypt.py | e3c98ab63666cc6a76c83babef91ec87ead7bdfa | [
"Apache-2.0",
"MIT",
"BSD-2-Clause"
] | permissive | saltstack/salt | 354fc86a7be1f69514b3dd3b2edb9e6f66844c1d | 1ef90cbdc7203f97775edb7666db86a41eb9fc15 | refs/heads/master | 2023-07-19T20:56:20.210556 | 2023-06-29T23:12:28 | 2023-07-19T11:47:47 | 1,390,248 | 11,026 | 6,296 | Apache-2.0 | 2023-09-14T20:45:37 | 2011-02-20T20:16:56 | Python | UTF-8 | Python | false | false | 7,298 | py | """
tests.pytests.unit.test_crypt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unit tests for salt's crypt module
"""
import uuid
import pytest
import salt.crypt
import salt.master
import salt.utils.files
PRIV_KEY = """
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAoAsMPt+4kuIG6vKyw9r3+OuZrVBee/2vDdVetW+Js5dTlgrJ
aghWWn3doGmKl... | [
"pedro@algarvio.me"
] | pedro@algarvio.me |
59272245968fd3f11a85901ea07d6c1fedcbbda5 | 0a33cc0ebb67c51cc38750f0f04c3e6c088e3b1a | /tests/components/sleepiq/test_init.py | e468734e06321cc5513d41f33c58d9775346af86 | [
"Apache-2.0"
] | permissive | robert-alfaro/home-assistant | e9bb08ad22a167ed226fb3de8f5b36acfc393548 | 4a53121b58b77a318f08c64ad2c5372a16b800e0 | refs/heads/dev | 2023-02-28T06:46:23.217246 | 2022-04-26T17:30:08 | 2022-04-26T17:30:08 | 115,894,662 | 4 | 0 | Apache-2.0 | 2023-02-22T06:21:08 | 2018-01-01T02:00:35 | Python | UTF-8 | Python | false | false | 4,870 | py | """Tests for the SleepIQ integration."""
from asyncsleepiq import (
SleepIQAPIException,
SleepIQLoginException,
SleepIQTimeoutException,
)
from homeassistant.components.sleepiq.const import (
DOMAIN,
IS_IN_BED,
PRESSURE,
SLEEP_NUMBER,
)
from homeassistant.components.sleepiq.coordinator impo... | [
"noreply@github.com"
] | robert-alfaro.noreply@github.com |
91beaa721a902e1b82c439cbefb62196165a74e9 | 2ea49bfaa6bc1b9301b025c5b2ca6fde7e5bb9df | /contributions/Acksl/python/Data Structures/2016-09-18.py | 8f3b1ae44bc5ba3c68d9c6718bc90507547e0675 | [] | no_license | 0x8801/commit | 18f25a9449f162ee92945b42b93700e12fd4fd77 | e7692808585bc7e9726f61f7f6baf43dc83e28ac | refs/heads/master | 2021-10-13T08:04:48.200662 | 2016-12-20T01:59:47 | 2016-12-20T01:59:47 | 76,935,980 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 125 | py | Following PEP 8 styling guideline.
`bytes` type
Double ended queues with `deque`
There is more to copying
`bytearray` objects | [
"axel.dahlberg12@gmail.com"
] | axel.dahlberg12@gmail.com |
70ec520b8f46fc9cf8721e28e623a8fcfb530cd0 | 345f9b0788d76820486b06a704ac77a59f506acf | /ACIS_hist/acis_hist_plot_trend_interactive.py | 813a6244d76563814f19a5b8aee632689ef213c4 | [] | no_license | tisobe/MTA_old | df7525d46073fbdd58d1cebdec5f2bc9e703001a | c0eb23514684b1ff91955c84eeade7436880b5e4 | refs/heads/master | 2021-09-14T17:24:33.131131 | 2018-05-16T16:18:19 | 2018-05-16T16:18:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 35,893 | py | #!/usr/bin/env /proj/sot/ska/bin/python
#########################################################################################################################
# #
# acis_hist_plot_trend_interactiv... | [
"isobe@head.cfa.harvard.edu"
] | isobe@head.cfa.harvard.edu |
831ed980bfb919797195d6eb39cdb4209814b00e | 26fc334777ce27d241c67d97adc1761e9d23bdba | /tests/django_tests/tests/validators/tests.py | da3db594d96ffff67788fdd68b416de6c0cc67f4 | [
"BSD-3-Clause"
] | permissive | alihoseiny/djongo | 1434c9e78c77025d7e0b3330c3a40e9ea0029877 | e2edf099e398573faa90e5b28a32c3d7f1c5f1e9 | refs/heads/master | 2020-03-27T23:27:02.530397 | 2018-08-30T14:44:37 | 2018-08-30T14:44:37 | 147,317,771 | 2 | 1 | BSD-3-Clause | 2018-09-04T09:00:53 | 2018-09-04T09:00:53 | null | UTF-8 | Python | false | false | 22,568 | py | import os
import re
import types
from datetime import datetime, timedelta
from decimal import Decimal
from unittest import TestCase, skipUnless
from django.core.exceptions import ValidationError
from django.core.files.base import ContentFile
from django.core.validators import (
BaseValidator, DecimalValidator, Ema... | [
"nesdis@gmail.com"
] | nesdis@gmail.com |
51896015a14c6a4d8b309e161612842c2ac88de5 | 89680cfcf0108e32d0c39905e85e1b7c06b5e65c | /lfs/voucher/tests.py | 3dc26fc282cb84cd9a6d1b9934f5651ff6c74618 | [] | no_license | cocox/django-lfs | b87d7bbc7c4e775340ea392ba31afed9359b62b7 | 1de6876f27036c03f34c0cfb739bd134a1c46ae1 | refs/heads/master | 2021-01-16T20:56:53.988027 | 2012-03-02T18:50:11 | 2012-03-30T08:30:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,358 | py | # python imports
import datetime
# django imports
from django.contrib.auth.models import User
from django.contrib.sessions.backends.file import SessionStore
from django.test import TestCase
# lfs imports
import lfs.voucher.utils
from lfs.cart.models import Cart
from lfs.cart.models import CartItem
from lfs.catalog.mo... | [
"kai.diefenbach@iqpp.de"
] | kai.diefenbach@iqpp.de |
cf418654128f2d45f3d354cb2e1916f862126d88 | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-dlf/huaweicloudsdkdlf/v1/model/update_connection_response.py | 47bbe563821d6e9a6e1416271cd977115452295f | [
"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 | 2,447 | py | # coding: utf-8
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class UpdateConnectionResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and th... | [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
505ffc46bb8c74cd11dac8ac80d0d705f1fd86f2 | 8cbeff7328c5e315733ca4f76307be407045f178 | /backend/comments_app/forms.py | 825467daedaee00183729d306f0a37e73ab3ff85 | [] | no_license | eflipe/Blog-App-Adv | 2586ce2817d61e8c16492e8d03bef720f55b8a58 | b398cb96bf93757af084fc33fb6055380be2029e | refs/heads/master | 2022-11-20T07:40:21.985089 | 2020-07-17T21:34:24 | 2020-07-17T21:34:24 | 277,913,745 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 312 | py | from django import forms
class CommentForm(forms.Form):
content_type = forms.CharField(widget=forms.HiddenInput)
object_id = forms.IntegerField(widget=forms.HiddenInput)
# parent_id = forms.IntegerField(widget=forms.HiddenInput, required=False)
content = forms.CharField(widget=forms.Textarea)
| [
"felipecabaleiro@gmail.com"
] | felipecabaleiro@gmail.com |
95a80a4842d0bca8dc17195fdb00391489b67b5b | 3fda3ff2e9334433554b6cf923506f428d9e9366 | /hipeac/api/views/awards.py | 6e5e44adc2596d98b2f46e8d59e69f82d93a5a05 | [
"MIT"
] | permissive | CreativeOthman/hipeac | 12adb61099886a6719dfccfa5ce26fdec8951bf9 | 2ce98da17cac2c6a87ec88df1b7676db4c200607 | refs/heads/master | 2022-07-20T10:06:58.771811 | 2020-05-07T11:39:13 | 2020-05-07T11:44:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,892 | py | from django.views.decorators.cache import never_cache
from rest_framework.decorators import action
from rest_framework.exceptions import PermissionDenied
from rest_framework.mixins import ListModelMixin, RetrieveModelMixin
from rest_framework.viewsets import GenericViewSet
from hipeac.models import Publication, Public... | [
"eneko.illarramendi@ugent.be"
] | eneko.illarramendi@ugent.be |
0f2723868f232a4c15d651578491256f668f1061 | 87d5b21265c381104de8f45aa67842a4adc880eb | /402.2.py | 54dab3ccdb05d73e26403a3f64631462212ab2f8 | [] | no_license | MYMSSENDOG/leetcodes | ac047fe0d951e0946740cb75103fc94aae967166 | 8a52a417a903a0742034161471a084bc1e494d68 | refs/heads/master | 2020-09-23T16:55:08.579319 | 2020-09-03T19:44:26 | 2020-09-03T19:44:26 | 225,543,895 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 664 | py | class Solution:
def removeKdigits(self, num: str, k: int) -> str:
while k:
z = num.find("0")
if z != -1 and z + 1 < k:
k -= z
num = num[z:]
num = num.lstrip("0")
else:
for i in range(len(num) - 1):
... | [
"fhqmtkfkd@naver.com"
] | fhqmtkfkd@naver.com |
75e5080dc01075d32c626fad54cd5ce394d32f88 | 7e8c72c099b231078a763ea7da6bba4bd6bac77b | /python/misc_ipata/src/ipa4django/views/json.py | 033b9896dd602912ef01717ff11f20a7a689ccbe | [] | no_license | github188/demodemo | fd910a340d5c5fbf4c8755580db8ab871759290b | 96ed049eb398c4c188a688e9c1bc2fe8cd2dc80b | refs/heads/master | 2021-01-12T17:16:36.199708 | 2012-08-15T14:20:51 | 2012-08-15T14:20:51 | 71,537,068 | 1 | 2 | null | 2016-10-21T06:38:22 | 2016-10-21T06:38:22 | null | UTF-8 | Python | false | false | 5,005 | py |
from django.core.serializers.json import Serializer as BuitlInJsonSerializer
from django.utils.encoding import smart_unicode
import simplejson
from django.db.models.query import QuerySet
from django.db import models
from StringIO import StringIO
import types
from ipa4django.db.raw_sql import SQLRow
class DjangoSerial... | [
"DeonWu@b18a5524-d64a-0410-9f42-ad3cd61580fb"
] | DeonWu@b18a5524-d64a-0410-9f42-ad3cd61580fb |
52b0ba351f610b254e933851391b0bb6f48a7e7e | 94b603a26fd0942181d4a3da2f9f830034c74ce0 | /adventofcode/2021/11/2.py | c5b6f2302004f3bb44d647548985c08755f1f847 | [
"Unlicense"
] | permissive | jan25/code_sorted | 55336e10bb9ee74610ce1ba62617db979ddf8e26 | 2a5af4f8c95a66ccca3223a261362a17be05728f | refs/heads/master | 2023-01-25T00:50:56.846461 | 2022-12-21T17:40:30 | 2022-12-21T17:40:30 | 34,155,896 | 3 | 0 | Unlicense | 2019-02-07T23:07:10 | 2015-04-18T06:54:30 | C++ | UTF-8 | Python | false | false | 1,095 | py | import fileinput
from collections import deque
grid = [list(map(int, l.strip())) for l in fileinput.input()]
n, m = len(grid), len(grid[0])
def neighs(i, j):
for di in range(-1, 2):
for dj in range(-1, 2):
if di == 0 and dj == 0:
continue
ni, nj = i + di, j + dj
... | [
"abhilashgnan@gmail.com"
] | abhilashgnan@gmail.com |
5a1709cca4ed8430186d843c77dd3b355da9a2e5 | 6fcfb638fa725b6d21083ec54e3609fc1b287d9e | /python/lllcho_CAPTCHA-breaking/CAPTCHA-breaking-master/test_type4.py | cdfa7e2c847d4dde613763837b52778d127047c8 | [] | no_license | LiuFang816/SALSTM_py_data | 6db258e51858aeff14af38898fef715b46980ac1 | d494b3041069d377d6a7a9c296a14334f2fa5acc | refs/heads/master | 2022-12-25T06:39:52.222097 | 2019-12-12T08:49:07 | 2019-12-12T08:49:07 | 227,546,525 | 10 | 7 | null | 2022-12-19T02:53:01 | 2019-12-12T07:29:39 | Python | UTF-8 | Python | false | false | 4,087 | py | # coding:utf-8
# __author__ = 'lllcho'
# __date__ = '2015/8/4'
import cv2
import cPickle
import numpy as np
import codecs
import h5py
import theano
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Flatten
from keras.layers.convolutional import Convolution2D, MaxPooling2D
def word_simi... | [
"659338505@qq.com"
] | 659338505@qq.com |
1d0c897dba3bb6a7161f8c54cbce22b16c320822 | 8b6cd902deb20812fba07f1bd51a4460d22adc03 | /back-end/.history/djreact/djreact/settings_20191221114946.py | d73de7bc2359fc8e027509c0dad39f0a615e9d53 | [] | no_license | vishaldenzil/Django-react- | f3a49d141e0b6882685b7eaa4dc43c84857f335a | 35b6d41f6dacb3bddcf7858aa4dc0d2fe039ff98 | refs/heads/master | 2022-11-08T09:27:02.938053 | 2020-05-29T04:53:52 | 2020-05-29T04:53:52 | 267,768,028 | 0 | 1 | null | 2022-10-15T14:08:30 | 2020-05-29T04:52:20 | Python | UTF-8 | Python | false | false | 3,999 | py | """
Django settings for djreact project.
Generated by 'django-admin startproject' using Django 2.2.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
#... | [
"vishal.denzil@ezedox.com"
] | vishal.denzil@ezedox.com |
cfb4bb724fb35de375d1710630dfc8212de919b6 | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/rna-transcription/fc168073da2740468bd7ae97f4ffe797.py | 35f45f8bdaeee0be8d73f3dfcb12f58b7ce0e6b3 | [] | no_license | itsolutionscorp/AutoStyle-Clustering | 54bde86fe6dbad35b568b38cfcb14c5ffaab51b0 | be0e2f635a7558f56c61bc0b36c6146b01d1e6e6 | refs/heads/master | 2020-12-11T07:27:19.291038 | 2016-03-16T03:18:00 | 2016-03-16T03:18:42 | 59,454,921 | 4 | 0 | null | 2016-05-23T05:40:56 | 2016-05-23T05:40:56 | null | UTF-8 | Python | false | false | 127 | py | from string import maketrans
translation = maketrans('GCTA', 'CGAU')
def to_rna(dna):
return dna.translate(translation)
| [
"rrc@berkeley.edu"
] | rrc@berkeley.edu |
077af677258eb500890b365e35a67a1aac4d0416 | 6e964d46b8fab9bccbd199ea7ade41297282b0a7 | /test/PySrc/tests/test_code_tracer_loops.py | b466d5a43d643b812be0eb2fb5fa47d94acf4e24 | [
"MIT"
] | permissive | donkirkby/live-py-plugin | 1a4cb87a796983245094d7c97c3e72f3cea0c540 | 165b447cc1288c94f24f1e660e0c45a6ef476826 | refs/heads/master | 2023-08-29T15:14:37.585327 | 2023-07-23T21:12:19 | 2023-07-23T21:12:19 | 4,332,096 | 257 | 59 | MIT | 2023-09-09T18:18:40 | 2012-05-15T04:41:18 | Python | UTF-8 | Python | false | false | 4,499 | py | from space_tracer.main import TraceRunner
def test_loop():
code = """\
i = 1
for j in range(3):
i += j
"""
expected_report = """\
i = 1
j = 0 | j = 1 | j = 2
i = 1 | i = 2 | i = 4"""
report = TraceRunner().trace_code(code)
assert report == expected_report
def test_loop_target_list():
code ... | [
"donkirkby@gmail.com"
] | donkirkby@gmail.com |
ef3c7f577c74802ed75c1fe43a00148d5752b617 | 27acd9eeb0d2b9b6326cc0477e7dbb84341e265c | /test/vraag4/src/isbn/211.py | f12f4415f953aa0120695d76f38edd57b5552c69 | [] | no_license | VerstraeteBert/algos-ds | e0fe35bc3c5b7d8276c07250f56d3719ecc617de | d9215f11cdfa1a12a3b19ade3b95fa73848a636c | refs/heads/master | 2021-07-15T13:46:58.790446 | 2021-02-28T23:28:36 | 2021-02-28T23:28:36 | 240,883,220 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,209 | py | def som_reeks(reeks):
cijfers = [int(teken) for teken in reeks]
return sum(cijfers)
def isISBN_13(isbn):
if not type(isbn) is str:
return False
if len(isbn) != 13:
return False
if not isbn.isdigit():
return False
if isbn.find('978') != 0 and isbn.find('979') != 0:
... | [
"bertverstraete22@gmail.com"
] | bertverstraete22@gmail.com |
c636f690bc9e4514b26c33b7ed2bd921baee0ad3 | aa28417be8935d6fa369fcb526174f9e1e30479a | /爬虫实战/动态渲染/14.选项卡.py | f4109af394e44c7c95bd96a034c9f7244d153be4 | [] | no_license | YYN117/Demo | d6fca95ed8a1a433ef06f1f3fc2e768414e863cb | 40690040a7422fd5d8f03a0d68f20f1be5d4a836 | refs/heads/master | 2020-04-14T12:29:30.129709 | 2019-01-02T13:31:10 | 2019-01-02T13:31:10 | 163,841,708 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 370 | py | from selenium import webdriver
import time
browser = webdriver.Chrome()
browser.get('https://www.baidu.com')
browser.execute_script('window.open()')
print(browser.window_handles)
browser.switch_to_window(browser.window_handles[1])
browser.get('https://www.taobao.com')
time.sleep(2)
browser.switch_to_window(browser.win... | [
"41251061+YYN117@users.noreply.github.com"
] | 41251061+YYN117@users.noreply.github.com |
5d4c1a6a2946425a8bb1b574e9a067700ddd6bac | b8ec95cba7c239d8a72e0ce8a88ddb37bb938770 | /learning/MB_lambda_IAMB_Lner.py | 0b4858fda13a0da8311cd1324519eba9af101a04 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | artiste-qb-net/quantum-fog | a7b95a5177594138aaf909c23b69053bc685672a | 5b4a3055ea14c2ee9c80c339f759fe2b9c8c51e2 | refs/heads/master | 2023-02-19T04:41:35.908393 | 2023-02-13T21:37:05 | 2023-02-13T21:37:05 | 47,056,346 | 95 | 34 | NOASSERTION | 2021-03-10T00:52:36 | 2015-11-29T08:49:47 | Jupyter Notebook | UTF-8 | Python | false | false | 5,542 | py | from learning.MB_BasedLner import *
class MB_lambda_IAMB_Lner(MB_BasedLner):
"""
The MB_lambda_IAMB_Lner (lambda Incremental Association Markov Blanket
Learner) is a subclass of MB_BasedLner. See docstring for MB_BasedLner
for more info about this type of algo.
lambda refers to the fact tha it us... | [
"tucci@ar-tiste.com"
] | tucci@ar-tiste.com |
33858cfb2091be346894cf7ae45113989b2a2dd4 | da29f1f5b4459fbfec968bb694bedb9586f87b14 | /new_algs/Sequence+algorithms/Selection+algorithm/pull_results2.py | 1e464fe8c9b22f81a07ab0908c52d802e137226d | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | coolsnake/JupyterNotebook | 547806a45a663f090f313dc3e70f779ad9b213c0 | 20d8df6172906337f81583dabb841d66b8f31857 | refs/heads/master | 2023-01-13T18:55:38.615312 | 2020-11-17T22:55:12 | 2020-11-17T22:55:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,501 | py | """
Pull results for genomic selection
"""
import os, sys
import pandas as pd
import numpy as np
import re
wkdir = os.path.abspath(sys.argv[0])[:-16]
print(wkdir)
use = ['02_PC', '03_rrBLUP', '04_BayesB','05_BayesA','06_BRR',"07_BL"]
index = []
accuracy = []
stdev = []
sterr = []
notes = []
for j in os.listdir(... | [
"chenqh@uci.edu"
] | chenqh@uci.edu |
b3d7e17241a103dbbfcbecd1e99ab102a74ebe22 | 3001520af0cb70fb658b081d87181ad62a8354c6 | /crawler/dedupdata.py | 940356bed8c2639e25b146b45fe048a7d7a24f9f | [] | no_license | praveen97uma/MalwareWebMap | 508a5c7a09052e74b79b4e7668cade869131c6ef | d0e00b52e8f71e23efd4bc262b1065ca0460c922 | refs/heads/master | 2020-05-17T00:13:12.186252 | 2014-01-27T14:04:38 | 2014-01-27T14:04:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,257 | py | import utils
import db_utils
EXPORT_EDGES_FILE = "graph.edges.csv"
EXPORT_NODES_FILE = "graph.nodes.csv"
def export_graph_data():
data_file = open(EXPORT_EDGES_FILE, "w")
db = db_utils.getDBInstance()
nodes = set([])
data_file.write("Source;Target\n")
edges = set([])
pages = db.webpages.fin... | [
"praveen97uma@gmail.com"
] | praveen97uma@gmail.com |
d2e01a8372d6b5b3369a05a5af23b34c574bac70 | b96ed10d6247e22d4fa1d28bc3314bc319d3109c | /LessonSample/mysite/polls/views.py | 8520924cec34b22ae4e3758c28bd575f78e22b7f | [] | no_license | 13555785106/PythonPPT-01 | ac1b22b9b1851f2b3ea6e4ab0a100e5f6896ee8c | 40e5883f248cb342f3a7fc7ad12ba02ebde4c619 | refs/heads/master | 2020-04-26T16:49:59.675964 | 2019-03-04T07:16:21 | 2019-03-04T07:16:21 | 157,095,747 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,810 | py | # -*- coding: UTF-8 -*-
from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404, render
from django.urls import reverse
from django.utils import timezone
from django.views import generic
from .models import Choice, Question
class IndexView(generic.ListView):
template_name = 'p... | [
"312655424@qq.com"
] | 312655424@qq.com |
0e4fa25e30758201ddcc318774962240fd3ed97a | 84abce44bd0278fa99e9556168290675f399834c | /EcalAlCaRecoProducers/config/reRecoTags/Cal_Nov2015_newGT_0T_v5.py | 92aba913315372ce6b1b26f8e76f775b6c3957e6 | [] | no_license | ECALELFS/ECALELF | 7c304c6b544b0f22a4b62cf942f47fa8b58abef0 | 62a046cdf59badfcb6281a72923a0f38fd55e183 | refs/heads/master | 2021-01-23T13:36:31.574985 | 2017-06-22T12:26:28 | 2017-06-22T12:26:28 | 10,385,620 | 1 | 9 | null | 2017-06-30T12:59:05 | 2013-05-30T15:18:55 | C++ | UTF-8 | Python | false | false | 1,551 | py | import FWCore.ParameterSet.Config as cms
from CondCore.DBCommon.CondDBSetup_cfi import *
#candidate used for 0T rereco without updating ECAL conditions
# + scaled IC with Bon/Boff corrections and scaled ADCtoGeV
RerecoGlobalTag = cms.ESSource("PoolDBESSource",
CondDBSetup,
... | [
"shervin.nourbakhsh@cern.ch"
] | shervin.nourbakhsh@cern.ch |
59adf9bfccc9f07873dac411201e44a2bf369e63 | b521802cca8e4ee4ff5a5ffe59175a34f2f6d763 | /maya/maya-utils/Scripts/Animation/2019-2-15 Tim Cam_Route_Manager/.history/Cam_Main/Cam_Main/Cam_Item_Layout_20190120130744.py | 09a1a974e1b1fe1446c8124560c24895dabfee93 | [] | no_license | all-in-one-of/I-Do-library | 2edf68b29558728ce53fe17168694ad0353a076e | 8972ebdcf1430ccc207028d8482210092acf02ce | refs/heads/master | 2021-01-04T06:58:57.871216 | 2019-12-16T04:52:20 | 2019-12-16T04:52:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,298 | py | # -*- coding:utf-8 -*-
# Require Header
import os
import json
from functools import partial
# Sys Header
import sys
import traceback
import subprocess
from Qt.QtCore import *
from Qt.QtGui import *
from Qt.QtWidgets import *
def loadUiType(uiFile):
import plugin.Qt as Qt
if Qt.__binding__.startswith('PyQt'):... | [
"2595715768@qq.com"
] | 2595715768@qq.com |
8f36eab7e9317370fbed4d199e089a935148128b | 6fdf0ad8a70cfe666ab1cae331ddf751178b0f34 | /Python/Arrays/problem_1051. Height Checker.py | 679788265b355852106eb65beff9440a8fd1ef24 | [] | no_license | vigneshthiagarajan/Leetcode_prep | 3aa46f90af084d6100cd61af28767e811c848d4e | 1f087564e9b68f85d9974c3643538b8370ba82e3 | refs/heads/main | 2023-06-19T06:47:00.388621 | 2021-07-12T04:54:32 | 2021-07-12T04:54:32 | 356,921,259 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 314 | py | class Solution:
def heightChecker(self, heights: List[int]) -> int:
num_indices_mismatch = 0
expected_heights = sorted(heights)
for i in range(len(heights)):
if heights[i] != expected_heights[i]:
num_indices_mismatch += 1
return num_indices_mismatch
| [
"vigneshthiagaraj@gmail.com"
] | vigneshthiagaraj@gmail.com |
48ab5771787957eeb1c9c69b7eb86c08eda031ee | 9378f00e13fa41b41cad1bb4dc733bcb46f259ef | /python/scripts/classifiers/SVM.py | 05f35e4215ce796d9c424c42db6bcd0505515469 | [] | no_license | ghpaetzold/iconic-internship | 0ac55c6e5289b569af2eb627a9e7025e0b9e9914 | 463f562dd1f3bdcb85954604ef2364ee5dcbef8e | refs/heads/master | 2021-01-10T19:12:19.713265 | 2015-07-21T15:46:02 | 2015-07-21T15:46:02 | 37,980,885 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,281 | py | from sklearn import svm
import sys, numpy, pickle
from sklearn.preprocessing import normalize
from sklearn.feature_selection import SelectKBest
from sklearn.feature_selection import f_classif
def readXY(xf, yf):
X = []
for line in open(xf):
values = [float(v) for v in line.strip().split('\t')]
X.append(values)
... | [
"ghpaetzold@outlook.com"
] | ghpaetzold@outlook.com |
8be72ee78cc9d7e1cf6795076617cef99ea05d82 | 7cebfa2066e679e19993a5507e59d1979df3d4a8 | /1_Basics/DataScienceAssignments/basicSearchEngine.py | eb134571d3ebac8f6c093cf7fa05c155bc04fe29 | [
"Apache-2.0"
] | permissive | Arunken/PythonScripts | 833e9e43ccb29234a206027f1cda1d978718d5eb | 702d0a3af7a9be3311f9da0afc5285d453f15484 | refs/heads/master | 2022-12-24T18:50:43.672779 | 2021-05-13T11:31:51 | 2021-05-13T11:31:51 | 237,631,027 | 0 | 0 | Apache-2.0 | 2022-12-08T00:47:45 | 2020-02-01T15:01:20 | Python | UTF-8 | Python | false | false | 3,737 | py | # -*- coding: utf-8 -*-
"""
Created on Mon May 28 13:17:19 2018
@author: SilverDoe
"""
import urllib
import collections
def get_page(url):
#return page html from url
try:
return [url,urllib.urlopen(url).read()]
except:
return [url,""]
def get_next_url(page):
#goes through pa... | [
"mail.arunken@gmail.com"
] | mail.arunken@gmail.com |
23d6e34bbac69811382efe75a0eaa6ccf8ac50e0 | 635c9f0501039f5a099849a3108e19de76092aea | /algorithm/ssafy_190325/부분집합합.py | a2aa237ea48bc4c554fc9fbb279759c67273b26f | [] | no_license | Hansung-Lee/SSAFY | 87ebea0808bb40381678d678e1035dc5fa2c2eb0 | cdb7ae1bba0e98e733eed703da2c62217c319462 | refs/heads/master | 2020-04-14T20:03:05.975040 | 2019-05-16T08:57:21 | 2019-05-16T08:57:21 | 164,080,393 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 526 | py | def subset(li):
for i in range(1<<len(li)):
temp = []
for j in range(len(li)):
if i & (1<<j):
temp.append(li[j])
if temp and sum(temp) == 0:
print(temp)
# def subset2(li,n,r):
# global temp
# if r == 0:
# print(temp)
# temp = [... | [
"ajtwlsgkst@naver.com"
] | ajtwlsgkst@naver.com |
8489ac70eb0eaae6b07f33f76b0ef93c44e29136 | 5bb0b1ee382d2ffce5cf59cd9b90e75d66396335 | /P12_视频网站视频真实上传日期_日期爬取_requests_re_匹配分组/001_Vixen_网站视频日期爬取_re查找_re分组匹配_日期匹配分组_交换顺序.py | e66d2cbf3eac4ada296d2b8a83f37194de16e510 | [] | no_license | FelixZFB/TZKT_Study_Note | d94ae82299fcce060da76cd4339b4182ab44f8c5 | 65f1089621d5236e3cddf37e6a3040556b4d0851 | refs/heads/master | 2021-06-26T09:16:17.051870 | 2020-12-01T02:14:39 | 2020-12-01T02:14:39 | 181,028,395 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,899 | py | # -*- coding:utf-8 -*-
# project_xxx\venv\Scripts python
'''
Author: Felix
Email: xiashubai@gmail.com
Blog: https://blog.csdn.net/u011318077
Date: 2019/9/16 21:22
Desc:
'''
# 视频网址视频下面日期是视频上传日期,真实拍摄日期大多数都早一天
# 视频源码中的日期正好是早一天的真实日期,直接提取对应日期即可
import requests
import re
import time
def get_date(url_list):
headers = ... | [
"18200116656@qq.com"
] | 18200116656@qq.com |
c39633b0d4ddbeeb4101389894b53606ca92dd4e | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_5765824346324992_0/Python/jcb/p2.py | bde3cb4839091e6513ee3b2edad179bc816deaa6 | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Python | false | false | 1,369 | py | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import sys
import fractions
def lcm(x, y):
return (x * y) / fractions.gcd(x, y)
def solve(f):
#parse
num_barbers, n = tuple([int(x) for x in f.readline().strip().split(" ")])
barbers = [[i + 1, int(x), 0] for i, x in enumerate(f.readline().strip().split(" "))]
#pri... | [
"eewestman@gmail.com"
] | eewestman@gmail.com |
43efe6f40cb20df2c4eb6e4f4c25c9fcfb33a3e6 | c4d1e606d2ebbeaaf3a4dee6f851a45dfa68dabe | /docs-crawler/docs/docs/spiders/numpy_spider.py | b4dae3615cf706dc8551bad586a9d824e7f85ac2 | [
"Apache-2.0"
] | permissive | niansong1996/threepio | 4d4a976da5a199c77fca936861ba78cc3f45fa7c | 5a143e045ca56560c29d03251cabc61cc8b982f6 | refs/heads/master | 2021-05-18T23:11:50.644479 | 2020-03-30T17:01:59 | 2020-03-30T17:01:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,509 | py | import re
from docs.items import ApiItem
from scrapy.spiders import Rule, CrawlSpider
from scrapy.linkextractors import LinkExtractor
from w3lib.html import remove_tags
class NumpySpider(CrawlSpider):
name = "numpy"
version = "1.17.0"
allowed_domains = ['scipy.org']
start_urls = [f'https://docs.scipy.... | [
"amrmkayid@gmail.com"
] | amrmkayid@gmail.com |
8f83835fe45446652f09806816af34d50e785cb3 | 8f7b7a910520ba49a2e614da72f7b6297f617409 | /Problemset/longest-substring-without-repeating-characters/longest-substring-without-repeating-characters.py | dc8487db359cebaaaaf3829e36b44a49590f76ec | [] | no_license | fank-cd/python_leetcode | 69c4466e9e202e48502252439b4cc318712043a2 | 61f07d7c7e76a1eada21eb3e6a1a177af3d56948 | refs/heads/master | 2021-06-16T23:41:55.591095 | 2021-03-04T08:31:47 | 2021-03-04T08:31:47 | 173,226,640 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 773 | py |
# @Title: 无重复字符的最长子串 (Longest Substring Without Repeating Characters)
# @Author: 2464512446@qq.com
# @Date: 2019-07-10 11:51:35
# @Runtime: 68 ms
# @Memory: 13.3 MB
class Solution:
def lengthOfLongestSubstring(self, s: str) -> int:
"""
滑窗法
"""
if not s:
return ... | [
"2464512446@qq.com"
] | 2464512446@qq.com |
f3dc9a759d3de427f44885d86311c78e81183969 | e5e2b7da41fda915cb849f031a0223e2ac354066 | /sdk/python/pulumi_azure_native/web/web_app_azure_storage_accounts.py | d55fb8b2ed5c239a1fd3dd9fdf97ebe2e482e77b | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | johnbirdau/pulumi-azure-native | b7d3bdddeb7c4b319a7e43a892ddc6e25e3bfb25 | d676cc331caa0694d8be99cb90b93fa231e3c705 | refs/heads/master | 2023-05-06T06:48:05.040357 | 2021-06-01T20:42:38 | 2021-06-01T20:42:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,101 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from... | [
"noreply@github.com"
] | johnbirdau.noreply@github.com |
1277be50c35d5f8141d67a8e05e653e78d81d442 | 4e29395020ce78f435e75e0b3f1e09b227f6f4d8 | /ataraxia/algorithm/Eval/eval.py | 5d666f6ab8a46c7ce2cea1d61d56bac77ffe1cdf | [] | no_license | luoyangustc/argus | 8b332d94af331a2594f5b1715ef74a4dd98041ad | 2ad0df5d7355c3b81484f6625b82530b38b248f3 | refs/heads/master | 2020-05-25T21:57:37.815370 | 2019-05-22T09:42:40 | 2019-05-22T09:42:40 | 188,005,059 | 5 | 3 | null | null | null | null | UTF-8 | Python | false | false | 3,628 | py | import pandas as pd
from collections import Counter
import pickle
from sklearn.metrics import accuracy_score
from sklearn.metrics import precision_score
from sklearn.metrics import recall_score
from sklearn.metrics import confusion_matrix
from sklearn.metrics import average_precision_score
import json
import matplotlib... | [
"luoyang@qiniu.com"
] | luoyang@qiniu.com |
a08bbad48829c38821e8d071a6a442413f27293f | f09dc121f213f2881df3572288b7ee5b39246d73 | /aliyun-python-sdk-opensearch/aliyunsdkopensearch/request/v20171225/DescribeAppGroupDataReportRequest.py | 758871adcb9db7d9bd59f3a70169885a82a3c3bd | [
"Apache-2.0"
] | permissive | hetw/aliyun-openapi-python-sdk | 2f31378ad6be0896fb8090423f607e9c7d3ae774 | 7443eacee9fbbaa93c7975c6dbec92d3c364c577 | refs/heads/master | 2023-01-19T22:42:36.214770 | 2020-12-04T10:55:14 | 2020-12-04T10:55:14 | 318,689,093 | 1 | 0 | NOASSERTION | 2020-12-05T03:03:03 | 2020-12-05T03:03:03 | null | UTF-8 | Python | false | false | 1,917 | py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
c06d9cfdd26f717ccda451b45843ae4a72787c06 | 741ee09b8b73187fab06ecc1f07f46a6ba77e85c | /AutonomousSourceCode/data/raw/squareroot/367b3079-2a92-41b6-b880-54e3b3730861__squareRoot.py | 80bbf1197a618a7a41813e23e44f3e78c6e83bf1 | [] | no_license | erickmiller/AutomatousSourceCode | fbe8c8fbf215430a87a8e80d0479eb9c8807accb | 44ee2fb9ac970acf7389e5da35b930d076f2c530 | refs/heads/master | 2021-05-24T01:12:53.154621 | 2020-11-20T23:50:11 | 2020-11-20T23:50:11 | 60,889,742 | 6 | 1 | null | null | null | null | UTF-8 | Python | false | false | 363 | py | # import math
def closeEnough(num1,num2):
if (abs(num1-num2) < 0.001):
return True
else:
return False
def squareRoot(num,guess):
# guess = 1
if(closeEnough((num/guess),guess)):
print round(guess,4)
else:
guess = ((num/guess)+guess)/2
squareRoot(num,guess)
if __name__ == '__main__':
num = input("Ent... | [
"erickmiller@gmail.com"
] | erickmiller@gmail.com |
5ef4daa35ad9543b2fe5089654f203686e072f58 | 6550cc368f029b3955261085eebbddcfee0547e1 | /第9部分-flask+智能玩具(火龙果)/day118/今日代码/day118/goto_tuling.py | 1b8d9603d97063fdb0054446d7e0569040b61834 | [] | no_license | vividyellow/oldboyeduPython14qi | d00c8f45326e16464c3d4e8df200d93779f68bd3 | de1e9f6efafa2846c068b3fe5ad6e1ca19f74a11 | refs/heads/master | 2022-09-17T21:03:17.898472 | 2020-01-31T10:55:01 | 2020-01-31T10:55:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 550 | py | import requests
url = "http://openapi.tuling123.com/openapi/api/v2"
data_dict = {
"reqType":0,
"perception": {
"inputText": {
"text": "北京"
},
},
"userInfo": {
"apiKey": "c3a9ba0d958a43658a5acdcae50c13ae",
"userId": "jinwangbas"
}
}
def tl(text,uid):
dat... | [
"524991368@qq.com"
] | 524991368@qq.com |
5f267713a18175d80bf3a5ca7febbc4b744eccfe | a83108c53c454102317d7bb4e769f36b661c75ed | /config/geturlParams.py | b8c892530271f545e9612e647a80ae8f630fed4e | [] | no_license | xuechao1/DX_interfaceTest | aa35a83390113c5be7d6bdf6e6c796b35059f63e | 524cce8cc06dc8f045a9b98bfafdbaecd25726df | refs/heads/master | 2022-12-05T17:00:45.289070 | 2020-08-20T10:14:28 | 2020-08-20T10:14:28 | 282,176,904 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 473 | py | from config import readConfig as readConfig
readconfig = readConfig.ReadConfig()
class geturlParams(): # 定义一个方法,将从配置文件中读取的进行拼接
def get_Url(self):
new_url = readconfig.get_http('scheme') + '://' + readconfig.get_http('baseurl') + ':8888' + '/login' + '?'
# logger.info('new_url'+new_url)
... | [
"623858143@qq.com"
] | 623858143@qq.com |
c215661b1e7f55ca27629f44a33101451779afe1 | 0aa64aa023f80c97c8ded68dee7541ca7d3aa274 | /ImageEnhancer/__init__.py | 86c7e8ae06480cd84cd538a85a494986eb1b6c22 | [] | no_license | YuMurata/gdrive_scripts | fb7751625b0d73d50ee91f9ab74aa9883a317231 | ce2cf48b757eca558e8f93892b9b929352431bfd | refs/heads/master | 2020-12-20T04:38:00.127118 | 2020-03-13T05:02:26 | 2020-03-13T05:02:26 | 235,964,806 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 266 | py | from .enhance_definer \
import (enhance_class_list, enhance_dict, enhance_name_list,
MAX_PARAM, MIN_PARAM)
from .image_enhancer \
import (ImageEnhancer, ImageEnhancerException, ResizableEnhancer)
from .generate_param import generate_random_param
| [
"purin7635@gmail.com"
] | purin7635@gmail.com |
a076db6989aa4821c423febbc9cc4b4248a6ecb3 | 18430833920b3193d2f26ed526ca8f6d7e3df4c8 | /src/transmittals/migrations/0051_auto_20160226_1127.py | 4cfd707e588c319531e2c6f51be7efc6f132cf50 | [
"MIT"
] | permissive | providenz/phase | ed8b48ea51d4b359f8012e603b328adf13d5e535 | b0c46a5468eda6d4eae7b2b959c6210c8d1bbc60 | refs/heads/master | 2021-01-17T06:56:07.842719 | 2016-06-28T11:17:53 | 2016-06-28T11:17:53 | 47,676,508 | 0 | 0 | null | 2015-12-09T07:45:19 | 2015-12-09T07:45:18 | null | UTF-8 | Python | false | false | 450 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('transmittals', '0050_make_entities'),
]
operations = [
migrations.AlterField(
model_name='trsrevision',
... | [
"thibault@miximum.fr"
] | thibault@miximum.fr |
58ef51cbfb19381e058ed5c3e284c3f524d96b96 | de468d3ec6b7b69664678789e5fa71b613b29687 | /scine_heron/tests/create_molecule_animator_test.py | 2b7d9a0197b9dff66dcdc7a40c6f8a4ae1afba00 | [
"BSD-3-Clause"
] | permissive | qcscine/heron | dc566bf8bfdd5b5271ed79faed249a6552390d0d | 688d2a510fda9f6bfaf5ef3af91fa3b988703a28 | refs/heads/master | 2023-04-06T23:31:14.931706 | 2022-08-31T05:40:15 | 2022-08-31T05:40:15 | 526,650,129 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,771 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__copyright__ = """ This code is licensed under the 3-clause BSD license.
Copyright ETH Zurich, Laboratory of Physical Chemistry, Reiher Group.
See LICENSE.txt for details.
"""
"""
Tests for the create_molecule_animator function.
"""
from scine_heron.energy_profile.energy... | [
"scine@phys.chem.ethz.ch"
] | scine@phys.chem.ethz.ch |
8ded2230e932e52c5fa2c4c833ee7824fad8c28e | 638af6b8c580eeae23fc1034882c4b514195137a | /Packages/vcs/Test/test_mesh_leg.py | 5b4d3ee35046a718c7cf7f1b6b698c33d332b6db | [] | no_license | doutriaux1/uvcdat | 83684a86b514b8cac4d8900a503fc13d557fc4d2 | 37e9635f988696c346b4c3cdb49144d1e21dab5d | refs/heads/master | 2021-01-17T07:57:22.897539 | 2015-02-02T22:52:12 | 2015-02-02T22:52:12 | 14,878,320 | 1 | 0 | null | 2015-02-19T20:54:25 | 2013-12-02T23:44:46 | C | UTF-8 | Python | false | false | 793 | py | # Adapted for numpy/ma/cdms2 by convertcdms.py
import vcs,cdms2 as cdms,sys,support,os
bg=support.bg
f=cdms.open(os.path.join(cdms.__path__[0],'..','..','..','..','sample_data','sampleCurveGrid4.nc'))
s=f('sample')
x=vcs.init()
t=x.createtemplate('jj')
m=x.createmeshfill('hh')
m.mesh='y'
m=x.createisofill('jj')
t.s... | [
"doutriaux1@meryem.llnl.gov"
] | doutriaux1@meryem.llnl.gov |
4ae301b5361e0b6d3d2a61c245a7ff6c6621f51a | 809a18b3dd7e90393a69d48f20be840041ef396e | /models/pointer.py | fbe08458d00cd150934dca5c3bb574b7b10f5407 | [] | no_license | wanwanaa/transformer-pointer | e58d4cb4b4f8a412515316457afac8708cdf1ef5 | aac7bff63e19d4845ac23dfcf9131f1a20812efc | refs/heads/master | 2020-05-17T17:08:05.747337 | 2019-09-08T13:02:30 | 2019-09-08T13:02:30 | 183,840,459 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,745 | py | import torch
import torch.nn as nn
from models.encoder import Encoder
from models.decoder import Decoder
class Pointer(nn.Module):
def __init__(self, config):
super().__init__()
self.linear = nn.Sequential(
nn.Linear(config.model_size*3, config.model_size),
nn.SELU(),
... | [
"1551612415@qq.com"
] | 1551612415@qq.com |
40f8185de6c03d4570b59f34d711c624447175de | 093b9569be9d1c4e5daf92efbebc38f680917b2d | /.history/base/views_20210828170402.py | 51bdc9919f9fd0fdfec82eaaf4503593d19de3b0 | [] | no_license | Justin-Panagos/todoList | 95b1e97ff71af1b0be58e7f8937d726a687cea4d | 10539219b59fcea00f8b19a406db3d4c3f4d289e | refs/heads/master | 2023-08-04T13:27:13.309769 | 2021-08-29T14:06:43 | 2021-08-29T14:06:43 | 400,827,602 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 128 | py | from django.shortcuts import render
from django.http import HttpResponse
def taskList(request):{
return HttpResponse('')
}
| [
"justpanagos@gmail.com"
] | justpanagos@gmail.com |
8f2dc8276cd6ae79f6dc311c301f1ec35490ef60 | 7d3592b74233ee8b1afa2fac00fa5a6f045f5525 | /tutorials/inputFromDependent/inputFromDependent.py | a53bf2778a6a20a6298dff152673c8f3bb9fa422 | [
"Apache-2.0"
] | permissive | afcarl/PyPPL | eca2a3e32729d7fd65042164b82c84f21877de2d | c6c654f163d1bdd0ae0357025c5782b17c14b93c | refs/heads/master | 2020-03-25T18:51:46.872319 | 2018-08-08T16:10:21 | 2018-08-08T16:10:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 724 | py |
from pyppl import PyPPL, Proc, Channel
pSort = Proc(desc = 'Sort files.')
pSort.input = {"infile:file": Channel.fromPattern("./data/*.txt")}
pSort.output = "outfile:file:{{in.infile | fn}}.sorted"
pSort.forks = 5
pSort.script = """
sort -k1r {{in.infile}} > {{out.outfile}}
"""
pAddPrefix = Proc(d... | [
"pwwang@pwwang.com"
] | pwwang@pwwang.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.