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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5ec1ee7bdb19d74f99bf937bc26b51227ed5e769 | 9c718b8964d476db4728fc0cf18e24292dd8cf60 | /MxOnline/apps/courses/migrations/0007_video_url.py | eb778b67fab3773e760b7adfb23e88345a338691 | [] | no_license | 1400720231/Django-Projects | 960f9226e0f5c01628afd65b9a78e810fdeb1b83 | 72f96788163f7ffe76e7599966ddbfa1d2199926 | refs/heads/master | 2021-06-25T17:41:14.147011 | 2019-04-03T02:24:38 | 2019-04-03T02:24:38 | 114,955,012 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 487 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2018-02-20 18:26
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('courses', '0006_auto_20180220_1535'),
]
operations = [
migrations.AddField(... | [
"937886362@qq.com"
] | 937886362@qq.com |
87f111c9190d4f0e1168bed1af78f8024c31c36c | fd717fe6ca74f6d77210cdd57a8c365d27c5bfc6 | /pychron/database/records/power_map_record.py | 130d5dbfa486a1f9890af0689a7ca5fca6defcc4 | [
"Apache-2.0"
] | permissive | stephen-e-cox/pychron | 1dea0467d904d24c8a3dd22e5b720fbccec5c0ed | 681d5bfe2c13e514859479369c2bb20bdf5c19cb | refs/heads/master | 2021-01-19T15:40:03.663863 | 2016-07-14T14:37:16 | 2016-07-14T14:37:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,306 | py | # ===============================================================================
# Copyright 2012 Jake Ross
#
# 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/licens... | [
"jirhiker@gmail.com"
] | jirhiker@gmail.com |
ec707a98e97489c8d21cc1494e91807c9ccc0da2 | e8b0dcef3fda2cde71ff3a193af2524456783a24 | /examples/pytorch/recommendation/rec/datasets/movielens.py | 0caf1fece950170f7e74b2dfc79f859a0fcb7063 | [
"Apache-2.0"
] | permissive | Menooker/dgl | 79daba49407e2f113d61ba8fab0902c51993b060 | 170c2ed46fde29271246fe6600948b2864534ca3 | refs/heads/master | 2021-01-15T06:00:46.706097 | 2020-04-01T02:10:25 | 2020-04-01T02:10:25 | 242,896,301 | 3 | 0 | Apache-2.0 | 2020-02-25T03:01:25 | 2020-02-25T03:01:24 | null | UTF-8 | Python | false | false | 8,159 | py | import pandas as pd
import dgl
import os
import torch
import numpy as np
import scipy.sparse as sp
import time
from functools import partial
from .. import randomwalk
import stanfordnlp
import re
import tqdm
import string
class MovieLens(object):
def __init__(self, directory):
'''
directory: path t... | [
"noreply@github.com"
] | Menooker.noreply@github.com |
74e2344e3bf94ca0eacd4283bbbeb33100bdf144 | 6caab8d886e8bd302d1994ff663cf5ccb5e11522 | /MyNotes_01/Step02/4-Concurrent/day03_09/demo12_dead_lock.py | 7cfadfec8a87614f6d0a798a678a98c857765851 | [] | no_license | ZimingGuo/MyNotes01 | 7698941223c79ee754b17296b9984b731858b238 | 55e6681da1a9faf9c0ec618ed60f5da9ecc6beb6 | refs/heads/master | 2022-07-30T21:30:32.100042 | 2020-05-19T16:59:09 | 2020-05-19T16:59:09 | 265,254,345 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,758 | py | # author: Ziming Guo
# time: 2020/3/31
'''
demo_dead_lock:
'''
from time import sleep
from threading import Thread, Lock
# 交易类
class Account():
def __init__(self, _id, balance, lock): # 第三个参数的意思就是要初始化一个锁对象,方便之后上锁
# 创建了一个对象,就实例化了一个用户
self.id = _id # 用户
self.balance = balance # 存款
... | [
"guoziming99999@icloud.com"
] | guoziming99999@icloud.com |
fac612177f53a4d7c75a80e5625418495ff1526b | 1f813c3cd6a9d293acfbc81f198c64f816a9a95d | /build/gazebo_msgs/catkin_generated/generate_cached_setup.py | fb96ff1529bff413e751a55b32cc355d9b1ca061 | [] | no_license | koteshrv/Vargi_Bots_1418 | 5ada79746785a9f9cc0e1d686a1dd2702c9e0f0f | 6bcf843c7150c93caee2b596e0864749c51b6155 | refs/heads/main | 2023-01-06T03:42:53.555701 | 2020-11-08T17:36:59 | 2020-11-08T17:36:59 | 302,916,294 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,322 | py | # -*- coding: utf-8 -*-
from __future__ import print_function
import os
import stat
import sys
# find the import for catkin's python package - either from source space or from an installed underlay
if os.path.exists(os.path.join('/opt/ros/melodic/share/catkin/cmake', 'catkinConfig.cmake.in')):
sys.path.insert(0, ... | [
"kkotesh100@gmail.com"
] | kkotesh100@gmail.com |
0da03225afbcf284ba55cf1f6e0ac7ec5f9eef7e | 7933d55de7e2d3a9e78a372fa76f064f5ed5eb6f | /maths/solutions_printing.py | c9eb70fbad5598e1f5f8b71bc4e0ae58c60e772c | [] | no_license | o2edu/MathsExams | 4921f6683e1d6d96aa834d5b01f30bd66522887d | 8e2c0aeba6bbad52103c420747ead1dad6380408 | refs/heads/master | 2021-05-29T17:42:32.442055 | 2014-05-31T10:18:12 | 2014-05-31T10:18:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 439 | py | import sympy
def substitute(expr, var, value):
latex = sympy.latex(expr)
print(latex)
latex = latex.replace(sympy.latex(var), sympy.latex(value))
return latex
def integral_working(expr, var, l, h):
left = substitute(expr, var, h) # upper bound goes on the left
right = substitute(expr, var... | [
"ben.lucato@gmail.com"
] | ben.lucato@gmail.com |
de58538e32e4fab5da02e44f5307d9f8381e1187 | 2fa05752244c2ab39c108c11ab2dc22f4f9e9ad0 | /Events/models.py | 21a3d293241fbf3a2f10e964028a4f94d626d2d1 | [
"Apache-2.0"
] | permissive | CiganOliviu/cigan_enterprize | b88aebcb27ec97dd229e67cbb5bea3199cc8b5ce | 8a4f4c06197655622ca08f92ec793add7d0be0cd | refs/heads/main | 2023-03-04T05:28:11.376109 | 2021-02-14T20:38:29 | 2021-02-14T20:38:29 | 333,212,689 | 0 | 0 | Apache-2.0 | 2021-02-14T20:38:29 | 2021-01-26T20:45:44 | null | UTF-8 | Python | false | false | 2,284 | py | from django.db import models
class PastEvent(models.Model):
event_name = models.CharField(max_length=200)
location = models.CharField(max_length=200)
space = models.CharField(max_length=200)
part_of_event = models.CharField(max_length=200, blank=True)
introduction = models.CharField(max_length=30... | [
"ciganoliviudavid@gmail.com"
] | ciganoliviudavid@gmail.com |
7681fbbf18fcd73148a18090ee3dc623e67524c3 | 999f3f3da1cb70cb5872f99a09d65d7c4df71cf7 | /src/data/422.py | c9f4348a402a94ccc58fe6c9159dfcb7a2658c86 | [
"MIT"
] | permissive | NULLCT/LOMC | 0f0d1f01cce1d5633e239d411565ac7f0c687955 | 79a16474a8f21310e0fb47e536d527dd5dc6d655 | refs/heads/main | 2023-07-27T17:03:46.703022 | 2021-09-04T08:58:45 | 2021-09-04T08:58:45 | 396,290,713 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,147 | py | import sys
def input():
return sys.stdin.readline().rstrip()
from collections import deque
n, q = map(int, input().split()) # 頂点数と辺数
# グラフ入力受け取り (ここでは無向グラフを想定)
graph = [[] for _ in range(n)]
for i in range(n - 1):
a, b = map(int, input().split())
a -= 1
b -= 1
graph[a].append(b)
graph[b].... | [
"cockatiel.u10@gmail.com"
] | cockatiel.u10@gmail.com |
b7cd2b10ebf6dfaa8b82fd393ae5c7eb222e452b | e76017111250067edf5fb563cf2e483badc68ece | /chap2/transforms.py | ca28ed1d6cdeb350b8ffd3b54badf1f87a155ea3 | [] | no_license | jaringson/Flight_Dynamics | f64108ec816e9606bcdddb0b5814992182e8b3ed | abaf667e154e9005c5160c68cdcb48a882e0c48e | refs/heads/master | 2021-05-11T16:03:45.597431 | 2018-04-13T20:53:28 | 2018-04-13T20:53:28 | 117,749,609 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,802 | py |
from numpy import pi, sin
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
# import matplotlib.animation as animation
from matplotlib.widgets import Slider
def draw_plane_nwu(plane_in):
R = np.array([[1,0,0],
[0,-1,0],
[0,0,-1]])
p... | [
"jaringson@gmail.com"
] | jaringson@gmail.com |
840c7e4b607bbbfba8780d7200c113b9d8d33362 | 95e8ff5910648df82a1d6dd538b535142be96162 | /SnakeGame/Map.py | 3583ecf10a0df739986225f8835032f30dc5e52d | [] | no_license | visittor/RL | 862d60821a8a52a532ce8ec742e67ef79c772545 | d110e070f9dd0b78cd61281774c567513aa984e2 | refs/heads/master | 2021-07-02T19:24:14.521192 | 2020-10-31T14:42:02 | 2020-10-31T14:42:02 | 221,648,260 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 274 | py |
class Map( object ):
def __init__( self, width: int, height: int ):
self.__width = width
self.__height = height
@property
def width( self ):
return self.__width
@property
def height( self ):
return self.__height | [
"chattarin.rodpon@gmail.com"
] | chattarin.rodpon@gmail.com |
7d298047fa3855b4c60842492f353cf8185c2917 | 94872a7ee1f7cd64a59e59c2092b18f48954d9eb | /IlijaCollector/cleanup.py | cdfbbc2987a069c52d943697dadd948707fcac53 | [] | no_license | ivukotic/FAXtools | 106957227a7033c6eaaeca29e30f859307c7ebbb | 0b9068f0b82f03c5422f7f66615e9d4083d77388 | refs/heads/master | 2020-04-06T03:33:51.797364 | 2016-11-16T16:45:05 | 2016-11-16T16:45:05 | 6,708,845 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 967 | py | #!/usr/bin/python
from datetime import datetime
import xml.etree.ElementTree as ET
@outputSchema("CLEANED:tuple(SRC:chararray,SITE:chararray,TOS:long,TOD:long,TOE:long,IN:long,OUT:long)")
def XMLtoNTUP(xmlInput):
ntup = []
root = ET.fromstring(xmlInput)
SRC=root.attrib['src'] # server name
SITE=root.... | [
"ivukotic@cern.ch"
] | ivukotic@cern.ch |
bf1e5321014ae815ae54a903c7dbd9492dc21a4b | 628ec414b7807fc50de67345361e41cc68ba3720 | /mayan/apps/mailer/links.py | ff70be2f8437a595c00305f37b45fb2a84c475bf | [
"Apache-2.0"
] | permissive | TestingCodeReview/Mayan-EDMS | aafe144424ffa8128a4ff7cee24d91bf1e1f2750 | d493ec34b2f93244e32e1a2a4e6cda4501d3cf4e | refs/heads/master | 2020-05-27T23:34:44.118503 | 2019-04-05T02:04:18 | 2019-04-05T02:04:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,503 | py | from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from navigation import Link
from .icons import (
icon_system_mailer_error_log, icon_user_mailer_create,
icon_user_mailer_list, icon_user_mailer_setup
)
from .permissions import (
permission_mailing_link, permi... | [
"roberto.rosario.gonzalez@gmail.com"
] | roberto.rosario.gonzalez@gmail.com |
89a57b2761ac7eb2700a21a0db54eb81630a8f82 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_135/688.py | 93210bdda7e5caabc402c9844a34c004ac9fb43c | [] | 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 | 531 | py | def solve(a, A, b, B):
s = set(A[a-1]).intersection(set(B[b-1]))
if len(s) == 1:
return str(list(s)[0])
if len(s) == 0:
return "Volunteer cheated!"
if len(s) > 1:
return "Bad magician!"
def main():
T = int(raw_input())
for t in xrange(1, T+1):
a = int(raw_input())
A = [map(int, raw_input()... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
8b349f526cd1c606c03ddd508c7189b821aade82 | 9e5353ba6e50f77a40a765bd494d8bfb990c8922 | /scratch/socket_test.py | df65b498efcb3ac969bc64dd918a76b336d66797 | [] | no_license | admiralbolt/stream-stuff | d9e24f1d78ac142416525b9b42cc53ef0bc4712a | 29cfa96f9e8d40c531362aced47ebacadccbe759 | refs/heads/master | 2023-08-05T00:02:17.812991 | 2021-09-23T05:47:16 | 2021-09-23T05:47:16 | 261,022,447 | 7 | 0 | null | null | null | null | UTF-8 | Python | false | false | 795 | py | import asyncio
import sys
import os
import time
import websockets
sys.path.append(os.path.realpath(os.path.join(
os.getcwd(),
"..",
"stream_backend/api/utils"
)))
sys.path.append(os.path.realpath(os.path.join(
os.getcwd(),
"..",
"stream_backend"
)))
from websocket_client import WebSocke... | [
"aviknecht@gmail.com"
] | aviknecht@gmail.com |
40bf64c084dd22ce89891bfea90ef07df3538dbf | e3c8f786d09e311d6ea1cab50edde040bf1ea988 | /Incident-Response/Tools/dfirtrack/dfirtrack_main/tests/system_importer/test_system_importer_file_csv_forms.py | b37856c7b92f51a0a17dc34c1510029c05cfcafc | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | foss2cyber/Incident-Playbook | d1add8aec6e28a19e515754c6ce2e524d67f368e | a379a134c0c5af14df4ed2afa066c1626506b754 | refs/heads/main | 2023-06-07T09:16:27.876561 | 2021-07-07T03:48:54 | 2021-07-07T03:48:54 | 384,988,036 | 1 | 0 | MIT | 2021-07-11T15:45:31 | 2021-07-11T15:45:31 | null | UTF-8 | Python | false | false | 1,512 | py | from django.core.files.uploadedfile import SimpleUploadedFile
from django.test import TestCase
from dfirtrack_main.importer.file.csv_importer_forms import SystemImporterFileCsvForm
class SystemImporterFileCsvFormTestCase(TestCase):
""" system importer file CSV form tests """
def test_system_importer_file_csv... | [
"a.songer@protonmail.com"
] | a.songer@protonmail.com |
63a46a45858243d9ebeee22d91f29779a70a5139 | dfcb65de02953afaac24cc926ee32fcdede1ac21 | /src/pyrin/utilities/string/normalizer/interface.py | 2ce7bc744c3717bbd93b06339e34ad637f686f5b | [
"BSD-3-Clause"
] | permissive | mononobi/pyrin | 031d0c38da945b76b07ea100554ffc7f8081b05e | 9d4776498225de4f3d16a4600b5b19212abe8562 | refs/heads/master | 2023-08-31T03:56:44.700142 | 2023-08-20T22:20:06 | 2023-08-20T22:20:06 | 185,481,041 | 20 | 8 | null | null | null | null | UTF-8 | Python | false | false | 1,585 | py | # -*- coding: utf-8 -*-
"""
string normalizer interface module.
"""
from abc import abstractmethod
from threading import Lock
from pyrin.core.structs import CoreObject, MultiSingletonMeta
from pyrin.core.exceptions import CoreNotImplementedError
class StringNormalizerSingletonMeta(MultiSingletonMeta):
"""
s... | [
"mohamadnobakht@gmail.com"
] | mohamadnobakht@gmail.com |
d5b2de6fa50598faa7966662ac5ed602f5303daa | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/datafactory/azure-mgmt-datafactory/generated_samples/integration_runtimes_get_monitoring_data.py | 162c40fb7e0725dfc7072eec2fbc63a3639f0451 | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later"
] | permissive | Azure/azure-sdk-for-python | 02e3838e53a33d8ba27e9bcc22bd84e790e4ca7c | c2ca191e736bb06bfbbbc9493e8325763ba990bb | refs/heads/main | 2023-09-06T09:30:13.135012 | 2023-09-06T01:08:06 | 2023-09-06T01:08:06 | 4,127,088 | 4,046 | 2,755 | MIT | 2023-09-14T21:48:49 | 2012-04-24T16:46:12 | Python | UTF-8 | Python | false | false | 1,716 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"noreply@github.com"
] | Azure.noreply@github.com |
4e983363b19bdb916fd76195d601d24d9e9ee54c | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_1483485_0/Python/laurentr/translate.py | a0ba9e164e94e4f8cb12d6e20191bbc65c9ef4c7 | [] | 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 | 647 | py | #!/usr/bin/python
from string import maketrans
googlerese = "qzejp mysljylc kd kxveddknmc re jsicpdrysi rbcpc ypc rtcsra dkh wyfrepkym veddknkmkrkcd de kr kd eoya kw aej tysr re ujdr lkgc jv"
english = "zqour language is impossible to understand there are twenty six factorial possibilities so it is okay if you wan... | [
"eewestman@gmail.com"
] | eewestman@gmail.com |
601d1d090416b33f87346019500e4e1cadd9f83c | ae5208474f3fc2a5f506e8bf0e8cdc62591f6f19 | /tests/test_softclip_clusterfinder.py | 1a655b8da68ef5dfc56fc7052ab010a253d4e273 | [
"MIT"
] | permissive | andurill/readtagger | e32ca519f955d4d80c0d4561e6ecb1e591be7458 | 127ec08c00c47d03dfb8e95b628c381d3e29a6c8 | refs/heads/master | 2020-04-27T19:58:15.549676 | 2019-03-29T16:18:23 | 2019-03-29T16:40:41 | 174,641,225 | 0 | 0 | null | 2019-03-09T03:00:12 | 2019-03-09T03:00:11 | null | UTF-8 | Python | false | false | 788 | py | from readtagger.find_softclip_clusters import (
SoftClipClusterFinder,
)
WRONG_TSD = 'wrong_tsd.bam'
MULTI_H6 = 'multisample_h6.bam'
def test_softclip_clusterfinder(datadir_copy, tmpdir): # noqa: D103, F811
input_path = str(datadir_copy[WRONG_TSD])
gff_out = tmpdir.join('out.gff').strpath
clusterfin... | [
"m.vandenbeek@gmail.com"
] | m.vandenbeek@gmail.com |
2d965d93ee20271285cb99c1135e2c911f7b5092 | 8b42c2c1fc8481f52e0c75d69cdd832029533a01 | /src/stump_data_pipeline/util/string.py | b8bd768816efe4a6f54917e1d762e51e27c4349b | [
"MIT"
] | permissive | stump-vote/stump-data-pipeline | 33e59e0e22ede06626421a2da7d52650b23294b0 | 7a8a27577f20cc4f4bdcbf20fe9664b69efa6953 | refs/heads/master | 2022-12-24T05:45:49.923308 | 2020-04-18T21:57:47 | 2020-04-18T21:57:47 | 253,142,064 | 0 | 1 | MIT | 2022-12-08T09:33:08 | 2020-04-05T02:44:15 | Python | UTF-8 | Python | false | false | 196 | py | def camel_to_snake(s):
return s[0] + "".join(
[
"_" + s[i].lower() if s[i - 1].islower() and s[i].isupper() else s[i]
for i in range(1, len(s))
]
)
| [
"galbwe92@gmail.com"
] | galbwe92@gmail.com |
90686270cec5374b3b24720cb1ca17eea5d31799 | 9acd4d3abca1058dade7771403e1eb9b7436f842 | /Plugins/Modules/importlib_resources/readers.py | 19450f461c8d58aec6de6bb92e55cd833af11c1d | [] | no_license | candy-kk/FrameScan | 900595c00e329200c792a7edd418e2e1cef1e539 | e4cfa0e6d0c457d14f7177c78b653b923184061a | refs/heads/master | 2023-05-10T15:45:46.565422 | 2023-04-12T04:56:15 | 2023-04-12T04:56:15 | 263,955,799 | 0 | 0 | null | 2020-05-14T15:40:27 | 2020-05-14T15:40:26 | null | UTF-8 | Python | false | false | 3,669 | py | import collections
import pathlib
import operator
from . import abc
from ._itertools import unique_everseen
from ._compat import ZipPath
def remove_duplicates(items):
return iter(collections.OrderedDict.fromkeys(items))
class FileReader(abc.TraversableResources):
def __init__(self, loader):
self.p... | [
"qianxiao996@126.com"
] | qianxiao996@126.com |
9f40d1c70876a29a78325e983cb7fc89dcffd860 | c9094a4ed256260bc026514a00f93f0b09a5d60c | /tests/components/abode/test_cover.py | bb1b8fceffb4d6028a08e4dce81c2148a8035c1a | [
"Apache-2.0"
] | permissive | turbokongen/home-assistant | 824bc4704906ec0057f3ebd6d92788e096431f56 | 4ab0151fb1cbefb31def23ba850e197da0a5027f | refs/heads/dev | 2023-03-12T05:49:44.508713 | 2021-02-17T14:06:16 | 2021-02-17T14:06:16 | 50,231,140 | 4 | 1 | Apache-2.0 | 2023-02-22T06:14:30 | 2016-01-23T08:55:09 | Python | UTF-8 | Python | false | false | 2,112 | py | """Tests for the Abode cover device."""
from unittest.mock import patch
from homeassistant.components.abode import ATTR_DEVICE_ID
from homeassistant.components.cover import DOMAIN as COVER_DOMAIN
from homeassistant.const import (
ATTR_ENTITY_ID,
ATTR_FRIENDLY_NAME,
SERVICE_CLOSE_COVER,
SERVICE_OPEN_COV... | [
"noreply@github.com"
] | turbokongen.noreply@github.com |
ac148293cc34566d29a0aabb1f1be353fc280f07 | 2aba62d66c2c622bdc148cef451da76cae5fd76c | /exercise/learn_python_dm2039/ch27/ch27_8.py | 47b5afb38beeb7cebb5ce67f0307e4f8d7ff2485 | [] | no_license | NTUT-109AB8011/crawler | 6a76de2ab1848ebc8365e071e76c08ca7348be62 | a703ec741b48d3af615a757fed7607b1f8eb66a6 | refs/heads/master | 2023-03-26T22:39:59.527175 | 2021-03-30T03:29:22 | 2021-03-30T03:29:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 520 | py | # ch27_8.py
import PyPDF2
pdfObj = open('travel.pdf','rb')
pdfRd = PyPDF2.PdfFileReader(pdfObj)
pdfWr = PyPDF2.PdfFileWriter() # 新的PDF物件
for pageNum in range(pdfRd.numPages):
pdfWr.addPage(pdfRd.getPage(pageNum)) # 一次將一頁放入新的PDF物件
pdfWr.encrypt('deepstone') # 執行加密
encryp... | [
"terranandes@gmail.com"
] | terranandes@gmail.com |
61f0993386e6185701397450a63a17faaa724432 | 04cd80564d67e3e946ec66fd80e95b858693eae8 | /backend/home/models.py | 0b984ee292c699d3ac7c48b92354b8e56caff465 | [] | no_license | crowdbotics-apps/new-rn-app-dev-1106 | 3307dd21fc0605bd9f471367faca97d6da6d77d4 | 8948a5b8b52198b55ce24b6e60a1c9e24293056a | refs/heads/master | 2023-01-25T01:36:41.979381 | 2019-12-02T21:11:21 | 2019-12-02T21:11:21 | 221,566,041 | 0 | 0 | null | 2023-01-24T00:51:39 | 2019-11-13T22:47:04 | JavaScript | UTF-8 | Python | false | false | 558 | py | from django.db import models
# Create your models here.
from django.db import models
class CustomText(models.Model):
title = models.CharField(max_length=150,)
def __str__(self):
return self.title
@property
def api(self):
return f"/api/v1/customtext/{self.id}/"
@property
de... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
4cd8533c2ff400fe3f3a9e78e6a145027f886051 | a95f0a79e066393df65c201d10e4ba3a9d44d433 | /pragmatic/middleware.py | 11200e2db6436b5d888c680eff65c2c1b911d811 | [] | no_license | barseghyanartur/django-pragmatic | d2d03a0b61865ec49b11f3eddfa9a2cf705d6945 | b5118e06568ba8c15d129e25fd2ddd3c14648898 | refs/heads/master | 2020-07-27T07:40:12.153629 | 2019-09-12T08:58:55 | 2019-09-12T08:58:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,572 | py | from django.conf import settings
from django.http import HttpResponse
from django.template import loader
from django.template.response import SimpleTemplateResponse
try:
from django.utils.deprecation import MiddlewareMixin
except ImportError: # Django < 1.10
# Works perfectly for everyone using MIDDLEWARE_CLA... | [
"erik.telepovsky@gmail.com"
] | erik.telepovsky@gmail.com |
4f66cd817ec45b42e7ca508ed4dc0006558881aa | d92f85e4345a12a245eec8266e14300b8e67d927 | /table print.py | 7c08d1571b9d2bfc3972690d51a55f56aa6b17cb | [] | no_license | ujalapraveen/Function | b13ce92926a3c65ad7f21ba2cb6baed023afa02c | 624145a55774695623a418fcf3a864f11fb6aec2 | refs/heads/main | 2023-06-25T01:40:43.927992 | 2021-07-13T08:41:36 | 2021-07-13T08:41:36 | 371,344,098 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 202 | py |
num= int(input("enter the number"))
a= int(input("enter the number"))
while num<=a:
i= 1
while i<=10:
s= num*i
print(num,"x",i,"=",s,"\n")
i= i+1
num= num+1
| [
"noreply@github.com"
] | ujalapraveen.noreply@github.com |
1833d5e8f4f06ef245347d7f9c37851e1e26bcc1 | dd70312e98b72c815368398b87dda55da7360b28 | /third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-py/thrift/annotation/java/constants.py | 0c3d96abb976d502b802bc337851b59efb1b466a | [
"Apache-2.0",
"PHP-3.01",
"MIT",
"Zend-2.0"
] | permissive | paulbiss/hhvm | ca6a8b4ac3e7b65dcf4029f9a59ce591c33c6cce | ddc087ddca8ab6b718c0567ec506139db300fdd1 | refs/heads/master | 2023-05-24T16:27:30.329476 | 2023-05-18T01:01:24 | 2023-05-18T01:01:24 | 63,633,816 | 0 | 0 | null | 2016-07-18T20:12:18 | 2016-07-18T20:12:17 | null | UTF-8 | Python | false | false | 653 | py | #
# Autogenerated by Thrift
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
# @generated
#
from __future__ import absolute_import
import sys
from thrift.util.Recursive import fix_spec
from thrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterfa... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
427743a45872def1a028777615f3412c9b13bb77 | bea159d40d7cedcff3f2edd17965005899d60666 | /cmd/help.py | 74f933bb02068ba176fd26ccf72a91461e969386 | [] | no_license | WaifuHarem/discord-bot | f8ebb7c793e7f1618c933b9e53939fdb8d47cd71 | 9002107776befba5b00d99eba3281b39a47f3018 | refs/heads/master | 2022-11-27T11:42:26.216412 | 2020-08-05T19:15:49 | 2020-08-05T19:15:49 | 275,703,867 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 477 | py | from cmd_core import Cmd
from cmd_proc import CmdProc
@Cmd.metadata(
perm = [
Cmd.perm.PUBLIC
],
info = 'Prints help text',
args = {
'cmd' : Cmd.arg(str, Cmd.OPTIONAL, 'Command to get help for')
}
)
async def help(msg, logger, **kargs):
cmd_name = Cmd.get(kargs, 'cmd')
if c... | [
"abraker95@gmail.com"
] | abraker95@gmail.com |
f85301e90db4db4e18ca83157c0040231567a14a | 6f7cc1e4ba9a58a8d84ff97d65a8f5a2f2e8fd19 | /src/products/migrations/0029_auto_20151216_0247.py | 3994550d3b479822c7c6713c0b8097cb4358be03 | [
"MIT"
] | permissive | LABETE/digitalmarket | f90f8220fed14f65ab9cabd16d57f00a22b94faf | fc5e81781cbd92535dfe7ecbcc5924058d475a5f | refs/heads/master | 2021-01-10T16:46:51.571972 | 2016-01-25T19:46:59 | 2016-01-25T19:46:59 | 50,375,708 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,167 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('products', '0028_productraiting_product')... | [
"eddie.valv@gmail.com"
] | eddie.valv@gmail.com |
3f659e6b4e79f2a9e308aa065deef09c5f9d8873 | d319165fca8067a172fde00f9d058ebc833a5c43 | /cv1/utils/graph_generation/bianconi.py | 3620ef85e768e2d7539f4f06dab7eb9a23d7f1cf | [] | no_license | pro0255/MADII | 208a2c1d6a8b795865bc03beb41f4031e8a71453 | 7e4ab3aa0b506e7e4cc8ce08b681ecded1dd6e9d | refs/heads/master | 2023-04-12T15:29:13.202166 | 2021-04-27T11:24:31 | 2021-04-27T11:24:31 | 340,859,489 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,152 | py | import random
def bianconi(G_0, n, m, P_t):
G = G_0
t = 0
while(t < n):
adding_vertex = len(G.keys())
counter = 1
G, i1 = first_link(G, adding_vertex)
while counter < m:
G = second_link(G, adding_vertex, P_t, i1)
counter += 1
t+=1
return ... | [
"prokop.vojtech@gmail.com"
] | prokop.vojtech@gmail.com |
8ef4373f7b87c866dcb782c0d597d200e0020fb8 | 7366ce3ba86cb6af2e9ee0923d4a74d028f08c72 | /3d/dambreak/twp_navier_stokes_p.py | 40a9fb0fa8012032b4ea02795ef9333476bac737 | [
"MIT"
] | permissive | erdc/air-water-vv | 56b939280d8d9fb81dc13b79a9de5a489e21e350 | f93ff99432703292b1d62c3e9689537eae44e864 | refs/heads/master | 2022-08-21T23:11:16.912042 | 2022-08-11T16:44:47 | 2022-08-11T16:44:47 | 21,613,939 | 5 | 21 | MIT | 2020-11-04T19:00:46 | 2014-07-08T13:36:39 | Python | UTF-8 | Python | false | false | 4,073 | py | from proteus import *
from proteus.default_p import *
from dambreak import *
from proteus.mprans import RANS2P
LevelModelType = RANS2P.LevelModel
if useOnlyVF:
LS_model = None
else:
LS_model = 2
if useRANS >= 1:
Closure_0_model = 5; Closure_1_model=6
if useOnlyVF:
Closure_0_model=2; Closure_1_m... | [
"cekees@gmail.com"
] | cekees@gmail.com |
44231f06b87758929e1f0c8ac466c426e56613b3 | 4daeb9ebf92d9826028a50bf4e4715c1ab145db1 | /Problem-Set/Basic/CMB02/setup.py | eab1c24574e3d3b0b51084bc6df3274791e02ec0 | [] | no_license | Rahul2025/Thesis | 4148653fcc96d623d602ba58e33cc6465d1cd9f5 | df31863194e2e0b69646e3a48fcaf90541a55c2a | refs/heads/master | 2020-05-02T00:48:09.593873 | 2013-04-21T20:23:02 | 2013-04-21T20:23:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 284 | py | # filename : setup.py
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
ext_modules = [Extension("qq7_tim",["qq7_tim.pyx"])]
setup(
name = 'qq7_tim app',
cmdclass = {'build_ext':build_ext},
ext_modules = ext_modules
) | [
"rahulgupta2025@gmail.com"
] | rahulgupta2025@gmail.com |
df91e4b73c7c761ad92b9cbe3cec04ab0820e5a3 | fc7998b5c544220e149585e83aecd0e7d839cbac | /file_handlers/constants.py | 14cbb1a66c7ce3e0e1b3d45e3f4ac2f8257b4237 | [] | no_license | IgorBolotnikov/karate-cat | 677de2cae874ca1e611bb3d8f8898c42eef808a7 | 54f62c36502ecd568d4545453490476e9d5ce96d | refs/heads/master | 2020-08-08T02:21:05.334408 | 2019-10-14T16:24:39 | 2019-10-14T16:24:39 | 213,675,806 | 0 | 0 | null | 2019-10-14T16:24:40 | 2019-10-08T15:03:17 | null | UTF-8 | Python | false | false | 646 | py | from os import path
BASE_DIR = path.dirname(__file__)
# ===== CSVHandlerMixin CONSTANTS =====
READ = 'r'
WRITE = 'w'
NEWLINE = ''
# ===== SaveFile CONSTANTS =====
SAVE_FILE = BASE_DIR + '/save.csv'
SAVE_HEADERS = ['number', 'name', 'char_class', 'level', 'current_exp',
'wins', 'losses', 'exp_to_lev... | [
"igorbolotnikov1993@gmail.com"
] | igorbolotnikov1993@gmail.com |
3672c6325e8a7ec68959e1a5c4e2ac2a68a4a05b | 2d993858f4cf3dad4f67a3cae8d35720f4dea2d3 | /glyphs2gx/glyphs2gx.py | c830bda220e0eb9b6b82f737af6e3803a9f328ce | [] | no_license | behdad/playground | c0889a0b0187a9e9f2eef841023cd679c89c172d | dac6d007feedb6564e5e63eaf906c458246b0e6a | refs/heads/master | 2023-09-05T05:33:42.822972 | 2018-01-21T21:27:26 | 2018-01-21T21:27:51 | 118,373,208 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,878 | py | #!/usr/bin/python
from __future__ import division
import glyphs2ufo.glyphslib
import glyphs2ufo.builder
import cu2qu.ufo
import ufo2ft
import fontmake.font_project
from fontTools.ttLib import TTFont
from fontTools.ttLib.tables._n_a_m_e import NameRecord
from fontTools.ttLib.tables._f_v_a_r import table__f_v_a_r, Axis,... | [
"behdad@behdad.org"
] | behdad@behdad.org |
d5fe1d9ee281300a6e27b2147bfe23aafa5eb944 | f4c0172e70ca5ffbe01695245e82a28291f88d04 | /v0.5.2/StudyTensroFlow/studyTF_LSTM_demo_me.py | 44b211578b3a7d8f67f36754f7f8496fed0e5405 | [] | no_license | huangxinkid/DeepLearning_Wavelet-LSTM | a84e667d5f2db477ac5a9993d8ae329ec9fd115f | b726f99a8631fc48e6943655ace222b0f6b0290b | refs/heads/master | 2020-03-24T07:11:52.832149 | 2018-05-30T18:43:38 | 2018-05-30T18:43:38 | 142,556,218 | 0 | 1 | null | 2018-07-27T09:21:18 | 2018-07-27T09:21:18 | null | UTF-8 | Python | false | false | 4,658 | py | """ Recurrent Neural Network.
A Recurrent Neural Network (LSTM) implementation example using TensorFlow library.
This example is using the MNIST database of handwritten digits (http://yann.lecun.com/exdb/mnist/)
Links:
[Long Short Term Memory](http://deeplearning.cs.cmu.edu/pdfs/Hochreiter97_lstm.pdf)
[MNIST Da... | [
"hello.sea@qq.com"
] | hello.sea@qq.com |
63d933c42c52f5dad03c2785b2cbacddca98e2da | 256f817910dd698970fab89871c6ce66a3c416e7 | /1. solvedProblems/144. Binary Tree Preorder Traversal/144.py | 50f8569065e9e235a6bb9942442d7b1f0a208ec5 | [] | no_license | tgaochn/leetcode | 5926c71c1555d2659f7db4eff9e8cb9054ea9b60 | 29f1bd681ae823ec6fe755c8f91bfe1ca80b6367 | refs/heads/master | 2023-02-25T16:12:42.724889 | 2021-02-04T21:05:34 | 2021-02-04T21:05:34 | 319,225,860 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,880 | py | # !/usr/bin/env python
# coding: utf-8
"""
Author:
Tian Gao (tgaochn@gmail.com)
CreationDate:
Thu, 09/03/2020, 19:33
# !! Description:
Given a binary tree, return the preorder traversal of its nodes' values.
Example:
Input: [1,null,2,3]
1
\
2
/
3
Output: [1,2,3]
Follow up: Recursive soluti... | [
"tgaochn@gmail.com"
] | tgaochn@gmail.com |
5349216cdfed5b4f42f237fa94627ee5f92d1f1e | 0afe73244e4d0ff7ef2b7f242475f4db2ac844ac | /225-Implement-Stack-Using-Queues.py | 3bfe9a890c44c1fb1883bd83fb9c27e20c678480 | [] | no_license | liuspencersjtu/MyLeetCode | 7261c7cfae4a175c6ca67dfe471e8c847a805a53 | b7d9238d692b1b2f5ab8f73a76d02228a71a4d15 | refs/heads/master | 2023-04-17T04:56:52.999553 | 2023-04-10T06:21:36 | 2023-04-10T06:21:36 | 129,114,505 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,008 | py | class MyStack:
def __init__(self):
"""
Initialize your data structure here.
"""
self.N = 8
self.storage = []
self.queue = []
def push(self, x: int) -> None:
"""
Push element x onto stack.
"""
if len(self.queue) == self.N:
... | [
"liusjtu@163.com"
] | liusjtu@163.com |
42e942cd2287432d6752b37a8aca4c458a069162 | 1eab574606dffb14a63195de994ee7c2355989b1 | /ixnetwork_restpy/testplatform/sessions/ixnetwork/globals/topology/rsvpteif/rsvpteif.py | 88c9ed3fbfd85e9f4cbc16696c5a34b98ce2ce67 | [
"MIT"
] | permissive | steiler/ixnetwork_restpy | 56b3f08726301e9938aaea26f6dcd20ebf53c806 | dd7ec0d311b74cefb1fe310d57b5c8a65d6d4ff9 | refs/heads/master | 2020-09-04T12:10:18.387184 | 2019-11-05T11:29:43 | 2019-11-05T11:29:43 | 219,728,796 | 0 | 0 | null | 2019-11-05T11:28:29 | 2019-11-05T11:28:26 | null | UTF-8 | Python | false | false | 2,597 | py | # MIT LICENSE
#
# Copyright 1997 - 2019 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify,... | [
"srvc_cm_packages@keysight.com"
] | srvc_cm_packages@keysight.com |
039cbe8608cd535c8a4a29803b5a2b437830c3b2 | cad8656cd25abaeb310805a603c6b777a9ce36c7 | /th_tumblr/my_tumblr.py | bdb62644a8aeca0260277bc032ea2f201911312c | [
"BSD-3-Clause"
] | permissive | vaibhavsingh97/django-th | 25dce736473a7a3244969e72e35515c147aa7617 | e50c04d2f0961d81738c9d3d9cc3b710d303223f | refs/heads/master | 2021-07-06T07:10:10.323894 | 2017-09-27T22:01:28 | 2017-09-27T22:01:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,945 | py | # coding: utf-8
from pytumblr import TumblrRestClient
# django classes
from django.conf import settings
from django.core.cache import caches
from logging import getLogger
# django_th classes
from django_th.services.services import ServicesMgr
"""
handle process with tumblr
put the following in th_settings.py... | [
"foxmaskhome@gmail.com"
] | foxmaskhome@gmail.com |
a0abb5323de5e3698ebe794809bd7fb17ecf33db | 5095200e9ca55cd3a37af34ed44448c02e2a1bb5 | /modules/image/Image_editing/super_resolution/falsr_c/test.py | 7878cff3ec169539bbfd57ca65586924cd80cb63 | [
"Apache-2.0"
] | permissive | PaddlePaddle/PaddleHub | 8712603ef486c45e83eb0bc5725b0b3ed3ddbbde | b402610a6f0b382a978e82473b541ea1fc6cf09a | refs/heads/develop | 2023-07-24T06:03:13.172978 | 2023-03-28T11:49:55 | 2023-03-28T11:49:55 | 162,672,577 | 12,914 | 2,239 | Apache-2.0 | 2023-07-06T21:38:19 | 2018-12-21T06:00:48 | Python | UTF-8 | Python | false | false | 2,228 | py | import os
import shutil
import unittest
import cv2
import numpy as np
import requests
import paddlehub as hub
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
class TestHubModule(unittest.TestCase):
@classmethod
def setUpClass(cls) -> None:
img_url = 'https://unsplash.com/photos/1sLIu1XKQrY/download?ixid=... | [
"noreply@github.com"
] | PaddlePaddle.noreply@github.com |
c4a605613e91c76b4e0754596377aee10e660d64 | 0bde5f7f09aa537ed1f4828d4e5ebee66475918f | /h2o-py/tests/testdir_javapredict/pyunit_PUBDEV_5529_leaf_node_GBM_mojo.py | ff5a10ab4f881208f357c15af321fa6571aa912f | [
"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 | 1,368 | py | from __future__ import print_function
import sys, os
sys.path.insert(1, "../../../")
import h2o
from tests import pyunit_utils
from random import randint
import tempfile
# This test will compare the leaf node assignment from model predict and mojo predict to make sure they
# agree for GBM models
def gbm_leaf_node_ass... | [
"noreply@github.com"
] | Winfredemalx54.noreply@github.com |
fcce0ac9ce077ca870306df1518eb376c131cc13 | 00a9295409b78a53ce790f7ab44931939f42c0e0 | /FPGA/apio/iCEBreaker/FIR_Filter/sympy/venv/lib/python3.8/site-packages/sympy/physics/quantum/qapply.py | 6451c185e5e353dc5a7d4302c9ca73eb0c2093af | [
"Apache-2.0"
] | permissive | klei22/Tech-OnBoarding-Class | c21f0762d2d640d5e9cb124659cded5c865b32d4 | 960e962322c37be9117e0523641f8b582a2beceb | refs/heads/master | 2022-11-10T13:17:39.128342 | 2022-10-25T08:59:48 | 2022-10-25T08:59:48 | 172,292,871 | 2 | 3 | Apache-2.0 | 2019-05-19T00:26:32 | 2019-02-24T03:50:35 | C | UTF-8 | Python | false | false | 7,070 | py | """Logic for applying operators to states.
Todo:
* Sometimes the final result needs to be expanded, we should do this by hand.
"""
from __future__ import print_function, division
from sympy import Add, Mul, Pow, sympify, S
from sympy.physics.quantum.anticommutator import AntiCommutator
from sympy.physics.quantum.co... | [
"kaunalei@gmail.com"
] | kaunalei@gmail.com |
2a82d8b1e75cb8cc0f45a4059ea1ca39356f6b3a | 6ed01f4503fc9de234a561c945adff7cf4b1c81b | /ncar_lib/archon_db/archon_collection.py | 12c9bd72f0864de0c2c86d6575a12e1b0d505f2d | [] | no_license | ostwald/python-lib | b851943c913a68424a05ce3c7b42878ff9519f68 | 9acd97ffaa2f57b3e9e632e1b75016549beb29e5 | refs/heads/master | 2021-10-28T06:33:34.156095 | 2021-10-21T23:54:49 | 2021-10-21T23:54:49 | 69,060,616 | 0 | 1 | null | 2018-06-21T16:05:30 | 2016-09-23T21:04:46 | Roff | UTF-8 | Python | false | false | 3,326 | py | """
API - getCollection (archon_db_coll_id) - returns ArchonDBCollection instance
"""
import os, sys, re
# from mysql import GenericDB, TableRow
# import MySQLdb
from archonDB import ArchonDB
from mysql import TableRow
class ArchonDBCollection ():
"""
exposes the following from archon database
- collection (a Table... | [
"ostwald@ucar.edu"
] | ostwald@ucar.edu |
017aaf3026c55564f3912bd767f8a1a6adeef5a2 | 9322c270beaf1019328bf14c836d167145d45946 | /raoteh/sampler/_sample_mc0.py | b20d507908331f99b40855d708bc90835d53697a | [] | no_license | argriffing/raoteh | 13d198665a7a3968aad8d41ddad12c08d36d57b4 | cdc9cce8fdad0a79dbd90dfcdec6feece8fc931f | refs/heads/master | 2021-01-22T19:41:25.828133 | 2014-03-10T22:25:48 | 2014-03-10T22:25:48 | 10,087,018 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,229 | py | """
Sample Markov chain trajectories on trees.
Sample states using the observation data and constraints
only through a pre-computed sparse map, for each node, from a feasible state
to a subtree likelihood.
"""
from __future__ import division, print_function, absolute_import
import numpy as np
import networkx as nx
... | [
"argriffi@ncsu.edu"
] | argriffi@ncsu.edu |
35eddafba63d712b81976f456f86c8c65fe3bc42 | 547db7801930874bf8298304b7ae453695ab3751 | /zeabus_command/src/roulette.py | 156d25ede5bdc7f7e7b65b65f3a6b8b19e13ab04 | [] | no_license | skconan/zeabus2018 | 5fc764b5039799fa7d80f7e86345822b50282d2e | 16e2fc1a21daea813833f9afb89f64142b5b8682 | refs/heads/master | 2020-03-25T12:39:38.759263 | 2018-07-27T23:53:50 | 2018-07-27T23:53:50 | 143,786,404 | 0 | 1 | null | 2018-08-06T21:41:52 | 2018-08-06T21:41:52 | null | UTF-8 | Python | false | false | 4,412 | py | #!/usr/bin/python2.7
import rospy
import math as m
import constants as cons
from aicontrol import AIControl
from zeabus_vision.msg import vision_roulette
from zeabus_vision.srv import vision_srv_roulette
from std_msgs.msg import String
class roulette(object) :
def __init__(self) :
print '<===INIT BIN===>'... | [
"supakit.kr@gmail.com"
] | supakit.kr@gmail.com |
b1ad9418990788e4ac1dbab024f74de584c180ae | ccd30f827fb3bd4231c59d05e6d61c5963019291 | /practice/LeetCode/EverydayPrac/150.py | 9fc08e4de74ee5b184260c5912aad7db0eb8dada | [] | no_license | anthony20102101/Python_practice | d6709e7768baebaa248612e0795dd3e3fa0ae6ba | 56bb1335c86feafe2d3d82efe68b207c6aa32129 | refs/heads/master | 2023-06-10T18:49:11.619624 | 2021-06-27T15:36:10 | 2021-06-27T15:36:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,380 | py | # 523. Continuous Subarray Sum
# Given an integer array nums and an integer k, return true if nums has a continuous subarray of size at least two whose elements sum up to a multiple of k, or false otherwise.
#
# An integer x is a multiple of k if there exists an integer n such that x = n * k. 0 is always a multiple of ... | [
"492193947@qq.com"
] | 492193947@qq.com |
f0df2cc5b671215861961d2add55877278d159de | 42064191a5ac586ed088b293165b51abf16b1ee4 | /Data Wrangling with MongoDB/Lesson3/PS3.py | 91a40fe4cd4f84a34b1bf8e34b7f815fcc1f1823 | [] | no_license | ObinnaObeleagu/Udacity | 637cd458824a835febacebd72ebef77b30ca7f94 | 761ba413934f66cbd9429fd9882f59f047eb065b | refs/heads/master | 2023-03-15T23:27:23.022463 | 2019-01-03T04:05:03 | 2019-01-03T04:05:03 | 497,375,575 | 1 | 0 | null | 2022-05-28T16:46:12 | 2022-05-28T16:46:12 | null | UTF-8 | Python | false | false | 2,140 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
In this problem set you work with cities infobox data, audit it, come up with a cleaning idea and then clean it up.
Since in the previous quiz you made a decision on which value to keep for the "areaLand" field,
you now know what has to be done.
Finish the function fi... | [
"ryanzjlib@gmail.com"
] | ryanzjlib@gmail.com |
85e7ff6d8a4a5d8700d898024ad21483459573bc | 7f54637e347e5773dfbfded7b46b58b50544cfe5 | /7-3/chainxy/spiders/snipits.py | d97156f5c9e1759c9c1c3827989bfd035823b300 | [] | no_license | simba999/all-scrapy | 5cc26fd92b1d03366b74d4fff58c4a0641c85609 | d48aeb3c00fa2474153fbc8d131cf58402976e1d | refs/heads/master | 2021-01-25T14:24:04.715550 | 2018-03-03T13:43:13 | 2018-03-03T13:43:13 | 123,695,640 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,985 | py | import scrapy
import json
import os
from scrapy.spiders import Spider
from scrapy.http import FormRequest
from scrapy.http import Request
from chainxy.items import ChainItem
from lxml import etree
from selenium import webdriver
from lxml import html
import usaddress
class snipits(scrapy.Spider):
name = 'snipits'
dom... | [
"oliverking8985@yahoo.com"
] | oliverking8985@yahoo.com |
482e4bd3661237b354f821f1c4da2255cf34b7db | d01f71eadb5039f8cba9550cf12832add292cc50 | /labs/lab03/student/tests/q4a.py | 4fbb938c9f943c38af8d25a437262426ac831c36 | [] | no_license | essentialols/Spring2020 | 929208b08d5ff2e62347420cc02489f2857690cd | 2369fe6939e7bf2c30cccbeb6cdd040806e998ff | refs/heads/master | 2022-09-07T09:19:51.262662 | 2020-05-29T09:45:15 | 2020-05-29T09:45:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,734 | py | test = { 'hidden': False,
'name': 'q4a',
'points': 1,
'suites': [ { 'cases': [ { 'code': '>>> import matplotlib ;\n'
'>>> '
'np.alltrue(np.array([l.get_text() '
... | [
"syoh@ucsb.edu"
] | syoh@ucsb.edu |
8aa9cf895f0bca3ee0e03003a7685af44fc89f17 | 263d6606dd72044b406b97e1a2e8cb16c4354c85 | /matrix.py | ebb111cc57474279d0ef225c7736d088813710e4 | [] | no_license | THABUULAGANATHAN/playerlevel | 6912ba792b128e36ff9ea4f15e508d3d442932ad | fe1813b25c94eb907df3fda63215b1755a8826fa | refs/heads/master | 2022-01-21T05:07:40.245217 | 2019-07-19T08:56:44 | 2019-07-19T08:56:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 717 | py | ro1=int(input())
ro2=[]
for v in range(0,ro1):
ro2.append(list(map(int,input().split())))
z=0
k=0
for v in range(0,ro1):
for j in range(0,ro1):
if ro2[v][j]==1:
if v!=ro1-1 and ro2[v+1][j]==0:
z=z+1
if j!=ro1-1 and ro2[v][j+1]==0:
z=z+1
... | [
"noreply@github.com"
] | THABUULAGANATHAN.noreply@github.com |
421011b0b2e0093abd8faf8e9f72af3f667b5198 | 2bb90b620f86d0d49f19f01593e1a4cc3c2e7ba8 | /pardus/tags/2007.2/applications/games/Ri-li/actions.py | 44afdafc2bd786859cbf9f6858265c1469318ad0 | [] | no_license | aligulle1/kuller | bda0d59ce8400aa3c7ba9c7e19589f27313492f7 | 7f98de19be27d7a517fe19a37c814748f7e18ba6 | refs/heads/master | 2021-01-20T02:22:09.451356 | 2013-07-23T17:57:58 | 2013-07-23T17:57:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 520 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2006 TUBITAK/UEKAE
# Licensed under the GNU General Public License, version 2.
# See the file http://www.gnu.org/copyleft/gpl.txt.
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get
def setup():
autot... | [
"yusuf.aydemir@istanbul.com"
] | yusuf.aydemir@istanbul.com |
dc57bbab4ee8d0fcac00864f4c34d13d0c8f4260 | a0afcdcfcd0c139be8a975e8bd31692b43806922 | /__Concluir__/lendo_json/json_.py | 96385d65e11d16b897ddb19ffd0110868bc2468b | [] | no_license | luiz158/Dica_Python_Linkedin | f3b9b95e2929edbd1d49c51ad54e6f3ba2721913 | d92130ab70742bad983989ad0d7fbb542a854f1d | refs/heads/master | 2023-08-17T10:12:31.094026 | 2021-09-19T11:16:29 | 2021-09-19T11:16:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 200 | py | import json
dados_json = '{"name": "Erickson", "age": 19, "city": "São Paulo"}'
carregar_dados = json.loads(dados_json)
print(carregar_dados['name'])
# Erickson
print(carregar_dados['age'])
# 19
| [
"ofc.erickson@gmail.com"
] | ofc.erickson@gmail.com |
6cda669b6a6658e279c87446ed23b98a68170333 | f47863b3a595cbe7ec1c02040e7214481e4f078a | /plugins/waf/blockdos.py | e6bb4d7aa13dc59305b9f57a9c5e9557c6578ebe | [] | no_license | gobiggo/0bscan | fe020b8f6f325292bda2b1fec25e3c49a431f373 | 281cf7c5c2181907e6863adde27bd3977b4a3474 | refs/heads/master | 2020-04-10T20:33:55.008835 | 2018-11-17T10:05:41 | 2018-11-17T10:05:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 388 | py | import re
from config import HTTP_HEADER
__product__ = "BlockDos DDoS protection (BlockDos)"
def detect(content, **kwargs):
headers = kwargs.get("headers", None)
detection_schema = (
re.compile(r"blockdos\.net", re.I),
)
for detection in detection_schema:
if detection.search(header... | [
"zer0i3@aliyun.com"
] | zer0i3@aliyun.com |
75200e6184bed8483c342fedcef21aba6ab696c7 | 92957173706467d31f9ad3cb4343f384312b7248 | /arkestra_image_plugin/testrunner.py | d63e009477a28766ba13a77be0df4f87609a1870 | [
"BSD-2-Clause"
] | permissive | evildmp/Arkestra | edc010f8726efe928ac453edf252705845ca98d6 | 3e7f7d8e109221180866fe482c70a94e635fd594 | refs/heads/develop | 2020-04-06T04:22:15.003712 | 2016-02-11T15:20:02 | 2016-02-11T15:20:02 | 1,449,804 | 57 | 12 | null | 2016-02-12T23:05:26 | 2011-03-07T11:49:47 | Python | UTF-8 | Python | false | false | 153 | py | from django.conf import settings
settings.configure(DEBUG=True, TEMPLATE_DEBUG=True,
TEMPLATE_DIRS=('/home/web-apps/myapp', '/home/web-apps/base'))
| [
"daniele@vurt.org"
] | daniele@vurt.org |
b9b6d67a147122f5ac8f755cafbe94b22c1e4345 | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/2D_20200722172559.py | 5059d62102aea6cdd5f5ee56dd0183f19e3c1566 | [] | no_license | MaryanneNjeri/pythonModules | 56f54bf098ae58ea069bf33f11ae94fa8eedcabc | f4e56b1e4dda2349267af634a46f6b9df6686020 | refs/heads/master | 2022-12-16T02:59:19.896129 | 2020-09-11T12:05:22 | 2020-09-11T12:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 961 | py | def array(n,m):
# where n is row size and m is column size
array = [[0 for x in range(n)] for x in range(m)]
print(array)
a = [[2, 4, 6, 8, 10], [3, 6, 9, 12, 15], [4, 8, 12, 16, 20]]
# where the first arguement reps the row and second arguement reps the column
print(a[0][3])
def hourGlass(... | [
"mary.jereh@gmail.com"
] | mary.jereh@gmail.com |
96ff4a5ce8802d24066c55849c077829a026bb6e | c831e7f6c434900d817f59a11b25e78a1a5090ad | /Calibration/CalibConfigFiles/Archive/CalibConfig_DetModel72_RecoStage72.py | 568126e57adc41e8c060c5df4ce930df853fb3dc | [] | no_license | StevenGreen1/OptimisationStudies | 8cca03f57d2cbf81e5fb609f13e2fa4b9c9880f6 | c5741e8d2fab4752ceca8b10cc5f2bbc1a7fafa9 | refs/heads/master | 2021-01-18T21:30:51.418785 | 2017-02-21T16:27:50 | 2017-02-21T16:27:50 | 44,306,370 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,262 | py | # Calibration config file for testing
# Digitisation Constants - ECal
CalibrECal = 42.4705823941
# Digitisation Constants ILDCaloDigi - HCal
CalibrHCalBarrel = 48.7023928526
CalibrHCalEndcap = 55.5809128718
CalibrHCalOther = 29.7879819428
# Digitisation Constants NewLDCCaloDigi - HCal
CalibrHCal = -1
# Digitisation... | [
"sg1sg2sg3@hotmail.co.uk"
] | sg1sg2sg3@hotmail.co.uk |
7573037e49e0216374763e873ff5b9b066a40b3f | c2d56799fcd048470769114301f4d834de6eaa5a | /blog/migrations/0002_auto_20170419_1834.py | 661d531ea47ff2f1e2a2749b7be43f82da6b69f0 | [] | no_license | talenhao/django_girls_study | 580d900a596850753dbebcd57b19be473cf05aba | 14c9680aec8619971a6899fd11fa3f6372355809 | refs/heads/master | 2021-01-19T22:24:23.429662 | 2017-04-25T04:25:46 | 2017-04-25T04:25:46 | 88,810,670 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 445 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('blog', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='post',
... | [
"talenhao@gmail.com"
] | talenhao@gmail.com |
9c486ba49768093c2ecd81be7540f65170248aa5 | f6189ae8031fcf756cd892ed866cb937bf0e5d56 | /datetime_utils/basic_utils.py | fbfa6703b86fbd2d028bc7ecbe483de0ae1bb85c | [] | no_license | shadhini/python_helpers | f9265ee139a9e32528b257ae1adee731d0d08d3f | d8a74fb22e6da741d9442325661b042c8c26202a | refs/heads/master | 2021-07-05T15:07:02.294986 | 2020-10-28T03:37:01 | 2020-10-28T03:37:01 | 198,464,862 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,257 | py | from datetime import datetime, timedelta
import math
COMMON_DATE_TIME_FORMAT = "%Y-%m-%d %H:%M:%S"
def now_as_string(string_format=None):
if string_format is None:
return datetime.now().strftime(COMMON_DATE_TIME_FORMAT)
else:
return datetime.now().strftime(string_format)
def now_as_datetime... | [
"jshadhiniaseka@gmail.com"
] | jshadhiniaseka@gmail.com |
4a0652c78a692e7cda3b603546fa6bc28af17c34 | ef821468b081ef2a0b81bf08596a2c81e1c1ef1a | /Python Advanced/Tuples_and_Sets-Exercises/Periodic Table.py | e5ee6900c871b0256e37d4a4dfc9c36a0c190b7c | [] | no_license | Ivaylo-Atanasov93/The-Learning-Process | 71db22cd79f6d961b9852f140f4285ef7820dd80 | 354844e2c686335345f6a54b3af86b78541ed3f3 | refs/heads/master | 2023-03-30T20:59:34.304207 | 2021-03-29T15:23:05 | 2021-03-29T15:23:05 | 294,181,544 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 209 | py | number = int(input())
unique_elements = set()
for i in range(number):
elements = input().split()
[unique_elements.add(element) for element in elements]
[print(element) for element in unique_elements]
| [
"ivailo.atanasov93@gmail.com"
] | ivailo.atanasov93@gmail.com |
d58ea80b3ae30f51247d56d865f826bcdbc7c2b0 | 12dd41cf81462d7e49de43202e5d3ee5a389ac69 | /app/lib/package_control/deps/oscrypto/version.py | c6494d5296b17f346a56b71abc297fd8b73368cf | [
"MIT"
] | permissive | rchl/packagecontrol.io | 02d39c70b63682697767287be6d4d2c5b851ace2 | d6acf2e0122def669aa2d38b5747a7c218516694 | refs/heads/master | 2021-03-15T08:31:18.443232 | 2020-01-22T14:38:59 | 2020-01-22T14:38:59 | 246,837,467 | 0 | 0 | NOASSERTION | 2020-03-12T13:10:40 | 2020-03-12T13:10:39 | null | UTF-8 | Python | false | false | 165 | py | # coding: utf-8
from __future__ import unicode_literals, division, absolute_import, print_function
__version__ = '1.2.0.dev1'
__version_info__ = (1, 2, 0, 'dev1')
| [
"will@wbond.net"
] | will@wbond.net |
26e98a8ba473fc7b12f71ed3389bf3bf1d05e2c9 | c4869d75f28507f6b37b04ca4f8d556f1900d5de | /yunda/yunda_spider/query_goods/yunda_conf.py | 1c82eece2cbd0b764b6d40c8dd9e6f42087f666f | [] | no_license | incinya/sklearn_img | 747a24c07e253f83c09039755d5fa00a2ae7ac9f | c8b85f82a2fc270904494afc9886161b39024976 | refs/heads/master | 2022-12-24T03:01:36.129859 | 2020-08-05T08:22:57 | 2020-08-05T08:22:57 | 263,810,284 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 446 | py | url = "http://ykjcx.yundasys.com/go.php"
url2 = "http://ykjcx.yundasys.com/go_wsd.php"
url3 = "http://ykjcx.yundasys.com/zb1qBpg2.php"
headers = {
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Safari/537.36",
"Cookie": "PHPSESSID=0loq... | [
"283438692@qq.com"
] | 283438692@qq.com |
d1a03b2a8a6ad4af3b7e287061ce0af9e2c9b846 | bde6ed092b7b29703737e11c5a5ff90934af3d74 | /AtCoder/ABC/119/c.py | ab6ab58c8b33c11706d228a8564b2fc9050bf892 | [] | no_license | takecian/ProgrammingStudyLog | 2ab7ea601e0996b3fa502b81ec141bc3772442b6 | 94485d131c0cc9842f1f4799da2d861dbf09b12a | refs/heads/master | 2023-04-28T16:56:18.943574 | 2023-04-18T06:34:58 | 2023-04-18T06:34:58 | 128,525,713 | 4 | 0 | null | 2022-12-09T06:15:19 | 2018-04-07T12:21:29 | Python | UTF-8 | Python | false | false | 1,547 | py | # https://atcoder.jp/contests/abc119/tasks/abc119_c
import copy
import itertools
# 長さ t の竹を L から少ないコストで作る方法を探す
def solve(t, l, c):
min_cost = 100000
cand = []
# 全組み合わせを考えて一番コストの低いものを使う
ptn = 1 << len(l) # Bit 全探索
for i in range(1, ptn):
answers = []
for j in range(0, len(l)):
... | [
"takecian@gmail.com"
] | takecian@gmail.com |
8f274a48f43e048c77afdc94cf23e0d85d5ea79d | 2a8068c87a082e0c12583aceeba7ec4e56968c88 | /src/synbio/ligate_singlefasta_with_vector_gui.py | 3ebea6754723b87b37d3a0340537d2d9f7ef08c1 | [
"MIT"
] | permissive | olgatsiouri1996/bioinfo_gui_scripts | 02feeefc2d94a006a15d3ae569ddaabb3ae23414 | 01056fd4188f459b293eb7bd19aea30c58ec0487 | refs/heads/master | 2023-08-18T09:41:46.371644 | 2023-08-14T12:24:18 | 2023-08-14T12:24:18 | 297,280,118 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,675 | py | # python3
import os
from gooey import *
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
from Bio import SeqFeature
# imput parameters
@Gooey(required_cols=2, program_name='ligate single-fasta files with vector', header_bg_color= '#DCDCDC', terminal_font_color= '#DCDCDC', terminal_panel... | [
"olgatsiouri@outlook.com"
] | olgatsiouri@outlook.com |
4ba4f8795a7eb913615680ccd1eb99603d09a8f7 | 8f4d7da050401865af3cd3341adb323062ae6447 | /count_smaller.py | 6dde4180293087884aced94ef57774c67470a776 | [] | no_license | ankitomss/python_practice | e68c2446f173018c093187b9e5ba31f21f994eac | f46ab3bcafbca4d0209df3aa9114dad52bda76b2 | refs/heads/master | 2021-01-11T05:15:15.369203 | 2016-10-13T03:00:58 | 2016-10-13T03:00:58 | 69,192,590 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 733 | py | def findindex(sort, x):
s, e = 0, len(sort)-1
if x < sort[s]: return s
if x > sort[e]: return e+1
while s<=e:
m = (s+e)/2
if s==e:
return s if x <= sort[s] else s+1
elif sort[m] == x:
while sort[m] == x:
m -= 1
return m+1
... | [
"v.ankit001@gmail.com"
] | v.ankit001@gmail.com |
126f82ce2f0b2053d004967d70746126610dc429 | 622a93a85402cd6d4e0c477dfd5c9370e9d918b9 | /torch_geometric/nn/conv/nn_conv.py | a9745fcf22ff93854280127711ccb58f65a9137c | [
"MIT"
] | permissive | YuGuangWang/pytorch_geometric | 1bfe88366ee661bc91d2909400e568e157796bfb | 44ce5378e71b8fa4adefb6baa1f597a30b48ba5f | refs/heads/master | 2021-11-21T12:31:53.659731 | 2021-08-24T11:21:48 | 2021-08-24T11:21:48 | 202,147,128 | 0 | 0 | MIT | 2020-01-16T07:29:44 | 2019-08-13T13:09:08 | Python | UTF-8 | Python | false | false | 4,329 | py | from typing import Union, Tuple, Callable
from torch_geometric.typing import OptTensor, OptPairTensor, Adj, Size
import torch
from torch import Tensor
from torch.nn import Parameter
from torch_geometric.nn.conv import MessagePassing
from ..inits import reset, uniform, zeros
class NNConv(MessagePassing):
r"""The... | [
"matthias.fey@tu-dortmund.de"
] | matthias.fey@tu-dortmund.de |
dba3da1a114dfe1aa55bffeefb45f64e348b7f33 | 1834d070640596ad1b96fbfeb92168be078753ee | /web_flask/9-states.py | 723fc16fbf6287fff9052df6b2fa750b40ab2e2d | [] | no_license | EtienneBrJ/AirBnB_clone_v2 | c8cc34064b19ccea950c343ecff96424946cf942 | b4b9c3339a7b7e2e24f2a7e0d35cc65407a30ee6 | refs/heads/master | 2023-08-15T01:06:10.489905 | 2021-09-21T18:21:13 | 2021-09-21T18:21:13 | 393,375,203 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,115 | py | #!/usr/bin/python3
"""Starts a Flask web application.
The application listens on 0.0.0.0, port 5000.
Routes:
/states: HTML page with a list of all State objects.
/states/<id>: HTML page displaying the given state with <id>.
"""
from models import storage
from models.state import State
from flask import Flask
fr... | [
"etiennebrxv@gmail.com"
] | etiennebrxv@gmail.com |
f75c9d8254829452892249b7c92e561212cfe494 | 077a17b286bdd6c427c325f196eb6e16b30c257e | /00_BofVar-unit-tests/05_64/remenissions-work/exploit-BofFunc-6.py | fcbd195258ee74db0902705c26c4042d6c3f5b85 | [] | no_license | KurSh/remenissions_test | 626daf6e923459b44b82521aa4cb944aad0dbced | 9dec8085b62a446f7562adfeccf70f8bfcdbb738 | refs/heads/master | 2023-07-08T20:25:04.823318 | 2020-10-05T06:45:16 | 2020-10-05T06:45:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 918 | py | from pwn import *
import time
import sys
import signal
import sf
target = process("./chall-test_BofVar-05-x64")
gdb.attach(target, execute="verify_exploit")
bof_payload = sf.BufferOverflow(arch=64)
bof_payload.set_input_start(0x58)
bof_payload.add_int32(0x20, 0xdeab)
bof_payload.add_int32(0x1c, 0xbef1)
bof_payload.a... | [
"ryancmeinke@gmail.com"
] | ryancmeinke@gmail.com |
4fc21a018f8acd4f1139eef64dbbd8155544d2d6 | 5db4e48731162a8a3fc5a6996ace94fb0e692e67 | /packages/registry/setup.py | 6c826670e69f58b49b2ec932f22d4bb4faa5afa1 | [
"Apache-2.0"
] | permissive | 0mars/monoskel | 89026f50179d47b455f3ed2062d8d5eeb53c7c7c | 1755f3c047d56b5cfe8e9b36b77c1e155bbd5a51 | refs/heads/master | 2022-12-13T18:59:56.232663 | 2020-12-26T09:22:47 | 2020-12-26T09:22:47 | 202,740,303 | 2 | 1 | Apache-2.0 | 2022-12-08T07:45:54 | 2019-08-16T14:18:07 | Python | UTF-8 | Python | false | false | 1,385 | py | from os.path import abspath, dirname, join as pjoin
from setuptools import setup, find_packages
root = dirname(abspath(__file__))
def execfile(fname, globs, locs=None):
locs = locs or globs
exec(compile(open(fname).read(), fname, "exec"), globs, locs)
source_path = 'src'
packages = find_packages(source_pat... | [
"omars@php.net"
] | omars@php.net |
be1d8368cd3341d801cb37602eb29889e335ae8d | f642c054451aa3c87bb18fa63037eea0e6358bda | /geektrust/loan_payments/customer_manager/models.py | dd3d0fcba64b05726d057e2eaccfe8378e3e3068 | [] | no_license | devendraprasad1984/python | 30f3a539e92be13d893246ad28a42907457a38d5 | 0f1badabba07fbe7f5f792b7e543c0748eecd6c7 | refs/heads/master | 2023-07-21T08:22:45.193077 | 2021-08-27T15:09:28 | 2021-08-27T15:09:28 | 254,812,552 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 479 | py | from django.db import models
# Create your models here.
class CUSTOMERS(models.Model):
id = models.AutoField(auto_created=True, primary_key=True)
name = models.CharField(max_length=200, null=True)
uid = models.CharField(max_length=30, null=True, unique=True)
age = models.IntegerField()
email = mode... | [
"devendraprasad1984@gmail.com"
] | devendraprasad1984@gmail.com |
3bc92ac198515b5ea4965ab5ada7b4cb625936bf | fc13edeb7ffb6ed9bf8e953fa08f97e5d2346316 | /src/manage.py | 8b7a2e00c6553673e8032e4f2d79e06488161725 | [
"BSD-3-Clause"
] | permissive | tykling/sslscout | 8105e61fe37337986ad9e4ba13180435d8a57d25 | c07395faf8b85c535b41d355934161e0b43e4c04 | refs/heads/master | 2021-01-16T20:31:33.028501 | 2014-06-26T05:50:37 | 2014-06-26T05:50:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 253 | py | #!/usr/local/bin/python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sslscout.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| [
"thomas@gibfest.dk"
] | thomas@gibfest.dk |
c1df8a31f6ab9b5ed0f4f1b3670141d3a8a33983 | 8583b2be92327b21af50237c7c71607f0bdb7be8 | /section07/lecture083/lesson.py | 069bf3d264888ab697fd8cc5557e6cb7fe588c24 | [] | no_license | DIT-Python/Python3_Basic_to_Advance_SV | 654061aa3e151146e78a0e8ac26366dcf62758be | fb6bc230a42cbaf08337cb2f11a2bbeaee6bc2e3 | refs/heads/master | 2022-01-10T16:59:01.725413 | 2019-05-05T10:51:55 | 2019-05-05T10:51:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 888 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class Car(object):
def __init__(self, model=None):
self.model = model
def run(self):
print('run')
class ToyotaCar(Car):
def run(self):
print('first run')
class TeslaCar(Car):
def __init__(self, model='Model s', enable_auto_run=F... | [
"takuya.stdmailbox#gmail.com"
] | takuya.stdmailbox#gmail.com |
915ec1588a27b8009f790f24aa7ea2cc31e70c29 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02760/s311421606.py | a93b2cc600572cd086910cf1b5f673e2ae71626b | [] | 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 | 708 | py | a = [list(map(int, input().split())) for i in range(3)]
n =int(input())
for k in range(n):
b = int(input())
for i in range(3):
for j in range(3):
if a[i][j] == b:
a[i][j] = 0
row0 = a[0] == [0, 0, 0]
row1 = a[1] == [0, 0, 0]
row2 = a[2] == [0, 0, 0]
colum0 = ... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
f4c3838c07ae1aaefeab17865de863e3ebcd810e | b13c57843cb8886c6f5d630ca099ad9130b26f25 | /python/5일차/selenium04/model_company.py | 36df3d2849c1ab88b65e7e3bf0d5329748b8c358 | [] | no_license | schw240/07.27-12.1_CLOUD | 6b563318f7208b843a13634a1cf46206197d6dfc | 8b4dc2d31e5d2ba96bde143116aba3ba0dad7a49 | refs/heads/master | 2023-03-25T15:44:03.555567 | 2021-03-30T02:09:32 | 2021-03-30T02:09:32 | 282,791,349 | 4 | 0 | null | 2021-03-19T15:00:00 | 2020-07-27T04:10:56 | Jupyter Notebook | UTF-8 | Python | false | false | 411 | py | class Company:
def __init__(self, _symbol, _name, _last_sale, _market_cap, _ipo_year, _sector, _industry, _summary_quote):
self.symbol = _symbol
self.name = _name
self.last_sale = _last_sale
self.market_cap = _market_cap
self.ipo_year = _ipo_year
self.sector = _sector... | [
"user@email.mail"
] | user@email.mail |
869e40e7fc3dd44ef9bd59de24782b32a660ee84 | e79e8eeb1f7063ccc2b48354ed890d63b0aad632 | /fload/stream/pipeline/filter.py | b330d61a5825192b65e7c8dad01923dc96360bfe | [
"Apache-2.0"
] | permissive | kevenli/fload | c7741c2c5729e720a1a24da2cedbb88c8b38c50a | 56cdbe7732bc6bddad17cd767bdb3e5607ee60c8 | refs/heads/main | 2023-06-18T19:22:55.721927 | 2021-07-19T13:38:44 | 2021-07-19T13:38:44 | 378,568,183 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,303 | py | from argparse import ArgumentParser
import re
from fload import Pipeline
class FilterPipeline(Pipeline):
field = None
regex = None
value = None
expression = None
def add_arguments(self, parser:ArgumentParser):
parser.add_argument('--field', required=True)
group = pars... | [
"pbleester@gmail.com"
] | pbleester@gmail.com |
024b564567774e5abf26b0a0070d43f4bc16f008 | 7d90d2ce27c6ee0af74391b09909edbd45fdc2f0 | /modules/VHF_radio/TEST2.py | 341f621d2c9d008f3bfab1a7ec1162f9f94641e6 | [] | no_license | gaoxingyu-hub/54testframework-master-e284 | d7ea0d4a715b65c8652430e963a86b9522a7237a | 57dd2197e7d91b8ad8fb2bd0e3503f10afa08544 | refs/heads/master | 2023-04-30T05:50:41.542402 | 2021-05-28T09:19:37 | 2021-05-28T09:19:37 | 309,922,838 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,377 | py | from PyQt5.QtCore import pyqtSlot, QPoint, Qt
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QDialog, QGraphicsItem
from PyQt5.QtCore import pyqtSignal
from PyQt5 import QtGui, QtWidgets, QtCore
import os
from constant_trans import TransConstants
from modules.VHF_radio.Ui_TEST2 import Ui_Dialog
from PyQt5... | [
"gaoxingyu@example.com"
] | gaoxingyu@example.com |
27c1879ef95a03504331c3ea5097c25188272733 | cb58043d5470c3d54807f09a51a7592a5760b0d1 | /LinkedList/05-sum-lists-my.py | 776b4fded8a2cf8ed4e1393062fd2ef0db276dff | [] | no_license | Early-woods/Python_Coding_Practice | 11a5f8fb777ed7945cb76642eab21aa014af8463 | 5dd9ff2e131130f164605e88f5962c2b41e7513f | refs/heads/master | 2021-05-24T09:28:13.282045 | 2020-04-05T06:35:56 | 2020-04-05T06:35:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,030 | py | """
# Sum two numbers that are represented with linked lists with decimal digits
# in reverse order of magnitude.
num1 = Node(1,Node(2,Node(3)))
num2 = Node(4,Node(9,Node(5)))
self.assertEqual(str(sum_lists(num1, num2)), "5,1,9")
"""
class Node:
def __init__(self, val, next=None):
... | [
"nidhi.bhushan123@gmail.com"
] | nidhi.bhushan123@gmail.com |
972c57aa4aab0906af4b69747461b1d1f4e9cb1d | 9c9b4759bb952c2b42b1fd0ed2a469eb8ad191bd | /neuro_pypes/utils/files.py | 2acca4f41a8cbb2f33d86181fcb126def8cc7ce1 | [
"Apache-2.0"
] | permissive | zuxfoucault/pypes | 1dfaa73ae722e001fc58639d32f6b2e435cd4504 | e88d27ebba842e8fa1f36b52ca12a0b9d5777e89 | refs/heads/master | 2020-06-20T13:04:11.541657 | 2018-10-23T09:27:53 | 2018-10-23T09:27:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,753 | py | # -*- coding: utf-8 -*-
"""
Helper functions to manage external files.
"""
import re
import os
from glob import glob
from functools import wraps
def get_vox_dims(volume):
import nibabel as nb
if isinstance(volume, list):
volume = volume[0]
nii = nb.load(volume)
hdr = nii.header
voxdims = h... | [
"alexsavio@gmail.com"
] | alexsavio@gmail.com |
091ea0c55edb020988dfe03cb4fc99470836eeba | d52ea2ddba48e3c9e69f16e2e671002cb8a55c9d | /example/generic/get_system_status.py | 7f315dbc0fb55f74fc3abc1dcb9b374e5dd9a388 | [
"Apache-2.0"
] | permissive | GreatWei/huobi_Python | 3bf8583d5ef042099d9f2a2a2cedfaba1b5f03bb | 7ed1cccedd2aadc61716292300bd5ba3d1d45f9f | refs/heads/master | 2023-05-01T00:39:10.497133 | 2021-05-07T16:20:32 | 2021-05-07T16:20:32 | 312,221,461 | 0 | 0 | Apache-2.0 | 2021-03-07T16:30:43 | 2020-11-12T09:03:01 | Python | UTF-8 | Python | false | false | 219 | py | from huobi.client.generic import GenericClient
"""
GET https://status.huobigroup.com/api/v2/summary.json
"""
generic_client = GenericClient()
system_status = generic_client.get_system_status()
print(system_status)
| [
"devin0thinking@gmail.com"
] | devin0thinking@gmail.com |
8c39453a9b9e2ca5f055a0f3eb096d876a41a678 | 2da798f1b31c6482d8f47bce394d78ccfae9d279 | /raw_data_processing/GSE149069/SRS6514323/rules/secondary_analysis.smk | aa67208cf2937ffcf7478fd4828e3af2350c3375 | [] | no_license | mariafiruleva/sc_athero_itmo_master | 47378083201e0dbad327b98291bbf4e65d5d3cc5 | e3c8c1b55d61b551957da13d109c8dfb56aa3173 | refs/heads/main | 2023-05-20T11:49:23.202549 | 2021-06-07T16:26:15 | 2021-06-07T16:26:15 | 373,524,898 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 414 | smk | rule run_analysis:
"""
Run Seurat processing using count matrix from the get_count_matrix rule.
"""
input: rules.get_count_matrix.output.count_mat
benchmark: "benchmarks/analysis.txt"
log: "logs/seurat.log"
output: h5ad=temp(f"{sample_id}.h5ad"), rda=f"{sample_id}.RData"
conda: "/mnt/tan... | [
"mmfiruleva@gmail.com"
] | mmfiruleva@gmail.com |
3e51589882d154b4609ce603544d030222ba4c73 | 40bf8016b86d3869dbc694f12f99a8b4103ae41a | /eval_GCR_ri.py | 085e9e8e9656a2c433ca1f3345e9a8e616711470 | [] | no_license | lwj2018/islr-few-shot | 3bc8e71fca3bfa07ec57c01cac095587494a010b | 4ff900662ba16b402f6ccda032d022f527873c1a | refs/heads/master | 2021-05-26T09:03:05.235782 | 2020-06-10T06:59:17 | 2020-06-10T06:59:17 | 254,068,609 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,132 | py | import os.path as osp
import time
import numpy as np
import torch
import torch.nn.functional as F
from torch.utils.data import DataLoader
from models.GCR_ri import GCR_ri
from models.gcrHCN_origin import gcrHCN
from models.Hallucinator import Hallucinator
from utils.ioUtils import *
from utils.critUtils import loss_fo... | [
"lwj19970331@gmail.com"
] | lwj19970331@gmail.com |
b8af9e711e28d5820cf856417659f62244951f7c | b739fefa06d46a60fe053f7fe0fe2c62a52242b2 | /constants/object_types.py | 115042d2d8836f8dcc2515a5fac8eb3ecab694b1 | [] | no_license | icorso/gkr-web-tests | c59d3b0f7e371e887c6699cd09b6a87a71dd762e | fdf25ad700d75230f1af74b646a6a8a18f3d0b18 | refs/heads/master | 2021-01-13T05:15:37.913759 | 2017-02-08T07:44:04 | 2017-02-08T07:44:04 | 81,296,963 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 684 | py | # coding=utf-8
from enum import Enum
class ObjectTypes(Enum):
STROI_OBJECT = ('Объект капитального строительства', 1)
ZEM_UCHASTOK = ('Земельный участок', 2)
DOMOVLADENIE = ('Домовладение', 3)
ZEMLI_SH_NAZNACHENIYA = ('Земли сельхоз назначения', 4)
def __init__(self, name, id_):
self.name... | [
"icorso@yandex.ru"
] | icorso@yandex.ru |
ed931e86f479edeb22c132706c3247b57f07bbe1 | bd08d0532f20b7285b437c9bf620de1bbcd5b9ea | /aalh_iit_industry_001/debug-find-duplicates.py | 50978835bcfc71ce41df7112a37c6f6c58eed258 | [
"Unlicense"
] | permissive | johndewees/iitmigration | a9e8a31ba6ceb541ce12c22fd612596cc243dbca | 4dadfbecda719d6e7d60af076a231aedec3c862f | refs/heads/main | 2023-03-14T17:06:58.777683 | 2021-03-27T20:44:58 | 2021-03-27T20:44:58 | 320,086,321 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,494 | py | from openpyxl import load_workbook
filename = 'aalh_iit_industry_001.xlsx'
wb = load_workbook(filename)
ws = wb['Metadata Template']
minimumcol = 43
maximumcol = 43
minimumrow = 7
maximumrow = 474
iterationrow = 7
identifiercol = 25
filenamecol = 43
countfilename = dict()
countidentifier = dict()
... | [
"noreply@github.com"
] | johndewees.noreply@github.com |
d5e10c4fcdfc66ab5ce65924e15fb38eeb866c66 | 3597ecf8a014dbd6f7d998ab59919a94aff8011d | /api-web/src/www/application/modules/treatment_block_pub_version/components.py | 750b0345de3b8f412e65119f3a59b7b45bfa4d32 | [] | no_license | duytran92-cse/nas-genomebrowser | f42b8ccbb7c5245bde4e52a0feed393f4b5f6bf1 | d0240ad5edc9cfa8e7f89db52090d7d733d2bb8a | refs/heads/master | 2022-10-24T05:26:01.760241 | 2020-06-14T19:01:35 | 2020-06-14T19:01:35 | 272,264,694 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 663 | py | from application.models import *
class TreatmentBlockPublicationVersionHelper(object):
def load_publications(self, id):
publications = []
rows = TreatmentBlockPublication.objects.filter(treatment_block_version_id=id)
if rows:
for r in rows:
publications.append({
... | [
"thanh.tran@etudiant.univ-lr.fr"
] | thanh.tran@etudiant.univ-lr.fr |
e73d3fd602f0549bdec2e9c66788186f234c4bf6 | 8682d6d60aa2f4c7a17300c2d935c45e972d00e2 | /media.py | ef29b6cb5b8a6e7dc52c5d1a09d99de6e03b1bcb | [] | no_license | coursepractice/movie-trailer-website | cf941f266ec154df5363e15b4916ee8efed6374f | 22ced122e3fddcb8f680727676519a0a648326d6 | refs/heads/master | 2021-01-10T13:14:15.478889 | 2015-06-04T22:31:23 | 2015-06-04T22:31:23 | 36,898,797 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 333 | py | class Movie():
#constructor, assigns values to each instance variable
def __init__(self, movie_title, movie_storyline, poster_image, trailer_youtube):
self.title = movie_title
self.storyline = movie_storyline
self.poster_image_url = poster_image
self.trailer_youtube_url = trai... | [
"root@ip-10-47-174-141.ec2.internal"
] | root@ip-10-47-174-141.ec2.internal |
a9bfe1e818e4c241e4e168f26f9386e2173e1dfe | 38466811d0e12a8f755bae58d7244622ef5f4d9b | /problems_analysis/min_depth_bin_tree.py | 4570a069796dcb336a243373d87b121fb64c1f80 | [] | no_license | andysitu/algo-problems | 4ab5a2b6591f0c0d84174b69598f30bc354ff8aa | 35c88dc747e7afa4fdd51d538bc80c4712eb1172 | refs/heads/master | 2023-06-24T15:55:39.019652 | 2021-02-26T20:31:07 | 2021-02-26T20:31:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 742 | py | """
Similar to the max depth bin tree except you are taking
the minimum instead of the max. If you find the depth of
the left child, then you can start the calculation of the
right child if it exceeds that min depth or vice versa.
This would require the recursive approach.
Runtime O(n) ; Space O(n)/O(1) depending on ... | [
"and.situ@gmail.com"
] | and.situ@gmail.com |
d8044123f06fe27910f39c49e03d3f92e4d67acb | 90bf2ffa7ee75ff266238bffd1b3edc6f83a2bbe | /WebApp_DataSupport/TSA_person_database/step1_createdb.py | de66e7b554beeff8bacd9e2701981525a69c284d | [] | no_license | MacHu-GWU/EFA-finished-projects | f7cf5e0f765aba78db2c1dd8729accff443aa6ee | 88c93b0e1c5880b710c11ef93254a732573c92ee | refs/heads/master | 2021-03-13T00:11:15.580259 | 2014-10-06T15:20:15 | 2014-10-06T15:20:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,002 | py | ##coding=utf8
import faker
import sqlite3
from _tool_schema import get_schema
conn = sqlite3.connect(r'C:\Users\Sanhe.Hu\Data_warehouse\TSA\TSA_person.db')
c = conn.cursor()
''' CREATE TABLE '''
try:
cmd = \
"""
CREATE TABLE person
(id INTEGER PRIMARY KEY NOT NULL,
lastname TEXT,
first... | [
"husanhe@gmail.com"
] | husanhe@gmail.com |
25650425821f60b09b90d551b0bb2a43248b7953 | b1ea051f9192e5fef2ca724a72c287214fcacf15 | /payment/migrations/0002_auto_20190223_1212.py | 6d8110a08b1642ec49868bca3ab5336b96755ccd | [] | no_license | pacifi/rest-bank | 8fbab44eff770db25beb5a9093ac95e608ec3131 | 90c5eebcf901a3ada09f094e49e50e23a0363422 | refs/heads/master | 2020-04-20T00:11:23.555974 | 2019-02-26T04:10:33 | 2019-02-26T04:10:33 | 168,516,260 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 453 | py | # Generated by Django 2.1.7 on 2019-02-23 17:12
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
dependencies = [
('payment', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='payment',
name='id',
... | [
"pacifi.bnr@gmail.com"
] | pacifi.bnr@gmail.com |
93d29e65d3fbdd674ff739f14fe376821b95c1c0 | b78ef082335b0a901b3f028746055fc6308990a2 | /Algorithms/Leetcode/430 - Flatten a Multilevel Doubly Linked List.py | 8982138ae41e53b53bbc68d2e999a350da4c9afc | [] | no_license | timpark0807/self-taught-swe | 1a968eab63f73cea30ef2379ffab53980743ed1a | bbfee57ae89d23cd4f4132fbb62d8931ea654a0e | refs/heads/master | 2021-08-14T23:31:14.409480 | 2021-08-10T06:36:06 | 2021-08-10T06:36:06 | 192,797,733 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 875 | py | """
# Definition for a Node.
class Node(object):
def __init__(self, val, prev, next, child):
self.val = val
self.prev = prev
self.next = next
self.child = child
"""
class Solution(object):
def flatten(self, head):
"""
:type head: Node
:rtype: Node
... | [
"timpark0807@gmail.com"
] | timpark0807@gmail.com |
3ed274764dddc44f7d777343c021925a74e26725 | fdcc67ab28dccb89b69dc647eb996bd7acfcd791 | /themusic/wsgi.py | a82c793dbe6afd976dd791570e69391e231168b0 | [] | no_license | moses-mugoya/Personal-Music-Upload-System | daaffada181067a99fe7d484f132f72c0bcace25 | b3a03e714c792968d9e83b2c9a57cc13de00aeca | refs/heads/master | 2021-07-15T06:00:49.679448 | 2017-10-20T20:39:14 | 2017-10-20T20:39:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 410 | py | """
WSGI config for themusic project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefaul... | [
"mosesmugoya31@gmail.com"
] | mosesmugoya31@gmail.com |
205539d4394c8835228d7e3e7d8bdb50cfde214c | b76615ff745c6d66803506251c3d4109faf50802 | /pyobjc-framework-Cocoa/PyObjCTest/test_nsxmlparser.py | b4e8b4cc6cbd578b852147807948fc93a25ac26a | [
"MIT"
] | permissive | danchr/pyobjc-git | 6ef17e472f54251e283a0801ce29e9eff9c20ac0 | 62b787fddeb381184043c7ff136f1c480755ab69 | refs/heads/master | 2021-01-04T12:24:31.581750 | 2020-02-02T20:43:02 | 2020-02-02T20:43:02 | 240,537,392 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,270 | py | from Foundation import *
from PyObjCTools.TestSupport import *
class TestNSXMLParser(TestCase):
def testConstants(self):
self.assertEqual(NSXMLParserInternalError, 1)
self.assertEqual(NSXMLParserOutOfMemoryError, 2)
self.assertEqual(NSXMLParserDocumentStartError, 3)
self.assertEqua... | [
"ronaldoussoren@mac.com"
] | ronaldoussoren@mac.com |
493732ef5e682d77728de4f09cfa5661fafc89c7 | ded5e3001325a4d27569c2f41079a68762a82506 | /photutils/isophote/tests/test_geometry.py | 429a7ec42fd613a4cad8afbb2770360e7317e26a | [
"BSD-3-Clause"
] | permissive | chaorun/photutils | fd326aa3b799aeaa07cc97a9274343f64bc21ef9 | 412e0d9907eecd88402913f0787e27065644e473 | refs/heads/master | 2022-10-06T22:16:39.834650 | 2022-09-19T18:03:54 | 2022-09-19T18:03:54 | 71,716,518 | 0 | 0 | null | 2016-10-23T16:55:33 | 2016-10-23T16:55:33 | null | UTF-8 | Python | false | false | 4,934 | py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests for the geometry module.
"""
import numpy as np
from numpy.testing import assert_allclose
import pytest
from ..geometry import EllipseGeometry
@pytest.mark.parametrize('astep, linear_growth', [(0.2, False), (20., True)])
def test_geometry(ast... | [
"larry.bradley@gmail.com"
] | larry.bradley@gmail.com |
70ac98d9dfba4a7289fd21971f5fce26d9042a0d | 99c77a1816f2c3856f7ecb0b30ebd918ec72bb02 | /drafts/examples.py | 1ee9307ecbe8c56138872749ba7e726f9a99adde | [
"BSD-3-Clause"
] | permissive | aykut/funcy | 6b7bf80ed5d54b2d3b7d7cece239f2aeb75965f2 | 45aa6ad10ab3ea8f92f33cfc99615a7d1328ff61 | refs/heads/master | 2021-01-21T20:22:46.628680 | 2013-11-24T06:10:05 | 2013-11-24T06:10:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,471 | py | has_comment = re_tester(r'#')
value.value = walk_values(prepare, value.value)
json_field = partial(field, json=True)
re = lambda pattern: lambda value: re_test(pattern, value)
re = curry(re_test)
def translate_dict(d):
lines = ('%s: %s' % (k, v) for k, v in walk_values(translate, d).items())
return '{%s}' %... | [
"suor.web@gmail.com"
] | suor.web@gmail.com |
6a673f2479c8785346a9bc8dabf6c261ba4e522d | 27f4beaaf19b3d599d9cf18e8793b92a9bd52441 | /examples/plot_arrival_angles_static.py | 48c02e743ccc72f660c56e8a6b63c8ec5c6bca0e | [
"MIT"
] | permissive | annierak/odor_tracking_sim | da70b2bd01c3d2199e98bb05441b2a918aca1025 | 4600a7be942666c3a5a0f366dab6d14838f332a0 | refs/heads/master | 2021-04-27T22:07:33.015377 | 2019-07-04T00:36:56 | 2019-07-04T00:36:56 | 122,412,726 | 0 | 0 | MIT | 2018-02-22T00:48:39 | 2018-02-22T00:48:39 | null | UTF-8 | Python | false | false | 1,406 | py | import scipy
import math
import matplotlib.pyplot as plt
import cPickle as pickle
import sys
import odor_tracking_sim.utility as utility
f = sys.argv[1]
input_file = f+'.pkl'
with open(input_file,'r') as f:
(swarm,wind_field) = pickle.load(f)
trap_num_list = swarm.list_all_traps()
plt.figure(2)
ax1 = plt.subplo... | [
"annie1rak@gmail.com"
] | annie1rak@gmail.com |
016ceae1fb089ac2590ce2b0ef4ad91a953cd33f | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/foodDistribution_20200703204251.py | 500e39347904ba1f81a3ee35340998020d787544 | [] | no_license | MaryanneNjeri/pythonModules | 56f54bf098ae58ea069bf33f11ae94fa8eedcabc | f4e56b1e4dda2349267af634a46f6b9df6686020 | refs/heads/master | 2022-12-16T02:59:19.896129 | 2020-09-11T12:05:22 | 2020-09-11T12:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,668 | py | def food(arr):
# removes the item at index 0
sandwiches = arr.pop(0)
# this loop runs only when sandwiches are greater than 0,otherwise we exit the while loop
while sandwiches > 0:
highest = -1
maxred = -1
# looping throught the hunger levels
for i in range(len(arr)):
... | [
"mary.jereh@gmail.com"
] | mary.jereh@gmail.com |
76b974be2a0f5441e010a43be073cb061a27fe05 | 24bd4ade62c73f92d7f8fa5f5f8d4b49efc6c829 | /Feature Selection.py | 2944e417655d7f5f3ebb154cf9a16c7d0a4e66ea | [
"MIT"
] | permissive | kuangzijian/Data-Preprocessing-and-Decision-Tree | ea4f13113e2a40c32ea2334dac3284ed843dd6a9 | a672cccfe74fdfdf1664305e21daebf956c53bfc | refs/heads/main | 2023-01-23T07:17:43.403216 | 2020-12-05T03:44:35 | 2020-12-05T03:44:35 | 302,569,770 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 845 | py | import numpy as np
from sklearn.feature_selection import SelectKBest
from sklearn.feature_selection import chi2
from sklearn.feature_selection import RFE
from sklearn import datasets, linear_model
# List all the columns of the dataset and report the size of the train part and test part
A = np.loadtxt(open('data/diabet... | [
"kuangzijian1@hotmail.com"
] | kuangzijian1@hotmail.com |
c9753409076dcbbf2f799658fdd2575274b657c2 | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/primeMover_20200714151021.py | 47cb0dc4deb41c8214b4217291596ba68847162a | [] | no_license | MaryanneNjeri/pythonModules | 56f54bf098ae58ea069bf33f11ae94fa8eedcabc | f4e56b1e4dda2349267af634a46f6b9df6686020 | refs/heads/master | 2022-12-16T02:59:19.896129 | 2020-09-11T12:05:22 | 2020-09-11T12:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 536 | py | import math
def PrimeMover(num):
# maybe come up with a list of prime numbers from 0 to num+1
# return newArr[num]
# how do we come up with that list
# the len of this array should be num+1
newArr = []
count = 0
numbers = range(2,10**4)
for i in numbers:
if is_prime(i) == True:
# print(i... | [
"mary.jereh@gmail.com"
] | mary.jereh@gmail.com |
8450999f90b1b3376b22bfb3db204e7d2308d460 | e210167f253547473d160d3c1c286b10ea3650a1 | /209.py | 9cdf1e1c4944c60ad5515e9350435eb445ac5436 | [] | no_license | cowarder/LeetCode | ee231f7bab0bb1525e187f770c15dbf339daba87 | 7d785a11fe2bd2bc3399984e0c0af8546780e185 | refs/heads/master | 2021-01-11T19:20:09.248360 | 2020-07-19T08:04:27 | 2020-07-19T08:04:27 | 79,439,657 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,416 | py | """
问题描述:
209. Minimum Size Subarray Sum
Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of
which the sum ≥ s. If there isn't one, return 0 instead.
Example:
Input: s = 7, nums = [2,3,1,2,4,3]
Output: 2
Explanation: the subarray [4,3] has the minimal le... | [
"1615482151@qq.com"
] | 1615482151@qq.com |
ae8b3cf0d41725d8e0bdc373ec63f37deac7fc30 | ea37a8cefb6639e87e9dcfaf047a08cc56c5059b | /executioner2/challenge/exploit.py | 705e2740f95f1e1d55a91cbf38786161a0a0fd36 | [] | no_license | AravGarg/pwnable.xyz-My-exploits | 9f0253a844a33f8583446d3eae34fa0110c57e52 | 9a97b4b85b889bd057f493081d27155cbea96c12 | refs/heads/master | 2022-12-01T08:02:32.385746 | 2020-07-31T11:36:41 | 2020-07-31T11:36:41 | 280,766,873 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 699 | py | from pwn import *
while(True):
#target=process('./challenge')
target=remote('svc.pwnable.xyz',30028)
print(target.recvuntil("0x"))
leak=int(target.recvline().strip("\n"),16)
print(hex(leak))
if(leak%0x10!=0):
target.close()
continue
... | [
"arav1635@gmail.com"
] | arav1635@gmail.com |
46f697365658fffc24989e1d4b613b36fb08ac8a | 72b77f97876983025eb05a5aa1d6f248a1be3074 | /reformat_the_string.py | 0b9f7353ad46168bc5bafff1dd3692a8845340cb | [
"Apache-2.0"
] | permissive | erjan/coding_exercises | 4c6bccb2cdac65ccbc3107a482914275ecd157f7 | 68dac358a6d4dabd41d47dbd4addb2ec50e0ca11 | refs/heads/master | 2023-09-02T07:25:30.886175 | 2023-08-27T06:13:06 | 2023-08-27T06:13:06 | 236,281,070 | 5 | 0 | Apache-2.0 | 2020-05-05T15:08:49 | 2020-01-26T07:32:09 | Python | UTF-8 | Python | false | false | 1,337 | py | '''
You are given an alphanumeric string s. (Alphanumeric string is a string consisting of lowercase English letters and digits).
You have to find a permutation of the string where no letter is followed by another letter and no digit is followed by another digit. That is, no two adjacent characters have the same type.... | [
"noreply@github.com"
] | erjan.noreply@github.com |
1bcfeec89c5fc7aac268acfecb773764dbb81c78 | b84b66f071050213a18ea6824fae443271f7d166 | /0739_Daily_Temperatures.py | 35a67a047f5a1cf04ff520d9943d69a65f7bb8c6 | [] | no_license | oveis/LeetCode | c4c400196de0cae4cd963384c7cb4826aa11e078 | 9ea466f1ebfd976b60dfa2ff2e8b0b2e5c99a9b3 | refs/heads/master | 2021-06-26T04:32:16.373204 | 2021-01-02T08:13:09 | 2021-01-02T08:13:09 | 192,046,829 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 442 | py | class Solution(object):
def dailyTemperatures(self, T):
"""
:type T: List[int]
:rtype: List[int]
"""
ans = [0] * len(T)
stack = []
for idx, temp in enumerate(T):
while stack and stack[-1][0] < temp:
_, prev_i = stack.pop()
... | [
"jinil@nyu.edu"
] | jinil@nyu.edu |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.