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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3a0f2cb630520d7d754dab75c74fc1a264fc997f | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03378/s701099054.py | 973d6f5da00380a9f78771557ce253738abc986c | [] | 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 | 222 | py | n, m, x = map(int, input().split())
A = list(map(int, input().split()))
start = 0
end = 0
for i in range(x):
if i in A:
start += 1
for i in range(x,n+1):
if i in A:
end += 1
print(min(start, end)) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
e8dbd929840258d578174ce40685fd6ebdaa89b1 | f3dbb5b2bdbb4b45bb6548935e7873736c7adc68 | /python/dvalley_core_TestEngineer/.svn/pristine/e8/e8dbd929840258d578174ce40685fd6ebdaa89b1.svn-base | 84058cade8f93e499ed8d350d3df254da5415353 | [] | no_license | lw000/new_python_demo | ece955bdb7df2c5499e4fb582503c13081c89649 | 3ca55b2c3106db75e31676e45e6c5c1f5a6fd714 | refs/heads/master | 2020-03-26T21:09:33.082625 | 2018-08-20T05:37:54 | 2018-08-20T05:37:54 | 145,370,381 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,954 | #!/usr/bin/env python
# -*- coding=utf-8 -*-
'''
Created on 2018年05月31日
@author: Administrator
'''
import sys
import demjson
import logging
import dvcore
from base_api import BaseApi
logging.basicConfig(level=logging.DEBUG)
log = logging.getLogger(__name__)
class UserApi(BaseApi):
de... | [
"liwei@liweideiMac.local"
] | liwei@liweideiMac.local | |
7a99d10927155a58b60057bd7c103dbb1d282c98 | 486a7eda8f492b0607b262d7128c78427b180269 | /src/profileapp/models.py | ddb452673a3cbd06eebbd2af1cc4548f9c766c9f | [] | no_license | Komilcoder/orm | f6d09206d0e9a9b911657cf4c4c3405696d3a39d | 432d7121088aaf53a97a3c12dcf371494262c38a | refs/heads/master | 2023-03-16T06:25:11.561958 | 2021-03-15T07:07:44 | 2021-03-15T07:07:44 | 347,868,830 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,084 | py | from django.db import models
from django.contrib.auth.models import User
class Client(models.Model):
client = models.ForeignKey(User,on_delete=models.CASCADE)
name = models.CharField(max_length=256)
def __str__(self):
return self.name
class Subject(models.Model):
user = models.ForeignKey(... | [
"yaxshilikovkomil@gmail.com"
] | yaxshilikovkomil@gmail.com |
3e02c0db5013c15ac08acaf6e6509dea8a7ff612 | 20f89f49400feb9d2885dc2daf3ea3ca189556e7 | /day05/proctice/三元表达式.py | 5e0bb8bef2856ba4cf186a6e9284acb76a7fb6c2 | [] | no_license | xiaobaiskill/python | 201511b1b1bddec8c33c4efa7ca2cc4afed24a89 | 540693baad757369ff811fb622a949c99fb6b4ba | refs/heads/master | 2021-04-12T03:43:30.308110 | 2018-07-13T01:41:19 | 2018-07-13T01:41:19 | 125,884,001 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 592 | py | #! /usr/bin/env python
# -*- coding:utf-8 -*-
# Author Jmz
'''
语法:
[成立1 if condition1 else
成立2 if condition2 else ...
if 成立N conditionN else 不成立]
'''
sex = 'man'
print('正确' if sex == 'man' else '错误')
# 正确
'''
语句解析:
sex = 'man'
if sex == 'man':
print('正确')
else:
print('错误')
'''
age = 23
res = '猜大了' i... | [
"1125378902@qq.com"
] | 1125378902@qq.com |
c29200633e547e1e14f2c3a49bc8b32333405810 | 86d499787fb35024db798b0c1dbfa7a6936854e9 | /py_tools/example/http_demo/02-根据用户需要返回相应的页面.py | cef6b306a0e0db13d4dc1c3b733418c609ce81ea | [] | no_license | Tomtao626/python-note | afd1c82b74e2d3a488b65742547f75b49a11616e | e498e1e7398ff66a757e161a8b8c32c34c38e561 | refs/heads/main | 2023-04-28T08:47:54.525440 | 2023-04-21T17:27:25 | 2023-04-21T17:27:25 | 552,830,730 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,795 | py | #coding:utf-8
import socket
import re
def service_client(new_socket):
'''为这个客户端返回数据'''
# 接受浏览器发送过来的请求,http请求
request = new_socket.recv(1024)
# print(request)
request_lines = request.splitlines()
print("")
print(">"*20)
print(request_lines)
'''
GET /index.html HTTP/1.1... | [
"gogs@fake.local"
] | gogs@fake.local |
4572a666a39fd92088aeb374ea763180721e82f5 | 16e26dfa651770b51a7879eab5e2ab8d3d6cff92 | /src/data/make_dataset.py | b448390f2975f564afbb864c4610b03a179c80fa | [
"MIT"
] | permissive | carlosgalvez-tiendeo/ue_master-TFM | 108879efc56b01ed64ddbc0346359efcaf66a5e8 | 97ac4d3029b1eef8e95ea8cca846812cafa87d0a | refs/heads/main | 2023-06-09T11:20:59.913197 | 2021-06-23T18:14:00 | 2021-06-23T18:14:00 | 379,906,271 | 0 | 0 | MIT | 2021-06-24T11:45:31 | 2021-06-24T11:45:31 | null | UTF-8 | Python | false | false | 1,476 | py | # -*- coding: utf-8 -*-
import click
import logging
import os
import pandas as pd
from pathlib import Path
from dotenv import find_dotenv, load_dotenv
from sklearn.model_selection import train_test_split
PROJECT_DIR = Path(__file__).resolve().parents[2]
RANDOM_STATE = 288
def get_dataset():
df = pd.read_csv('sr... | [
"carlos.galvez@tiendeo.com"
] | carlos.galvez@tiendeo.com |
bbfb3e803109460939ad25a2601cb97c67d78f1d | 8f6aa9ac9c8c2e409875bbf36fbc49b3eb37d88b | /enthought/traits/ui/menu.py | 3aa7fcd16d7341bc54f84c36dffaa1a4a8e89bcf | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | enthought/etsproxy | 5660cf562c810db2ceb6b592b6c12274bce96d73 | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | refs/heads/master | 2023-03-27T04:51:29.297305 | 2020-12-02T09:05:18 | 2020-12-02T09:05:18 | 1,632,969 | 3 | 1 | NOASSERTION | 2020-12-02T09:05:20 | 2011-04-18T22:29:56 | Python | UTF-8 | Python | false | false | 43 | py | # proxy module
from traitsui.menu import *
| [
"ischnell@enthought.com"
] | ischnell@enthought.com |
decd3605c3e8f3451b507837fc9e80d6e6f84b18 | b659e99f89cf17ae886857383cb5b708847fe3f1 | /Think Python Book/caseStudy-wordPlay/exercise9.3.py | 9014f3fb5e4d0edbc08f63fb7211540e2e2a2b34 | [] | no_license | nitheeshmavila/practice-python | bea06cc4b2b9247b926e07fd5a3987552e531242 | f54bf8934a4cf160cdfc9dc43176f1eea3bc7a41 | refs/heads/master | 2021-07-03T17:24:29.450939 | 2021-06-16T08:40:48 | 2021-06-16T08:40:48 | 100,113,256 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 795 | py | '''
Exercise 9.2
--------------
Write a function named avoids that takes a word and a string of forbidden letters, and
that returns True if the word doesn’t use any of the forbidden letters.
Modify your program to prompt the user to enter a string of forbidden letters and then
print the number of words that don’t conta... | [
"mail2nitheeshmavila@gmail.com"
] | mail2nitheeshmavila@gmail.com |
d84c3a1d543303d754b7448bdcaed968e11c7e93 | 12971fc2b1426f3d3a52039f21c4c2d7bb820f68 | /Exercises4Programmers_57Challenges/01_saying_hello/python/hello_challenge_01.py | dd10b80c3287cb06046aadc6a60c2a3755dfa048 | [
"MIT"
] | permissive | adrianogil/AlgoExercises | 29b3c64e071008bffbfe9273130f980100381deb | be1d8d22eedade2e313458e8d89185452d9da194 | refs/heads/main | 2023-08-18T23:31:51.463767 | 2023-07-22T18:02:46 | 2023-07-22T18:02:46 | 86,254,111 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 457 | py | # The “Hello, World” program is the first program you learn
# to write in many languages, but it doesn’t involve any input.
# So create a program that prompts for your name and prints a greeting using your name.
# Example Output
# What is your name? Brian
# Hello, Brian, nice to meet you!
# Challenge:
# - W... | [
"adrianogil.san@gmail.com"
] | adrianogil.san@gmail.com |
f044703c469fe0463f500e944f0e552a812c0673 | 1d7618d3f1a9ffcabb18caa65d09ea48b632b80b | /tests/opt/projectors/test_proj_lpballs.py | 156fb71b1de5c9cc8e4a0c07b95fb25edf5259ab | [
"Apache-2.0"
] | permissive | carnotresearch/cr-sparse | 668b607f0edd55644db6a879ec6b24a3171b264e | c43496bc54ec32b80b5a64901b04d0a12ac6687f | refs/heads/main | 2023-05-23T19:13:06.283727 | 2022-10-08T06:37:37 | 2022-10-08T06:37:37 | 323,566,858 | 70 | 9 | null | null | null | null | UTF-8 | Python | false | false | 2,337 | py | from projectors_setup import *
# L2 Balls
@pytest.mark.parametrize("x,q,outside", [
[[3,4], 5, 0],
[[3,4], 4, 1],
])
def test_l2_ball(x, q, outside):
ball = projectors.proj_l2_ball(q)
v = ball(x)
if outside:
# second projection should not change it
assert_array_equal(ball(v), v)
... | [
"shailesh@indigits.com"
] | shailesh@indigits.com |
6ffec8c541799771f50bd871e898069f9467c6d2 | 14aa22b09485b40bd1983b6b00f6b8d2f743e0c9 | /120.Triangle/main.py | fea13da0a7ed334583985b15b216c63755b3ffc8 | [] | no_license | ZhihaoJun/leetcode | 02030539815b6353b6a5588c64eebb4a10882b9d | 3cbb3f8ec81aa688ca9d90903a49cdf4a6130c4c | refs/heads/master | 2021-10-25T22:55:45.336738 | 2019-04-08T04:21:41 | 2019-04-08T04:21:41 | 33,469,539 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,066 | py | class Solution(object):
def get(self, x, y):
return self.f[y][x]
def set(self, x, y, v):
if y not in self.f:
self.f[y] = {}
self.f[y][x] = v
def value(self, x, y):
return self.triangle[y][x]
def cal(self, x, y):
if y == self.size-1:
... | [
"zhao11fs@gmail.com"
] | zhao11fs@gmail.com |
56577c16868cd793762ec33a8905362318f541f3 | b3f063ba06a7b4786463cc77756dde766da2b687 | /setup/load_data/load_csv.py | 1f79989374914f1f7d6295fee1dbad5e1dd66a9b | [] | no_license | Lothilius/fun-with-containers | 594b6e9c0470021fc659eda8ef182bb8a0960cc6 | fbc433323f49b13ab13b06aacda0aa57ccbd84b0 | refs/heads/master | 2022-12-22T06:42:34.069508 | 2020-10-06T09:28:30 | 2020-10-06T09:28:30 | 300,806,945 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,521 | py | import pandas as pd
from os import environ
import logging
from sqlalchemy import create_engine
from sqlalchemy.exc import OperationalError
import traceback
import time
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)s:%(message)s')
logger = logging.getLogger(__name__)
def connect_to_db():
... | [
"martin.valenzuela@bazaarvoice.com"
] | martin.valenzuela@bazaarvoice.com |
83060bc4714b82ea8cc3e7bba7f4ce4411fdd011 | bc10a5df6d3f7e59cea6bf364ac614d39d04ac75 | /submodule/template_lib/pytorch/fgsm_tutorial.py | 45008790ddb86792173526de3d373db99817e2af | [
"MIT"
] | permissive | AnonymousGFR/wbgan.pytorch | f65efdb1f5a6678b7344a6e4186f6e78d446d53c | d75cb6599852e901df0136db87520e3314f8ca71 | refs/heads/master | 2023-04-14T06:22:34.542167 | 2019-10-08T14:28:46 | 2019-10-08T14:28:46 | 210,862,958 | 1 | 0 | MIT | 2023-03-24T23:08:30 | 2019-09-25T14:17:04 | Python | UTF-8 | Python | false | false | 5,192 | py | from __future__ import print_function
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import datasets, transforms
import numpy as np
import matplotlib.pyplot as plt
outdir = 'results/fgsm'
epsilons = [0, .05, .1, .15, .2, .25, .3]
pretrained_model = f"{ou... | [
"you@example.com"
] | you@example.com |
ed8fd8a7e250c616bfaaad5bd06f39a58258aad1 | e6d862a9df10dccfa88856cf16951de8e0eeff2b | /VMS/core/python/setup.py | 145c7ec74b08da59c3c13b1c966f6979da01ad6e | [] | no_license | AllocateSoftware/API-Stubs | c3de123626f831b2bd37aba25050c01746f5e560 | f19d153f8e9a37c7fb1474a63c92f67fc6c8bdf0 | refs/heads/master | 2022-06-01T07:26:53.264948 | 2020-01-09T13:44:41 | 2020-01-09T13:44:41 | 232,816,845 | 0 | 0 | null | 2022-05-20T21:23:09 | 2020-01-09T13:34:35 | C# | UTF-8 | Python | false | false | 1,110 | py | # coding: utf-8
"""
VMS API
## Description API to be impemented by VMS systems for integration into HealthSuite business processes # noqa: E501
The version of the OpenAPI document: 1.0.0
Contact: support@allocatesoftware.com
Generated by: https://openapi-generator.tech
"""
from setuptools im... | [
"nigel.magnay@gmail.com"
] | nigel.magnay@gmail.com |
6f55d1a15017e4db87d7d41770a35d0bedbffe61 | 31fd6c73c37b5065221427d8272e92afc5a79a53 | /src/uniform-tilings/coxeter/integer.py | afcbbb6ec064ff1d47a0d7422bfb08a8eff48433 | [
"MIT"
] | permissive | GenerousMan/pywonderland | 2b28d59aea65fc402dcbea8be585c4e30c7fed3b | 28b7611066fde2590ab9f60971248eb47809ec3e | refs/heads/master | 2020-12-28T09:07:27.086833 | 2020-02-04T11:48:08 | 2020-02-04T11:48:08 | 238,259,252 | 1 | 0 | MIT | 2020-02-04T17:04:20 | 2020-02-04T17:04:19 | null | UTF-8 | Python | false | false | 785 | py | """
Helper functions for integer arithmetic.
"""
from collections import defaultdict
def lcm(m, n):
if m * n == 0:
return 0
q, r = m, n
while r != 0:
q, r = r, q % r
return abs((m * n) // q)
def decompose(n):
"""Decompose an integer `n` into a product of primes.
The result... | [
"mathzhaoliang@gmail.com"
] | mathzhaoliang@gmail.com |
fce36d11f95cef58d768edb14803b464408f7355 | 7b102f9c8f2e3f9240090d1d67af50333a2ba98d | /gbd_2019/shared_code/central_comp/nonfatal/epic/workflow.py | 14eeadc18f3575e30003dbd499a1b7f2bb582802 | [] | no_license | Nermin-Ghith/ihme-modeling | 9c8ec56b249cb0c417361102724fef1e6e0bcebd | 746ea5fb76a9c049c37a8c15aa089c041a90a6d5 | refs/heads/main | 2023-04-13T00:26:55.363986 | 2020-10-28T19:51:51 | 2020-10-28T19:51:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,126 | py | import os
import datetime
import getpass
import json
import logging
import shutil
import numpy as np
import networkx as nx
import pandas as pd
from dataframe_io.io_queue import RedisServer
from db_queries import get_demographics
from gbd_artifacts.severity_prop import SeverityPropMetadata
import gbd.constants as gbd
... | [
"cheth@uw.edu"
] | cheth@uw.edu |
f6a8ae1541c9a1aea0034d32f065444a664ebed5 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/55/usersdata/111/22852/submittedfiles/av2_p3_civil.py | 1f8bc8ba880d7c45429f3ca8df20c55e347dfe9a | [] | 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 | 868 | py | # -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
def peso(a,x,y):
soma=0
c=0
d=0
for i in range(0,a.shape[0],1):
for j in range(0,a.shape[1],1):
if x==a[i+1]
c=i
if y==a[j+1]
d=j
for i in range(c,a.shape[... | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
e7433943b06f1d78b9a7fd9a4c54496f2fd4de75 | 6987dfe763caed29613ae255c00821ffb25f44c9 | /utils/ltp/ltp_xml.py | b9c9c1205fdcd7370b8f2fc55893503643bb2607 | [] | no_license | sapnajayavel/FakeReview-Detector | 70a4f9decc7214f796f362b1e53736dd4c3ef71f | ab3ebef3cc0bb6c483c18d39bff1277d2e98c9c0 | refs/heads/master | 2021-01-22T13:30:58.090821 | 2013-06-16T23:42:37 | 2013-06-16T23:42:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 823 | py | #!/usr/bin/env python2.7
#encoding=utf-8
"""
"""
from xml.dom.minidom import parse,parseString
class ltpXML:
def __init__(self,sentence,xml_str):
self.sentence = sentence
self.xml_str = xml_str
self.relate_list = self.get_relate_list()
self.word_list = self.get_word_list()
de... | [
"yangxue00.yxmn@gmail.com"
] | yangxue00.yxmn@gmail.com |
a063e399690c0d581577baa5acc8bb0f037038f6 | 698c383b77111d53495268b64d45f39ffcba126d | /homebooks/accounts/utils/make_user_yaml.py | dd16087b243bf1cb875dca3c6c2651217cc629e0 | [] | no_license | noname2048/ab-homebooks-django | 5f42080d17c9e16a68210766bab11cff56ef74dd | 702e2957ea48eb4fdee8d00558d2ded1434e170d | refs/heads/main | 2023-07-07T15:28:36.000023 | 2021-08-10T12:27:46 | 2021-08-10T12:27:46 | 363,648,317 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 635 | py | import yaml
from faker import Factory
from yaml import load, dump
from pathlib import Path
if not Path(Path(__file__).resolve() / "test_users.yaml").exists():
fake = Factory.create("en_US")
fake.seed(1)
user_list = [{"username": fake.user_name(), "email": fake.email()} for _ in range(100)]
try:
... | [
"sungwook.csw@gmail.com"
] | sungwook.csw@gmail.com |
40058b6bf2a6a6dbfac1e5619d0b93b834b79775 | 1bb2a9150de01c618163bbb8f872bdce6f14df4f | /Puzzle/030_set_tap.py | f618728840144e90b9c2fb12dd4b874157cd6e85 | [] | no_license | whyj107/Algorithm | a1c9a49a12a067366bd0f93abf9fa35ebd62102e | aca83908cee49ba638bef906087ab3559b36b146 | refs/heads/master | 2023-04-14T12:59:52.761752 | 2021-05-01T03:53:31 | 2021-05-01T03:53:31 | 240,014,212 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,227 | py | # 멀티 탭으로 만든 문어 다리 배선
# 문제
# n=20일 때 몇 가지의 멀티 탭 배치를 생각할 수 있는지 구해 보세요
# (단, 전원 용량은 생각하지 않기로 한다.)
N = 20
def set_tap1(remain):
if remain == 1:
return 1
cnt = 0
# 2구
for i in range(1, remain // 2 + 1):
if remain - i == i:
cnt += set_tap1(i) * (set_tap1(i) + 1) // 2
els... | [
"60024292+whyj107@users.noreply.github.com"
] | 60024292+whyj107@users.noreply.github.com |
174d29bde1166d77b5ea8428c53b1229672719c3 | 3cc2f47de6d78d610a2887f92bfba150b2994888 | /application/utils/helper.py | a55fae66e681c0efa5cc87d0be94b0835edd7f75 | [] | no_license | fengliu222/blogbar | c8a66df586187d0a16063e4536e76d155863fe17 | ff6e7182f000777112101eed12ae9e2ca4298d25 | refs/heads/master | 2021-01-15T08:59:51.478354 | 2014-12-20T08:13:53 | 2014-12-20T08:13:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 195 | py | # coding: utf-8
def parse_int(integer, default=None):
"""提取整数,若失败则返回default值"""
try:
return int(integer)
except Exception, e:
return default
| [
"hustlzp@qq.com"
] | hustlzp@qq.com |
5489fd638a7f97687db13c5888518bf9f2fde953 | 6206ad73052b5ff1b6690c225f000f9c31aa4ff7 | /Code/Successful Pairs of Spells and Potions.py | 616d663a7d534aef45f065602b19b50c662efbad | [] | no_license | mws19901118/Leetcode | 7f9e3694cb8f0937d82b6e1e12127ce5073f4df0 | 752ac00bea40be1e3794d80aa7b2be58c0a548f6 | refs/heads/master | 2023-09-01T10:35:52.389899 | 2023-09-01T03:37:22 | 2023-09-01T03:37:22 | 21,467,719 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 618 | py | class Solution:
def successfulPairs(self, spells: List[int], potions: List[int], success: int) -> List[int]:
potions.sort() #Sort potions in asending order.
return [len(potions) - bisect_left(potions, ceil(success / x)) for... | [
"noreply@github.com"
] | mws19901118.noreply@github.com |
5dc8c4505c10729f9eba9ecc3c9bdcb476c5dbda | 43e0cfda9c2ac5be1123f50723a79da1dd56195f | /python/paddle/fluid/tests/unittests/test_sparse_elementwise_op.py | 12546ea463a84ac9d8defa21eb099c6346b2678d | [
"Apache-2.0"
] | permissive | jiangjiajun/Paddle | 837f5a36e868a3c21006f5f7bb824055edae671f | 9b35f03572867bbca056da93698f36035106c1f3 | refs/heads/develop | 2022-08-23T11:12:04.503753 | 2022-08-11T14:40:07 | 2022-08-11T14:40:07 | 426,936,577 | 0 | 0 | Apache-2.0 | 2022-02-17T03:43:19 | 2021-11-11T09:09:28 | Python | UTF-8 | Python | false | false | 5,489 | py | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | [
"noreply@github.com"
] | jiangjiajun.noreply@github.com |
4946b6aece4fd26a815a69b1f0b8b0e7d424b1f3 | 843ca2944c5a92dc3d13d132c34545d3b18a9eb9 | /scripts/cell/interfaces/Avatar/DialogSystem.py | fc3f3e99bb9671019e60d6fc59f6cc818c81ed2c | [] | no_license | m969/wanfadalu_server | 550dac97795bfc15c1d47f0c18bfab9c18fe6a76 | 08f5bec5ed4a17f4f1fcc40a27311aa03906e5ef | refs/heads/master | 2021-07-03T10:21:21.331204 | 2020-08-14T14:56:42 | 2020-08-14T14:56:42 | 138,024,157 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 4,553 | py | # -*- coding: utf-8 -*-
import KBEngine
from KBEDebug import *
import GlobalConst
import PyDatas.level_data as level_data
import PyDatas.dialog_config_Table as dialog_config_Table
from DIALOG_ITEM import TDialogItem
from DIALOG_ITEM import TDialogItemList
dialogDatas = dialog_config_Table.datas
dialogTypeMap = {
1... | [
"969041327@qq.com"
] | 969041327@qq.com |
fc79f953728d1619a0608c81d27284876bdce5b6 | 16f61285e902285ecade358870a2ab5720bfc3b4 | /utilities/make_nsr_database.py | 350eb90bfb64c5d88363c94b7f0d50bbba4e90cf | [] | no_license | naturalis/galaxy-tool-taxonmatcher | 56dbd56264392fb3f2c477ea7aea65a0cd919a19 | 4e9e337c7156d624db60842ed9c7304d909f479d | refs/heads/master | 2022-11-17T18:35:23.176173 | 2022-11-15T10:15:18 | 2022-11-15T10:15:18 | 149,607,894 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,922 | py | #!/usr/bin/python3
import sqlite3
import csv
db = sqlite3.connect('nsr_taxonmatcher')
cursor = db.cursor()
def make_database():
cursor.execute('''CREATE TABLE nsr(id INTEGER PRIMARY KEY, source TEXT, taxonID INTEGER, acceptedNameUsageID INTEGER, taxonomicStatus TEXT, species_rank TEXT, genus_rank TEXT, family_rank... | [
"martenhoogeveen@gmail.com"
] | martenhoogeveen@gmail.com |
6b24dbec72e959374d2977d74015853eeddb3e20 | 1cae1f15f4957efc42b011929cfdba0308887ecc | /beerfinder/sighting/south_migrations/0001_initial.py | 776df5146290be6488131e756855dfab78188fa9 | [] | no_license | jmichalicek/Beerfinder-Web | 983cbcfb37b889b8bf85b3d6c6da6f745c9da921 | f48d9983343463541611752c5aefe0bd10c3907f | refs/heads/master | 2016-09-06T06:10:17.088864 | 2015-05-01T01:40:03 | 2015-05-01T01:40:03 | 15,567,057 | 4 | 0 | null | 2015-05-01T01:40:03 | 2014-01-01T17:04:50 | CSS | UTF-8 | Python | false | false | 13,672 | py | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Sighting'
db.create_table(u'sighting_sighting', (
... | [
"jmichalicek@gmail.com"
] | jmichalicek@gmail.com |
58a9216257324f092630be979ba310cc8f359ca1 | 149c90e6366d8adf9cbfd9332612736a41e6dc25 | /__manifest__.py | 224e05af8799187aeda5ad199cb0481c624444e3 | [] | no_license | brahim94/formation | 02549ef1fee7d7432987248e87627b22158a12f6 | 1cd96a6ccfac1d61e524a20b84d4c30d395f5a35 | refs/heads/master | 2023-03-06T16:19:15.883896 | 2021-02-25T18:13:16 | 2021-02-25T18:13:16 | 341,509,426 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 902 | py | # -*- coding: utf-8 -*-
{
'name': "formation",
'summary': """
Short (1 phrase/line) summary of the module's purpose, used as
subtitle on modules listing or apps.openerp.com""",
'description': """
Long description of module's purpose
""",
'author': "My Company",
'websit... | [
"brahim-ayad@hotmail.com"
] | brahim-ayad@hotmail.com |
207e5e3c5fa9d53bb95381ed966da7a673f28161 | c33496682b760deac61fedecba3e82ce4e41dfde | /scripts/e216.py | 153ce21f2c414603d711d9470b62ef7e81559416 | [
"MIT"
] | permissive | ferasalsaab/neuralnilm_prototype | c5e9cde02d475ac499b15fea62143e76adff07d0 | 2119292e7d5c8a137797ad3c9abf9f37e7f749af | refs/heads/master | 2020-04-16T14:38:03.615279 | 2018-01-29T15:30:43 | 2018-01-29T15:30:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,233 | py | from __future__ import print_function, division
import matplotlib
matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab!
from neuralnilm import Net, RealApplianceSource, BLSTMLayer, DimshuffleLayer
from lasagne.nonlinearities import sigmoid, rectify
from lasagne.objectives import crossentropy, mse... | [
"jack-list@xlk.org.uk"
] | jack-list@xlk.org.uk |
bc5fd4f18e4cea5cd86a9459e97322e8707e5aa0 | 53e2254b83ac5ac71ff390a7c77070ff97b31c0b | /large_substr1_lex.py | 602d31574147c303229b67c7c2185b18776e1843 | [] | no_license | Ponkiruthika112/codekataset1 | 83a02b96a6b35c33ae7c5a6d6b21c34e63a7eef4 | 4f164864a59e22122b647dd62d36d24e7ace7dac | refs/heads/master | 2020-04-15T04:58:44.427824 | 2019-09-06T10:10:12 | 2019-09-06T10:10:12 | 164,404,367 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 118 | py | # your code goes here
s=input()
for i in range(0,len(s)):
k=s[i::]
if s[0]<k[0]:
print(k)
break
#substring
#se
| [
"noreply@github.com"
] | Ponkiruthika112.noreply@github.com |
cf7283cf94a1136d00a4c9a0df38866b2d50be20 | 6ecff67d6103ddbd787f78c35182722b83b8a37e | /백준/Python/카테고리/우선순위 큐/11286(절대값 힙).py | c06ae059aafbe6c660e2deb3dda5c19f3f852654 | [] | no_license | jsungmin6/Algorithm | 9ef2339aa00921e7df756a8dff569954a008c118 | bc1ea9de9f7ba3f1aa6616ebef8719540d72e0bf | refs/heads/master | 2023-05-27T06:24:16.123307 | 2021-06-11T09:22:21 | 2021-06-11T09:22:21 | 259,299,624 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,366 | py | '''
분류
우선순위 큐
근거
절대값 힙, 작은수부터 출력해 배열에서 제거
풀이과정
1.절대값이 가장 작은 값을 출력 하는데 같을경우에는 -를 출력한다.
힙을 튜블로 저장해서 -,+ 여부를 파악하고 순서를 줘야할 것 같다.
2.다른 풀이를 보니 우선순위큐를 두개써서 음수와 양수를 나누어 저장해 깔끔하게 구했다.
시간복잡도
우선순위 큐는 삽입과 삭제가 O(log(N)) 이다 . N번 수행하니
O(Nlog(N))
'''
import heapq
import sys
input = sys.stdin.readline
N=int(input())
heap=[]
for _ i... | [
"jsungmin506@gmail.com"
] | jsungmin506@gmail.com |
9229c9844bad464a609cd06d4a743ce10d40f974 | 1fb1c41a7b916da23f02db059526f93f071c5479 | /django12/src/blog/views.py | 9f847f4e748441c0399614978594313e2c220119 | [] | no_license | jm40108/1 | 1a70d90ad8f7bfb0e4da55960b075a70766482c5 | 2f11ad1751aa4d5df01c00fcd07fd2c68a93a425 | refs/heads/master | 2020-04-14T01:20:18.752824 | 2018-12-30T03:23:12 | 2018-12-30T03:23:12 | 163,557,921 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,542 | py | from django.shortcuts import render
from django.views.generic.list import ListView
from .models import *
from django.views.generic.detail import DetailView
from django.views.generic.edit import FormView
from .forms import *
from django.http.response import HttpResponseRedirect
from django.urls.base import revers... | [
"user@DESKTOP-7EQF3M8"
] | user@DESKTOP-7EQF3M8 |
99f41f0320101cd077bdd50a4a2cb1db34c8fa1e | 3940b4a507789e1fbbaffeb200149aee215f655a | /lc/25.ReverseNodesInK-Group.py | 6607facb67916c01b66962b629574b88293be6ce | [] | no_license | akimi-yano/algorithm-practice | 15f52022ec79542d218c6f901a54396a62080445 | 1abc28919abb55b93d3879860ac9c1297d493d09 | refs/heads/master | 2023-06-11T13:17:56.971791 | 2023-06-10T05:17:56 | 2023-06-10T05:17:56 | 239,395,822 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,850 | py | # 25. Reverse Nodes in k-Group
# Hard
# 4406
# 427
# Add to List
# Share
# Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.
# k is a positive integer and is less than or equal to the length of the linked list. If the number of nodes is not a multiple of k then left-... | [
"akimi.mimi.yano@gmail.com"
] | akimi.mimi.yano@gmail.com |
4e09d800c43d33123b8450392a65415a90949257 | ddc38e9a10e31c122e19d8fe132e9d73ac954c50 | /tests/conftest.py | 4338383926352a7245060ae3a6035ede61b2a92b | [
"MIT"
] | permissive | Tinche/pyrseia | 8734bddc5f0efcc5ceb901fd80a7bd239306577f | 5abf2eda9be06b7417395a50ef676454bbd8f667 | refs/heads/master | 2023-09-03T17:38:05.059968 | 2020-05-10T01:05:20 | 2020-05-10T01:05:20 | 256,872,895 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 880 | py | from typing import Callable, TypeVar, Type
from pytest import fixture # type: ignore
from pyrseia import server, Server
from .calculator import Calculator
C = TypeVar("C")
@fixture
def calculator_server_creator() -> Callable[[Type[C]], Server[Calculator, C]]:
def create_server(
ctx_cls: Type[C], middle... | [
"tinchester@gmail.com"
] | tinchester@gmail.com |
3d64cb96441e32368bf07fa0be0d9af7d52bd0e5 | 0d37147ac9ae4f24823dc0be62c1bb8e6c610e08 | /bip_utils/bip32/bip32_keys.py | 6c5e3c66ba6d0ca598cee268678eb8b109ecfa89 | [
"MIT"
] | permissive | tesseract13666/bip_utils | 7c1e5f6415054291473340a62f66cb68f10e563a | 5c39cc990fb514cb1d88845e1fb0fa8fa393250c | refs/heads/master | 2023-06-27T13:57:19.037879 | 2021-07-25T21:06:06 | 2021-07-25T21:06:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,614 | py | # Copyright (c) 2021 Emanuele Bellocchia
#
# 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, merge, publish,... | [
"54482000+ebellocchia@users.noreply.github.com"
] | 54482000+ebellocchia@users.noreply.github.com |
e35e31b0309865823176429707b8d45bae480e5d | aaa108af22012ce93db0177aa38cea698ba500ec | /lab_3/f_math2.py | d7405da1d9c8f9fb0c8f809bd43a2d06390b9c2e | [] | no_license | minhduc9699/PhamMinhDuc-lab-c4e16 | 74519ca0e1552ee890710d42e34d6b54b60954a0 | 957e56509f861514b51873f267edc47d40ed6225 | refs/heads/master | 2021-09-10T15:00:42.141530 | 2018-03-28T06:18:45 | 2018-03-28T06:18:45 | 125,954,065 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 68 | py | #from eval import *
import eval
res = eval.calc(5, +, 6)
print(res)
| [
"minhduc.096.99@gmail.com"
] | minhduc.096.99@gmail.com |
61a0e08eee109f4b7a51ef5accb0820c64fd186e | d2dbc4eeba22f308634d8accde50062739fb50d1 | /sd/algorithms/partitional.py | 004f4e4ff78310c3a207d2e1a97987346704b6a9 | [
"Apache-2.0"
] | permissive | shibaji7/SuperDARN-Clustering | bf2d793a23dfae105bd4ca5bbac09fd64e60182a | d7427ba609fb7f5e50c26f52364e5e9e118bbc31 | refs/heads/master | 2022-12-24T07:08:52.308469 | 2020-10-06T16:46:08 | 2020-10-06T16:46:08 | 267,057,983 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,111 | py | #!/usr/bin/env python
"""
partitional.py: module is deddicated to run different partitional algorithms.
Partitional clustering algorithms aim to discover the groupings present in the data by optimizing
a specific objective function and iteratively improving the quality of the partitions. These algorithms
... | [
"shibaji7@vt.edu"
] | shibaji7@vt.edu |
9182b833c33a0c031a4b6abd00195b321488a6ba | 35fa8925e63f2b0f62ef6bfc1ff4e03cf42bd923 | /django_analyses/serializers/analysis.py | 5686c2648bdc0f3b2920d148bc7a04ed4cdb06cb | [
"Apache-2.0"
] | permissive | TheLabbingProject/django_analyses | 9e6f8b9bd2a84e8efe6dda6a15de6a3ecdf48ec1 | 5642579660fd09dde4a23bf02ec98a7ec264bceb | refs/heads/master | 2023-02-26T07:53:53.142552 | 2023-02-17T08:12:17 | 2023-02-17T08:12:17 | 225,623,958 | 1 | 2 | Apache-2.0 | 2023-02-17T08:12:18 | 2019-12-03T13:15:29 | Python | UTF-8 | Python | false | false | 662 | py | from django_analyses.models.analysis import Analysis
from django_analyses.models.category import Category
from rest_framework import serializers
class AnalysisSerializer(serializers.HyperlinkedModelSerializer):
url = serializers.HyperlinkedIdentityField(view_name="analyses:analysis-detail")
category = seriali... | [
"z.baratz@gmail.com"
] | z.baratz@gmail.com |
766e6c727fc7adb01aeabb92bfcb815182f6aae6 | 81f3f88c6b1a687726b75b8f53c2fb29d72df584 | /aispider/crawler/auto_crawler.py | d998aaa9ed30476aae87695ddcafe35746857691 | [
"Apache-2.0"
] | permissive | East196/aispider | 1f256ee1eea991d49d41373f2b4734a65b264b7d | 6b42ff5c4bda89cbd923a86f3aa3fdf4a224dbb9 | refs/heads/master | 2020-04-07T10:14:14.222722 | 2018-04-21T04:55:11 | 2018-04-21T04:55:11 | 124,202,962 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,020 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
爬取器
"""
from __future__ import print_function
import json
import re
from xml.sax.saxutils import escape
from bs4 import BeautifulSoup
from lxml import etree
from aispider.core.http_request import HttpRequest
from aispider.core.request import get_soup, get_json, get_... | [
"2901180515@qq.com"
] | 2901180515@qq.com |
710eb29d865055eab7e561ae6bcc477dc460ff18 | 7410903c6cd5ef35c592af00c934fb21c369cbf2 | /00_Code/01_LeetCode/537_ComplexNumberMultiplication.py | 094cbd3b7c1735c92ca7bc620c1998bdb3a74513 | [
"MIT"
] | permissive | KartikKannapur/Algorithms | f4e4726170599db0622d18e8c06a382e9bce9e77 | 66e3c8112826aeffb78bd74d02be1a8d1e478de8 | refs/heads/master | 2020-12-25T18:32:41.086518 | 2020-10-19T02:59:47 | 2020-10-19T02:59:47 | 93,961,043 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,141 | py | """
Given two strings representing two complex numbers.
You need to return a string representing their multiplication.
Note i2 = -1 according to the definition.
Example 1:
Input: "1+1i", "1+1i"
Output: "0+2i"
Explanation: (1 + i) * (1 + i) = 1 + i2 + 2 * i = 2i, and you
need convert it to the form of 0+2i.
Example 2:... | [
"kartikkannapur@gmail.com"
] | kartikkannapur@gmail.com |
db82c1c496fe6537c6a8907b9536571681a9557c | 98879590858368d5c32c389db31b761e479a0ab8 | /wsgiserver/test_server2.py | 65acfc0ccd5cfba74d4dc697f67fa500d68a87c0 | [] | no_license | zhiruchen/get_hands_dirty | 0bbf3719113dcf474baae571ecd55e5c234072a3 | af98a11bbeb8183428fe41cb7c9fa9a2354983e9 | refs/heads/master | 2020-04-17T12:00:44.275247 | 2017-06-24T16:28:43 | 2017-06-24T16:28:43 | 66,988,195 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,332 | py | # -*- coding: utf-8 -*-
import re
from cgi import escape
def index(environ, start_response):
start_response('200 OK', [('Content-Type', 'text/html')])
return ['''Hello World Application
This is the hello world application:
`continue <hello/>`_
''']
def hello(environ, start_respon... | [
"zhiruchen1992@foxmail.com"
] | zhiruchen1992@foxmail.com |
3e3a6e0c7c8a80543715611c08a374cc4e38615b | 114ea96f201cf3de825900fc632b6696433ae240 | /my_selenium/scroll.py | 538bf4ca52bdd1ef18230e06d1660bc08b65d708 | [] | no_license | iorilan/py_tiny_apps_playground | 2662133ec97aee0d495329a355fd22f7fb14ad2e | 70fb7965c1c27419ee83b6e9fd94d27ad47e4040 | refs/heads/master | 2023-02-08T12:06:47.406728 | 2020-12-31T15:08:24 | 2020-12-31T15:08:24 | 282,785,377 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 722 | py | """
http://the-internet.herokuapp.com/infinite_scroll
"""
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
import time
def go():
y=100
# to keep browser open by pass... | [
"iorilan@hotmail.com"
] | iorilan@hotmail.com |
3f5d03e017f3cbb1e790acea900ca9157adbf6c2 | 531c47c15b97cbcb263ec86821d7f258c81c0aaf | /sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/type_field_py3.py | d522b7658ebd52d0c6959e7716a83589d1124bef | [
"LicenseRef-scancode-generic-cla",
"LGPL-2.1-or-later",
"MIT"
] | permissive | YijunXieMS/azure-sdk-for-python | be364d3b88204fd3c7d223df23756386ff7a3361 | f779de8e53dbec033f98f976284e6d9491fd60b3 | refs/heads/master | 2021-07-15T18:06:28.748507 | 2020-09-04T15:48:52 | 2020-09-04T15:48:52 | 205,457,088 | 1 | 2 | MIT | 2020-06-16T16:38:15 | 2019-08-30T21:08:55 | Python | UTF-8 | Python | false | false | 1,042 | 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 ... | [
"lmazuel@microsoft.com"
] | lmazuel@microsoft.com |
e68925dd548561cc823aaf960ced2ccccccc2fda | 7e96ba20c25c6fb56af6ccd36b3b6d68df6a081c | /Shivi_khanuja/Django/belt_reviewer/apps/reviews/apps.py | 074ef3493d7c37a3c7566d311a3355dc3c20d54f | [] | no_license | CodingDojoDallas/python_september_2017 | 9d8cd74131a809bc6b13b7f465594cf8b1e2fd75 | f9f2f7b39bf9c4fceda3df5dc7424164aa5d5df5 | refs/heads/master | 2021-01-23T08:52:22.899994 | 2017-10-30T17:00:55 | 2017-10-30T17:00:55 | 102,558,291 | 2 | 14 | null | 2018-01-13T05:28:34 | 2017-09-06T03:28:38 | Python | UTF-8 | Python | false | false | 162 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps import AppConfig
class ReviewsConfig(AppConfig):
name = 'reviews'
| [
"shivalikhanuja.net@gmail.com"
] | shivalikhanuja.net@gmail.com |
b98467ba8ab928b8fe67d4607f0eaa6093bece31 | 14d1b3b0d2f4b21a62ae11bb30adaafca4aa0a76 | /demo_2.py | 106f3e70eebbcab59aad22dcb7825bc9f53da156 | [] | no_license | bdrummo6/CSPT13_Algorithms_GP | 9d64f83cdf566588b988d4108be655997d3b0dd0 | 907dc29d245ebb88d9ce07cf60249bf1ca862c50 | refs/heads/main | 2022-12-26T17:48:29.633204 | 2020-10-06T02:29:58 | 2020-10-06T02:29:58 | 301,584,067 | 0 | 0 | null | 2020-10-06T01:35:29 | 2020-10-06T01:35:28 | null | UTF-8 | Python | false | false | 4,375 | py | '''Explorer's Dilemna - aka the Knapsack Problem
After spending several days exploring a deserted island out in the Pacific,
you stumble upon a cave full of pirate loot! There are coins, jewels,
paintings, and many other types of valuable objects.
However, as you begin to explore the cave and take stock of what you'v... | [
"tomtarpeydev@gmail.com"
] | tomtarpeydev@gmail.com |
8f06b68aecddec25becf243ccd0383fb3198050f | a4ac55fca45c6d958513af43a1916c66fb25b931 | /pyatool/extras.py | 685dbf8e9c9ea0f853f63f2f2bd2fe94754931ad | [
"MIT"
] | permissive | guolong123/pyatool | d4393ebbfe3160400b0060e52f0d73c457212999 | 3d7e1bad67d990909dc590c1132c0f3811a2eee9 | refs/heads/master | 2020-04-24T02:19:07.642579 | 2019-02-20T05:59:01 | 2019-02-20T05:59:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,097 | py | import requests
import tempfile
import os
import re
import platform
SYSTEM_TYPE = platform.system()
def hello_world(toolkit=None):
"""
test only
:param toolkit:
:return:
"""
# toolkit contains some tools for development
# get device id
device_id = toolkit.device_id
print(device_i... | [
"178894043@qq.com"
] | 178894043@qq.com |
9ec0d07f9d5c5478b3c58d1c523384b8f2a6aa8e | 1b3402ff6f4b531d13add47d94fa497666bdd3f1 | /authentication/serializers.py | 0cab463ae50c55a50877768f7d80bf9ebf71a3f8 | [] | no_license | falled10/breaking_brain_api | b4287ed8986986dea5621deb45529c6986af0f32 | b16324f5a0a6d102797944a02c3194d6f86b049e | refs/heads/master | 2023-06-03T07:25:11.862023 | 2021-06-20T16:00:43 | 2021-06-20T16:00:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,190 | py | from django.utils.encoding import force_text, force_bytes
from django.utils.http import urlsafe_base64_decode, urlsafe_base64_encode
from django.conf import settings
from rest_framework import serializers
from authentication.models import User
from authentication.tokens import TokenGenerator
from breaking_brain_api.ta... | [
"jurakulek@gmail.com"
] | jurakulek@gmail.com |
dc2ed23ce665cf327bd85c3c52419c99ed15d825 | dd0f95e4b20112b3c8ec4ded3e2baa9acaa5f71e | /tests/tests.py | e1669df1959e52168d30d20d954360fad2da7d33 | [] | no_license | scotm/postcode_locator | 1cf6f0e075ff38a16806be82be4cb6b345cf6d73 | e9d6a486dc66cc05bc53157f91a71477abc1f449 | refs/heads/master | 2021-01-21T10:13:23.944029 | 2019-03-26T16:47:21 | 2019-03-26T16:47:21 | 31,371,483 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,626 | py | from django.contrib.gis.geos import Point
from django.core.urlresolvers import reverse
from django.test import TestCase
from postcode_locator.models import PostcodeMapping
from postcode_locator.tests.factories import PostcodeMappingFactory
class MatchPostcodeTest(TestCase):
def setUp(self):
pass
def... | [
"scott.scotm@gmail.com"
] | scott.scotm@gmail.com |
da0b1ea947109a1a2d20982c3c045252fa82861c | 9b14cd92abcae4e26df1afc3cc595e1edeffda82 | /ATLASalertsservice/alerts.py | 79452ceab9de5b49e82a4533e4f45dd73f8e03d2 | [] | no_license | ATLAS-Analytics/AnalyticsNotebooks | 8d374363c3a55067614a802c1928743e990bd419 | 6656470cf42c5211891013a9f3a0f9036749abe1 | refs/heads/master | 2020-04-15T15:50:44.881217 | 2018-10-19T18:00:05 | 2018-10-19T18:00:05 | 55,799,185 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,594 | py | import requests, httplib2, json, time
from oauth2client.service_account import ServiceAccountCredentials
from apiclient import discovery
import oauth2client
from oauth2client import client
from oauth2client import tools
from email.mime.text import MIMEText
from email.mime.image import MIMEImage
from email.mime.multipa... | [
"ivukotic@cern.ch"
] | ivukotic@cern.ch |
c143278afc362b186e45a61344e467ce938f73cf | ddd7e91dae17664505ea4f9be675e125337347a2 | /unused/2014/preprocess/preprocess_ndpi.py | e183a7517dc9cfbe7be7907701c28afb1afe6eb4 | [] | no_license | akurnikova/MouseBrainAtlas | 25c4134bae53827167e4b54ba83f215aec9f2d85 | ed1b5858467febdaed0a58a1a742764d214cc38e | refs/heads/master | 2021-07-15T17:17:19.881627 | 2019-02-22T06:00:17 | 2019-02-22T06:00:17 | 103,425,463 | 0 | 0 | null | 2018-04-27T19:08:02 | 2017-09-13T16:45:56 | Jupyter Notebook | UTF-8 | Python | false | false | 5,345 | py | #!/usr/bin/python
def execute_command(cmd):
try:
retcode = call(cmd, shell=True)
if retcode < 0:
print >>sys.stderr, "Child was terminated by signal", -retcode
else:
print >>sys.stderr, "Child returned", retcode
except OSError as e:
print >>sys.stderr, "Execution failed:", e
... | [
"cyc3700@gmail.com"
] | cyc3700@gmail.com |
5dd5ce0022a9d3e8a1091fad2365d5c27b5e5451 | 34fea597d7327536987b2b8342e4ff26f294e9ed | /Source/DataDictionary/txt2xml.py | 8f1b9a8871488c1a4a03bb96f9c2668ac16be8b8 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | hsorby/gdcm | bce8bcf436682bb8a5f1ff2b549a07d10943cf62 | cd1b5fc2872893d17eb3fe7abc17850e1fdff120 | refs/heads/master | 2021-01-20T22:35:25.037034 | 2011-12-15T22:31:03 | 2011-12-15T22:31:03 | null | 0 | 0 | null | null | null | null | WINDOWS-1252 | Python | false | false | 15,070 | py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import re,os
"""
GEMS
This parser parse a table formatted like this:
Attribute Name Tag VR VM
"""
class TextParser:
def __init__(self, inputfilename, outputfilename):
self._InputFilename = ''
self._OutputFilename = ''
def Parse(self):
infile = file(inputf... | [
"h.sorby@auckland.ac.nz"
] | h.sorby@auckland.ac.nz |
77058cba020de410735849d1908ef6510f24db88 | dd4d2589d1f14303cacd3b7ee1dd5f6bacd3bf3c | /company/amazon/graphs/connected_graphs.py | e8044bd1e1dd19d5a95ccc77e3a4796e68f2fa77 | [] | no_license | salujaharkirat/ds-algo | ec22eaae81bdb78f2818248508325a536aedbb7b | 819b5971826d97ec600b92776c5158518c9cbf22 | refs/heads/master | 2023-05-02T17:20:49.425484 | 2021-05-23T07:54:29 | 2021-05-23T07:54:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 631 | py | class Solution:
def dfs(self, isConnected):
visited = [0] * len(isConnected)
res = 0
def traverse(visited, i):
for j in range(len(isConnected)):
if isConnected[i][j] == 1 and visited[j] == 0:
visited[j] = 1
traverse... | [
"saluja.harkirat@gmail.com"
] | saluja.harkirat@gmail.com |
13866286b72f821ce21e6968b0f7be80736b3dc1 | 24b2f3f5f49ed19cf7fd3dcd433d6b72806e08cf | /python/sorting_and_searching/0363_Max_Sum_of_Rectangle_No_Larger_Than_K.py | 680321f332bc9186ac9d8af3bffac598b0194d6a | [] | no_license | lizzzcai/leetcode | 97089e4ca8c3c53b5a4a50de899591be415bac37 | 551cd3b4616c16a6562eb7c577ce671b419f0616 | refs/heads/master | 2021-06-23T05:59:56.928042 | 2020-12-07T03:07:58 | 2020-12-07T03:07:58 | 162,840,861 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,167 | py | '''
27/05/2020
363. Max Sum of Rectangle No Larger Than K - Hard
Tag: Binary Search, Dynamic Programming, Queue
Given a non-empty 2D matrix matrix and an integer k, find the max sum of a rectangle in the matrix such that its sum is no larger than k.
Example:
Input: matrix = [[1,0,1],[0,-2,3]], k = 2
Output: 2
Exp... | [
"lilcolinn@gmail.com"
] | lilcolinn@gmail.com |
9b06082fd362d65269019bd114f3fabdf83ff4c5 | 740ed147112eddc2581504f5a8c5c4cb4dbe32f6 | /pprof/projects/pprof/sqlite3.py | e407453388a8fe510e87f19c8ee2998d4bd0e9c8 | [] | no_license | CIB/pprof-study | 3765499c8111dfcf6f690ea192b9ce235f1f28c4 | 9d6b995ba21ced3fa39327eff6dc34274e3b3b56 | refs/heads/master | 2021-01-22T01:33:53.452195 | 2016-02-15T14:45:14 | 2016-02-15T14:45:14 | 37,426,320 | 0 | 0 | null | 2015-06-14T19:28:01 | 2015-06-14T19:28:00 | null | UTF-8 | Python | false | false | 2,569 | py | from pprof.projects.pprof.group import PprofGroup
from os import path
from plumbum import local
class SQLite3(PprofGroup):
""" SQLite3 """
NAME = 'sqlite3'
DOMAIN = 'database'
src_dir = "sqlite-amalgamation-3080900"
src_file = src_dir + ".zip"
src_uri = "http://www.sqlite.org/2015/" + src_fi... | [
"simbuerg@fim.uni-passau.de"
] | simbuerg@fim.uni-passau.de |
4b2cd183f9317d769c5c7ab8699d92dc79d30b09 | e10a6d844a286db26ef56469e31dc8488a8c6f0e | /grow_bert/lowcost/layers/resolution_layer.py | b35bb95842ab66c6af0c41c742b726d6721f1191 | [
"Apache-2.0",
"CC-BY-4.0"
] | permissive | Jimmy-INL/google-research | 54ad5551f97977f01297abddbfc8a99a7900b791 | 5573d9c5822f4e866b6692769963ae819cb3f10d | refs/heads/master | 2023-04-07T19:43:54.483068 | 2023-03-24T16:27:28 | 2023-03-24T16:32:17 | 282,682,170 | 1 | 0 | Apache-2.0 | 2020-07-26T15:50:32 | 2020-07-26T15:50:31 | null | UTF-8 | Python | false | false | 4,229 | py | # coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | [
"copybara-worker@google.com"
] | copybara-worker@google.com |
e3444263f858ef21d7e3d42b693a6d4a0113c448 | e122b7aa4f2f0b09962c2a3580b9a440ed1dbcce | /aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/BatchGetEdgeInstanceDriverConfigsRequest.py | fc162a96be2081c218889caa3105e475c54d4f0c | [
"Apache-2.0"
] | permissive | laashub-soa/aliyun-openapi-python-sdk | 0a07805972fb5893f933951960d0f53fc2938df9 | c0d98a5363225fc8ad4aee74e30d10f62403319b | refs/heads/master | 2023-02-28T00:17:05.934082 | 2021-02-05T09:46:35 | 2021-02-05T09:46:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,946 | 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 |
52020455331440cfe02942db01afd18aed00716a | 717558d6a075163294054bd5aea4ef3234df23ad | /models_all/st_test6.py | 020b56f9d7347dd2d7a7fd204cf82942113dc054 | [
"MIT"
] | permissive | RomeoV/pyomo-MINLP-benchmarking | 1270766397fbc4e57ea1bd0c2285fb7edf64062d | 996d2c8ee1cb9b03fe00c6246f52294337d8b92c | refs/heads/master | 2021-07-11T17:54:25.284712 | 2020-08-13T23:43:14 | 2020-08-13T23:43:14 | 185,664,992 | 8 | 1 | MIT | 2019-05-10T19:07:05 | 2019-05-08T19:09:05 | Python | UTF-8 | Python | false | false | 2,229 | py | # MINLP written by GAMS Convert at 05/15/20 00:51:23
#
# Equation counts
# Total E G L N X C B
# 6 1 0 5 0 0 0 0
#
# Variable counts
# x b i s1s s2s sc ... | [
"bernalde@cmu.edu"
] | bernalde@cmu.edu |
4d3e3795de4f0d14456e7c3b20dbe59dd3f65d27 | c9ddbdb5678ba6e1c5c7e64adf2802ca16df778c | /cases/synthetic/tree-big-1006.py | 9963ac98670192801ddc8a73ed6f01ffdc49ab9c | [] | 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,293 | 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 |
669b4b361e5ae6e31c58326b71d172bdfac6fa46 | 1d0613fb401e92b6861ea3f615561df854603db6 | /KiBuzzard/deps/fonttools/Tests/ttLib/tables/otBase_test.py | ce0416e429bf1d1d925f0deb9a77811759bbcc93 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"OFL-1.1",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | gregdavill/KiBuzzard | 8c84a4339108c9942e1ec0e05e4110bba49fd265 | 88c4129b3fbed2cad718c01e5e2d29204e2f2071 | refs/heads/main | 2023-09-01T19:46:45.146077 | 2023-08-31T11:55:10 | 2023-08-31T11:55:10 | 328,686,533 | 358 | 36 | MIT | 2023-08-31T12:12:45 | 2021-01-11T14:16:42 | Python | UTF-8 | Python | false | false | 3,188 | py | from fontTools.misc.textTools import deHexStr
from fontTools.ttLib.tables.otBase import OTTableReader, OTTableWriter
import unittest
class OTTableReaderTest(unittest.TestCase):
def test_readShort(self):
reader = OTTableReader(deHexStr("CA FE"))
self.assertEqual(reader.readShort(), -13570)
... | [
"greg.davill@gmail.com"
] | greg.davill@gmail.com |
e66cb54f081ee6a1b66de4c70b0070575006b270 | caf135d264c4c1fdd320b42bf0d019e350938b2d | /04_Algorithms/Leetcode/JZ23 二叉搜索树的后序遍历序列.py | 9fd12c4174b4cea3111d6a7932fcc8b955ad6e21 | [] | no_license | coolxv/DL-Prep | 4243c51103bdc38972b8a7cbe3db4efa93851342 | 3e6565527ee8479e178852fffc4ccd0e44166e48 | refs/heads/master | 2022-12-31T22:42:20.806208 | 2020-10-23T10:19:19 | 2020-10-23T10:19:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,853 | py | # -*- coding:utf-8 -*-
class Solution1:
def VerifySquenceOfBST(self, sequence):
def helper(seq):
if 0 < len(seq) < 2:
return True
elif len(seq) == 0:
return False
else:
pivot = seq[-1]
place = -1
... | [
"1574572981@qq.com"
] | 1574572981@qq.com |
e8fb944f87186041b706d37c50f6956045ae2213 | 7c39cc529a292967d8fc52718a227fccc0da53e4 | /src/crawler/crawler/items.py | 8341771ba3b5981723f73e6ed2a721d274f4581e | [] | no_license | carrie0307/parking-domain-detection | 860b5d1ad5e0e0344c4667e2e91149257a1068a6 | 9ff9f4f2b31c73599d0ac46eeb62634e2a8d940a | refs/heads/master | 2020-04-10T18:03:27.496758 | 2018-12-11T00:28:18 | 2018-12-11T00:28:18 | 161,192,700 | 8 | 1 | null | null | null | null | UTF-8 | Python | false | false | 502 | py | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class CrawlerItem(scrapy.Item):
# define the fields for your item here like:
# name = scrapy.Field()
'''
oldDomain = scrapy.Field()
... | [
"cst_study@163.com"
] | cst_study@163.com |
6e78a0942b241bb27c202408d2d7248f3628cdbc | 9689ebc06e7c9a5c1b5b19d34dbcf0f5b5b82cb6 | /speech/migrations/0125_auto_20190121_1023.py | b2e25a07b6d803abbd5e98a66ad8e95273c52cfe | [] | no_license | tigrezhito1/Ramas | 94fe57dc4235616522aa50b36f5a655861ecbb9f | fa894fa69f6bf2a645179cadc11fb8809e82700a | refs/heads/master | 2020-05-02T07:03:03.564208 | 2019-03-26T14:55:29 | 2019-03-26T14:55:29 | 177,808,426 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,863 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2019-01-21 10:23
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('speech', '0124_auto_20190121_0906'),
]
operations = [
migra... | [
"you@example.com"
] | you@example.com |
877180851854964f8c776d432dcf5da1e3a1f906 | 4a7494457d4ffcc32fd663835ceaa6360488f9e6 | /largest-subarray.py | 8f90cd5e9901bd472435d910a0b9fe416b59f539 | [] | no_license | eliyahuchaim/randomCodeChallenges | c5e35c7afc80f6c2acc482878256bb4710bbbe55 | 780e4404bcad20c6ccaba7a11c52c8d67c96cd59 | refs/heads/master | 2021-05-01T07:18:19.164784 | 2018-02-11T18:21:17 | 2018-02-11T18:21:17 | 121,152,975 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 418 | py | array = [1, -1, 5, 3, -7, 4, 5, 6, -100, 4]
def largestSubarray(array):
total = temp = 0
for n in array:
# temp += n if temp + n > 0 else 0
if temp + n < 0:
temp = 0
else:
temp += n
if total < temp: total = temp
return total
# print(largestSubarr... | [
"github email address"
] | github email address |
d217fb6e18d40c8667f11db7401b0d973258cfa1 | 5f2b22d4ffec7fc1a4e40932acac30256f63d812 | /mathematical-modeling/test/canadian_temperature.py | fcb568f1f5270207fcff7d06d953597f12abea66 | [] | no_license | Thpffcj/Python-Learning | 45734dd31e4d8d047eec5c5d26309bc7449bfd0d | 5dacac6d33fcb7c034ecf5be58d02f506fd1d6ad | refs/heads/master | 2023-08-04T21:02:36.984616 | 2021-09-21T01:30:04 | 2021-09-21T01:30:04 | 111,358,872 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,834 | py | # -*- coding: UTF-8 -*-
# Created by thpffcj on 2019/9/20.
import pandas as pd
import numpy as np
pd.set_option('display.max_columns', 40)
pd.set_option('display.width', 1000)
'''
[839 rows x 25 columns]
"Date/Time","Year","Month","Mean Max Temp (°C)","Mean Max Temp Flag","Mean Min Temp (°C)","Mean Min Temp Flag","M... | [
"1441732331@qq.com"
] | 1441732331@qq.com |
5573cd63e7ebaa8b444ea121a417072282d3ba39 | 1fc45a47f0e540941c87b04616f3b4019da9f9a0 | /tests/sentry/api/endpoints/test_project_environments.py | 3279e53b271d1c8c31363bcb8df014286d498391 | [
"BSD-2-Clause"
] | permissive | seukjung/sentry-8.15.0 | febc11864a74a68ddb97b146cc1d2438ef019241 | fd3cab65c64fcbc32817885fa44df65534844793 | refs/heads/master | 2022-10-28T06:39:17.063333 | 2018-01-17T12:31:55 | 2018-01-17T12:31:55 | 117,833,103 | 0 | 0 | BSD-3-Clause | 2022-10-05T18:09:54 | 2018-01-17T12:28:13 | Python | UTF-8 | Python | false | false | 1,174 | py | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from sentry.models import Environment
from sentry.testutils import APITestCase
class ProjectEnvironmentsTest(APITestCase):
def test_simple(self):
project = self.create_project()
env1 = Environment.objects.create... | [
"jeyce@github.com"
] | jeyce@github.com |
cb2f83b86946560fd8c598dfd20a0e7a84f4d13c | 6a0abe2f4172f680415d83f1946baaf85e5711b7 | /aliyun-python-sdk-imm/aliyunsdkimm/request/v20170906/DetectImageFacesRequest.py | 470f7c6aad17d81be0dde9d91e70745af3e23bed | [
"Apache-2.0"
] | permissive | brw123/aliyun-openapi-python-sdk | 905556b268cbe4398f0f57b48422b713d9e89a51 | 8c77db6fd6503343cffa3c86fcb9d11770a64ca2 | refs/heads/master | 2020-05-01T16:26:49.291948 | 2019-03-21T09:11:55 | 2019-03-21T09:11:55 | 177,572,187 | 1 | 0 | null | 2019-03-25T11:21:59 | 2019-03-25T11:21:59 | null | UTF-8 | Python | false | false | 1,290 | 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... | [
"haowei.yao@alibaba-inc.com"
] | haowei.yao@alibaba-inc.com |
43765cb5e4883a166f855945d77778bc48262c7f | 4c489dadcc7d5b59e95eb1991085509372233d53 | /backend/home/migrations/0001_load_initial_data.py | 54607830076275e75394db8f9cbd3dc37bd32255 | [] | no_license | crowdbotics-apps/test-26812 | 1a304728cd5230c7f7a843bb37be5b1f2a65f923 | dedd52fc3ab5cb0d5d49f1dafd93232b246beb87 | refs/heads/master | 2023-05-07T09:40:39.041733 | 2021-05-17T18:41:05 | 2021-05-17T18:41:05 | 368,288,198 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 526 | py | from django.db import migrations
def create_site(apps, schema_editor):
Site = apps.get_model("sites", "Site")
custom_domain = "test-26812.botics.co"
site_params = {
"name": "test",
}
if custom_domain:
site_params["domain"] = custom_domain
Site.objects.update_or_create(default... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
1752eb5d8c161c3697676c8be791bea383a7832b | acb8e84e3b9c987fcab341f799f41d5a5ec4d587 | /langs/2/f0v.py | 658e4418beac1328261dee4dfa89ecdbb068d26d | [] | no_license | G4te-Keep3r/HowdyHackers | 46bfad63eafe5ac515da363e1c75fa6f4b9bca32 | fb6d391aaecb60ab5c4650d4ae2ddd599fd85db2 | refs/heads/master | 2020-08-01T12:08:10.782018 | 2016-11-13T20:45:50 | 2016-11-13T20:45:50 | 73,624,224 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 486 | py | import sys
def printFunction(lineRemaining):
if lineRemaining[0] == '"' and lineRemaining[-1] == '"':
if len(lineRemaining) > 2:
#data to print
lineRemaining = lineRemaining[1:-1]
print ' '.join(lineRemaining)
else:
print
def main(fileName):
with open(fileName) as f:
for line in f:
... | [
"juliettaylorswift@gmail.com"
] | juliettaylorswift@gmail.com |
42092263ef3f5e333a75f78220560c9da11a25c8 | 4ca853aeabbd3e33f5c0f28699b3de7206ad83a7 | /ML With python/ASSIGNMENT/p41.py | 657bbf07ebc5b1d9c5524a377bc2fbccd8239179 | [] | no_license | kundan4U/ML-With-Python- | 9fe1ce5049591040521b0809e9cd154158364c72 | 5376693ae3f52721663adc713f6926c0ccccbf75 | refs/heads/main | 2023-06-17T20:27:30.411104 | 2021-07-21T18:47:23 | 2021-07-21T18:47:23 | 388,214,485 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 180 | py |
list=[]
print("plese Enter 10 integer number")
for i in range(0,10):
n=int(input())
list.append(n)
print("Sum of list is :",sum(list))
print("Average of list is :",sum(list)/10) | [
"kc946605@gmail.com"
] | kc946605@gmail.com |
d5a0b82e66988683dc1a7a08141b7edbbd417a8e | 20aadf6ec9fd64d1d6dffff56b05853e0ab26b1f | /l6/L6_pbm10.py | 3ae3245b6a76d7e97b2c8dab28e13dd0e95b16a6 | [] | no_license | feminas-k/MITx---6.00.1x | 9a8e81630be784e5aaa890d811674962c66d56eb | 1ddf24c25220f8b5f78d36e2a3342b6babb40669 | refs/heads/master | 2021-01-19T00:59:57.434511 | 2016-06-13T18:13:17 | 2016-06-13T18:13:17 | 61,058,244 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 277 | py | def howMany(aDict):
'''
aDict: A dictionary, where all the values are lists.
returns: int, how many values are in the dictionary.
'''
templist = aDict.values()
result = 0
for elmnt in aDict.values():
result += len(elmnt)
return result
| [
"femi1991@gmail.com"
] | femi1991@gmail.com |
b8766a10748c69ca7f71c5a655acc68584b7a37c | c9ddbdb5678ba6e1c5c7e64adf2802ca16df778c | /cases/synthetic/coverage-big-3190.py | 2fb8e0e6a673125695c09fac111c25d0e89336b5 | [] | 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 | 13,349 | py | count:int = 0
count2:int = 0
count3:int = 0
count4:int = 0
count5:int = 0
def foo(s: str) -> int:
return len(s)
def foo2(s: str, s2: str) -> int:
return len(s)
def foo3(s: str, s2: str, s3: str) -> int:
return len(s)
def foo4(s: str, s2: str, s3: str, s4: str) -> int:
return len(s)
def foo5(s: str,... | [
"647530+Virtlink@users.noreply.github.com"
] | 647530+Virtlink@users.noreply.github.com |
f08f4762946aef8780f1f38b462d4d8626e4a64d | a560269290749e10466b1a29584f06a2b8385a47 | /Notebooks/py/edmundzhang/emsemble-method-voting-lr-gb-rf-svc/emsemble-method-voting-lr-gb-rf-svc.py | a3d99dc1eba7755790009666723177c68666a38c | [] | no_license | nischalshrestha/automatic_wat_discovery | c71befad1aa358ae876d5494a67b0f4aa1266f23 | 982e700d8e4698a501afffd6c3a2f35346c34f95 | refs/heads/master | 2022-04-07T12:40:24.376871 | 2020-03-15T22:27:39 | 2020-03-15T22:27:39 | 208,379,586 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 18,628 | py | #!/usr/bin/env python
# coding: utf-8
# In[ ]:
# pandas
import pandas as pd
from pandas import Series,DataFrame
# numpy, matplotlib, seaborn
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
# machine learning
from sklearn.linear_model import LogisticRegression
from sklearn.svm import SVC, L... | [
"bitsorific@gmail.com"
] | bitsorific@gmail.com |
2e8b923f0207d66b8e635ac23e77072882adefa1 | 62261d7fbd2feab54b1b5f9f0fef33fd784873f9 | /src/results/deepfool/merge.py | 3ca3a046015f8a2c7f425357dd4043e353ce924f | [] | no_license | ychnlgy/DeepConsensus-experimental-FROZEN | 50ebfe25b33ce8715fb9f24285969831cef311f2 | 904ae3988fee1df20273e002ba53a49a0d811192 | refs/heads/master | 2020-03-31T06:18:38.029959 | 2018-12-02T05:04:52 | 2018-12-02T05:04:52 | 151,976,523 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 840 | py | import scipy.misc, os, collections, numpy
ORI = "original.png"
PER = "perturbed.png"
def pair(folder):
files = os.listdir(folder)
sep = collections.defaultdict(dict)
for f in files:
fid, lab = f.split("-")
im = scipy.misc.imread(os.path.join(folder, f))
sep[fid][lab] = im
... | [
"ychnlgy@gmail.com"
] | ychnlgy@gmail.com |
e3063f03197b9586200a1b0b57c839c13178ae36 | 8f7dee55fd89be91f5cc0f3539099d49575fe3a9 | /profile/context_processors.py | a5e74883e9f039415a0d319a2c201278b3bad380 | [] | no_license | qoin-open-source/samen-doen | f9569439a5b715ed08b4a4dadc3e58a89f9e1d70 | 9feadb90fe14d458102ff3b55e60c56e0c8349e4 | refs/heads/master | 2020-05-03T23:59:43.794911 | 2019-04-02T21:15:18 | 2019-04-02T21:15:18 | 178,876,128 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 549 | py | from django.conf import settings
#from cms.models import Page
def top_menu_items(request):
"""
Adds list of items to include in top menu (reverse ids from menu system).
"""
return {
'top_menu_items': settings.TOP_MENU_ITEMS
}
def tandc_url(request):
"""Adds terms and conditions url ... | [
"stephen.wolff@qoin.com"
] | stephen.wolff@qoin.com |
7714c67660d779859e7a8c5e203bd5850c7d3fcc | 092dd56a1bf9357466c05d0f5aedf240cec1a27b | /tests/fullscale/eqinfo/TestEqInfoTri.py | 90cb696cfd95f9f891ecb9e9d0875d78fd19a316 | [
"MIT"
] | permissive | rwalkerlewis/pylith | cef02d5543e99a3e778a1c530967e6b5f1d5dcba | c5f872c6afff004a06311d36ac078133a30abd99 | refs/heads/main | 2023-08-24T18:27:30.877550 | 2023-06-21T22:03:01 | 2023-06-21T22:03:01 | 154,047,591 | 0 | 0 | MIT | 2018-10-21T20:05:59 | 2018-10-21T20:05:59 | null | UTF-8 | Python | false | false | 2,571 | py | #!/usr/bin/env nemesis
#
# ----------------------------------------------------------------------
#
# Brad T. Aagaard, U.S. Geological Survey
# Charles A. Williams, GNS Science
# Matthew G. Knepley, University at Buffalo
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://g... | [
"baagaard@usgs.gov"
] | baagaard@usgs.gov |
3d16707eb061763a8a198215cb3901205f667840 | 918b8b356abdaed27ee2dc1ad45503e32d8d8080 | /twisted/words/im/pbsupport.py | 6db05b771f1f133ce630598d31b06ddb7c36ec9b | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | hitzjd/Balance-Simulate | 683c7b424195131e4ec5691e930e0ed909631d0d | 22f06f34b0e4dbbf887f2075823dcdf4429e4b8e | refs/heads/master | 2020-03-12T09:51:50.704283 | 2018-04-22T11:27:18 | 2018-04-22T11:27:18 | 130,561,072 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,673 | py | # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
"""L{twisted.words} support for Instance Messenger."""
from __future__ import nested_scopes
from twisted.internet import defer
from twisted.internet import error
from twisted.python import log, components
from twisted.python.failure i... | [
"hitwhzjd@163.com"
] | hitwhzjd@163.com |
121e27cfcaef5efab2c56974139a1bafd566952e | edbf8601ae771031ad8ab27b19c2bf450ca7df76 | /19-Remove-Nth-Node-From-End-of-List/RemoveNthNodeFromEndOfList.py3 | 8a93b5636d86f21ee4c093c44be72653cf74c6a3 | [] | no_license | gxwangdi/Leetcode | ec619fba272a29ebf8b8c7f0038aefd747ccf44a | 29c4c703d18c6ff2e16b9f912210399be427c1e8 | refs/heads/master | 2022-07-02T22:08:32.556252 | 2022-06-21T16:58:28 | 2022-06-21T16:58:28 | 54,813,467 | 3 | 2 | null | 2022-06-21T16:58:29 | 2016-03-27T05:02:36 | Java | UTF-8 | Python | false | false | 670 | py3 | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
def removeNthFromEnd(self, head: ListNode, n: int) -> ListNode:
if head==None or n<0 :
return None
dummy = ListNode(0)
dummy.next... | [
"gxwangdi@gmail.com"
] | gxwangdi@gmail.com |
755afec3b1065969f31399dc2818065df4c4ce1b | e3fe234510d19c120d56f9a2876b7d508d306212 | /tool/add_user_info.py | cf7926ddc05cd92b753d4b9fb6fff028de2b4ba3 | [
"Apache-2.0"
] | permissive | KEVINYZY/python-tutorial | 78b348fb2fa2eb1c8c55d016affb6a9534332997 | ae43536908eb8af56c34865f52a6e8644edc4fa3 | refs/heads/master | 2020-03-30T02:11:03.394073 | 2019-12-03T00:52:10 | 2019-12-03T00:52:10 | 150,617,875 | 0 | 0 | Apache-2.0 | 2018-09-27T16:39:29 | 2018-09-27T16:39:28 | null | UTF-8 | Python | false | false | 863 | py | # -*- coding: utf-8 -*-
# Author: XuMing <shibing624@126.com>
# Data: 17/8/30
# Brief:
import sys
path_user_cdc_client = sys.argv[1]
path_file = sys.argv[2]
path_output = sys.argv[3]
userid_map = {}
with open(path_user_cdc_client, "r")as f:
for line in f:
userid = line.strip().split("\t")[0]
us... | [
"507153809@qq.com"
] | 507153809@qq.com |
d1faa712aa4511eb6b3eab04b47070bb02eb3a92 | 1eddc123709611cf2ddccb0b7d48b722b2a09a5d | /plugins/modules/fmgr_firewall_gtp_messageratelimit.py | d76a992b2291e11e40fa13858bb313926d01ad54 | [] | no_license | fortinet-ansible-dev/ansible-galaxy-fortimanager-collection | bfb2014a72007358b491bb1d27c0fa3191ec62a8 | 63b65abce410ed4d6b76e3dd1dcf7a4341cc173d | refs/heads/main | 2023-07-09T04:33:38.304263 | 2023-06-21T21:11:57 | 2023-06-21T21:11:57 | 242,629,431 | 10 | 18 | null | 2022-12-16T15:57:16 | 2020-02-24T02:28:03 | Python | UTF-8 | Python | false | false | 111,403 | py | #!/usr/bin/python
from __future__ import absolute_import, division, print_function
# Copyright 2019-2023 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the ... | [
"hq-devops-admin@fortinet.com"
] | hq-devops-admin@fortinet.com |
a7cb90a23bc7cad769ce94384e03a03fa159fdf6 | fd8ef75bb06383538cdb21ed2a0ef88e570179b7 | /src/openfermion/resource_estimates/thc/compute_lambda_thc.py | 16fa0ef8d1fcf0fdb71359635f9c43ccda4892ed | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | quantumlib/OpenFermion | d1147383f99573d19005bd0f3e0120e9e9bed04c | 788481753c798a72c5cb3aa9f2aa9da3ce3190b0 | refs/heads/master | 2023-09-04T11:00:32.124157 | 2023-08-24T21:54:30 | 2023-08-24T21:54:30 | 104,403,768 | 1,481 | 406 | Apache-2.0 | 2023-08-24T21:54:31 | 2017-09-21T22:10:28 | Python | UTF-8 | Python | false | false | 2,973 | py | #coverage:ignore
"""
Compute lambdas for THC according to
PRX QUANTUM 2, 030305 (2021) Section II. D.
"""
import numpy as np
from openfermion.resource_estimates.molecule import pyscf_to_cas
def compute_lambda(pyscf_mf,
etaPp: np.ndarray,
MPQ: np.ndarray,
use_er... | [
"noreply@github.com"
] | quantumlib.noreply@github.com |
308fa8a66e05dc307f31798d5666ddc5f04c04b9 | a6d8465aed280c36fb7129e1fa762535bae19941 | /embroidery365/builder/models.py | 2a66c14eedd56fbd8017ed36c96924943f213b2b | [] | no_license | rahuezo/365digitizing_and_embroidery | c61c53f567e73163a67d3fd568a20551a3681ccd | 41a22b6ff8bd83238219f2d34ce13b5a8ef9bb57 | refs/heads/master | 2020-09-02T11:59:07.702947 | 2017-11-11T02:40:01 | 2017-11-11T02:40:01 | 98,377,801 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,713 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import User
class BaseItem(models.Model):
name = models.CharField(max_length=255)
def __str__(self):
return self.name
class Style(models.Model):
name = models.CharField(... | [
"rahuezo@ucdavis.edu"
] | rahuezo@ucdavis.edu |
0c681f2924ffd76c5f9ae78985c972d4343bc44c | 0d2f636592dc12458254d793f342857298c26f12 | /11-1(tag).py | 734ce229ca7758695bc91f180e55aa7f25671b3e | [] | no_license | chenpc1214/test | c6b545dbe13e672f11c58464405e024394fc755b | 8610320686c499be2f5fa36ba9f11935aa6d657b | refs/heads/master | 2022-12-13T22:44:41.256315 | 2020-09-08T16:25:49 | 2020-09-08T16:25:49 | 255,796,035 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 261 | py |
def absolute(n):
""" 絕對值設計 """
if n < 0:
n = -n
print("絕對值是 ", n)
x = int(input("請輸入數值 = "))
absolute(x)
"""自己做的"""
"""n = input("請輸入數值=")
def absolute(n):
return abs(n)"""
| [
"kkbuger1523@gmail.com"
] | kkbuger1523@gmail.com |
acc6ecdc5245f8d6a5f64b44c64aaf65b596ec4f | 7b4820948845f55274b211d676ab8a6253a6298b | /addons/plugin.video.onlinemovies/default.py | 85dfea3da113da4f3a25fa280fcd2dfecd7eab42 | [] | no_license | bopopescu/mw | 524c57d4b859751e298b907a12e44e9711ef72a6 | 5ef2acea0fb4150578e53201463c6bc5da37be20 | refs/heads/master | 2021-05-30T19:33:11.750160 | 2016-01-11T05:28:46 | 2016-01-11T05:28:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,475 | py | import urllib,urllib2,re,xbmcplugin,xbmcgui,urlresolver,sys,xbmc,xbmcaddon,os,urlparse
from t0mm0.common.addon import Addon
from metahandler import metahandlers
addon_id = 'plugin.video.onlinemovies'
selfAddon = xbmcaddon.Addon(id=addon_id)
addon = Addon(addon_id, sys.argv)
ADDON2=xbmcaddon.Addon(id='plugin.vid... | [
"bialagary@Garys-Mac-mini.local"
] | bialagary@Garys-Mac-mini.local |
fbd130a61a01bd9a6823abfaf12fe6aaabe8bdfa | 7e80b503e6563f190147e5e6bc2b47d5d8020510 | /xpdan/tests/test_main_pipeline.py | d48ca0a8d228efbdc4760025b3eb6e1f3beab1e4 | [] | no_license | eaculb/xpdAn | a687c15175fdff82a0f2092509faa7c2da288357 | 82e16ba50ddbfb9dcd0dba9b3b181354c329d58a | refs/heads/master | 2021-09-04T06:07:48.173024 | 2017-10-11T14:24:59 | 2017-10-11T14:24:59 | 106,735,663 | 0 | 0 | null | 2017-10-12T19:20:47 | 2017-10-12T19:20:47 | null | UTF-8 | Python | false | false | 1,230 | py | import os
import time
from xpdan.pipelines.main import conf_main_pipeline
def test_main_pipeline(exp_db, fast_tmp_dir, start_uid3):
"""Decider between pipelines"""
source = conf_main_pipeline(exp_db, fast_tmp_dir,
vis=True,
write_to_disk=True,
... | [
"cjwright4242@gmail.com"
] | cjwright4242@gmail.com |
e14f2fe359cddfd679bf0d49b1f8bd0071ee606d | acb8e84e3b9c987fcab341f799f41d5a5ec4d587 | /langs/7/rvm.py | e7aa454725a371fb08c6f2504204562064724860 | [] | no_license | G4te-Keep3r/HowdyHackers | 46bfad63eafe5ac515da363e1c75fa6f4b9bca32 | fb6d391aaecb60ab5c4650d4ae2ddd599fd85db2 | refs/heads/master | 2020-08-01T12:08:10.782018 | 2016-11-13T20:45:50 | 2016-11-13T20:45:50 | 73,624,224 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 486 | py | import sys
def printFunction(lineRemaining):
if lineRemaining[0] == '"' and lineRemaining[-1] == '"':
if len(lineRemaining) > 2:
#data to print
lineRemaining = lineRemaining[1:-1]
print ' '.join(lineRemaining)
else:
print
def main(fileName):
with open(fileName) as f:
for line in f:
... | [
"juliettaylorswift@gmail.com"
] | juliettaylorswift@gmail.com |
66edbd7ed1b95691bb48c4cba65b30a6f7bba699 | 523239f9fd7aa76b246e7fdf16f3298b0e178878 | /Old_Code/code/miscc/loss_back.py | fe2c264abc08624dd34fbcfd76d04e2cf696c16e | [] | no_license | Trccc/SBA-GAN | d1e69421255f56d7558fbbb13478eff51c6ff5e2 | 581d0ced59b0b00900ad68cc927d9ba39cd58671 | refs/heads/master | 2020-11-25T03:02:00.822588 | 2019-12-03T03:41:00 | 2019-12-03T03:41:00 | 228,468,462 | 2 | 0 | null | 2019-12-16T20:19:32 | 2019-12-16T20:19:31 | null | UTF-8 | Python | false | false | 8,193 | py | # Created by Chirong Nov 4th 21:01
import torch
import torch.nn as nn
import numpy as np
from miscc.config import cfg
from GlobalAttention import func_attention
# ##################Loss for matching text-image###################
def cosine_similarity(x1, x2, dim=1, eps=1e-8):
"""Returns cosine similarity betwee... | [
"google-dl-platform@googlegroups.com"
] | google-dl-platform@googlegroups.com |
33ffbc046e4b0ac1d10d366ef83a771449e1ddc9 | 5ba2ea4694d9423bc5435badba93b7b8fedfadd0 | /webapp/common/form_filter.py | b8a0c53c890bb381213adb1227e781f2a1f1a292 | [] | no_license | Digital-Botschafter-und-mehr/mein-stadtarchiv | bdf480d82b366253afd27c697143ad5d727f652f | a9876230edac695710d4ec17b223e065fa61937c | refs/heads/master | 2023-02-05T18:43:13.159174 | 2021-01-01T09:35:46 | 2021-01-01T09:35:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,590 | py | # encoding: utf-8
"""
Copyright (c) 2017, Ernesto Ruge
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditi... | [
"mail@ernestoruge.de"
] | mail@ernestoruge.de |
ba73735c7237f4e48b4b1fbd2aa067c357f01d0e | c2be187155aabf59a4c0d3f5065bc26239c0b827 | /get_products.py | f2882901593542808abf671d139350736cc370d0 | [] | no_license | dankCodeNugs/tmtext | 1d6c54f79399bfa5e6f3905c0f72ba0be59d8d0d | 8e2d834775f440def7f57294674b8109b46ee191 | refs/heads/master | 2023-03-16T08:49:38.456929 | 2016-12-20T19:45:54 | 2016-12-20T19:45:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,055 | py | #!/usr/bin/python
# extract products from a certain output file, that belong to a certain category/department
# and write their respective category ids to a file
# usage: site given as first argument, category as second argument
import json
import codecs
import re
import sys
from pprint import pprint
def get_produc... | [
"life.long.learner127@outlook.com"
] | life.long.learner127@outlook.com |
5ccb3f3b16bf9a927d6c3b37a551c8127225de2e | 696b9b8963a6b26776849f69263e50860317a37d | /PyPoll/main.py | 61a19cdc1d53b9a47dffc15695d5372dc380ec3e | [] | no_license | neelarka/python-challenge | 64a7099470b2885511b568625c8c0e320801da82 | 9060c30ed9a319807fd5bd8756b3bc36f522bbc8 | refs/heads/master | 2020-03-24T22:00:26.874430 | 2018-08-05T04:23:11 | 2018-08-05T04:23:11 | 143,061,907 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,350 | py | import os
import csv
from pathlib import Path
filepath = Path("../../Desktop/election_data.csv")
with open(filepath, newline="", encoding='utf-8' ) as csvfile:
csvreader = csv.reader(csvfile, delimiter=",")
reader = csv.reader(csvfile)
next(reader, None)
Voter_Id = []
county = []
candidate = []... | [
"you@example.com"
] | you@example.com |
5e08cd42df0284a8dbe8ab6c59c652b94834a5ae | b2d4c5b7738f3b53126d73bcac6165cbb32445eb | /05_数据存储/02-关系型数据库存储/_01_MySQL的存储/_05_删除数据.py | c378a6ab681dba229320434e26d188cf3b8b0411 | [] | no_license | xuelang201201/Python3Spider | 933911abb5056bc7864d3c6bfaf1d7f75ca6ac98 | 0b190f11f74f66058eda6a40a000c5d6076764ea | refs/heads/master | 2022-07-02T11:15:42.032997 | 2020-05-16T13:01:08 | 2020-05-16T13:01:08 | 259,358,807 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 427 | py | import pymysql
db = pymysql.connect(host='localhost', user='root', password='123456', port=3306, db='spiders')
cursor = db.cursor()
table = 'students'
condition = 'age > 20'
sql = 'DELETE FROM {table} WHERE {condition}'.format(table=table, condition=condition)
try:
cursor.execute(sql)
print('Successful')
... | [
"xuelang201201@gmail.com"
] | xuelang201201@gmail.com |
903c419d5b5ada8e3f10bf8af828028c8b21c111 | 0a9949a7dbe5f7d70028b22779b3821c62eb6510 | /static/flight_price_analysis/conf/conf.py | 03dee15c55f02670e982b0b01d56b2fd80b699f2 | [] | no_license | 744996162/warehouse | ed34f251addb9438a783945b6eed5eabe18ef5a2 | 3efd299a59a0703a1a092c58a6f7dc2564b92e4d | refs/heads/master | 2020-06-04T22:10:14.727156 | 2015-07-03T09:40:09 | 2015-07-03T09:40:09 | 35,603,929 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 956 | py | #coding=utf-8
__author__ = 'zhangc'
import ConfigParser
import os
import sys
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
#测试路径
# conf_path=path+"/conf/db.conf"
# conf_path=path+"/conf/db3.conf"
#部署路径
# conf_path="conf/db3.conf"
# conf_path="db.conf"
conf_path = BASE_DIR+"/conf/db.conf"
class DBConf(object):
... | [
"744996162@qq.com"
] | 744996162@qq.com |
4c67b10133e699217a67331d1ee268eb65d7d2c7 | 34cab614568d4ce3cf28167450d6d2bc2bf7bfbf | /importers/cunia.py | 287229bfda6b4aace79d72da50a213322351c454 | [] | no_license | Halicea/ArmandDictionar | 07949936efd3a55edfa1e7a1e12d1ed8c48c4bdf | a82f77065e03cafa6c6b50c163fa53858ab356b8 | refs/heads/master | 2016-09-05T14:03:41.261258 | 2013-04-29T10:27:27 | 2013-04-29T10:27:27 | 964,892 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,917 | py | # -*- coding: utf-8 -*-
import codecs
import re
import os
langs = ['ro', 'en', 'fr']
err_count = 0
tr_not_found = {'ro':0, 'en':0, 'fr':0}
with_ref=0
def parse_line(l, index):
global err_count
global tr_not_found
global with_ref
results = []
#synonims or similar meaning
words = l.split(u'§')
for i in rang... | [
"costa@halicea.com"
] | costa@halicea.com |
c8dee9b1d52c4575ef88af44d875106e2a851a69 | 1f620140538728b25fd0181e493975534aa0e1fb | /project/basis/admin.py | 29ffeb36206b3b503e22a6c5ab29970a5e48bb91 | [] | no_license | YukiUmetsu/recipe-app-api-python-django | 2a22f63871489cd073d5c312e20fd9fe49eee5a5 | abaf4a0826e840e990781b20aaa5d7f0577c54c5 | refs/heads/master | 2022-11-30T03:11:16.129881 | 2020-03-03T20:04:00 | 2020-03-03T20:04:00 | 244,045,701 | 0 | 0 | null | 2022-11-22T05:21:23 | 2020-02-29T21:41:25 | Python | UTF-8 | Python | false | false | 947 | py | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.utils.translation import gettext as _
from basis import models
class UserAdmin(BaseUserAdmin):
ordering = ['id']
list_display = ['email', 'name']
fieldsets = (
(None, {'fields': ('email', ... | [
"yuuki.umetsu@gmail.com"
] | yuuki.umetsu@gmail.com |
f8e645fdf821b4a8a13e40bf4c64379b0006bd1f | 8af71789222675dddd541bafba681143162f4206 | /apps/entidades/admin.py | 0036ab360b549a2fda945f3612c3020591d73f18 | [] | no_license | RubenAlvarenga/nhakanina | b82d23d80e06aaf49693c8fb65a70ee73e130994 | 3e39a522029c9a6cbb455b2e736ce335ebc4bf1d | refs/heads/master | 2021-01-10T15:32:01.550423 | 2016-03-07T17:34:09 | 2016-03-07T17:34:09 | 43,449,047 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 873 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib import admin
from .models import Persona, Alumno
from apps.finanzas.models import PlanPago
class AlumnoAdmin(admin.ModelAdmin):
list_display = ('codigo', 'cedula', 'get_full_name')
search_fields = ['cedula', 'apellido1', 'apellido2', 'nombre1',... | [
"rubenalvarengan@gmail.com"
] | rubenalvarengan@gmail.com |
c5b809b7fc38a9ff5c2f441e16cef7229f172c5c | 019fd2c29b8239d7b0a3906cfbdddfd440362417 | /automl/google/cloud/automl_v1beta1/gapic/prediction_service_client_config.py | d93ca92f8ed2cfa20ca2620e5999b95da2b81014 | [
"Apache-2.0"
] | permissive | tswast/google-cloud-python | 1334d26cdb994293f307d889251d7daef5fcb826 | d897d56bce03d1fda98b79afb08264e51d46c421 | refs/heads/master | 2021-06-10T17:40:06.968584 | 2020-01-11T17:41:29 | 2020-01-11T17:41:29 | 58,775,221 | 1 | 1 | Apache-2.0 | 2019-04-10T17:09:46 | 2016-05-13T22:06:37 | Python | UTF-8 | Python | false | false | 1,173 | py | config = {
"interfaces": {
"google.cloud.automl.v1beta1.PredictionService": {
"retry_codes": {
"idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"],
"non_idempotent": [],
},
"retry_params": {
"default": {
"... | [
"noreply@github.com"
] | tswast.noreply@github.com |
3b260f7d947e059cd8f8835dcc76c8a3a680903b | f889bc01147869459c0a516382e7b95221295a7b | /test/test_error_parameters_item.py | f28c7deb40b2328947bfa816d2d8f5b8c4d4729a | [] | no_license | wildatheart/magento2-api-client | 249a86f5c0289743f8df5b0324ccabd76f326512 | e6a707f85b37c6c3e4ef3ff78507a7deb8f71427 | refs/heads/master | 2021-07-14T16:01:17.644472 | 2017-10-18T13:33:08 | 2017-10-18T13:33:08 | 107,412,121 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 977 | py | # coding: utf-8
"""
Magento Community
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sy... | [
"sander@wildatheart.eu"
] | sander@wildatheart.eu |
36085263fc74873d7a489b295947c34b95ac2da9 | c39f999cae8825afe2cdf1518d93ba31bd4c0e95 | /PYME/misc/editgrid.py | 88352f19f837e68d04a636a2ed4eefcea4deadab | [] | no_license | WilliamRo/CLipPYME | 0b69860136a9b2533f2f29fc29408d7471cb934d | 6596167034c727ad7dad0a741dd59e0e48f6852a | refs/heads/master | 2023-05-11T09:50:58.605989 | 2023-05-09T02:17:47 | 2023-05-09T02:17:47 | 60,789,741 | 3 | 1 | null | 2016-06-17T08:52:44 | 2016-06-09T16:30:14 | Python | UTF-8 | Python | false | false | 2,557 | py | # -*- coding: utf-8 -*-
import wx
import wx.grid
import numpy as np
class EditGrid(wx.grid.Grid):
def __init__(self, *args, **kwargs):
wx.grid.Grid.__init__(self, *args, **kwargs)
wx.EVT_KEY_DOWN(self, self.OnKeyDown)
def OnKeyDown(self, event):
key = event.GetKeyCode()
... | [
"willi4m@zju.edu.cn"
] | willi4m@zju.edu.cn |
9b6987d7cb66e6ddd8024c55a1385a3fdea8a190 | 1cccad3f2b8cb9872fd47360486f43ed90f57c9b | /config/snippets/models.py | fcd342d2d7995fc13300285bb1aba732f10a9e9a | [] | no_license | moorekwon/rest-api | bf377cd98aa07792fd08bda70ff2621c9ca3bf9b | 5455c021dd2796968cd035f41ad7de44ec4201c4 | refs/heads/master | 2021-01-02T15:04:18.630201 | 2020-03-02T15:55:30 | 2020-03-02T15:55:30 | 239,673,224 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,157 | py | from django.db import models
# Create your models here.
from pygments.lexers import get_all_lexers
from pygments.styles import get_all_styles
from config.settings import AUTH_USER_MODEL
LEXERS = [item for item in get_all_lexers() if item[1]]
LANGUAGE_CHOICES = sorted([(item[1][0], item[0]) for item in LEXERS])
STYLE... | [
"raccoonhj33@gmail.com"
] | raccoonhj33@gmail.com |
1f2f281bc5d31a4d6b6acc05d5758e652471300c | 2d4ab8e3ea9fd613ec0ae0c1956b68874c9b5f06 | /paip/pipelines/variant_calling/index_alignment.py | 5237bd5c232a9b2a4000d6340f70cca0582b76b0 | [] | no_license | biocodices/paip | 4abd39cbbd372a68592da87177c70c403d5a661d | 040a62c11e5bae306e2de4cc3e0a78772ee580b3 | refs/heads/master | 2021-01-17T20:48:28.642255 | 2019-07-26T14:30:58 | 2019-07-26T14:30:58 | 62,604,413 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 734 | py | from paip.task_types import SampleTask
from paip.pipelines.variant_calling import MarkDuplicates
from paip.helpers.create_cohort_task import create_cohort_task
class IndexAlignment(SampleTask):
"""
Takes a BAM and creates its BAI (index) companion.
"""
REQUIRES = MarkDuplicates
OUTPUT = "dupmarked... | [
"juanmaberros@gmail.com"
] | juanmaberros@gmail.com |
af319fa3841c5cb66f3ce96349db1ab481a2337d | d3efc82dfa61fb82e47c82d52c838b38b076084c | /Autocase_Result/Risk/FK_FKYW_PG_KCB_212.py | 06c0ff949a1a41fb9928d88cc150b43d6ed2101e | [] | no_license | nantongzyg/xtp_test | 58ce9f328f62a3ea5904e6ed907a169ef2df9258 | ca9ab5cee03d7a2f457a95fb0f4762013caa5f9f | refs/heads/master | 2022-11-30T08:57:45.345460 | 2020-07-30T01:43:30 | 2020-07-30T01:43:30 | 280,388,441 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,564 | py | #!/usr/bin/python
# -*- encoding: utf-8 -*-
import sys
import os
sys.path.append("/home/yhl2/workspace/xtp_test/Autocase_Result/Risk/service")
from order import f
sys.path.append("/home/yhl2/workspace/xtp_test/service")
from QueryStkPriceQty import *
from log import *
from utils import *
sys.path.append("/home/yhl2/wo... | [
"418033945@qq.com"
] | 418033945@qq.com |
38e4fda8720303f4e1bd2540c6a20bf972c60ed9 | f546248daf7fd64aeff6517e9fea668b459f9b62 | /yatwin/interfaces/onvif/wsdl/wsdl/errors.py | 557ffa417b37c79dad41bfc06a4d843c207004bc | [] | no_license | andre95d/python-yatwin | 2310b6c6b995771cea9ad53f61ad37c7b10d52d0 | 7d370342f34e26e6e66718ae397eb1d81253cd8a | refs/heads/master | 2023-03-16T18:06:17.141826 | 2020-05-12T23:04:53 | 2020-05-12T23:04:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 319 | py | """
Library which contains errors
All errors inherit from <Exception>, then pass
... essentially just renaming the <Exception>
Contains:
<FileDoesNotExist>
<InvalidArgument>
<ParseError>
"""
class FileDoesNotExist(Exception): pass
class InvalidArgument(Exception): pass
class ParseError(Exception): pass
| [
"26026015+tombulled@users.noreply.github.com"
] | 26026015+tombulled@users.noreply.github.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.