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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12ceb17dde9e62bad12f5290cd23d191e8114f88 | fb0d368a0a1af269de38a296ebe8aa85e6785ee9 | /plugins/item_tasks/server/cli_parser.py | 79b4f806927c3d1643b61e44ef70b0cec217593d | [
"Apache-2.0"
] | permissive | sutartmelson/girder | 4e1a8d086e48c0a655b45707d624acc77147db23 | d124d3363c86064fa9ef0d3e461fca8e731b81b2 | refs/heads/master | 2020-05-30T22:51:30.643977 | 2017-06-06T13:01:42 | 2017-06-06T13:01:42 | 58,329,911 | 0 | 0 | null | 2016-05-08T20:25:35 | 2016-05-08T20:25:34 | null | UTF-8 | Python | false | false | 4,251 | py | import ctk_cli
import itertools
import os
from girder.models.model_base import ValidationException
from girder.plugins.worker import constants
_SLICER_TO_GIRDER_WORKER_INPUT_TYPE_MAP = {
'boolean': 'boolean',
'integer': 'integer',
'float': 'number',
'double': 'number',
'string': 'string',
'int... | [
"zach.mullen@kitware.com"
] | zach.mullen@kitware.com |
ae136e0ab30772984c0e437e68c38b499091ebf6 | 826a8aeb87cb074938b2056ada22c89b9bd9276c | /test.py | a67e6332d135bd82a5add06f88f209a57d7e1547 | [] | no_license | priyom/priyomdb2 | ce441d755d021c838684aba705b3fb905461ca9f | 47deecab60febd427af692149788d37cd9f770ba | refs/heads/master | 2020-07-04T01:59:29.506148 | 2014-03-03T11:51:14 | 2014-03-03T11:51:14 | 25,634,647 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 483 | py | #!/usr/bin/python2
# encoding=utf8
from __future__ import absolute_import, unicode_literals, print_function
import time
from datetime import datetime
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
import priyom.consistency
import priyom.model as model
engine = create_engine('mysql://pr... | [
"j.wielicki@sotecware.net"
] | j.wielicki@sotecware.net |
d89513cacd3076d29ae48e71669f136780a7c89f | 8634b4f7f2293bf431ba8ed59e95f80abc59483f | /Homework/12/main.py | 71a7c963b22fbc17689ada2e95edeef4ed5bb243 | [] | no_license | TitanVA/Metiz | e1e2dca42118f660356254c39c7fadc47f772719 | e54f10b98226e102a5bb1eeda7f1e1eb30587c32 | refs/heads/master | 2020-12-22T11:44:58.746055 | 2020-02-10T14:41:16 | 2020-02-10T14:41:16 | 236,770,476 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 499 | py | import pygame
from body import Body
import functions as fs
from settings import Settings
def run_game():
pygame.init()
ai_settings = Settings()
screen = pygame.display.set_mode((ai_settings.screen_width,
ai_settings.screen_height))
body = Body(screen)
pygame.d... | [
"viktorbezai@gmail.com"
] | viktorbezai@gmail.com |
7f7b74b6d51c039b44bd3835cfb39f27f19cf5ab | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2607/60829/292435.py | 6444270ef4ed48995093bddc1a2fe009718dd2d5 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,018 | py | def a(x):
res=[]
for i in range(len(x)):
res.append(int(x[i]))
return res
def judge(x):
res=[]
for i in x:
if not i in res:
res.append(i)
if res==[0,1,2]:
return True
else:
return False
n=int(input())
for p in range(n):
count=[]
s=a(str(inp... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
c09b204f868edfd5f1d9756b239aa4425f21ed83 | 4a1273f72e7d8a07a3fa67ac9f2709b64ec6bc18 | /tests/run_tests.py | d0248ef9d055bf5fd569d0a42866e153334ececa | [] | no_license | WealthCity/django-project | 6668b92806d8c61ef9e20bd42daec99993cd25b2 | fa31fa82505c3d0fbc54bd8436cfc0e49c896f3e | refs/heads/dev | 2021-01-19T14:10:52.115301 | 2017-04-12T11:23:32 | 2017-04-12T11:23:32 | 88,132,284 | 0 | 1 | null | 2017-04-13T06:26:30 | 2017-04-13T06:26:29 | null | UTF-8 | Python | false | false | 473 | py | #!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
from django.test.utils import get_runner
#from django.test.utils import setup_test_environment
if __name__ == "__main__":
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.test_settings'
django.setup()
TestRunner = get_r... | [
"peterroth0612@gmail.com"
] | peterroth0612@gmail.com |
07e35864dbee7959b626d634e72014526b2f9654 | e461333f1253861829c82a92e345fa7d72518ef6 | /blog/models.py | a1ef570e0f71f70be6101442e4128506ac788dd0 | [] | no_license | slowlearner99/ideal-waffle | 98b548f58ea3da08ef797e7b04ffa1e5f2a45a05 | dc20454580db5807e0b83d667fb11c755fecaf13 | refs/heads/master | 2021-05-02T06:30:52.141729 | 2018-02-09T06:20:11 | 2018-02-09T06:20:11 | 120,859,193 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 479 | py | from django.db import models
from django.utils import timezone
class Post(models.Model):
author=models.ForeignKey('auth.User',on_delete=models.CASCADE)
title=models.CharField(max_length=200)
text=models.TextField()
created_date=models.DateTimeField(default=timezone.now)
published_date=models.DateTimeField(bla... | [
"sachinjose16@gmail.com"
] | sachinjose16@gmail.com |
0affee339d945f6e06ccff51066566f806486aec | 0f9c9e4c60f28aa00aff8b80e1e4c142c61d24ce | /Python/SwordOffer/reverse_sentence.py | 709437a5803ddb710b5e629aea81631700057e99 | [] | no_license | shouliang/Development | c56fcc69e658393c138b63b507b96c48232128d5 | b7e3b02c50d54515e584cb18dff83109224245d0 | refs/heads/master | 2020-03-22T09:14:51.070228 | 2019-08-29T02:50:26 | 2019-08-29T02:50:26 | 139,825,052 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,268 | py | # coding=utf-8
''''
题目描述
牛客最近来了一个新员工Fish,每天早晨总是会拿着一本英文杂志,写些句子在本子上。
同事Cat对Fish写的内容颇感兴趣,有一天他向Fish借来翻看,但却读不懂它的意思。例如,“student. a am I”。
后来才意识到,这家伙原来把句子单词的顺序翻转了,正确的句子应该是“I am a student.”。
Cat对一一的翻转这些单词顺序可不在行,你能帮助他么?
思路:先翻转整个句子,再单独翻转每个单词
'''
class Solution:
def ReverseSentence(self, s):
if not s:
ret... | [
"git@git.dxl.cc:node/hunqing.git"
] | git@git.dxl.cc:node/hunqing.git |
4303ab08ba740fd8b2d44c1b55038746ee90d0b9 | 7ba55da528467cc7d15edec37b955ebe9f9176f9 | /docs/examples/03_backends_ros/files/04_plan_motion.py | 406c5786f88eacfb3d123c54d0e6f04b730420dc | [
"MIT"
] | permissive | xarthurx/compas_fab | 71095cdda107084b583e53e055450fe510a53c6a | 64119228184953aef7899f6853b2ade2296fedc6 | refs/heads/master | 2023-02-08T10:13:16.133155 | 2022-11-09T13:02:51 | 2022-11-09T13:02:51 | 183,207,453 | 0 | 0 | MIT | 2019-05-27T07:31:38 | 2019-04-24T10:36:54 | Python | UTF-8 | Python | false | false | 1,291 | py | import math
from compas.geometry import Frame
from compas_fab.backends import RosClient
with RosClient() as client:
robot = client.load_robot()
assert robot.name == 'ur5_robot'
frame = Frame([0.4, 0.3, 0.4], [0, 1, 0], [0, 0, 1])
tolerance_position = 0.001
tolerance_axes = [math.radians(1)] * 3
... | [
"casas@arch.ethz.ch"
] | casas@arch.ethz.ch |
2f7185ea5b869ce91ea3ac63db95ddf2cfd72921 | 734458ec2b0f573cdd6a5e388f870e036af01c3a | /python/ThirteenTeV/SemiVisibleJets/generateScan.py | d0430f6a5d84fd16a067f22a06c399221ee579f7 | [] | no_license | knash/genproductions | 987ec8d549aba879d0cb8b3f32206d19f139d3ef | 328e10ae97248ece03e548c7b73453e0ff136e92 | refs/heads/master | 2021-01-18T03:12:09.682945 | 2019-07-03T11:11:57 | 2019-07-03T11:11:57 | 85,840,586 | 0 | 1 | null | 2019-06-06T09:14:09 | 2017-03-22T14:53:04 | Python | UTF-8 | Python | false | false | 7,155 | py | import FWCore.ParameterSet.Config as cms
from Configuration.GenProduction.ThirteenTeV.SemiVisibleJets.svjHelper import svjHelper
from collections import OrderedDict
from copy import deepcopy
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
import numpy as np
# implementation of recursive loop over ... | [
"kpedro88@gmail.com"
] | kpedro88@gmail.com |
c68f82f56196ab515b57e4b8dd8e64e11aee61c6 | 3003a8663135aa10f5a152a8642bc6ab270995b9 | /ggCloudSDK/google-cloud-sdk/.install/.backup/lib/googlecloudsdk/compute/subcommands/copy_files.py | c497c185cda19853ba46968bda156d1afe8bafc5 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | bopopescu/packmybot | 1b4d199b36d196e5e769a781b520019bb4d0bdbc | 92de1e72cfc51b41447366ffc81a9dcd9a5e7870 | refs/heads/master | 2022-11-25T23:46:06.946645 | 2015-10-22T08:22:04 | 2015-10-22T08:22:04 | 282,313,675 | 0 | 0 | null | 2020-07-24T20:50:10 | 2020-07-24T20:50:10 | null | UTF-8 | Python | false | false | 5,907 | py | # Copyright 2014 Google Inc. All Rights Reserved.
"""Implements the command for copying files from and to virtual machines."""
import collections
import getpass
import logging
from googlecloudsdk.calliope import actions
from googlecloudsdk.calliope import exceptions
from googlecloudsdk.core import properties
from go... | [
"cboussicaud@leaseplan.fr"
] | cboussicaud@leaseplan.fr |
9b6a45f40e12d2ecc6562977a6042f61788e25dd | 3716e91c0a18a2cf0b5807cc673d95a7539b008c | /DungeonsKitgard/TheRaisedSword.py | bd20ffd2d9632d3bba2ce439aa466531ce379317 | [] | no_license | kiwiapple87/CodeCombat-1 | 47f0fa6d75d6d3e9fb9c28feeb6fe2648664c1aa | ce0201e5ed099193ca40afd3b7abeee5a3732387 | refs/heads/master | 2021-05-01T16:38:03.575842 | 2016-08-25T11:13:26 | 2016-08-25T11:13:26 | 66,552,813 | 1 | 0 | null | 2016-08-25T11:39:20 | 2016-08-25T11:39:18 | null | UTF-8 | Python | false | false | 168 | py | # http://codecombat.com/play/level/the-raised-sword
self.attack("Rig")
self.attack("Rig")
self.attack("Gurt")
self.attack("Gurt")
self.attack("Ack")
self.attack("Ack")
| [
"vadim-job-hg@yandex.ru"
] | vadim-job-hg@yandex.ru |
ceb6062ff1dac18c07651c2b08736a9dc730fd51 | 0a613ccff34341510e9d8ac5e7c03ec991babfc8 | /pytorch_widedeep/models/wide.py | 24db9c9c539a9f5dae5152178bf0d2ccf1e74544 | [
"MIT"
] | permissive | sailfish009/pytorch-widedeep | f0e507e00566207b1e455d250eb67ac71d2df3c7 | b487b06721c5abe56ac68c8a38580b95e0897fd4 | refs/heads/master | 2023-05-01T05:24:39.217202 | 2021-04-16T15:17:48 | 2021-04-16T15:17:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,279 | py | import math
import torch
from torch import nn
from pytorch_widedeep.wdtypes import * # noqa: F403
class Wide(nn.Module):
def __init__(self, wide_dim: int, pred_dim: int = 1):
r"""wide (linear) component
Linear model implemented via an Embedding layer connected to the output
neuron(s).
... | [
"jrzaurin@gmail.com"
] | jrzaurin@gmail.com |
658ae6ce12ab34713850e57285d9f752a27cf1c8 | ca231a325e8f4c18d50d89ffa7eec993d4cc68c3 | /PythonZumbis/lista4/questao01.py | 52ef9d134fbcb8049241fa246ac2f38051db434d | [] | no_license | HugoPorto/PythonCodes | 8e1597999ccd34ffa86df5ae7e91111d77dc7a22 | 539ad6891cbd49a2c011349f843ab710aad2993a | refs/heads/master | 2022-02-13T05:48:24.633750 | 2017-09-12T15:44:06 | 2017-09-12T15:44:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 442 | py | from random import randint
lista = [
randint(1, 100), randint(1, 100), randint(1, 100),
randint(1, 100), randint(1, 100), randint(1, 100),
randint(1, 100), randint(1, 100), randint(1, 100),
randint(1, 100), randint(1, 100)]
maior = 0
menor = 999
i = 0
while i < 10:
if lista[i] > maior:
ma... | [
"gpzim98@gmail.com"
] | gpzim98@gmail.com |
f3f5edd99ffd8c25d6f8b7f8f256e0d8b3db914b | b72c37e3ccda507b231649cddd5c7845c6c34ba1 | /PythonBasic/Day10/HomeWork_func.py | 616a95d2e92ed813880bc2d38a1c2920d8ab7b03 | [] | no_license | ljrdemail/AID1810 | 51c61c255b5c5efc1dc642b46691a614daedd85e | b417bd831bc1550ab953ce7ca23f54e34b8b2692 | refs/heads/master | 2020-04-24T09:45:14.781612 | 2019-02-21T11:26:49 | 2019-02-21T11:26:49 | 171,866,267 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 481 | py |
def mysum(n):
# sum = 0
# num = int(n)
# for i in range(1, num + 1):
# sum += i
# return sum
return sum(range(1,n+1))
# return sum(list(range(1,n+1)))
def myfac(n):
fac = 1
num = int(n)
for i in range(1, num + 1):
fac *= i
return fac
print(myfac(10))
def mypow(... | [
"root"
] | root |
c5f10f045e2471562135208acf2377b8d14c9942 | 403de45c6626f2c40d2d48d64f4c94a728bb7b09 | /vocoder_eva/eval.py | baa254f50dd11cbd3bae82919f435fa3ef8f150a | [] | no_license | exeex/vocoder_eva | f95d969261adaa63ec01270239496eec3c9adca5 | d81dc01768da20c208df00bfb78d90c52d93c0a8 | refs/heads/master | 2020-09-14T01:04:27.189683 | 2020-01-20T14:08:14 | 2020-01-20T14:08:14 | 222,961,890 | 12 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,992 | py | import librosa
import numpy as np
import pyworld as pw
import matplotlib.pyplot as plt
import pysptk
ln10_inv = 1 / np.log(10)
def pad_to(x, target_len):
pad_len = target_len - len(x)
if pad_len <= 0:
return x[:target_len]
else:
return np.pad(x, (0, pad_len), 'constant', constant_values=... | [
"xray0h@gmail.com"
] | xray0h@gmail.com |
560336f07c938cf86e6d8af0547e58c0c2aeee39 | 14fc2ee47e1081416f0465e8afa18da33169095f | /src/PP4E/Ai/ExpertSystem/holmes/holmes2/forward2.py | 68e44a13498fb15d2cd3a51dad0b31cdbb159c0f | [] | no_license | madtyn/progPython | d95ea8021b1a54433e7b73de9d3b11d53a3096b7 | f3a1169149afdeb5191dd895462139f60d21d458 | refs/heads/master | 2021-07-09T13:35:27.519439 | 2017-10-04T14:46:57 | 2017-10-04T14:46:57 | 104,866,903 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,469 | py | #
# module forward2.py
#
# forward chaining inference engine
#
# this is a varient of forward.py that implements
# negation both by explicit assertion, and by
# ommission; see holmes.doc for more info;
# to use negation-by-ommission in the shell:
# holmes> +2
# to use it in a program, just import forward2;
#####... | [
"madtyn@gmail.com"
] | madtyn@gmail.com |
e5701a988ccc68f2d79bc6b8df147784e0b255fe | 6fdb4eaf5b0e6dbd7db4bf947547541e9aebf110 | /robot-server/tests/service/session/models/test_command.py | 67d99f409ac65be929996b5cab636f523cc44269 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | Opentrons/opentrons | 874321e01149184960eeaeaa31b1d21719a1ceda | 026b523c8c9e5d45910c490efb89194d72595be9 | refs/heads/edge | 2023-09-02T02:51:49.579906 | 2023-08-31T16:02:45 | 2023-08-31T16:02:45 | 38,644,841 | 326 | 174 | Apache-2.0 | 2023-09-14T21:47:20 | 2015-07-06T20:41:01 | Python | UTF-8 | Python | false | false | 2,142 | py | from datetime import datetime
import pytest
from pydantic import ValidationError
from robot_server.service.session.models import command, command_definitions
@pytest.mark.parametrize(
argnames="command_def",
argvalues=[
command_definitions.ProtocolCommand.start_run,
command_definitions.Calibr... | [
"noreply@github.com"
] | Opentrons.noreply@github.com |
580eeccd0fdd976778a96b8c5d7a64e3cbcc7863 | b39d9ef9175077ac6f03b66d97b073d85b6bc4d0 | /Emend_WC500026537.4.py | 46754167c443614635089acfee5a74b6d1a88dc2 | [] | no_license | urudaro/data-ue | 2d840fdce8ba7e759b5551cb3ee277d046464fe0 | 176c57533b66754ee05a96a7429c3e610188e4aa | refs/heads/master | 2021-01-22T12:02:16.931087 | 2013-07-16T14:05:41 | 2013-07-16T14:05:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,484 | py | {'_data': [['Common',
[['Metabolism', u'minskad aptit'],
['Nervous system', u'huvudv\xe4rk'],
['Respiratory', u'Hicka'],
['GI', u'f\xf6rstoppning, dyspepsi'],
['General', u'Tr\xf6tthet'],
['Investigations', u'f\xf6rh\xf6jt ALAT']]],
... | [
"daro@daro-ThinkPad-X220.(none)"
] | daro@daro-ThinkPad-X220.(none) |
ac6dc9752855bb5a9741df5fcd939fbed3d4226b | 0f9f8e8478017da7c8d408058f78853d69ac0171 | /python3/l0229_majority_element_2.py | 8d8dd64afeae37fe515fb54d936bb76fed74d62f | [] | no_license | sprax/1337 | dc38f1776959ec7965c33f060f4d43d939f19302 | 33b6b68a8136109d2aaa26bb8bf9e873f995d5ab | refs/heads/master | 2022-09-06T18:43:54.850467 | 2020-06-04T17:19:51 | 2020-06-04T17:19:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 865 | py | from typing import List
class Solution:
def majorityElement(self, nums: List[int]) -> List[int]:
c1, c2 = None, None
count1, count2 = 0, 0
for n in nums:
if n == c1:
count1 += 1
elif n == c2:
count2 += 1
elif count1 == 0:
... | [
"zhoulv82@gmail.com"
] | zhoulv82@gmail.com |
0cbf5e113335f0f6acf9dd864503ff0411592ba7 | 8bfd94be34008db3a7822247e9fb05604ad010d2 | /snips/migrations/0001_initial.py | a7b67f1349671972f09f8da5d588956b54b4acf5 | [] | no_license | SnipToday/FrontEnd | c7ce59548b0114e24008580d98dad48c78ff431d | 5043fb584535295b27e8c6f0044c54ac8ab40023 | refs/heads/master | 2021-01-22T17:49:04.506117 | 2017-09-04T22:08:28 | 2017-09-04T22:08:28 | 102,405,712 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,461 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-04-20 13:20
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import modelcluster.fields
class Migration(migrations.Migration):
initial = True
dependenci... | [
"ranihorev@gmail.com"
] | ranihorev@gmail.com |
5d323280b72ac2c020eaf9e222a4bbe9e7dfd50f | 0fc9eca08cc48f93a4079a9b4c0dd0201ef2ce80 | /vindula/agendacorporativa/browser/search.py | 8571790b6dae199e6a61314a09ccf6efa1eb8e74 | [] | no_license | vindula/vindula.agendacorporativa | c75564c7d89424e23e3a1baa1f1dcdc6ac2dfc4c | e70f6c2baf6629cb4a486bc642c49e7b7138bf7d | refs/heads/master | 2020-12-29T01:41:33.812325 | 2013-08-02T18:54:58 | 2013-08-02T18:54:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,266 | py | # coding: utf-8
from Products.CMFCore.utils import getToolByName
from AccessControl.SecurityManagement import newSecurityManager, getSecurityManager, setSecurityManager
from DateTime import DateTime
from copy import copy
def busca_commitment(context,username,portlet=False):
ctool = getToolByName(context, 'portal_c... | [
"cesaraugusto@liberiun.com"
] | cesaraugusto@liberiun.com |
e82730273d0eaa099b5b7974f79444de9077c466 | 045cb1a5638c3575296f83471758dc09a8065725 | /addons/purchase/report/purchase_bill.py | d442019eb8c1ec5604f64349509c1d4a9b4dc348 | [] | no_license | marionumza/saas | 7236842b0db98d1a0d0c3c88df32d268509629cb | 148dd95d991a348ebbaff9396759a7dd1fe6e101 | refs/heads/main | 2023-03-27T14:08:57.121601 | 2021-03-20T07:59:08 | 2021-03-20T07:59:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,459 | py | # -*- coding: utf-8 -*-
# Part of Harpiya. See LICENSE file for full copyright and licensing details.
from harpiya import api, fields, models, tools
from harpiya.tools import formatLang
class PurchaseBillUnion(models.Model):
_name = 'purchase.bill.union'
_auto = False
_description = 'Purchases & Bills Uni... | [
"yasir@harpiya.com"
] | yasir@harpiya.com |
5114aa4f0924c3f6eaa3c0e48d017abbbb07dc7f | b6277a78b0337667ec4b88e0da3cb84a76383687 | /tests/test_inertia.py | ee4d43936999c7eb71ba51b38a6a87c207d455ae | [
"MIT"
] | permissive | sgalkina/trimesh | 11c91e9c9a7c013fb81551dcee0fdbfffa1f5d13 | 55e35216efcf620c816d82d9f9167e22966a851d | refs/heads/master | 2021-01-25T07:00:55.935106 | 2017-06-06T03:30:28 | 2017-06-06T03:30:28 | 93,636,761 | 0 | 0 | null | 2017-06-07T13:11:58 | 2017-06-07T13:11:57 | null | UTF-8 | Python | false | false | 4,510 | py | import generic as g
class InertiaTest(g.unittest.TestCase):
def test_inertia(self):
t0 = g.np.array([[-0.419575686853, -0.898655215203, -0.127965023308, 0. ],
[ 0.712589964872, -0.413418145015, 0.566834172697, 0. ],
[-0.562291548012, 0.146643245877, 0.813832890385... | [
"mik3dh@gmail.com"
] | mik3dh@gmail.com |
aaa6d9dc213f7a6387f24784b2d7e5faf88bdaca | 2f37d3dcb20c9ba171024b1f8711b9926dbef0f3 | /eventex/subscriptions/mixins.py | af8a07846e310bed196a2252db4603a7d4f73b42 | [] | no_license | sergiopassos/eventex-sergiopassos | 9c080a365e4e554a5839aa461ce47e3d40d9fc53 | 6672223faaa7930377532141394dea3ae7c2c431 | refs/heads/master | 2023-04-27T02:40:15.094019 | 2020-01-16T13:51:11 | 2020-01-16T13:51:11 | 192,630,937 | 0 | 0 | null | 2023-04-21T20:32:42 | 2019-06-19T00:37:38 | Python | UTF-8 | Python | false | false | 1,585 | py | from django.conf import settings
from django.core import mail
from django.template.loader import render_to_string
from django.views.generic import CreateView
class EmailCreateMixin:
email_to = None
email_context_name = None
email_template_name = None
email_from = settings.DEFAULT_FROM_EMAIL
email_... | [
"sergio.passos02@gmail.com"
] | sergio.passos02@gmail.com |
20aa4222af3a4ebe0cc386a6ed3d8a36989e1b88 | 8a9b10eeef43e648fcc82d5fdbf6505e0e19a88b | /Tensor_Flow/stock_similarity_daily.py | 865cb66b7091f69f8580c800d2c23bd22bff0acb | [] | no_license | lwzswufe/neural_net | 3648e100ad68fd2dbd6e3f51be7b053780f7fd87 | 0a0ed94680c0e5dd3dbd2e13aef79a1b8fd8293d | refs/heads/master | 2021-03-30T17:06:18.296242 | 2019-10-16T08:22:47 | 2019-10-16T08:22:47 | 76,216,678 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 208 | py | # author='lwz'
# coding:utf-8
# !/usr/bin/env python3
import os
from Tensor_Flow import AutoEncoder2, similarity_analysis
if __name__ == '__main__':
AutoEncoder2.daily()
similarity_analysis.daily() | [
"lwzswufe@foxmail.com"
] | lwzswufe@foxmail.com |
c73df56929f4b7102748c83d681b3d6ba5a8af13 | 0d86bb399a13152cd05e3ba5684e4cb22daeb247 | /python-basics/unit11-error/py116_raise.py | f69da74fed89c80b5b2226b0517bf4504d52200c | [] | no_license | tazbingor/learning-python2.7 | abf73f59165e09fb19b5dc270b77324ea00b047e | f08c3bce60799df4f573169fcdb1a908dcb8810f | refs/heads/master | 2021-09-06T05:03:59.206563 | 2018-02-02T15:22:45 | 2018-02-02T15:22:45 | 108,609,480 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 685 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 18/1/2 下午8:00
# @Author : Aries
# @Site :
# @File : py116_raise.py
# @Software: PyCharm
'''
raise语句 主动抛出异常
'''
def thorw_error():
raise Exception("抛出一个异常")
if __name__ == '__main__':
thorw_error()
'''
Traceback (most recent call last):
Fi... | [
"852353298@qq.com"
] | 852353298@qq.com |
ed61bed728ef72c66243a1d999603df111527ea6 | ab650e6a0ca2f97096235ebe914b140b740aec66 | /app/templates/_root_init.py | 88f63dc99cf2ee4d75a6a147f53f0b50423d33bb | [
"MIT"
] | permissive | ghostRider1124/generator-python-package | 8fd353d6c4ed2c6f1ad88ebb6fe6811a8d585026 | 678b33fec9937c68aaa45ae04e6a8aac5f6554c5 | refs/heads/master | 2020-05-20T18:16:32.266189 | 2014-07-02T17:05:26 | 2014-07-02T17:05:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 387 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This file is part of <%= package.name %>.
# <%= package.url %>
# Licensed under the <%= package.license %> license:
# http://www.opensource.org/licenses/<%= package.license%>-license
# Copyright (c) <%= package.created.year %> <%= package.author.name %> <%= package.author.e... | [
"heynemann@gmail.com"
] | heynemann@gmail.com |
06c6fc43bcedc984addf32ef365c64484890ea3c | 9e988c0dfbea15cd23a3de860cb0c88c3dcdbd97 | /sdBs/AllRun/ec_13175-1949/sdB_ec_13175-1949_coadd.py | ffac546028839ada5df1dbebec03b93979d41d2d | [] | no_license | tboudreaux/SummerSTScICode | 73b2e5839b10c0bf733808f4316d34be91c5a3bd | 4dd1ffbb09e0a599257d21872f9d62b5420028b0 | refs/heads/master | 2021-01-20T18:07:44.723496 | 2016-08-08T16:49:53 | 2016-08-08T16:49:53 | 65,221,159 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 439 | py | from gPhoton.gMap import gMap
def main():
gMap(band="NUV", skypos=[200.073167,-20.088431], skyrange=[0.0333333333333,0.0333333333333], stepsz = 30., cntfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdBs/sdB_ec_13175-1949/sdB_ec_13175-1949_movie_count.fits", cntcoaddfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sd... | [
"thomas@boudreauxmail.com"
] | thomas@boudreauxmail.com |
f606fc6928efe6b05a4ee59ddda61acd48e114dd | 930bc970069d8cbcfb36725a90492eff50638ecc | /code/dk-iris-pipeline/airflow_home/src/model/benchmark.py | 1bbbbefb5abcaffd9064680c379d44d929b5a14b | [
"MIT"
] | permissive | databill86/airflow4ds | 4770d856569c4db4b55b2d9dfda010e21c4cd790 | b5ae213f7169c54d31f4eca58d235ec6b09fd56f | refs/heads/master | 2021-09-25T17:26:43.340747 | 2018-10-24T16:09:49 | 2018-10-24T16:09:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 906 | py | import os
import sys
# Allow Python to discover local modules
sys.path.append(os.getenv(key='AIRFLOW_HOME'))
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import classification_report, accuracy_score
from src import PR... | [
"dushyant.khosla@pmi.com"
] | dushyant.khosla@pmi.com |
3ce8f8c6eacd5408747793dcc122d0488f4ae734 | baa484828e8683d51d58d48989532e3d3ce987bc | /200228_4.py | 2efd1e862a827523b45963bb36d5e9ac5f94ac82 | [] | no_license | sungguenja/study_gui | 0fc1e17c98a9afc0a6e66a39aeefcd89c3e60f5e | b058ca900061f2bd743f8532056ecedcc6b7ce0a | refs/heads/master | 2021-01-16T16:32:28.027456 | 2020-03-17T16:54:21 | 2020-03-17T16:54:21 | 243,184,712 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 592 | py | from tkinter import *
def font_control(ev):
label.config(font='HY헤드라인M {0} bold'.format(v.get()))
if v.get()==40:
label['text']='wa sans~'
label['font']='굴림체 40 bold'
else:
label['text']='안녕 파이썬~'
win=Tk()
v=IntVar()
win.geometry('300x150')
label = Label(win, text='안녕 파이썬~')
label.... | [
"59605197+sungguenja@users.noreply.github.com"
] | 59605197+sungguenja@users.noreply.github.com |
d232fe89ca699bb27814c5684ea1ae3d2a1807b6 | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-as/huaweicloudsdkas/v1/model/batch_remove_scaling_instances_request.py | bebca60ab39111f01f7c0e8379c57dbbff64a882 | [
"Apache-2.0"
] | permissive | huaweicloud/huaweicloud-sdk-python-v3 | cde6d849ce5b1de05ac5ebfd6153f27803837d84 | f69344c1dadb79067746ddf9bfde4bddc18d5ecf | refs/heads/master | 2023-09-01T19:29:43.013318 | 2023-08-31T08:28:59 | 2023-08-31T08:28:59 | 262,207,814 | 103 | 44 | NOASSERTION | 2023-06-22T14:50:48 | 2020-05-08T02:28:43 | Python | UTF-8 | Python | false | false | 4,211 | py | # coding: utf-8
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class BatchRemoveScalingInstancesRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The ... | [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
14c7592a361aec866f6bbc9d904a1567aab1a1ec | ecd4b06d5d5368b71fd72a1c2191510a03b728fd | /3 - pandas foundation/austin case study/4.py | 40ede74aea409c735ebd2a40bd4f6e624d3f96aa | [
"MIT"
] | permissive | Baidaly/datacamp-samples | 86055db5e326b59bfdce732729c80d76bf44629e | 37b4f78a967a429e0abca4a568da0eb9d58e4dff | refs/heads/master | 2022-07-27T01:18:00.700386 | 2022-07-18T19:27:23 | 2022-07-18T19:27:23 | 123,827,284 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 642 | py | # Convert the date column to string: df_dropped['date']
df_dropped['date'] = df_dropped['date'].astype(str)
# Pad leading zeros to the Time column: df_dropped['Time']
df_dropped['Time'] = df_dropped['Time'].apply(lambda x:'{:0>4}'.format(x))
# Concatenate the new date and Time columns: date_string
date_string = df_dr... | [
"daulet.urazalinov@uptake.com"
] | daulet.urazalinov@uptake.com |
1ed5f1cca9b1d29e15103ea5e148e811b1f53733 | be526f8602651479f5b24eab9c91a3817e9bff0e | /word2vec_tensorboard.py | bc0a82bc12957315e14cf53c710a8cda0042d17f | [] | no_license | bage79/word2vec4kor | 76a870c57a1a854ff3e3a00c955424b394723259 | 3dc8a856e22f79e8da27f74b3d55de474a599e8c | refs/heads/master | 2021-04-27T11:33:00.869446 | 2018-05-08T14:12:45 | 2018-05-08T14:12:45 | 122,564,641 | 11 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,861 | py | import argparse
import os
import pickle
import traceback
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
import tensorflow as tf
from tensorflow.contrib.tensorboard.plugins import projector
def turn_off_tensorflow_logging():
import os
import tensorflow as tf
os.environ['TF... | [
"bage79@gmail.com"
] | bage79@gmail.com |
782beba45b77ab5dd35b7a388087e5f618f0f266 | 62f59fe1e0246b33c84412ee2a60e77938a05a15 | /test/zombie_task_test.py | 97d79ca67f9031bb031c6eccabdd7eb9bba5e7e6 | [] | no_license | 20113261/platform_service | 02676d2654f5c7bde2c7eafdadbf55fe7253a7b0 | bc903168bd7cbc499892f24c2b1cc82c38180c01 | refs/heads/dev | 2022-08-01T02:30:05.004852 | 2018-04-29T05:39:37 | 2018-04-29T05:39:37 | 131,576,306 | 1 | 0 | null | 2022-07-08T19:13:32 | 2018-04-30T09:14:54 | Python | UTF-8 | Python | false | false | 1,113 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2017/10/26 下午6:28
# @Author : Hou Rong
# @Site :
# @File : zombie_task_test.py
# @Software: PyCharm
import datetime
import pymongo
client = pymongo.MongoClient(host='10.10.231.105')
collections = client['MongoTask']['Task']
def monitoring_zombies_tas... | [
"nmghr9@gmail.com"
] | nmghr9@gmail.com |
d72d79bedd1d13883fc2cad393b334ee4aff8287 | 95495baeb47fd40b9a7ecb372b79d3847aa7a139 | /test/test_metadata.py | 4a4189f3e130f421154ba36b2d51d25b314c6960 | [] | no_license | pt1988/fmc-api | b1d8ff110e12c13aa94d737f3fae9174578b019c | 075f229585fcf9bd9486600200ff9efea5371912 | refs/heads/main | 2023-01-07T09:22:07.685524 | 2020-10-30T03:21:24 | 2020-10-30T03:21:24 | 308,226,669 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,142 | py | # coding: utf-8
"""
Cisco Firepower Management Center Open API Specification
**Specifies the REST URLs and methods supported in the Cisco Firepower Management Center API. Refer to the version specific [REST API Quick Start Guide](https://www.cisco.com/c/en/us/support/security/defense-center/products-programmi... | [
"pt1988@gmail.com"
] | pt1988@gmail.com |
0af742a6da7d3a491d33c665d6821b55a52e9e22 | 451e3188ef94bfd106a0194774c23edd0bba84a2 | /blog/migrations/0011_auto_20190624_1757.py | 32bf1b8e4505dacd5f6698621a22e1552d94538a | [] | no_license | Dolidodzik/Wagtail-Django-Static-Blog | fe9c8caf63275c8f444ac7b898e7e0d67fae018a | db0769da8c7b1c3fc450fe40181bfcf984079ec1 | refs/heads/master | 2020-06-08T02:13:32.401772 | 2019-10-29T17:09:09 | 2019-10-29T17:09:09 | 193,139,774 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,218 | py | # Generated by Django 2.2.2 on 2019-06-24 17:57
from django.db import migrations
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.images.blocks
class Migration(migrations.Migration):
dependencies = [
('blog', '0010_auto_20190624_1749'),
]
operations = [
migrations.Al... | [
"teethtard321@gmail.com"
] | teethtard321@gmail.com |
dc8423b42f23e5e62b109260c92631277dd9f347 | 20860030d52b5be62cb797e396a5a6b83f45dc44 | /configuration-api/src/__init__.py | cf8683bda4fd470b0adb1d974c85ba42670d64d7 | [] | no_license | rcosnita/bravehub | 189d30c46224dd80d6fbf41c50a33559ec2f44ae | 960bcfdb3c2e53e81aa75f7a48980e4918cfd4bb | refs/heads/master | 2022-12-21T11:28:16.626690 | 2018-02-17T10:43:09 | 2018-02-17T10:43:09 | 98,259,347 | 0 | 1 | null | 2022-12-19T13:27:11 | 2017-07-25T03:17:44 | Python | UTF-8 | Python | false | false | 396 | py | """Initializes some configuration parameters which are used in the implementation of
configuration-api microservice."""
from src.ioc import ConfigurationApiContainer
API_VERSION = ConfigurationApiContainer.api_meta.version
API_FULL_VERSION = "{0}.{1}.{2}".format(API_VERSION.major, API_VERSION.minor, API_VERSION.patch)... | [
"radu.cosnita@gmail.com"
] | radu.cosnita@gmail.com |
49f713c4ee1d37d24c760dd5a7d2afcca4e2a2f2 | 6359831db732f929409adbb8270092c7e9cca8d5 | /Q046_Vertical_traversal_of_binary_trees.py | a8f43145ca2853b7a89f408b9807b11bd25a2276 | [] | no_license | latika18/interviewbit | 11237219d982c98a22f0098be8248ef7a5b9246f | a065b19dc368136101dafbbbdab9b664fed0bf35 | refs/heads/master | 2020-03-15T15:20:30.002201 | 2018-08-22T07:39:21 | 2018-08-22T07:39:21 | 132,209,831 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,336 | py | Given a binary tree, print a vertical order traversal of it.
Example :
Given binary tree:
6
/ \
3 7
/ \ \
2 5 9
returns
[
[2],
[3],
[6 5],
[7],
[9]
]
Note : If 2 Tree Nodes shares the same vertical level then the one with lesser depth will come first.
Code: ... | [
"noreply@github.com"
] | latika18.noreply@github.com |
4d062caff31b114960dd1f54eb12dceb00549788 | df5ed643835e0759b326b9c3ad2f96a945b1519f | /Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/turtledemo/penrose.py | c913c6312d53a0f6dfd5900a4ee1c1972cf95f4c | [
"MIT"
] | permissive | keith/Xcode.app-strings | 8182a6b5272e5763111ddf376818aca277f113d3 | c3c93e5b349425159172bb62e9929b701de26a87 | refs/heads/main | 2023-08-30T22:31:13.291293 | 2023-08-29T18:19:23 | 2023-08-29T18:19:23 | 75,589,712 | 91 | 28 | null | null | null | null | UTF-8 | Python | false | false | 3,358 | py | #!/usr/bin/env python3
""" xturtle-example-suite:
xtx_kites_and_darts.py
Constructs two aperiodic penrose-tilings,
consisting of kites and darts, by the method
of inflation in six steps.
Starting points are the patterns "sun"
consisting of five kites and "star"
consisting of five darts.
For more informa... | [
"keithbsmiley@gmail.com"
] | keithbsmiley@gmail.com |
994535b97312d7b201e3c3ece5776069e47d98fd | 1269530d9534b563879d8e995fecf67196287719 | /check_size_mlstm.py | 40a5c8f3dcd4d109b5f841f02994af78f278d6a3 | [] | no_license | amirunpri2018/Keras-Multiplicative-LSTM | a7ff7eea2d9b8ba1ae15efa7759eb5510fe6fabe | 3c89fed3ac45d84072bc2712a895e479b657e457 | refs/heads/master | 2020-04-08T03:37:47.274723 | 2017-11-04T03:04:22 | 2017-11-04T03:04:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 686 | py | import multiplicative_lstm
from keras.layers import Input, LSTM
from keras.models import Model
ip = Input(shape=(1, 100))
lstm = LSTM(128)(ip)
mlstm = multiplicative_lstm.MultiplicativeLSTM(128)(ip)
lstm_model = Model(ip, lstm)
mlstm_model = Model(ip, mlstm)
lstm_model.summary()
print('\n' * 3)
mlstm_model.summar... | [
"titu1994@gmail.com"
] | titu1994@gmail.com |
f69ee0ebd58b2cd9df04217cbdb83c8b95f62007 | f6b5799c13fad2382d638a1208f4972ce818174a | /site/PROGRAMMERS/src/python/스킬테스트/level01/콜라츠추측.py | 9da7b4527830f6a02e0a2ca40eba22dd9e88d4e1 | [] | no_license | JoonBeomLee/Algorithm_Python | 6bf0cc29ffaf75156bfa44ea531c33b3d2b2a129 | 185fb39d535573c374f1d0d88f728f97086a4246 | refs/heads/master | 2023-06-11T10:27:10.228151 | 2021-07-05T14:59:40 | 2021-07-05T14:59:40 | 193,500,999 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 368 | py | def solution(num):
answer = 0
while True:
if(num == 1): break
if(answer == 500): answer = -1; break
# 짝수
if num % 2 == 0:
num = num / 2
# 홀수
elif num % 2 != 0:
num = 3 * num + 1
an... | [
"jbl9595@naver.com"
] | jbl9595@naver.com |
28623c7e7bcdf0aaaff6991949f05be9d2bc310d | e2992452a3c52f4cbbc64e1686128ad464b71d16 | /weixinSource/weixinSource/pipelines.py | aeba7ce32ab3fe5a82d68511a812978bede5574e | [] | no_license | MaGuiSen/studyScrapy | 6b84605a15027ffc24501d690666f419ebb379fd | 03604bafe19e55db12677a4af388c8a9198ca572 | refs/heads/master | 2021-01-17T04:30:23.858217 | 2017-08-30T01:50:08 | 2017-08-30T01:50:08 | 95,433,695 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 292 | py | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
class WeixinsourcePipeline(object):
def process_item(self, item, spider):
return item
| [
"1059876295@qq.com"
] | 1059876295@qq.com |
0eec3d555e4db9f9548824002788e9b95e60b91e | dd4d2589d1f14303cacd3b7ee1dd5f6bacd3bf3c | /matrix/spiral_matrix_2.py | ed14ac09091d56c65841453b2f11ee3ea40c813a | [] | 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 | 1,339 | py | """
https://leetcode.com/problems/spiral-matrix-ii/
"""
import numpy as np
class Solution:
def generateMatrix(self, n: int) -> List[List[int]]:
res = []
for i in range(n):
res.append([0] * n)
left = 0
right = n - 1
top = 0
bottom = n - 1
dire... | [
"saluja.harkirat@gmail.com"
] | saluja.harkirat@gmail.com |
d7cdd4c62c61f62e1d8c309bc87f77c4949eadd9 | 9e988c0dfbea15cd23a3de860cb0c88c3dcdbd97 | /sdBs/AllRun/sbss_1655+591/sdB_sbss_1655+591_coadd.py | f030d65a0471c8af9f04c2583c5c8ff5c0bbeec1 | [] | no_license | tboudreaux/SummerSTScICode | 73b2e5839b10c0bf733808f4316d34be91c5a3bd | 4dd1ffbb09e0a599257d21872f9d62b5420028b0 | refs/heads/master | 2021-01-20T18:07:44.723496 | 2016-08-08T16:49:53 | 2016-08-08T16:49:53 | 65,221,159 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 438 | py | from gPhoton.gMap import gMap
def main():
gMap(band="NUV", skypos=[254.127958,59.079469], skyrange=[0.0333333333333,0.0333333333333], stepsz = 30., cntfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdBs/sdB_sbss_1655+591/sdB_sbss_1655+591_movie_count.fits", cntcoaddfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdB... | [
"thomas@boudreauxmail.com"
] | thomas@boudreauxmail.com |
81d2acb91a751c6699bd377dc4694798e495f094 | 634514a9c10e32051964b179cc807d089d31124e | /S2l/Thesis_Ch3/Exp1_reach3dof/Scripts/plotter_episodes.py | c705777868308749f11d14705ce7c42a4bc061d3 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | leopauly/Observation-Learning-Simulations | 34009872a1f453ffc4ae7ddced7447a74ff704c4 | 462c04a87c45aae51537b8ea5b44646afa31d3a5 | refs/heads/master | 2021-08-04T10:55:42.900015 | 2021-07-05T13:41:09 | 2021-07-05T13:41:09 | 129,761,220 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 528 | py | #### For plotting from reawrd values stored in files
import numpy as np
import matplotlib.pyplot as plt
import sys
run=sys.argv[1]
y = np.loadtxt('episode_reward_run_'+run+'.txt', unpack=True)
y_new=y[1:len(y)]
x=range(len(y_new))
print(x,y_new)
plt.figure(1)
plt.plot(x,y_new)
plt.title('Reward')
plt.xlabel('epis... | [
"meetleopauly@yahoo.com"
] | meetleopauly@yahoo.com |
32d769360c3b3706f42a2f42c8b12903939383f8 | 9b1446b26e81a79c303f9799fb6a91785c7adb03 | /.history/Code/markov_chain_20200120225120.py | c8637afc95c9347859961865560d6e5a25020a0a | [] | no_license | SamirIngley/CS1.2-Tweet-Gen | 017ea15b1113881a156ff24682828bc654eb6c81 | bcd95fa63e05849cbf8e36230d8e31032b99daaa | refs/heads/master | 2020-12-14T20:19:57.733290 | 2020-08-04T23:19:23 | 2020-08-04T23:19:23 | 234,856,234 | 0 | 0 | null | 2020-06-05T21:13:04 | 2020-01-19T07:05:55 | Python | UTF-8 | Python | false | false | 794 | py | import sample
from clean_text import clean
class Markov():
def __init__(self, corpus):
self.corpus = corpus
self.states = {}
self.chain()
def chain(self):
last_word = None
for word in self.corpus:
if last_word is not None: # set last word line 14
... | [
"samir.ingle7@gmail.com"
] | samir.ingle7@gmail.com |
61b0a836a83e88645081bc1ab3f28d2beac4fce3 | 2337351b228818e41be3002bd38f68f77c2aa074 | /core/confdb/syntax/protocols/lldp/hints.py | 3b89367275377af955519b66880edf74dbe19045 | [
"BSD-3-Clause"
] | permissive | nocproject/noc | 57d40c680a1499374463e472434f9595ed6d1374 | 6e6d71574e9b9d822bec572cc629a0ea73604a59 | refs/heads/master | 2023-08-31T01:11:33.544573 | 2023-08-30T17:31:11 | 2023-08-30T17:31:11 | 107,815,776 | 105 | 33 | BSD-3-Clause | 2023-07-31T07:57:45 | 2017-10-21T21:04:33 | Python | UTF-8 | Python | false | false | 839 | py | # ----------------------------------------------------------------------
# ConfDB hints protocols lldp syntax
# ----------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# -------------------------------------------------------------------... | [
"dv@nocproject.org"
] | dv@nocproject.org |
c3e795fbfe3826d2f5904f7e97ae0c1ae14fa894 | 3644db13925e6d518a9637edafa6247547ca90b4 | /interprocedural_analyses/taint/test/integration/functions_as_locals.py | f4f5aa681cb6601056ece250cd511564f500a956 | [
"MIT"
] | permissive | luizribeiro/pyre-check | 348699cecf82a5aa36f5e1301076cb006a2fb9f9 | 42d1fced8cbb94c4c9400d6fddd798e50d331ab9 | refs/heads/master | 2023-04-17T17:26:23.262598 | 2020-08-08T04:03:04 | 2020-08-08T04:03:35 | 285,969,507 | 0 | 0 | MIT | 2023-04-04T01:56:30 | 2020-08-08T04:01:31 | OCaml | UTF-8 | Python | false | false | 675 | py | # flake8: noqa
from builtins import __test_sink, __test_source
def foo(arg):
__test_sink(arg)
def foo_as_local():
x = __test_source()
f = foo
foo(x)
f(x)
def local_tito(arg):
f = foo
f(arg)
class C:
def m(self, arg):
__test_sink(arg)
def local_function_with_method_sink(... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
c6b23600f363b1173b40bde086cf7afccd9b839d | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /dQZmkrPaKdtSat5f9_6.py | 326adc8b9d5d878706b0607ed434207c59a78551 | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 312 | py |
def single_occurrence(txt):
txt = txt.upper()
Answer = ""
Counter = 0
Length = len(txt)
while (Counter < Length):
Item = txt[Counter]
Events = txt.count(Item)
if (Events == 1):
Answer = Item
return Answer
else:
Counter += 1
return Answer
| [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
079956603181043e047fcfcd8ae48b9209a73544 | 596e92d0d484b6e7eee6d322e72e52748fdeaa5d | /sportsdata/mlb_projections/models/mlb_projections_dfs_slate_game.py | 4aadebaeb66acdeb4d93f89a1e1c5748361edf13 | [] | no_license | scottypate/sportsdata | f5f61ddc7eb482883f93737c6ce73dd814ed4336 | a07955ab50bf4fff1ce114ed9895095ff770c473 | refs/heads/main | 2023-08-18T16:51:56.452678 | 2021-10-22T12:44:08 | 2021-10-22T12:44:08 | 420,062,350 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 7,117 | py | # coding: utf-8
"""
MLB v3 Projections
MLB projections API. # noqa: E501
OpenAPI spec version: 1.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class MlbProjectionsDfsSlateGame(object):
"""NOTE: This class is auto g... | [
"scotty.pate@auth0.com"
] | scotty.pate@auth0.com |
318cd859b70a41e212785c1596ffdf88353bce76 | 98c6ea9c884152e8340605a706efefbea6170be5 | /examples/data/Assignment_7/snxkai001/util.py | 217a94e3e61b1d0258092af7a9640f7e96345ae2 | [] | no_license | MrHamdulay/csc3-capstone | 479d659e1dcd28040e83ebd9e3374d0ccc0c6817 | 6f0fa0fa1555ceb1b0fb33f25e9694e68b6a53d2 | refs/heads/master | 2021-03-12T21:55:57.781339 | 2014-09-22T02:22:22 | 2014-09-22T02:22:22 | 22,372,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,079 | py | def create_grid (grid):
for u in range(4):
grid.append([])
for down in range(4):
grid[u].append(0)
def print_grid(grid):
print("+" + "-"*20 + "+")
allign= "{0:" "<5}"
for row in range(4):
print("|", end="")
for col in range(4):
i... | [
"jarr2000@gmail.com"
] | jarr2000@gmail.com |
39e716c97c55b1ae0ce73788baea20aa77976d3b | 9508879fcf1cff718f3fe80502baff8b82c04427 | /data_structures_domain/linked_lists/print_in_reverse.py | 9e70be3bfc61fc9bdc1e648101f1a043b9f0ec55 | [] | no_license | davidozhang/hackerrank | e37b4aace7d63c8be10b0d4d2bffb4d34d401d55 | bdc40d6ff3e603949eb294bbc02a1e24a4ba5b80 | refs/heads/master | 2021-05-04T11:31:59.110118 | 2017-11-15T09:17:27 | 2017-11-15T09:17:27 | 47,906,672 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 529 | py | """
Print elements of a linked list in reverse order as standard output
head could be None as well for empty list
Node is defined as
class Node(object):
def __init__(self, data=None, next_node=None):
self.data = data
self.next = next_node
"""
def ReversePrint(head):
if not head:
... | [
"davzee@hotmail.com"
] | davzee@hotmail.com |
54601c3faba97921513238671d4defe422ee9d46 | d3eb732ffd738d3a624196f0971e4c29f85f6673 | /maptool.py | 57b5b053df938d8e44ecddd90a5bd11d4c5471b6 | [] | no_license | kailIII/mgrs-tools | c44aae9542e9883e9e1a395217b468bea4fb0788 | 3ac612bdf980f2d61f27d417c709115890af415f | refs/heads/master | 2021-01-15T16:57:14.768002 | 2015-04-01T12:15:10 | 2015-04-01T12:15:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 955 | py | import mgrs
from qgis.core import *
from qgis.gui import *
from qgis.utils import iface
from PyQt4.QtCore import *
class MGRSMapTool(QgsMapTool):
ct = mgrs.MGRS()
epsg4326 = QgsCoordinateReferenceSystem("EPSG:4326")
def __init__(self, canvas):
QgsMapTool.__init__(self, canvas) ... | [
"volayaf@gmail.com"
] | volayaf@gmail.com |
7ceceed258eb306cbc6fee57056ca756971ba8da | df1cb33bfe99a1e72cf75931749163b7c8731757 | /stages/stage3.py | 012d626c02d661dbc7a2f17848fc0e501c06bcb9 | [] | no_license | orf/wikilink_py | 2d6ae9dd64264fdf17995980ed8a4a960c199c5b | 6643397e220970a93dab1e50e120748bfdc3bf19 | refs/heads/master | 2021-01-22T11:55:16.906965 | 2014-01-08T20:49:38 | 2014-01-08T20:49:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,415 | py | from lib.progress import run_with_progressbar
from lib.formatters.Neo4jFormatter import Neo4jFormatter
from lib.formatters.CSVFormatter import MultiCSVFormatter
import functools
import os
import logging
import sys
import itertools
import __pypy__
import json
logger = logging.getLogger()
logger.addHandler(logging.Strea... | [
"tom@tomforb.es"
] | tom@tomforb.es |
92df4a82b4256ff8f683501f22e0c09dbea8b0c0 | b89df6019163d7b18a8ecb4003939f6235b5de85 | /mnist/cnn_mnist.py | 0f8dd40e176c805f08e1a65e10cdad7e16b51923 | [] | no_license | liketheflower/tf_practise | fdd22b608ca7d513a4972497466e3fc7a12762b6 | 2725b52169b2f0044d20b3c33c86485336e65483 | refs/heads/master | 2020-03-19T23:21:16.467649 | 2018-06-19T03:56:07 | 2018-06-19T03:56:07 | 137,003,463 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,709 | py | #opyright 2016 iThe TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | [
"jim.morris.shen@gmail.com"
] | jim.morris.shen@gmail.com |
d89b26a0c2aa42dccc501acbb07ac7e597b9047a | 102b67d83e12219f3bf4bea6ed691ddd9c2e69f1 | /ad/templatetags/ads.py | 7e6251780e534773006f27332ae6205e14bdccc8 | [
"BSD-3-Clause"
] | permissive | nicksergeant/snipt-old | 2cb6bec629d798dd83fc39f0105828f1fd40a51a | f2f1e9f183fb69bcc0fabbc25059bfd1c60527e2 | refs/heads/master | 2021-01-18T14:03:01.426851 | 2012-09-19T00:09:48 | 2012-09-19T00:09:48 | 865,573 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 882 | py | from tagging.models import TaggedItem
from snipt.ad.models import Ad
from django import template
register = template.Library()
@register.simple_tag
def ad(tag):
try:
ads = TaggedItem.objects.get_by_model(Ad.objects.order_by('?'), tag)
ad = ads[0]
except:
ads = Ad.objects.order_by('?')
... | [
"nick@nicksergeant.com"
] | nick@nicksergeant.com |
974c0c7fd25b0de5202f8adde919a1f585b0a4ed | aa45f6f5106517c582b21691ce22ad808339ec64 | /borax/calendars/birthday.py | aea5997b9e454ee9eaf8a2861a068b38780a781c | [
"MIT"
] | permissive | kinegratii/borax | 86b1a87c686f9b74db8d919afe30761497888368 | 06407958a6ba3115d783ed6457c2e7355a3f237c | refs/heads/master | 2023-03-11T06:09:20.040607 | 2022-11-15T02:39:43 | 2022-11-15T02:39:43 | 126,959,349 | 67 | 8 | MIT | 2022-11-15T02:39:44 | 2018-03-27T09:07:08 | Python | UTF-8 | Python | false | false | 1,151 | py | from datetime import date
from .lunardate import LunarDate, LCalendars
def nominal_age(birthday, today=None):
birthday = LCalendars.cast_date(birthday, LunarDate)
if today:
today = LCalendars.cast_date(today, LunarDate)
else:
today = LunarDate.today()
return today.year - birthday.year... | [
"kinegratii@gmail.com"
] | kinegratii@gmail.com |
a0f1f2557839af7ed23dfb81c8ff5bea64a59bc4 | e4c25590298b084e3fb44b0b325a05699fac4202 | /Kattis/sevenwonders.py | 5a96568a7cc25485bbe157259a725421d500474b | [] | no_license | shakib609/competitive-programming | 520028bd1147e7e43e708875b6390e1a7d65a94b | 5090d5d3650b8055e16651ed9de5380cc7fdb7aa | refs/heads/master | 2022-12-09T12:33:20.167332 | 2022-12-07T17:28:30 | 2022-12-07T17:28:30 | 67,289,210 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 226 | py | s = input().strip()
t, c, g = [0, 0, 0]
for ch in s:
if ch == 'T':
t += 1
elif ch == 'C':
c += 1
else:
g += 1
result = t ** 2 + c ** 2 + g ** 2
result += min([t, c, g]) * 7
print(result)
| [
"shakib609@gmail.com"
] | shakib609@gmail.com |
52afe556959590049b64feb71a30c5fce7fedaf1 | 48e124e97cc776feb0ad6d17b9ef1dfa24e2e474 | /sdk/python/pulumi_azure_native/containerregistry/v20190501/get_webhook.py | 7948e368ab3b2de549dbfecb516f227ee8cca61a | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | bpkgoud/pulumi-azure-native | 0817502630062efbc35134410c4a784b61a4736d | a3215fe1b87fba69294f248017b1591767c2b96c | refs/heads/master | 2023-08-29T22:39:49.984212 | 2021-11-15T12:43:41 | 2021-11-15T12:43:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,711 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__... | [
"noreply@github.com"
] | bpkgoud.noreply@github.com |
df9dd24400578916c3d14c13ccc9926eddfabb48 | 38eb57300418e6f10433630437388f779ce50e09 | /cookie_and_session/app02_session/views.py | 25a4bbc4abf9387fc8de2e70f90c22b5c03e8db7 | [] | no_license | SelfShadows/Django-Flask | f37839f763133f0d62bffad3128171c426a1c038 | 13e32d1c8aac1532b43323e1891c423fe78f2813 | refs/heads/master | 2021-01-04T12:31:18.018508 | 2020-02-14T16:29:27 | 2020-02-14T16:29:27 | 240,550,991 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,688 | py | from django.shortcuts import render ,redirect
from functools import wraps
from django import views
# Django提供的工具,把函数装饰器转变为方法装饰器
from django.utils.decorators import method_decorator
from app02_session import models
def check_login(func):
@wraps(func) # 装饰器修复技术
def inner(request, *args, **kwargs):
# 获取s... | [
"870670791@qq.com"
] | 870670791@qq.com |
9d2cd1f61430081aa4a65d8e29b28e23f51b088f | 85f6de6e3ef680cd717312233fd03c636c606550 | /src/two/rolling_a_dice.py | faf4234c08ca6aa9dc9b3cb20192a6fdd631a5dc | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | Guillermogsjc/dissecting-reinforcement-learning | f8956455ffda22445ecc11fc6938da40ed4948e2 | 8a2751efa6d4a733df81c272c503b8061c70c04f | refs/heads/master | 2021-01-11T20:41:02.216522 | 2017-01-15T11:32:27 | 2017-01-15T11:32:27 | 79,168,192 | 1 | 0 | null | 2017-01-16T23:14:54 | 2017-01-16T23:14:53 | null | UTF-8 | Python | false | false | 611 | py | import numpy as np
#Trowing a dice for N times and evaluating the expectation
dice = np.random.randint(low=1, high=7, size=3)
print("Expectation (3 times): " + str(np.mean(dice)))
dice = np.random.randint(low=1, high=7, size=10)
print("Expectation (10 times): " + str(np.mean(dice)))
dice = np.random.randint(low=1, hig... | [
"massimiliano.patacchiola@gmail.com"
] | massimiliano.patacchiola@gmail.com |
fac85c5c169eaf142355c0655ac86fcd5f74fc09 | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/surrounded_20200617223518.py | 233debe26db46593e2dfe08e99e70eb47ac5cf87 | [] | 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,136 | py | def surronded(board):
# dfs
# untouched
# in progress
# finished
rows = len(board)
if rows == 0:
return
cols = len(board[0])
if cols == 0:
return
state = [[0]* cols for _ in range(rows)]
def canReachOutside(x,y,pending):
pending.append(x,y)
... | [
"mary.jereh@gmail.com"
] | mary.jereh@gmail.com |
d662e3cccc6393bf07124edfdf202bfc54925ebe | 7cf29923d278c5b934a40de216ac606c25c8a5eb | /wheelcms_axle/translate.py | 4f0f0c74ba26a7823c2018014ad16b58ddbffc3f | [
"BSD-2-Clause"
] | permissive | wheelcms/wheelcms_axle | 1df024f75d17544a575953359e3cc9a4ab56d93c | b5916b555f37b7baafdf08fd56b5b985688df9d0 | refs/heads/master | 2020-04-05T22:43:04.176353 | 2015-04-05T10:53:42 | 2015-04-05T10:53:42 | 7,800,085 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,095 | py | from django.conf import settings
any_lang = ('any', 'Any')
def languages():
languages = tuple(settings.CONTENT_LANGUAGES)
if any_lang not in languages:
languages = languages + (any_lang, )
return languages
def fallback_languages(language):
""" given a language, provide a list of alternative... | [
"github@in.m3r.nl"
] | github@in.m3r.nl |
fb48fd9656915149d8133355706be99ed2db0469 | a31de016611f3b4efc7a576e7113cad1a738419b | /_string_monster2.py | ba71783722b858478094721a871a759c7c6dd5c1 | [] | no_license | Ing-Josef-Klotzner/python | 9d4044d632672fff966b28ab80e1ef77763c78f5 | 3913729d7d6e1b7ac72b46db7b06ca0c58c8a608 | refs/heads/master | 2022-12-09T01:40:52.275592 | 2022-12-01T22:46:43 | 2022-12-01T22:46:43 | 189,040,355 | 0 | 0 | null | 2022-12-01T19:52:37 | 2019-05-28T14:05:16 | Python | UTF-8 | Python | false | false | 1,363 | py | #!/usr/bin/python3
from sys import stdin
def match (ssof, ss):
if ss == "": return True
#print (ssof, ss, end = " ")
for st in ssof:
if ss.startswith (st):
return match (ssof - {st}, ss [len (st):])
return False
# this works with testcases, because strings are included
# in order i... | [
"noreply@github.com"
] | Ing-Josef-Klotzner.noreply@github.com |
1f3f8ad62b3bff4ac0821b0fc51593df8ce0d5ce | c61c9bedba1968bfaf571ac3996b696fc35890a6 | /Chapter12/has_match.py | 00b6ca1068d542e225e1be731b69d6152b593ec3 | [] | no_license | ArunRamachandran/ThinkPython-Solutions | 497b3dbdeba1c64924fe1d9aa24204a9ca552c5b | 1a0872efd169e5d39b25134960168e3f09ffdc99 | refs/heads/master | 2020-04-01T10:23:20.255132 | 2014-11-07T17:04:52 | 2014-11-07T17:04:52 | 25,806,318 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 463 | py | # has_match takes two sequences, t1 and t2, and returns True, if there is
# an index i such that t1[i] == t2[i]
def has_match(t1,t2):
for x,y in zip(t1,t2):
if x == y:
return True
else:
return False
t1 = "banana"
t2 = "sequence"
print "Given sequences are : "
print t1
print t2
case = has_match(t1,t2)
if ... | [
"arunkramachandran92@gmail.com"
] | arunkramachandran92@gmail.com |
8f18a7a3cb0b452be92e2c21ca740144639a7e69 | 7e4a1838dbcbe0526f20b4b49f88a3f213dbc712 | /npcaller/fasta.py | 7d1d78befe1990ff329540e7f2e2e5f87acb256e | [
"MIT"
] | permissive | grst/nanopore_pkg | c5c8ee940ddd9218c08846ba5e5884c697914ca6 | e13ccfae0be79f23ae3270b09744726504b0e58f | refs/heads/master | 2023-04-02T14:38:52.410352 | 2020-11-06T19:34:37 | 2020-11-06T19:34:37 | 48,172,418 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,569 | py | """
Since skbio and Biopython are overkill and slightly to complicated most of the time
I came up with this really simple fasta-io class.
"""
from itertools import groupby
class FastaReader(object):
def __init__(self, file):
if not hasattr(file, 'read'):
self.file = open(file, 'r')
els... | [
"mail@gregor-sturm.de"
] | mail@gregor-sturm.de |
fc77466e30f68146a40c8d3ba3b858f15859ddb5 | 19ddab74600f71700a6b693281d0180d5271f295 | /程序员面试金典/03_03_堆盘子.py | 2f96f3b2e8fb699bf5461a949729ba6f932d252c | [] | no_license | zhulf0804/Coding.Python | 4d55a430da1a8077c81feba65c13ac654aaf094a | 46ab03e23d15ebd5434ef4dd5ae99130000b00a5 | refs/heads/master | 2022-09-14T18:40:59.880941 | 2022-08-20T08:25:51 | 2022-08-20T08:25:51 | 213,113,482 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,000 | py | class StackOfPlates:
def __init__(self, cap: int):
self.stack = []
self.cap = cap
def push(self, val: int) -> None:
if self.cap == 0:
return
if len(self.stack) == 0 or len(self.stack[-1]) == self.cap:
self.stack.append([])
self.stack[-1].append(v... | [
"zhulf0804@gmail.com"
] | zhulf0804@gmail.com |
c4fd6afe113c170e2b3985c756cac05390668ae8 | e04dbc32247accf073e3089ed4013427ad182c7c | /hhkb2020/C TLE.py | 61c4d78700c4375a274fc85a2aa4fa2d73278a89 | [] | no_license | twobooks/atcoder_training | 9deb237aed7d9de573c1134a858e96243fb73ca0 | aa81799ec87cc9c9d76de85c55e99ad5fa7676b5 | refs/heads/master | 2021-10-28T06:33:19.459975 | 2021-10-20T14:16:57 | 2021-10-20T14:16:57 | 233,233,854 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 260 | py | import numpy as np # np.lcm(),np.gcd()
N = int(input())
arrP = np.array(input().split(),dtype=np.int64)
arrAll = np.arange(200000+1,dtype=np.int64)
mask = np.ones(200000+1,dtype=np.int64) == 1
for p in arrP:
mask[p] = False
print(arrAll[mask][0]) | [
"twobookscom@gmail.com"
] | twobookscom@gmail.com |
27b8f49cb7a0e85b1fe35959e45a5d9c84dcb57b | dfb53581b4e6dbdc8e3789ea2678de1e1c4b5962 | /Django/mydjango01/news/views.py | 21a263f4be374c6a40d7fe19b8fd65329d2cf18d | [] | no_license | biabulinxi/Python-ML-DL | 7eff6d6898d72f00575045c5aa2acac45b4b0b82 | 217d594a3c0cba1e52550f74d100cc5023fb415b | refs/heads/master | 2020-06-01T09:13:17.314121 | 2019-06-08T03:59:36 | 2019-06-08T03:59:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 168 | py | from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
def index(request):
return HttpResponse("这是news的首页")
| [
"biabu1208@163.com"
] | biabu1208@163.com |
99b1f62912fb80c7e719697e2f9075d4fd505216 | 15b12d69ac3123d1562986970ce01d7a47d171de | /typings/nltk/translate/__init__.pyi | 79712704c982cb5c2d56cec50d1fde99fb9fb8ad | [
"Apache-2.0"
] | permissive | simplymanas/python-learning | 9b67b5a7acfb3a7c2455a7d1fc66203a2b419c37 | 75bc99c0dce211fd1bce5f6ce1155e0f4c71d7d0 | refs/heads/master | 2021-07-11T06:40:24.803589 | 2021-06-20T12:06:02 | 2021-06-20T12:06:02 | 241,769,614 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 768 | pyi | """
This type stub file was generated by pyright.
"""
from nltk.translate.api import AlignedSent, Alignment, PhraseTable
from nltk.translate.ibm_model import IBMModel
from nltk.translate.ibm1 import IBMModel1
from nltk.translate.ibm2 import IBMModel2
from nltk.translate.ibm3 import IBMModel3
from nltk.translate.ibm4 i... | [
"manas.dash@tesco.com"
] | manas.dash@tesco.com |
ee75934b54a7c419ea4df630c94ae680bfee4f92 | ba0e07b34def26c37ee22b9dac1714867f001fa5 | /azure-mgmt-powerbiembedded/azure/mgmt/powerbiembedded/models/error_detail.py | 08890398d70c2163092510b29f7f60ffe5e56300 | [
"MIT"
] | permissive | CharaD7/azure-sdk-for-python | b11a08ac7d24a22a808a18203072b4c7bd264dfa | 9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c | refs/heads/master | 2023-05-12T12:34:26.172873 | 2016-10-26T21:35:20 | 2016-10-26T21:35:20 | 72,448,760 | 1 | 0 | MIT | 2023-05-04T17:15:01 | 2016-10-31T15:14:09 | Python | UTF-8 | Python | false | false | 1,024 | 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 |
33161c34e78739d53ded91e468cf82f429dfef1d | b170d37a81c09fd0dbb0edf3cff6296084b32af9 | /cexbot/command_utils.py | 7d0382b5e4f8d343853e41df961287aa984532fe | [
"MIT"
] | permissive | metaperl/cexbot | 8e17a7d5063a82675e002d926324e3c4a6eb6745 | 0dd0b60415afd9c1feb959186d32b1a683887975 | refs/heads/master | 2020-12-29T01:11:50.768031 | 2013-12-10T17:13:18 | 2013-12-10T17:13:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,754 | py | #!/usr/bin/env python
""" cexbot - command_utils.py
Default command line utitlities to run cexbot
"""
import os, sys, logging
import cexbot, config, parser, db, cexapi, updater, timer, cex
def main(argv=[]):
args = parser.get_parser()
verbose = 1
if args.verbose:
verbose = 2
if args.debug:
verbose ... | [
"nikcub@gmail.com"
] | nikcub@gmail.com |
20faeb3af99098aeae7f42e863b981e32e75deb0 | f8a053f287c66652adffd15624c85dcc0850d898 | /setup.py | 424d2c9837ce0ca5390c3445ddf06d2283a94b46 | [
"MIT"
] | permissive | heyongwei/zvt | cce9e9bac78c6acc5e73b517f80d1fa464342817 | 051106955a6a01707847ee56a447e2502a25ff46 | refs/heads/master | 2023-04-23T16:36:58.631045 | 2021-05-16T16:01:18 | 2021-05-16T16:01:18 | 363,716,402 | 0 | 0 | MIT | 2021-05-16T16:01:19 | 2021-05-02T17:59:26 | Python | UTF-8 | Python | false | false | 2,508 | py | #!/usr/bin/env python
# To use a consistent encoding
from codecs import open
from os import path
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
try:
# for pip >= 10
from pip._internal.req import parse_requirements
except ImportError:
# for pip <= 9.0.3
from pip.... | [
"5533061@qq.com"
] | 5533061@qq.com |
0a261a997e8b133dd2f20809de2b05a9df10aa1a | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03041/s690420831.py | d69751f59907935676518728b9785bda095c49de | [] | 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 | 290 | py | n, k = map(int, input().split())
s = str(input())
ans = ''
if s[k-1] == 'A':
ans = s[:k-1] + 'a' + s[k:]
print(ans)
exit()
elif s[k-1] == 'B':
ans = s[:k-1] + 'b' + s[k:]
print(ans)
exit()
elif s[k-1] == 'C':
ans = s[:k-1] + 'c' + s[k:]
print(ans)
exit() | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
feb5b5b9942b836a874b3a07264b9012e4b7df0b | 3f9bec3201cc255c5ad6023cc746488306224015 | /Chapter 13/Example_13-2.py | 08ddcf523baaba0c0e1dc8735da55bee0e9ae257 | [] | no_license | afettouhi/FluentPython-py37 | 64927a908c5804d8970ea3f4b667c109c5867a6a | a14a721d738b8908f9e8e78552d70fbb2d6dd74f | refs/heads/master | 2022-06-14T18:26:47.456090 | 2020-05-08T04:13:51 | 2020-05-08T04:13:51 | 259,222,101 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 199 | py | import decimal
ctx = decimal.getcontext()
ctx.prec = 40
one_third = decimal.Decimal('1') / decimal.Decimal('3')
one_third
one_third == +one_third
ctx.prec = 28
one_third == +one_third
+one_third
| [
"A.Fettouhi@gmail.com"
] | A.Fettouhi@gmail.com |
ea566c781d0e6f7ed3612211e0138868a141630c | 780af071416ece1e1f6ead426e95155c3de209e9 | /notebooks/rv/__init__.py | 5918d5994e584d77b4e31b849f510e080fa8203b | [] | no_license | o-smirnov/docker-notebook | b2afd38cf16a1db9d3049c4ce79f7bc61c6183fb | 9cdb1f3fbaaca8edb94d9706a1e62410942a2f1a | refs/heads/master | 2021-01-22T17:14:03.346539 | 2015-05-07T12:31:01 | 2015-05-07T12:31:01 | 35,032,895 | 0 | 0 | null | 2015-05-04T12:15:27 | 2015-05-04T12:15:27 | null | UTF-8 | Python | false | false | 7,750 | py | import os, time, math, astropy, pyfits, traceback, fnmatch
from pandas import DataFrame, Series
import IPython.display
from IPython.display import Image, HTML, display
from rv.FITSFile import FITSFile
from rv.ImageFile import ImageFile
import matplotlib.pyplot as plt
NOTEBOOK_DIR = os.environ.get('RVNB_NOTEBOOK_DIR'... | [
"osmirnov@gmail.com"
] | osmirnov@gmail.com |
99cbf86713b07499e57c02d95ba061f54909e2b4 | 0aa150f1bfe3fdbdeaaeeaef5754c3e90378e935 | /yearapp/migrations/0034_auto_20191008_0609.py | 75095d6fe84241d240057f54d63809fb82a11f8f | [] | no_license | arshpreetsingh12/yearbook | 6232eba52330b36a7404317985aea4482befd101 | dac303e3cc448985256b44baae6e9baa4c8d8292 | refs/heads/master | 2020-08-07T19:57:00.281613 | 2019-10-11T13:41:49 | 2019-10-11T13:41:49 | 213,571,523 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 767 | py | # Generated by Django 2.2.5 on 2019-10-08 06:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('yearapp', '0033_sale'),
]
operations = [
migrations.AlterField(
model_name='invitation',
name='address',
... | [
"director@avioxtechnologies.com"
] | director@avioxtechnologies.com |
ef94b32dec93fe156549f2e821e7e2798f65812c | 5b0aebb53c33124b87c8655a5923858d6a2a5bc7 | /bm_preproc.py | 266dc2e049dc3c7569d58d10d38f24412cdec468 | [] | no_license | corylstewart/DNA-Class | 440e8c0304ea568347d2dad77424ee77a74f9e01 | 5706b95181ef7dd73a6a9d97cc879a50663ca60a | refs/heads/master | 2021-01-10T13:18:07.538528 | 2016-03-29T18:50:26 | 2016-03-29T18:50:26 | 55,001,838 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,110 | py | """bm_preproc.py: Boyer-Moore preprocessing."""
__author__ = "Ben Langmead"
def z_array(s):
""" Use Z algorithm (Gusfield theorem 1.4.1) to preprocess s """
assert len(s) > 1
z = [len(s)] + [0] * (len(s)-1)
# Initial comparison of s[1:] with prefix
for i in range(1, len(s)):
if s[i] == ... | [
"corylstewart@gmail.com"
] | corylstewart@gmail.com |
3b33c6da73e70bcb25b56b4fd175de4ac366f2a8 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /9S8qp4XKG2qwQMdrb_2.py | 07908c297beae33944959e2c40e6e492d0f35bf6 | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 542 | py | """
Write a function that returns the number of ways a person can climb **n
stairs** , where the person may only climb **1** or **2** steps at a time.
To illustrate, if **n = 4** there are **5** ways to climb:
[1, 1, 1, 1]
[2, 1, 1]
[1, 2, 1]
[1, 1, 2]
[2, 2]
### Examples
ways_to_climb(1)... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
9fe4cb94c81a6b0a10f86ec898adfb99833b6625 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/verbs/_nicking.py | 8ade774452ec36eabf9b8b12da80103b68a5a982 | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 228 | py |
from xai.brain.wordbase.verbs._nick import _NICK
#calss header
class _NICKING(_NICK, ):
def __init__(self,):
_NICK.__init__(self)
self.name = "NICKING"
self.specie = 'verbs'
self.basic = "nick"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
44e5115d831d8f11ee4ec8b575906d3138700fbf | 348aeccddd5fdb48fb91a63d170b7f0453f70e36 | /libcloud/utils/files.py | 201e94a4e3a873553fc3a035aa2b8953785c0c0e | [
"Apache-2.0"
] | permissive | lelou6666/libcloud | 4eb08e236cb9f4b787fa73ce963347f708faf092 | bff26fe27fdd53979e32e08038ecd2fc108b6083 | refs/heads/trunk | 2021-01-14T14:02:16.661579 | 2013-10-28T11:18:08 | 2013-10-28T11:18:08 | 55,902,523 | 0 | 0 | null | 2016-04-10T14:08:20 | 2016-04-10T14:08:20 | null | UTF-8 | Python | false | false | 3,437 | 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 use ... | [
"tomaz@apache.org"
] | tomaz@apache.org |
cead28e09d8898e94fd635d1ede4ab5cabf171fe | 16b77438b7a7923a391a12f1f4bc12b49429bb73 | /src/PIPE/PIPE.py | afa369355271987d911ce5454c61b803916fa8aa | [] | no_license | OpenJ92/zebra | eb582c36fd7110ccf5866eb34418ff9e725efd5d | 2d3d3d42bb0461901f2418069a55e47cf8450c50 | refs/heads/master | 2020-11-29T14:29:37.279589 | 2020-01-18T19:54:07 | 2020-01-18T19:54:07 | 230,138,421 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,042 | py | from src.NODE.NODE import NODE
class PIPE(object):
def __init__(self, form):
self._name, self._kwargs = *form.keys(), *form.values()
self.__gen_nodes__();
self._transformed = self.__execute__({'Data1':1, 'Data2':1})
def __gen_nodes__(self):
self._nodes = [NODE(kw) for kw in se... | [
"jacob.vartuli.92@gmail.com"
] | jacob.vartuli.92@gmail.com |
19b365204ddcf74e34ab42a5f2b0d756622c9ad5 | ca55dcaa64ea9db4068e13091321cfebecc0ff41 | /codeUp/codeUpBasic/1990.py | bca5b69987f830843fdbdeecd27fbb8549319697 | [] | no_license | gomtinQQ/algorithm-python | 8fb8343594b945099ae2a4dfa794ecb47e54ab0b | 751562922b66e335f621d366bb73dacdc7125140 | refs/heads/master | 2022-12-07T23:05:44.535593 | 2020-08-21T12:29:58 | 2020-08-21T12:29:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 239 | py | '''
1990 : 3의 배수 판별하기
자연수 n이 입력되면 3의 배수인지 아닌지 판별하시오.
3의 배수이면 1을 출력하고, 아니면 0을 출력한다.
'''
n = int(input())
if(n%3==0):
print(1)
else:
print(0) | [
"minhyeonlee1@gmail.com"
] | minhyeonlee1@gmail.com |
0f035ba1c524afe06432726820c34655340ac8c6 | 82fce9aae9e855a73f4e92d750e6a8df2ef877a5 | /Lab/venv/lib/python3.8/site-packages/OpenGL/raw/GL/ARB/texture_storage_multisample.py | fdcdbc160823f7a5f0c538918cf1a7c652b4e9a0 | [] | no_license | BartoszRudnik/GK | 1294f7708902e867dacd7da591b9f2e741bfe9e5 | 6dc09184a3af07143b9729e42a6f62f13da50128 | refs/heads/main | 2023-02-20T19:02:12.408974 | 2021-01-22T10:51:14 | 2021-01-22T10:51:14 | 307,847,589 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 879 | py | '''Autogenerated by xml_generate script, do not edit!'''
from OpenGL import platform as _p
# End users want this...
from OpenGL.raw.GL import _errors
# Code generation uses this
from OpenGL.raw.GL import _types as _cs
_EXTENSION_NAME = 'GL_ARB_texture_storage_multisample'
def _f(function):
return _p.createFuncti... | [
"rudnik49@gmail.com"
] | rudnik49@gmail.com |
8a6874d0099dce3f2d73698422596393937926c4 | 1422a57e98aba02321b772d72f8f0ada6d8b8cba | /mm/models/shared/augmentation.py | 91ccf3fae4c30c7c4b6af2cc19bd690100302532 | [
"MIT"
] | permissive | JonasRSV/Friday | e1908a411aa133bc5bd2f383b0a995f7e028092d | f959eff95ba7b11525f97099c8f5ea0e325face7 | refs/heads/main | 2023-05-15T03:33:21.542621 | 2021-06-12T10:34:50 | 2021-06-12T10:34:50 | 315,309,991 | 7 | 2 | null | null | null | null | UTF-8 | Python | false | false | 604 | py | from typing import List
import tensorflow as tf
import numpy as np
import models.shared.augmentations as a
import random
def create_audio_augmentations(aug: List[a.Augmentation], p: np.ndarray):
if len(aug) != len(p):
raise ValueError(f"Length of augmentations must match distribution {len(aug)} != {len(p)}... | [
"jonas@valfridsson.net"
] | jonas@valfridsson.net |
d613832fb1e4fbf8daf1f43cb77c47396088f146 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_181/ch4_2020_03_05_16_07_05_989464.py | dff125cf8d4a74499e2b22478368603f7e78b838 | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 142 | py | def classifica_idade(i):
if i<12:
return 'crianca'
if 18>i>12:
return 'adolescente'
else:
return 'adulto'
| [
"you@example.com"
] | you@example.com |
83b9b89602f94805f1ff6283f7237c42100ead2a | f5a7de717f41f8379ccdee7d06de838fdf1d0a0b | /soloperformance-api/apps/catalog/management/commands/exercises.py | b73d1df31fb2d914106dd6d80bd4253425dbe55c | [] | no_license | jimmy818/mexico-angular | 977e4d1d0cab2ff8c10c9892d9c72ca2f4f9ac49 | 005ed3729b807d77a8fd97a3b5469a42ceefdaad | refs/heads/main | 2023-08-10T21:37:53.614298 | 2021-05-11T19:04:29 | 2021-05-11T19:04:29 | 366,485,541 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,560 | py |
from django.core.management.base import BaseCommand, CommandError
from django.http import HttpRequest
import requests
import xlrd
from apps.catalog import utils
class Command(BaseCommand):
help = 'Add exercises'
def handle(self, ... | [
"45069768+itsrocketfuel@users.noreply.github.com"
] | 45069768+itsrocketfuel@users.noreply.github.com |
84555327ae07d2945fac7b3d7ca618e1946fb291 | e56214188faae8ebfb36a463e34fc8324935b3c2 | /intersight/models/workflow_default_value_ref.py | 18613e62146e7f7c285e489454fb63c30fab824b | [
"Apache-2.0"
] | permissive | CiscoUcs/intersight-python | 866d6c63e0cb8c33440771efd93541d679bb1ecc | a92fccb1c8df4332ba1f05a0e784efbb4f2efdc4 | refs/heads/master | 2021-11-07T12:54:41.888973 | 2021-10-25T16:15:50 | 2021-10-25T16:15:50 | 115,440,875 | 25 | 18 | Apache-2.0 | 2020-03-02T16:19:49 | 2017-12-26T17:14:03 | Python | UTF-8 | Python | false | false | 5,734 | py | # coding: utf-8
"""
Cisco Intersight OpenAPI specification.
The Cisco Intersight OpenAPI specification.
OpenAPI spec version: 1.0.9-1461
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class WorkflowDefaultVa... | [
"ucs-build@github.com"
] | ucs-build@github.com |
1727d04b8a7d1014b6e1d7a1ae539f023ea9f601 | 1713334f9b68255f9adab70175c21f399d0460f3 | /python/125_Valid_Palindrome.py | 4d198f026b9d9fad4550fee87f5e98972fb8c355 | [
"MIT"
] | permissive | coy0725/leetcode | 0a798b7adafe80f726e51c06c34835c4aa51b563 | 743a0bfa22402ec39858dc9c4c7dc531f825b953 | refs/heads/master | 2020-05-21T18:25:09.683714 | 2019-05-11T13:00:40 | 2019-05-11T13:00:40 | 186,132,894 | 2 | 0 | MIT | 2019-05-11T12:55:22 | 2019-05-11T12:55:21 | null | UTF-8 | Python | false | false | 395 | py | class Solution(object):
def isPalindrome(self, s):
"""
:type s: str
:rtype: bool
"""
alnum_s = [t.lower() for t in s if t.isalnum()]
ls = len(alnum_s)
if ls <= 1:
return True
mid = ls / 2
for i in range(mid):
if alnum_s[... | [
"qiyuangong@gmail.com"
] | qiyuangong@gmail.com |
d9e06504505b6a186387d2ff84264d0ecf0308fb | 83d657c787529f01a8ecc8a874421738a7eecec7 | /Paths/Harmonise Curve to Line.py | 753600a50daceb8ddc9121810ba918269ff339b9 | [
"Apache-2.0"
] | permissive | BurgAndOeden/Glyphs-Scripts | e31b5164b491dfe0cd2d57f6cf1422c4aadda104 | f0195d6b8f0a6c055e4e44d5ef41ba48bdd1e3a6 | refs/heads/master | 2020-09-16T08:01:06.345898 | 2019-11-24T00:15:44 | 2019-11-24T00:15:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,124 | py | #MenuTitle: Harmonise Curve to Line
# -*- coding: utf-8 -*-
__doc__="""
Maximises opposing handles and reduces adjacent handles of line segments.
"""
from Foundation import NSPoint
def intersectionWithNSPoints( pointA, pointB, pointC, pointD ):
"""
Returns an NSPoint of the intersection AB with CD.
Or False if the... | [
"res@glyphsapp.com"
] | res@glyphsapp.com |
998dbc4a900cf93aa3ee0d2e520aed575aca4de5 | 02ad25c4ac78a98b5493a2aa7f744a77f381aaae | /dashboard_app/migrations/0010_auto_20201211_0846.py | 2168834a1f6db118e06a45e41521adce387ce856 | [] | no_license | cavidanhasanli/Havayi | 1f85d0d7608c964b0ddc80e3b526b32cdb81e8bf | bd30c9e3e700c7381b5961b5051cbcb398adc449 | refs/heads/main | 2023-02-03T09:25:03.866784 | 2020-12-22T18:09:07 | 2020-12-22T18:09:07 | 316,319,183 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 911 | py | # Generated by Django 3.1.3 on 2020-12-11 08:46
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('dashboard_app', '0009_auto_20201211_0839'),
]
operations = [
migrations.Delet... | [
"cavidan.hasanli@mail.ru"
] | cavidan.hasanli@mail.ru |
d4e96ddfa8c091f87bd220375da45cf8ce6295f4 | 679ce4b323f79b2425976201324c6c1f88b95199 | /Python/Stanley Cup/csv_parser.py | 53294c7db661e390948575da2be855cee905e598 | [] | no_license | abriggs914/Coding_Practice | ff690fb5f145a11f4da144f3882b37f473b10450 | 3afd7c59e0d90f0ef5f6203853e69f853312019b | refs/heads/master | 2023-08-31T04:04:58.048554 | 2023-08-29T13:23:29 | 2023-08-29T13:23:29 | 161,865,421 | 0 | 1 | null | 2022-10-27T08:35:29 | 2018-12-15T03:20:14 | Python | UTF-8 | Python | false | false | 7,689 | py | import csv
from utility import *
file_name = "past winners.csv"
# skip 2005 back fill
with open(file_name) as csv_file:
lines = csv.DictReader(csv_file)
data_by_year = {}
header = lines.fieldnames
print("header", header)
last = None
for i, line in enumerate(lines):
if last is not None:
if any([val is None ... | [
"abriggs1@unb.ca"
] | abriggs1@unb.ca |
4eb48a87e664b4cabd5416d2d6729ed9a88b43a1 | 49cd9ba075ed2ab6b267f6e012bfb03267b7bc08 | /project_42_formsModelpagination/app42/forms.py | 99db23b3c75ea231d95bd12b4e9224ed18e651db | [] | no_license | Satputev/DjangoApps | 4d47a76f20815b2b1313e8b3e3c61b5406f5da60 | c6fb5e9fa131f07d1f5920e98699f9daaa49d424 | refs/heads/master | 2023-02-14T00:42:36.037749 | 2020-12-24T07:39:54 | 2020-12-24T07:39:54 | 323,857,826 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 527 | py | from django import forms
from app42.models import ProductsModel
from django.forms import ValidationError
class ProductForm(forms.ModelForm):
class Meta:
model=ProductsModel
fields='__all__'
exclude=('pid',)
labels={'pname':'Product Name','pprice':'Product Price','pimg':'Product Imag... | [
"satputevishal8@gmail.com"
] | satputevishal8@gmail.com |
694b8b138f3b4862d4b35953cdb3675a91e2a179 | fd25231975acd147e04dc3ed3627c92cb1a4f86c | /FlaskAPI/vir_env/lib/python3.7/site-packages/scipy/spatial/tests/test_distance.py | c0b831a2879fa2a21e753350d7b7edefe48591cf | [] | no_license | sumitkutty/Flight-Price-Prediction | 832a2802a3367e655b46d3b44f073d917abd2320 | d974a8b75fbcbfa42f11703602af3e45a3f08b3c | refs/heads/master | 2022-12-25T07:13:06.375888 | 2020-10-08T18:46:44 | 2020-10-08T18:46:44 | 302,366,725 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 130 | py | version https://git-lfs.github.com/spec/v1
oid sha256:a99a0a8e8696f85040b18a7b95996060265dec4c0607ab9bc90551e2f2dc9bd2
size 81424
| [
"sumitkutty37@gmail.com"
] | sumitkutty37@gmail.com |
035f453b189a37c9677088804e6c18447aabdbbe | 75dcb56e318688499bdab789262839e7f58bd4f6 | /_algorithms_challenges/leetcode/LeetCode/733 Flood Fill.py | 4350e4e56af74a61b1f948707760e1b580de0573 | [] | no_license | syurskyi/Algorithms_and_Data_Structure | 9a1f358577e51e89c862d0f93f373b7f20ddd261 | 929dde1723fb2f54870c8a9badc80fc23e8400d3 | refs/heads/master | 2023-02-22T17:55:55.453535 | 2022-12-23T03:15:00 | 2022-12-23T03:15:00 | 226,243,987 | 4 | 1 | null | 2023-02-07T21:01:45 | 2019-12-06T04:14:10 | Jupyter Notebook | UTF-8 | Python | false | false | 2,124 | py | #!/usr/bin/python3
"""
An image is represented by a 2-D array of integers, each integer representing
the pixel value of the image (from 0 to 65535).
Given a coordinate (sr, sc) representing the starting pixel (row and column) of
the flood fill, and a pixel value newColor, "flood fill" the image.
To perform a "flood f... | [
"sergejyurskyj@yahoo.com"
] | sergejyurskyj@yahoo.com |
7d375196ec6a89c43b9391ff60129464324ce322 | f4fdb0c1213bbb403b87c2dbbde390918ac08861 | /convert_uk_decl_num3.py | accb16c1dd9181350a97f4be6023784d4fd9b64a | [] | no_license | benwing2/RuNounChanges | 0d5076e576237f10b50049ed52b91f96c95cca95 | 048dfed5abe09b8d5629c5772292027ce0a170f2 | refs/heads/master | 2023-09-03T22:48:06.972127 | 2023-09-03T06:27:56 | 2023-09-03T06:27:56 | 41,480,942 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,246 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import pywikibot, re, sys, argparse
import blib
from blib import getparam, rmparam, tname, pname, msg, errandmsg, site
def process_text_on_page(index, pagetitle, text):
global args
def pagemsg(txt):
msg("Page %s %s: %s" % (index, pagetitle, txt))
notes = []
... | [
"ben@benwing.com"
] | ben@benwing.com |
fbfa4af6739e251fef1d94b0ce852a6cb2c6cca3 | c1b8ff60ed4d8c70e703f71b7c96a649a75c0cec | /ostPython4/context_mgr.py | 5d67ab14436a6f258a36aef585b8624eba812c9d | [] | no_license | deepbsd/OST_Python | 836d4fae3d98661a60334f66af5ba3255a0cda5c | b32f83aa1b705a5ad384b73c618f04f7d2622753 | refs/heads/master | 2023-02-14T17:17:28.186060 | 2023-01-31T02:09:05 | 2023-01-31T02:09:05 | 49,534,454 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,284 | py | #!/usr/bin/env python3
#
#
# context_mgr.py
#
# Lesson 14: Context Managers
#
# by David S. Jackson
# 8/17/15
#
# OST Python4: Advanced Python
# for Pat Barton, Instructor
#
"""
Project:
Write a context manager class that suppresses any ValueError
exceptions that occur in the cont... | [
"deepbsd@yahoo.com"
] | deepbsd@yahoo.com |
49de7e6ce41f348e586e2eefc9b9a5e0127f92ad | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03574/s538402697.py | a100b6d62d5fdc1b9953e127ac04d0761a0d8b81 | [] | 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 | 464 | py | h,w=map(int,input().split())
s=["."*(w+2)]
for i in range(h):
s.append("."+input()+".")
s.append("."*(w+2))
dx=[-1,0,1,1,1,0,-1,-1]
dy=[1,1,1,0,-1,-1,-1,0]
ans=[]
for i in range(1,h+1):
wp=""
for j in range(1,w+1):
if s[i][j]=="#":
wp+="#"
continue
count=0
for... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
6099e986b2054b690030adc9e7e17a767ae0e2b4 | c6fa248ec5a7e3c67afac98e365cac850c511473 | /generative_adversarial_networks/code/chapter_08/04_train_discriminator.py | c79e832de127b1bae5f94a1889e27d01ecef99ac | [] | no_license | shenjnigxing/deep-learning-material | 44830e07cc2a5bd47b07ca903c1f2b65beef22bb | 24dfee3b9fe1a40303cb2dfe256028d35113babf | refs/heads/master | 2022-12-23T10:08:05.881432 | 2020-09-16T02:24:38 | 2020-09-16T02:24:38 | 295,900,907 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,988 | py | # example of training the discriminator model on real and random cifar10 images
from numpy import ones
from numpy import zeros
from numpy.random import rand
from numpy.random import randint
from keras.datasets.cifar10 import load_data
from keras.optimizers import Adam
from keras.models import Sequential
from keras.laye... | [
"Shenjx161212@gmail.com"
] | Shenjx161212@gmail.com |
4cd79181130987db75faf7e250e83b9863e339bb | 5d6dd782e0b29817b3c27d5d6984909152813444 | /dbbase/urls.py | 3d183271c6790a11b27359533230ad4817dbcaab | [] | no_license | smartslee/hospacc | 387d8a7e42e068080738e365045a23d6d8a1f222 | 5bd42a9e729f3c90ff4b87185167f64fe79aac01 | refs/heads/master | 2020-04-01T12:59:50.743213 | 2019-10-07T08:13:41 | 2019-10-07T08:13:41 | 153,232,513 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,111 | py | from django.urls import path
from . import views
from .views import (HdbUpdateView,IndexView, SearchFormView,HdbCreateView,HdbDeleteView, HdbprintView)
urlpatterns = [
path('list/', views.index, name ='list'),
# url(r'^dbedit/', views.hospdb_list, name ='edit'),
path('input/', views.inputdb, name ='inp... | [
"you@example.com"
] | you@example.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.