Skip to content

Instantly share code, notes, and snippets.

View iapyeh's full-sized avatar

Hsin Yuan Yeh iapyeh

  • IIS Academia Sinica
  • Taipei Taiwan
View GitHub Profile
@hisoka0917
hisoka0917 / DynamicKeys.swift
Last active September 23, 2021 07:33
Make Dictionary<String, Any> Codable
/**
```
// Encode a model with properties of type [String : Any]
var propertiesContainer = container.nestedContainer(keyedBy: DynamicKey.self, forKey: .properties)
if let properties = properties {
try propertiesContainer.encodeDynamicKeyValues(withDictionary: properties)
}
```
inspired by https://gist.github.com/samwize/a82f29a1fb34091cd61fc06934568f82
*/
@windows98SE
windows98SE / api.py.patch
Created May 23, 2015 15:18
[fix] LINE API function login ( api.py ) / new examples
@@ -55,7 +55,21 @@
After login, make `client` and `client_in` instance
to communicate with LINE server
"""
- raise Exception("Code is removed because of the request of LINE corporation")
+
+ self.transport = THttpClient.THttpClient(self.LINE_HTTP_URL)
+ self.transport_in = THttpClient.THttpClient(self.LINE_HTTP_IN_URL)
+
+ self.transport.setCustomHeaders(self._headers)